Function at 0x1002c51d
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
sub esp, 0x10
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
test ecx, ecx
jne 0x1002c491
test ebx, ebx
je 0x1002c491
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 ecx, dword [0x101042e4]
mov ebx, eax
cmp ecx, 0xffffffff
je 0x1002c440
call fcn.100290c0
mov edi, eax
test edi, edi
je 0x1002c43a
cmp edi, 0xffffffff
je 0x1002c68f
jmp 0x1002c656
mov ecx, dword [0x101042e4]
or edx, 0xffffffff
call fcn.1003b000
test eax, eax
je 0x1002c68f
push 0x364
push 2
call sym.ucrtbase.dll__calloc_base
mov ecx, dword [0x101042e4]
mov edi, eax
add esp, 8
test edi, edi
je 0x1002c67e
mov edx, edi
call fcn.1003b000
test eax, eax
jne 0x1002c645
mov ecx, dword [0x101042e4]
xor edx, edx
call fcn.1003b000
push edi
jmp 0x1002c687
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x1002c401
cmp dword [ebp + 0x18], 0
je 0x1002c401
lea edi, [ebx - 1]
imul edi, eax
add edi, ecx
mov dword [ebp - 8], edi
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, dword [0x10105650]
mov esi, eax
mov eax, dword [0x101042e0]
mov dword [ebp - 0x10], eax
nop
mov ecx, dword [0x101042d0]
xor edx, dword [0x101042d0]
and ecx, 0x1f
ror edx, cl
mov dword [ebp - 0xc], edx
cmp edx, 0xffffffff
je 0x1002c541
test edx, edx
jne 0x1002c58b
mov edi, 0x1000a588
mov edi, edi
mov ecx, dword [edi]
call fcn.1003269e
test eax, eax
jne 0x1002c508
add edi, 4
cmp edi, 0x1000a590
jne 0x1002c4f0
jmp 0x1002c51d
push 0x1000a548
push eax
call dword [sym.imp.api_ms_win_core_libraryloader_l1_1_0.dll_GetProcAddress]
mov edi, eax
mov dword [ebp - 0xc], edi
test edi, edi
jne 0x1002c565
mov eax, dword [0x101042d0]
mov ecx, 0x20
and eax, 0x1f
sub ecx, eax
or eax, 0xffffffff
ror eax, cl
mov ecx, 0x10105650
xor eax, dword [0x101042d0]
xchg dword [ecx], eax
mov edi, dword [ebp - 8]
push dword [ebp - 0x10]
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
push esi
mov dword [ebp - 0x10], eax
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
cmp dword [ebp - 0x10], 1
jne 0x1002c59b
mov byte [ebp - 1], 1
call fcn.10029460
jmp 0x1002c59f
mov eax, dword [0x101042d0]
mov ecx, 0x20
and eax, 0x1f
sub ecx, eax
mov eax, edi
ror eax, cl
mov ecx, 0x10105650
xor eax, dword [0x101042d0]
xchg dword [ecx], eax
mov edi, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
push dword [ebp - 0x10]
mov ecx, edx
call dword [0x10106270]
call dword [ebp - 0xc]
jmp 0x1002c54a
mov byte [ebp - 1], 0
mov eax, dword [ebp + 0xc]
cmp eax, edi
ja 0x1002c60e
mov edx, dword [ebp + 8]
lea esp, [esp]
mov edi, ebx
shr edi, 1
je 0x1002c624
mov ecx, ebx
mov esi, edi
and ecx, 1
lea ebx, [edi - 1]
mov dword [ebp - 0x10], ecx
jne 0x1002c5c7
mov esi, ebx
imul esi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x18]
add esi, eax
push esi
push edx
call dword [0x10106270]
call dword [ebp + 0x18]
add esp, 8
test eax, eax
je 0x1002c610
jns 0x1002c5f7
mov ecx, dword [ebp + 0xc]
mov eax, esi
sub eax, dword [ebp + 0x14]
cmp dword [ebp - 0x10], 0
mov dword [ebp - 8], eax
jne 0x1002c602
jmp 0x1002c604
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp - 8]
add ecx, esi
mov dword [ebp + 0xc], ecx
mov ebx, edi
mov edx, dword [ebp + 8]
cmp ecx, eax
mov eax, dword [ebp + 0xc]
jbe 0x1002c5b0
xor esi, esi
cmp byte [ebp - 1], 0
je 0x1002c61b
call fcn.10029570
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x1002c60e
mov ebx, dword [ebp + 0x18]
mov ecx, ebx
push eax
push edx
call dword [0x10106270]
call ebx
add esp, 8
neg eax
sbb esi, esi
not esi
and esi, dword [ebp + 0xc]
jmp 0x1002c610
mov ecx, edi
call fcn.1003e545
push 0
call sym.ucrtbase.dll__free_base
add esp, 4
push esi
imul ebx, ebx, 0x364
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
add ebx, edi
je 0x1002c696
add ebx, 0x10
mov dword [ebx], 0x16
call sym.ucrtbase.dll__invalid_parameter_noinfo
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
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
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret