Function at 0x1002f090
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x1010e2b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
test eax, eax
je 0x1002f1dc
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x100764b0
cmp dword [ebp + 0x18], 0
je 0x100764b0
lea edi, [ebx - 1]
imul edi, ecx
add edi, eax
mov dword [ebp - 0x10], edi
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, dword [0x1010f3b4]
mov esi, eax
mov eax, dword [0x1010e2c4]
mov dword [ebp - 0xc], eax
mov ecx, dword [0x1010e2b0]
xor edx, dword [0x1010e2b0]
and ecx, 0x1f
ror edx, cl
mov dword [ebp - 8], edx
cmp edx, 0xffffffff
je 0x1007655c
test edx, edx
je 0x10076528
push dword [ebp - 0xc]
mov ecx, edx
call dword [0x10110268]
mov eax, dword [ebp - 8]
call eax
push esi
mov dword [ebp - 8], eax
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
cmp dword [ebp - 8], 1
jne 0x1002f133
call fcn.1002dc80
mov ecx, dword [ebp + 0xc]
cmp ecx, edi
ja 0x1002f199
mov edx, dword [ebp + 8]
lea ecx, [ecx]
mov esi, ebx
shr esi, 1
je 0x1002f19d
mov eax, ebx
mov edi, esi
and eax, 1
lea ebx, [esi - 1]
mov dword [ebp - 0xc], eax
jne 0x1002f157
mov edi, ebx
imul edi, dword [ebp + 0x14]
add edi, ecx
mov ecx, dword [ebp + 0x18]
push edi
push edx
call dword [0x10110268]
call dword [ebp + 0x18]
add esp, 8
test eax, eax
je 0x1002f1be
jns 0x1002f185
sub edi, dword [ebp + 0x14]
cmp dword [ebp - 0xc], 0
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x10], edi
jne 0x1002f190
jmp 0x1002f192
mov ecx, dword [ebp + 0x14]
add ecx, edi
mov edi, dword [ebp - 0x10]
mov dword [ebp + 0xc], ecx
mov ebx, esi
mov edx, dword [ebp + 8]
cmp ecx, edi
jbe 0x1002f140
xor edi, edi
jmp 0x1002f1be
test ebx, ebx
je 0x1002f199
mov ebx, dword [ebp + 0x18]
push ecx
push edx
mov ecx, ebx
call dword [0x10110268]
call ebx
add esp, 8
mov edi, eax
neg edi
sbb edi, edi
not edi
and edi, dword [ebp + 0xc]
cmp dword [ebp - 8], 1
jne 0x1002f1c9
call fcn.1002dce0
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1005cc20
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x1002f0b3
jmp 0x100763e5
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, dword [0x1010e2c0]
mov esi, eax
cmp ecx, 0xffffffff
je 0x10076413
call fcn.10029fa0
mov edi, eax
test edi, edi
je 0x1007640d
cmp edi, 0xffffffff
jne 0x1007645a
jmp 0x10076492
mov ecx, dword [0x1010e2c0]
or edx, 0xffffffff
call fcn.10032a89
test eax, eax
je 0x10076492
push 0x364
push 2
call sym.ucrtbase.dll__calloc_base
mov ecx, dword [0x1010e2c0]
mov edi, eax
add esp, 8
test edi, edi
je 0x10076481
mov edx, edi
call fcn.10032a89
test eax, eax
je 0x10076515
mov ecx, edi
call fcn.10031ad6
push 0
call sym.ucrtbase.dll__free_base
add esp, 4
test edi, edi
je 0x10076492
mov ecx, dword [0x1010e2c4]
call fcn.10029fa0
imul eax, eax, 0x364
push esi
add edi, eax
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
test edi, edi
je 0x10076499
lea eax, [edi + 0x10]
jmp 0x1007649e
xor edx, edx
call fcn.10032a89
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 eax, 0x1010eac0
mov dword [eax], 0x16
call sym.ucrtbase.dll__invalid_parameter_noinfo
xor eax, eax
jmp 0x1002f1cb
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, dword [0x1010e2c0]
mov esi, eax
cmp ecx, 0xffffffff
je 0x100764db
call fcn.10029fa0
mov edi, eax
test edi, edi
je 0x100764d5
cmp edi, 0xffffffff
je 0x10076492
jmp 0x1007645a
mov ecx, dword [0x1010e2c0]
or edx, 0xffffffff
call fcn.10032a89
test eax, eax
je 0x10076492
push 0x364
push 2
call sym.ucrtbase.dll__calloc_base
mov ecx, dword [0x1010e2c0]
mov edi, eax
add esp, 8
test edi, edi
je 0x10076481
mov edx, edi
call fcn.10032a89
test eax, eax
jne 0x10076449
mov ecx, dword [0x1010e2c0]
xor edx, edx
call fcn.10032a89
push edi
jmp 0x1007648a
mov eax, 0x10006a9c
mov dword [ebp - 8], eax
mov ecx, dword [eax]
call fcn.10032fe0
test eax, eax
jne 0x1007656a
mov eax, dword [ebp - 8]
add eax, 4
mov dword [ebp - 8], eax
cmp eax, 0x10006aa4
jne 0x10076530
push 0xffffffffffffffff
call fcn.10032d19
add esp, 4
mov ecx, 0x1010f3b4
xchg dword [ecx], eax
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
jmp 0x1002f11e
push 0x10006aa4
push eax
call dword [sym.imp.api_ms_win_core_libraryloader_l1_1_0.dll_GetProcAddress]
mov dword [ebp - 8], eax
test eax, eax
je 0x1007654b
push eax
call fcn.10032d19
add esp, 4
mov ecx, 0x1010f3b4
xchg dword [ecx], eax
mov edx, dword [ebp - 8]
test edx, edx
je 0x1007655c
jmp 0x1002f10e