Function at 0x1003a0f0
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 edx, dword [ebp + 8]
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x100], edx
mov dword [ebp - 0x10c], 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 edx, edx
jne 0x1003a22a
test edi, edi
je 0x1003a22a
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 0x1003a18e
mov ecx, edi
call fcn.100290c0
mov edi, eax
test edi, edi
je 0x1003a188
cmp edi, 0xffffffff
je 0x1003a841
imul ebx, dword [ebp - 0x114], 0x364
jmp 0x1003a7e0
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 0x1003a1bf
mov ecx, ebx
call dword [0x10106270]
call ebx
jmp 0x1003a1c5
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
test eax, eax
je 0x1003a841
push 0x364
push 2
call sym.ucrtbase.dll__calloc_base
mov ecx, dword [0x101042e4]
mov edi, eax
add esp, 8
test edi, edi
je 0x1003a830
mov edx, edi
call fcn.1003b000
test eax, eax
jne 0x1003a20a
mov ecx, dword [0x101042e4]
xor edx, edx
call fcn.1003b000
push edi
jmp 0x1003a839
mov ecx, edi
call fcn.1003e545
push 0
call sym.ucrtbase.dll__free_base
add esp, 4
imul ebx, dword [ebp - 0x114], 0x364
jmp 0x1003a7e0
test esi, esi
je 0x1003a7f0
test ebx, ebx
je 0x1003a7f0
mov dword [ebp - 0x120], 0
cmp edi, 2
jb 0x1003a858
dec edi
imul edi, esi
add edi, edx
mov dword [ebp - 0xf8], edi
lea esp, [esp]
mov eax, edi
sub eax, edx
xor edx, edx
div esi
inc eax
cmp eax, 8
ja 0x1003a3ba
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 0x1003a2a1
mov byte [ebp - 0x105], 1
call fcn.10029460
jmp 0x1003a2a8
mov byte [ebp - 0x105], 0
mov ecx, dword [ebp - 0xf8]
mov eax, dword [ebp - 0x100]
cmp ecx, eax
jbe 0x1003a375
mov edi, dword [ebp - 0x104]
lea edx, [edi + eax]
mov dword [ebp - 0x11c], edx
jmp 0x1003a2d0
mov esi, edx
mov dword [ebp - 0xfc], eax
cmp esi, ecx
ja 0x1003a315
lea esp, [esp]
push eax
push esi
push dword [ebp - 0x10c]
mov ecx, ebx
call dword [0x10106270]
call ebx
add esp, 0xc
test eax, eax
jle 0x1003a303
mov eax, esi
mov dword [ebp - 0xfc], eax
jmp 0x1003a309
mov eax, dword [ebp - 0xfc]
mov ecx, dword [ebp - 0xf8]
add esi, edi
cmp esi, ecx
jbe 0x1003a2e0
mov edx, ecx
cmp eax, ecx
je 0x1003a359
sub eax, ecx
mov ebx, edi
mov dword [ebp - 0xfc], eax
jmp 0x1003a330
mov cl, byte [edx + eax]
lea edx, [edx + 1]
mov esi, dword [ebp - 0xfc]
mov al, byte [edx - 1]
mov byte [edx + esi - 1], al
mov eax, esi
mov byte [edx - 1], cl
sub ebx, 1
jne 0x1003a330
mov ebx, dword [ebp - 0x118]
mov ecx, dword [ebp - 0xf8]
mov eax, dword [ebp - 0x100]
sub ecx, edi
mov edx, dword [ebp - 0x11c]
mov dword [ebp - 0xf8], ecx
cmp ecx, eax
ja 0x1003a2d0
cmp byte [ebp - 0x105], 0
je 0x1003a383
call fcn.10029570
mov eax, dword [ebp - 0x120]
sub eax, 1
mov dword [ebp - 0x120], eax
js 0x1003a858
mov edx, dword [ebp + eax*4 - 0x7c]
mov edi, dword [ebp + eax*4 - 0xf4]
mov esi, dword [ebp - 0x104]
mov ecx, dword [ebp - 0x10c]
mov dword [ebp - 0x100], edx
jmp 0x1003a253
mov edx, dword [ebp - 0x100]
shr eax, 1
imul eax, esi
mov dword [ebp - 0xfc], eax
lea edi, [eax + edx]
push edi
push edx
push ecx
mov ecx, ebx
mov dword [ebp - 0x110], edi
call dword [0x10106270]
call ebx
add esp, 0xc
test eax, eax
mov eax, dword [ebp - 0x100]
jle 0x1003a43a
mov dword [ebp - 0x114], esi
mov dword [ebp - 0x11c], edi
cmp eax, edi
je 0x1003a43a
mov ebx, dword [ebp - 0x114]
mov esi, edi
mov edi, dword [ebp - 0xfc]
lea esp, [esp]
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 0x1003a410
mov edi, dword [ebp - 0x110]
mov ebx, dword [ebp - 0x118]
mov esi, dword [ebp - 0x104]
mov eax, dword [ebp - 0x100]
push dword [ebp - 0xf8]
mov ecx, ebx
push eax
push dword [ebp - 0x10c]
call dword [0x10106270]
call ebx
mov edx, dword [ebp - 0xf8]
add esp, 0xc
test eax, eax
jle 0x1003a4a1
mov eax, dword [ebp - 0x100]
mov dword [ebp - 0x110], esi
mov esi, edx
cmp eax, edx
je 0x1003a4a1
mov ebx, dword [ebp - 0x110]
sub eax, edx
mov dword [ebp - 0x11c], 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 0x1003a480
mov ebx, dword [ebp - 0x118]
mov edx, dword [ebp - 0xf8]
push edx
push edi
push dword [ebp - 0x10c]
mov ecx, ebx
call dword [0x10106270]
call ebx
mov edx, dword [ebp - 0xf8]
add esp, 0xc
test eax, eax
mov eax, dword [ebp - 0x104]
jle 0x1003a501
mov ebx, eax
mov esi, edx
cmp edi, edx
je 0x1003a501
mov eax, edi
sub eax, edx
mov dword [ebp - 0x110], eax
mov edx, eax
lea ebx, [ebx]
mov al, byte [esi]
lea esi, [esi + 1]
mov cl, byte [edx + esi - 1]
mov byte [edx + esi - 1], al
mov byte [esi - 1], cl
sub ebx, 1
jne 0x1003a4e0
mov eax, dword [ebp - 0x104]
mov edx, dword [ebp - 0xf8]
mov esi, dword [ebp - 0x100]
mov ebx, edx
mov dword [ebp - 0xfc], edx
nop
cmp edi, esi
jbe 0x1003a54f
add esi, eax
mov dword [ebp - 0x114], esi
cmp esi, edi
jae 0x1003a549
mov ecx, dword [ebp - 0x118]
push edi
push esi
push dword [ebp - 0x10c]
call dword [0x10106270]
call dword [ebp - 0x118]
add esp, 0xc
test eax, eax
mov eax, dword [ebp - 0x104]
jle 0x1003a514
jmp 0x1003a58c
mov edx, dword [ebp - 0xf8]
mov ebx, dword [ebp - 0x118]
add esi, eax
cmp esi, edx
ja 0x1003a580
push edi
push esi
push dword [ebp - 0x10c]
mov ecx, ebx
call dword [0x10106270]
call ebx
mov edx, dword [ebp - 0xf8]
add esp, 0xc
test eax, eax
mov eax, dword [ebp - 0x104]
jle 0x1003a555
mov ebx, dword [ebp - 0xfc]
mov dword [ebp - 0x114], esi
mov esi, dword [ebp - 0x118]
mov eax, dword [ebp - 0x104]
mov ecx, ebx
sub ebx, eax
mov dword [ebp - 0xfc], ecx
cmp ebx, edi
jbe 0x1003a5cb
push edi
push ebx
push dword [ebp - 0x10c]
mov ecx, esi
call dword [0x10106270]
call esi
add esp, 0xc
test eax, eax
jg 0x1003a592
mov eax, dword [ebp - 0x104]
mov ecx, dword [ebp - 0xfc]
mov esi, dword [ebp - 0x114]
mov dword [ebp - 0xfc], ebx
cmp ebx, esi
jb 0x1003a62c
mov dword [ebp - 0x11c], eax
mov edx, ebx
je 0x1003a617
sub esi, ebx
mov ebx, eax
lea esp, [esp]
mov al, byte [edx]
lea edx, [edx + 1]
mov cl, byte [esi + edx - 1]
mov byte [esi + edx - 1], al
mov byte [edx - 1], cl
sub ebx, 1
jne 0x1003a5f0
mov esi, dword [ebp - 0x114]
mov ebx, dword [ebp - 0xfc]
mov eax, dword [ebp - 0x104]
mov edx, dword [ebp - 0xf8]
cmp edi, ebx
jne 0x1003a510
mov edi, esi
jmp 0x1003a510
cmp edi, ecx
jae 0x1003a669
mov ebx, dword [ebp - 0x118]
sub ecx, eax
mov dword [ebp - 0xfc], ecx
cmp ecx, edi
jbe 0x1003a669
push edi
push ecx
push dword [ebp - 0x10c]
mov ecx, ebx
call dword [0x10106270]
call ebx
mov ecx, dword [ebp - 0xfc]
add esp, 0xc
test eax, eax
mov eax, dword [ebp - 0x104]
je 0x1003a636
jmp 0x1003a6b6
mov ebx, dword [ebp - 0x118]
mov esi, dword [ebp - 0x10c]
jmp 0x1003a680
sub ecx, eax
mov dword [ebp - 0xfc], ecx
cmp ecx, dword [ebp - 0x100]
jbe 0x1003a6b0
push edi
push ecx
push esi
mov ecx, ebx
call dword [0x10106270]
call ebx
mov ecx, dword [ebp - 0xfc]
add esp, 0xc
test eax, eax
mov eax, dword [ebp - 0x104]
je 0x1003a680
mov esi, dword [ebp - 0x114]
mov edi, dword [ebp - 0xf8]
mov ecx, edi
mov edx, dword [ebp - 0xfc]
sub ecx, esi
mov eax, edx
sub eax, dword [ebp - 0x100]
cmp eax, ecx
jl 0x1003a715
mov eax, dword [ebp - 0x100]
cmp eax, edx
jae 0x1003a6f4
mov ecx, dword [ebp - 0x120]
mov dword [ebp + ecx*4 - 0x7c], eax
mov dword [ebp + ecx*4 - 0xf4], edx
inc ecx
mov dword [ebp - 0x120], ecx
cmp esi, edi
jae 0x1003a383
mov ecx, dword [ebp - 0x10c]
mov edx, esi
mov esi, dword [ebp - 0x104]
mov dword [ebp - 0x100], edx
jmp 0x1003a260
cmp esi, edi
jae 0x1003a731
mov eax, dword [ebp - 0x120]
mov dword [ebp + eax*4 - 0x7c], esi
mov dword [ebp + eax*4 - 0xf4], edi
inc eax
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x100], edx
jae 0x1003a383
mov esi, dword [ebp - 0x104]
mov edi, edx
mov ecx, dword [ebp - 0x10c]
mov edx, dword [ebp - 0x100]
jmp 0x1003a253
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 0x1003a78d
mov ecx, ebx
call dword [0x10106270]
call ebx
jmp 0x1003a793
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
test eax, eax
je 0x1003a841
push 0x364
push 2
call sym.ucrtbase.dll__calloc_base
mov ecx, dword [0x101042e4]
mov edi, eax
add esp, 8
test edi, edi
je 0x1003a830
mov edx, edi
call fcn.1003b000
test eax, eax
je 0x1003a1f7
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 0x1003a848
add ebx, 0x10
jmp 0x1003a84d
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 0x1003a75c
mov ecx, edi
call fcn.100290c0
mov edi, eax
test edi, edi
je 0x1003a756
cmp edi, 0xffffffff
je 0x1003a841
jmp 0x1003a7d6
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