Function at 0x10163900
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x10]
xor edx, edx
push edi
mov dword [ebp - 0xc], edx
mov byte [ebp - 1], dl
cmp eax, edx
jbe 0x10163924
mov ecx, dword [esi + 0x14]
mov edi, dword [ecx]
jmp 0x10163926
xor edi, edi
mov dword [ebp - 0x14], edx
cmp eax, edx
jbe 0x10163b9e
mov eax, dword [edi + 0x3c]
mov ecx, eax
and ecx, 0xfff00000
cmp ecx, 0x30000000
je 0x10163950
cmp ecx, 0x30100000
jne 0x10163b1b
and eax, 0xfffff
mov ebx, eax
mov cl, 1
mov dword [ebp - 0x10], ebx
mov esi, edx
jbe 0x101639ec
lea eax, [ebx*4]
mov dword [ebp - 8], eax
mov edi, edi
test cl, cl
je 0x101639d9
mov ecx, dword [edi + 0xc]
mov eax, dword [ecx + esi*4]
mov ecx, dword [eax + 0x50]
mov eax, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
and eax, 0x44210008
and ecx, 0x180
or eax, ecx
je 0x101639d9
mov ecx, dword [ebp - 8]
mov edx, dword [edi + 4]
mov eax, dword [ecx + edx]
mov ecx, dword [eax + 0x50]
mov eax, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
and eax, 0x44210008
and ecx, 0x180
or eax, ecx
je 0x101639d7
lea ecx, [esi + ebx*2]
mov edx, dword [edx + ecx*4]
mov ecx, dword [edx + 0x50]
mov eax, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
and eax, 0x44210008
and ecx, 0x180
or eax, ecx
je 0x101639d7
mov cl, 1
xor edx, edx
jmp 0x101639db
xor edx, edx
xor cl, cl
add dword [ebp - 8], 4
inc esi
cmp esi, ebx
jb 0x10163970
test cl, cl
je 0x10163b18
mov eax, dword [0x101e316c]
cmp eax, edx
jge 0x101639f9
xor eax, eax
jmp 0x10163a02
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
xor edx, edx
cmp dword [eax + 0x18], edx
je 0x10163a2a
mov ecx, dword [eax + 0x18]
cmp ecx, edx
jne 0x10163a14
xor ecx, ecx
mov esi, ecx
jmp 0x10163a3a
mov esi, dword [ecx]
mov dword [eax + 0x18], esi
cmp esi, edx
jne 0x10163a20
mov dword [eax + 0x1c], edx
mov dword [ecx], 0xfefefefe
mov esi, ecx
jmp 0x10163a3a
mov ecx, dword [eax + 0x14]
push 0x10
push 0x44
call fcn.101d8457
mov esi, eax
xor edx, edx
cmp esi, edx
je 0x10163b41
or eax, 0xffffffff
mov dword [esi + 0x10], eax
mov dword [esi + 0x20], eax
xor ecx, ecx
push edx
mov eax, ebx
and eax, 0xfffff
mov dword [esi], edx
mov dword [esi + 8], edx
mov dword [esi + 0x3c], edx
mov dword [esi + 4], edx
mov word [esi + 0x40], cx
mov dword [esi + 0xc], edx
mov word [esi + 0x42], cx
mov dword [esi + 0x14], edx
mov dword [esi + 0x18], edx
mov dword [esi + 0x1c], edx
mov dword [esi + 0x24], edx
mov dword [esi + 0x34], edx
mov dword [esi + 0x38], edx
lea ecx, [ebx + ebx]
or eax, 0x22e00000
push esi
mov edx, ebx
call fcn.10172020
mov dword [ebp - 0xc], eax
test eax, eax
jl 0x10163b4f
mov edx, dword [edi + 0x34]
mov dword [esi + 0x34], edx
mov eax, dword [edi + 0x38]
mov dword [esi + 0x38], eax
xor eax, eax
test ebx, ebx
jbe 0x10163afa
lea ecx, [ebx*4]
lea edx, [ebx*8]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov edi, edi
mov edx, dword [edi + 0xc]
mov edx, dword [edx + eax*4]
mov ebx, dword [esi + 0xc]
mov dword [ebx + eax*4], edx
mov edx, dword [edi + 4]
mov ecx, dword [ecx + edx]
mov ebx, dword [esi + 4]
mov dword [ebx + eax*4], ecx
mov ecx, dword [ebp - 8]
mov edx, dword [edi + 4]
mov edx, dword [ecx + edx]
mov ecx, dword [ebp - 0xc]
mov ebx, dword [esi + 4]
add dword [ebp - 8], 4
mov dword [ecx + ebx], edx
inc eax
add ecx, 4
mov dword [ebp - 0xc], ecx
cmp eax, dword [ebp - 0x10]
jb 0x10163ac0
push esi
push edi
call fcn.10172c80
mov dword [ebp - 0xc], eax
test eax, eax
jl 0x10163b4f
mov byte [ebp - 1], 1
call fcn.10171ee0
call fcn.101751f0
xor edx, edx
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
mov eax, dword [esi + 0x10]
inc ecx
mov dword [ebp - 0x14], ecx
cmp ecx, eax
jb 0x10163b30
xor edi, edi
mov dword [ebp - 0x14], eax
jmp 0x10163b36
mov edi, dword [esi + 0x14]
mov edi, dword [edi + ecx*4]
cmp dword [ebp - 0x14], eax
jb 0x10163931
jmp 0x10163b97
mov eax, 0x8007000e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
test esi, esi
je 0x10163b95
call fcn.10171ee0
mov eax, dword [0x101e316c]
test eax, eax
jl 0x10163b95
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
je 0x10163b95
push 0x44
push 0xfe
push esi
call sub.msvcrt.dll_memset
mov dword [esi], 0
mov eax, dword [edi + 0x1c]
add esp, 0xc
test eax, eax
je 0x10163b8f
mov dword [eax], esi
jmp 0x10163b92
mov dword [edi + 0x18], esi
mov dword [edi + 0x1c], esi
xor edx, edx
mov eax, dword [ebp - 0xc]
cmp eax, edx
jl 0x10163ba6
xor eax, eax
cmp byte [ebp - 1], al
sete al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4