Function at 0x10162080
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x25c
push ebx
push esi
mov esi, eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x3c]
mov ebx, dword [eax + 0xc]
and ecx, 0xfffff
xor edx, edx
push edi
mov edi, dword [eax + 8]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], edx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x10], 2
mov dword [ebp - 0xc], 3
call fcn.1017c6c0
test al, al
jne 0x101620dc
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push 0x80
lea eax, [ebp - 0x118]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x80
lea ecx, [ebp - 0x98]
push 0
push ecx
call sub.msvcrt.dll_memset
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 8]
mov ebx, dword [ebp + 0x10]
add esp, 0xc
push edx
push eax
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x1b8]
push edx
mov edx, dword [ebx]
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x118]
push ecx
mov ecx, dword [ebp + 8]
push edx
push eax
call fcn.10161210
mov edi, eax
test edi, edi
jl 0x10162269
jne 0x1016223c
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
inc dword [esi + 4]
lea ecx, [ebp - 0x118]
push ecx
push edx
push ebx
push eax
lea esi, [ebp - 0x258]
call fcn.1015fb10
mov edi, eax
test edi, edi
jl 0x10162269
xor esi, esi
cmp dword [ebx + 4], esi
jbe 0x101621c1
lea ecx, [ebp - 0x98]
mov dword [ebp + 0x14], ecx
mov edx, dword [ebp + 0x14]
push edx
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x18]
push ecx
mov ecx, dword [ebp + 0xc]
lea edx, [ebp - 0x1b8]
push edx
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x258]
push eax
push ebx
push ecx
push edx
mov eax, esi
call fcn.10160cb0
mov edi, eax
test edi, edi
jl 0x10162269
add dword [ebp + 0x14], 4
inc esi
cmp esi, dword [ebx + 4]
jb 0x10162180
mov eax, dword [ebx + 4]
cmp eax, 1
jne 0x101621f0
mov esi, dword [ebp - 0x98]
mov eax, dword [ebp + 0xc]
push esi
push eax
call fcn.10172c80
mov edi, eax
test edi, edi
jl 0x10162269
mov ecx, dword [ebp + 0xc]
or edx, 0xffffffff
call fcn.1010b3f0
jmp 0x10162242
xor esi, esi
test eax, eax
jbe 0x10162221
mov eax, dword [ebp + esi*4 - 0x98]
mov edi, dword [ebp + 8]
push eax
call fcn.101699c0
mov edi, eax
test edi, edi
jl 0x10162269
mov ecx, dword [ebp + esi*4 - 0x98]
or edx, 0xffffffff
call fcn.1010b3f0
inc esi
cmp esi, dword [ebx + 4]
jb 0x101621f6
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebx + 4]
mov edi, dword [ebp + 8]
push 1
push ecx
lea edx, [ebp - 0x98]
push edx
push eax
call fcn.1016a230
mov edi, eax
mov esi, dword [ebp - 0x98]
test edi, edi
jl 0x10162269
cmp dword [ebx + 4], 1
jne 0x101622c9
test esi, esi
je 0x101622c9
call fcn.10171ee0
call fcn.101751f0
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
xor eax, eax
mov dword [ebp + 0xc], eax
mov edi, edi
mov esi, dword [ebp + eax*4 - 0x98]
test esi, esi
je 0x101622bd
call fcn.10171ee0
mov eax, dword [0x101e316c]
test eax, eax
jl 0x101622bd
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
je 0x101622bd
push 0x44
push 0xfe
push esi
call sub.msvcrt.dll_memset
mov dword [esi], 0
mov eax, dword [ebx + 0x1c]
add esp, 0xc
test eax, eax
je 0x101622b7
mov dword [eax], esi
jmp 0x101622ba
mov dword [ebx + 0x18], esi
mov dword [ebx + 0x1c], esi
mov eax, dword [ebp + 0xc]
inc eax
mov dword [ebp + 0xc], eax
cmp eax, 0x20
jb 0x10162270
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10