Function at 0x1003a870
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x101042d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x108], ecx
push ebx
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x118], ebx
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x104], esi
push edi
mov edi, dword [ebp + 0xc]
test ecx, ecx
jne 0x1003a9a1
test edi, edi
je 0x1003a9a1
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, dword [0x101042e0]
mov esi, eax
call fcn.100290c0
mov edi, dword [0x101042e4]
mov dword [ebp - 0x114], eax
cmp edi, 0xffffffff
je 0x1003a905
mov ecx, edi
call fcn.100290c0
mov edi, eax
test edi, edi
je 0x1003a8ff
cmp edi, 0xffffffff
je 0x1003af6c
imul ebx, dword [ebp - 0x114], 0x364
jmp 0x1003af0b
mov edi, dword [0x101042e4]
push 0x1000a590
push 0x1000a588
mov edx, 0x1000a554
mov ecx, 0x21
call fcn.100293a0
add esp, 8
mov ebx, eax
push 0xffffffffffffffff
push edi
test ebx, ebx
je 0x1003a936
mov ecx, ebx
call dword [0x10106270]
call ebx
jmp 0x1003a93c
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
test eax, eax
je 0x1003af6c
push 0x364
push 2
call sym.ucrtbase.dll__calloc_base
mov ecx, dword [0x101042e4]
mov edi, eax
add esp, 8
test edi, edi
je 0x1003af5b
mov edx, edi
call fcn.1003b000
test eax, eax
jne 0x1003a981
mov ecx, dword [0x101042e4]
xor edx, edx
call fcn.1003b000
push edi
jmp 0x1003af64
mov ecx, edi
call fcn.1003e545
push 0
call sym.ucrtbase.dll__free_base
add esp, 4
imul ebx, dword [ebp - 0x114], 0x364
jmp 0x1003af0b
test esi, esi
je 0x1003af1b
test ebx, ebx
je 0x1003af1b
mov dword [ebp - 0x120], 0
cmp edi, 2
jb 0x1003af83
dec edi
imul edi, esi
add edi, ecx
mov dword [ebp - 0xfc], edi
mov eax, edi
xor edx, edx
sub eax, ecx
div esi
inc eax
cmp eax, 8
ja 0x1003ab15
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, dword [0x101042e0]
mov esi, eax
call fcn.100290c0
push esi
mov edi, eax
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
cmp edi, 1
jne 0x1003aa11
mov byte [ebp - 0x109], 1
call fcn.10029460
jmp 0x1003aa18
mov byte [ebp - 0x109], 0
mov eax, dword [ebp - 0xfc]
mov ecx, dword [ebp - 0x108]
cmp eax, ecx
jbe 0x1003aad6
mov edi, dword [ebp - 0x104]
lea edx, [edi + ecx]
mov dword [ebp - 0x11c], edx
jmp 0x1003aa40
mov esi, edx
mov dword [ebp - 0x100], ecx
cmp esi, eax
ja 0x1003aa7f
lea esp, [esp]
push ecx
push esi
mov ecx, ebx
call dword [0x10106270]
call ebx
add esp, 8
test eax, eax
jle 0x1003aa6d
mov ecx, esi
mov dword [ebp - 0x100], ecx
jmp 0x1003aa73
mov ecx, dword [ebp - 0x100]
mov eax, dword [ebp - 0xfc]
add esi, edi
cmp esi, eax
jbe 0x1003aa50
mov edx, eax
cmp ecx, eax
je 0x1003aaba
sub ecx, eax
mov ebx, edi
mov dword [ebp - 0x100], ecx
nop
mov esi, dword [ebp - 0x100]
lea edx, [edx + 1]
mov cl, byte [edx + ecx - 1]
mov al, byte [edx - 1]
mov byte [edx + esi - 1], al
mov byte [edx - 1], cl
mov ecx, esi
sub ebx, 1
jne 0x1003aa90
mov ebx, dword [ebp - 0x118]
mov eax, dword [ebp - 0xfc]
mov ecx, dword [ebp - 0x108]
sub eax, edi
mov edx, dword [ebp - 0x11c]
mov dword [ebp - 0xfc], eax
cmp eax, ecx
ja 0x1003aa40
cmp byte [ebp - 0x109], 0
je 0x1003aae4
call fcn.10029570
mov eax, dword [ebp - 0x120]
sub eax, 1
mov dword [ebp - 0x120], eax
js 0x1003af83
mov ecx, dword [ebp + eax*4 - 0x80]
mov edi, dword [ebp + eax*4 - 0xf8]
mov esi, dword [ebp - 0x104]
mov dword [ebp - 0x108], ecx
jmp 0x1003a9ca
shr eax, 1
imul eax, esi
mov dword [ebp - 0x100], eax
lea edi, [eax + ecx]
push edi
push ecx
mov ecx, ebx
mov dword [ebp - 0x110], edi
call dword [0x10106270]
call ebx
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x108]
jle 0x1003ab8a
mov dword [ebp - 0x114], esi
mov dword [ebp - 0x11c], edi
cmp eax, edi
je 0x1003ab8a
mov ebx, dword [ebp - 0x114]
mov esi, edi
mov edi, dword [ebp - 0x100]
mov al, byte [esi]
mov edx, esi
sub edx, edi
mov cl, byte [edx]
mov byte [edx], al
mov byte [esi], cl
inc esi
sub ebx, 1
jne 0x1003ab60
mov edi, dword [ebp - 0x110]
mov ebx, dword [ebp - 0x118]
mov esi, dword [ebp - 0x104]
mov eax, dword [ebp - 0x108]
push dword [ebp - 0xfc]
mov ecx, ebx
push eax
call dword [0x10106270]
call ebx
mov edx, dword [ebp - 0xfc]
add esp, 8
test eax, eax
jle 0x1003abf1
mov eax, dword [ebp - 0x108]
mov dword [ebp - 0x110], esi
mov esi, edx
cmp eax, edx
je 0x1003abf1
mov ebx, dword [ebp - 0x110]
sub eax, edx
mov dword [ebp - 0x11c], eax
mov edx, eax
lea ebx, [ebx]
mov al, byte [esi]
lea esi, [esi + 1]
mov cl, byte [esi + edx - 1]
mov byte [esi + edx - 1], al
mov byte [esi - 1], cl
sub ebx, 1
jne 0x1003abd0
mov ebx, dword [ebp - 0x118]
mov edx, dword [ebp - 0xfc]
push edx
push edi
mov ecx, ebx
call dword [0x10106270]
call ebx
mov edx, dword [ebp - 0xfc]
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x104]
jle 0x1003ac45
mov ebx, eax
mov esi, edx
cmp edi, edx
je 0x1003ac45
mov eax, edi
sub eax, edx
mov dword [ebp - 0x110], eax
mov edx, eax
mov al, byte [esi]
lea esi, [esi + 1]
mov cl, byte [esi + edx - 1]
mov byte [esi + edx - 1], al
mov byte [esi - 1], cl
sub ebx, 1
jne 0x1003ac24
mov eax, dword [ebp - 0x104]
mov edx, dword [ebp - 0xfc]
mov esi, dword [ebp - 0x108]
mov ebx, edx
mov dword [ebp - 0x100], edx
cmp edi, esi
jbe 0x1003ac95
jmp 0x1003ac60
add esi, eax
mov dword [ebp - 0x114], esi
cmp esi, edi
jae 0x1003ac8f
mov ecx, dword [ebp - 0x118]
push edi
push esi
call dword [0x10106270]
call dword [ebp - 0x118]
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x104]
jle 0x1003ac60
jmp 0x1003acd1
mov edx, dword [ebp - 0xfc]
mov ebx, dword [ebp - 0x118]
jmp 0x1003aca0
add esi, eax
cmp esi, edx
ja 0x1003acc5
push edi
push esi
mov ecx, ebx
call dword [0x10106270]
call ebx
mov edx, dword [ebp - 0xfc]
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x104]
jle 0x1003aca0
mov ebx, dword [ebp - 0x100]
mov dword [ebp - 0x114], esi
mov esi, dword [ebp - 0x118]
jmp 0x1003ace0
mov eax, dword [ebp - 0x104]
mov ecx, ebx
sub ebx, eax
mov dword [ebp - 0x100], ecx
cmp ebx, edi
jbe 0x1003ad13
push edi
push ebx
mov ecx, esi
call dword [0x10106270]
call esi
add esp, 8
test eax, eax
jg 0x1003ace0
mov eax, dword [ebp - 0x104]
mov ecx, dword [ebp - 0x100]
mov esi, dword [ebp - 0x114]
mov dword [ebp - 0x100], ebx
cmp ebx, esi
jb 0x1003ad6d
mov dword [ebp - 0x11c], eax
mov edx, ebx
je 0x1003ad58
sub esi, ebx
mov ebx, eax
mov al, byte [edx]
lea edx, [edx + 1]
mov cl, byte [edx + esi - 1]
mov byte [edx + esi - 1], al
mov byte [edx - 1], cl
sub ebx, 1
jne 0x1003ad31
mov esi, dword [ebp - 0x114]
mov ebx, dword [ebp - 0x100]
mov eax, dword [ebp - 0x104]
mov edx, dword [ebp - 0xfc]
cmp edi, ebx
jne 0x1003ac53
mov edi, esi
jmp 0x1003ac53
cmp edi, ecx
jae 0x1003adad
mov ebx, dword [ebp - 0x118]
jmp 0x1003ad80
sub ecx, eax
mov dword [ebp - 0x100], ecx
cmp ecx, edi
jbe 0x1003adad
push edi
push ecx
mov ecx, ebx
call dword [0x10106270]
call ebx
mov ecx, dword [ebp - 0x100]
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x104]
je 0x1003ad80
jmp 0x1003adf1
mov ebx, dword [ebp - 0x118]
mov esi, dword [ebp - 0x108]
lea esp, [esp]
sub ecx, eax
mov dword [ebp - 0x100], ecx
cmp ecx, esi
jbe 0x1003adeb
push edi
push ecx
mov ecx, ebx
call dword [0x10106270]
call ebx
mov ecx, dword [ebp - 0x100]
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x104]
je 0x1003adc0
mov esi, dword [ebp - 0x114]
mov edi, dword [ebp - 0xfc]
mov ecx, edi
mov edx, dword [ebp - 0x100]
sub ecx, esi
mov eax, edx
sub eax, dword [ebp - 0x108]
cmp eax, ecx
jl 0x1003ae4a
mov eax, dword [ebp - 0x108]
cmp eax, edx
jae 0x1003ae2f
mov ecx, dword [ebp - 0x120]
mov dword [ebp + ecx*4 - 0x80], eax
mov dword [ebp + ecx*4 - 0xf8], edx
inc ecx
mov dword [ebp - 0x120], ecx
cmp esi, edi
jae 0x1003aae4
mov ecx, esi
mov esi, dword [ebp - 0x104]
mov dword [ebp - 0x108], ecx
jmp 0x1003a9d0
cmp esi, edi
jae 0x1003ae66
mov eax, dword [ebp - 0x120]
mov dword [ebp + eax*4 - 0x80], esi
mov dword [ebp + eax*4 - 0xf8], edi
inc eax
mov dword [ebp - 0x120], eax
mov ecx, dword [ebp - 0x108]
cmp ecx, edx
jae 0x1003aae4
mov esi, dword [ebp - 0x104]
mov edi, edx
jmp 0x1003a9ca
mov edi, dword [0x101042e4]
push 0x1000a590
push 0x1000a588
mov edx, 0x1000a554
mov ecx, 0x21
call fcn.100293a0
add esp, 8
mov ebx, eax
push 0xffffffffffffffff
push edi
test ebx, ebx
je 0x1003aeb8
mov ecx, ebx
call dword [0x10106270]
call ebx
jmp 0x1003aebe
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
test eax, eax
je 0x1003af6c
push 0x364
push 2
call sym.ucrtbase.dll__calloc_base
mov ecx, dword [0x101042e4]
mov edi, eax
add esp, 8
test edi, edi
je 0x1003af5b
mov edx, edi
call fcn.1003b000
test eax, eax
je 0x1003a96e
mov ecx, edi
call fcn.1003e545
push 0
call sym.ucrtbase.dll__free_base
add esp, 4
imul ebx, dword [ebp - 0x110], 0x364
push esi
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
add ebx, edi
je 0x1003af73
add ebx, 0x10
jmp 0x1003af78
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, dword [0x101042e0]
mov esi, eax
call fcn.100290c0
mov edi, dword [0x101042e4]
mov dword [ebp - 0x110], eax
cmp edi, 0xffffffff
je 0x1003ae87
mov ecx, edi
call fcn.100290c0
mov edi, eax
test edi, edi
je 0x1003ae81
cmp edi, 0xffffffff
je 0x1003af6c
jmp 0x1003af01
xor edx, edx
call fcn.1003b000
push 0
call sym.ucrtbase.dll__free_base
add esp, 4
push esi
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
mov ebx, 0x101049f4
mov dword [ebx], 0x16
call sym.ucrtbase.dll__invalid_parameter_noinfo
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10068820
mov esp, ebp
pop ebp
ret