Function at 0x1016d770
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
sub esp, 0x38
test byte [ecx + 0x8124], 4
push ebx
push esi
push edi
je 0x1016d795
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
xor eax, eax
cmp dword [ecx + 0x10], 1
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], eax
jbe 0x1016dcde
mov ebx, 1
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], eax
mov edi, dword [ecx + 0x14]
mov eax, dword [ebp - 0x18]
mov eax, dword [edi + eax]
mov esi, dword [eax + 0x3c]
mov dword [ebp - 0x28], eax
mov eax, esi
shr eax, 0x1c
cmp eax, 1
jb 0x1016dc6e
cmp eax, 4
ja 0x1016dc6e
and esi, 0xfff00000
cmp esi, 0x22400000
je 0x1016dc6e
cmp esi, 0x22500000
je 0x1016dc6e
cmp esi, 0x22600000
je 0x1016dc6e
cmp esi, 0x10600000
ja 0x1016d824
je 0x1016dc6e
cmp esi, 0x10300000
je 0x1016dc6e
cmp esi, 0x10500000
jmp 0x1016d82a
cmp esi, 0x10800000
je 0x1016dc6e
mov edx, ebx
cmp ebx, dword [ecx + 0x10]
jae 0x1016dc6e
lea eax, [edi + ebx*4]
mov edi, edi
mov edi, dword [eax]
test dword [edi + 0x3c], 0xf0000000
mov dword [ebp - 8], edi
jne 0x1016d85c
inc edx
add eax, 4
cmp edx, dword [ecx + 0x10]
jb 0x1016d840
jmp 0x1016dc6e
mov edx, dword [edi + 0x3c]
and edx, 0xfff00000
cmp edx, esi
jne 0x1016dc6e
mov eax, dword [ebp - 0x28]
mov edi, dword [eax + 8]
mov ebx, dword [eax + 0xc]
lea esi, [ecx + 0x530]
call fcn.1017c6c0
mov edx, dword [ebp - 8]
mov ebx, dword [ebp + 8]
mov byte [ebp - 2], al
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax + 0xc]
mov eax, dword [edx + 0xc]
mov esi, dword [ecx]
mov edi, dword [eax]
call fcn.101acd60
test al, al
je 0x1016dc68
mov ebx, dword [ebp - 0x28]
mov ecx, dword [ebx + 0xc]
mov esi, dword [ebp - 8]
mov eax, dword [esi + 0xc]
mov edx, dword [ecx]
mov ecx, dword [eax]
mov eax, dword [ecx + 0x80]
cmp eax, dword [edx + 0x80]
jne 0x1016dc68
mov ecx, dword [ebx + 0x3c]
mov eax, dword [ebx]
and ecx, 0xfffff
xor edx, edx
div ecx
mov dword [ebp - 0x14], ecx
mov ecx, dword [esi + 0x3c]
and ecx, 0xfffff
mov dword [ebp - 0x28], ecx
xor ecx, ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], eax
cmp eax, ecx
jbe 0x1016d96b
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
jmp 0x1016d903
mov esi, dword [ebp - 8]
mov eax, dword [ebp + 8]
mov ecx, dword [esi + 4]
mov edx, dword [ebx + 4]
push eax
mov eax, dword [ebp - 0x20]
mov esi, dword [ecx + eax]
mov ecx, dword [ebp - 0x24]
mov edi, dword [edx + ecx]
call fcn.101b3de0
test al, al
je 0x1016d965
mov edx, dword [ebp - 8]
mov eax, dword [edx + 4]
mov ecx, dword [ebp - 0x20]
mov edx, dword [eax + ecx]
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebx + 4]
mov eax, dword [eax + ecx]
mov ecx, dword [eax + 0x80]
cmp ecx, dword [edx + 0x80]
jne 0x1016d965
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0xc]
add ecx, ecx
add ecx, ecx
add dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x14]
add ecx, ecx
add ecx, ecx
add dword [ebp - 0x24], ecx
inc eax
mov dword [ebp - 0xc], eax
cmp eax, dword [ebp - 0x10]
jb 0x1016d900
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 0xc], eax
jne 0x1016dc68
xor edi, edi
cmp dword [esi], edi
jbe 0x1016d9a0
lea ebx, [ebx]
mov edx, dword [ebx + 8]
mov ecx, dword [esi + 4]
mov eax, dword [ebx + 0xc]
push edx
mov edx, dword [ecx + edi*4]
mov ecx, dword [ebp + 8]
push eax
push edx
call fcn.1016d6d0
test al, al
jne 0x1016d9a0
inc edi
cmp edi, dword [esi]
jb 0x1016d980
cmp edi, dword [esi]
jne 0x1016dc68
mov edx, dword [ebx + 8]
mov dword [ebp - 0x24], 0
test edx, edx
jbe 0x1016d9d7
mov eax, dword [ebx + 0xc]
lea esp, [esp]
mov ecx, dword [eax]
mov ecx, dword [ecx + 0x64]
mov edi, 1
shl edi, cl
add eax, 4
or dword [ebp - 0x24], edi
sub edx, 1
jne 0x1016d9c0
xor eax, eax
cmp dword [esi + 8], eax
jbe 0x1016d9fd
mov edx, dword [esi + 0xc]
mov ecx, dword [edx]
mov ecx, dword [ecx + 0x64]
mov edi, 1
shl edi, cl
mov ecx, dword [ebp - 0x24]
test ecx, edi
jne 0x1016d9fd
inc eax
add edx, 4
cmp eax, dword [esi + 8]
jb 0x1016d9e1
cmp eax, dword [esi + 8]
jne 0x1016dc68
mov eax, dword [ebp + 8]
inc dword [eax + 0x534]
cmp byte [ebp - 2], 0
je 0x1016dc68
mov edx, eax
test byte [edx + 0x7fcc], 2
je 0x1016db31
xor edx, edx
mov dword [ebp - 0xc], edx
cmp edx, dword [ebp - 0x10]
jae 0x1016db2b
xor eax, eax
mov byte [ebp - 1], 1
mov byte [ebp - 2], 1
cmp dword [ebp - 0x14], eax
jbe 0x1016daaa
mov ecx, dword [ebx + 0x3c]
mov esi, dword [ebx + 4]
and ecx, 0xfffff
imul ecx, edx
lea ecx, [esi + ecx*4]
mov esi, dword [ecx]
mov esi, dword [esi + 0x64]
mov dword [ebp - 0x24], esi
mov esi, ecx
mov ecx, dword [ebx + 0x3c]
and ecx, 0xfffff
imul ecx, edx
mov edx, dword [ebx + 4]
lea edi, [edx + ecx*4]
mov ecx, dword [edi]
cmp dword [ecx + 0x64], eax
je 0x1016da7e
mov byte [ebp - 1], 0
mov edx, dword [esi]
mov ecx, dword [ebp - 0x24]
cmp dword [edx + 0x64], ecx
je 0x1016da8c
mov byte [ebp - 2], 0
inc eax
add edi, 4
add esi, 4
cmp eax, dword [ebp - 0x14]
jb 0x1016da73
cmp byte [ebp - 1], 0
jne 0x1016daa4
cmp byte [ebp - 2], 0
je 0x1016db22
mov edx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
xor eax, eax
cmp dword [ebp - 0x28], eax
jbe 0x1016db07
mov ecx, dword [ebx + 0x3c]
mov edi, dword [ebx + 4]
and ecx, 0xfffff
imul ecx, edx
mov ecx, dword [edi + ecx*4]
mov ecx, dword [ecx + 0x64]
mov dword [ebp - 0x24], ecx
mov ecx, dword [esi + 0x3c]
mov esi, dword [esi + 4]
and ecx, 0xfffff
imul ecx, edx
lea edi, [esi + ecx*4]
jmp 0x1016dae0
mov ecx, dword [edi]
mov esi, dword [ecx + 0x64]
mov ecx, dword [ebp - 0x14]
add ecx, eax
cmp esi, ecx
je 0x1016daf2
mov byte [ebp - 1], 0
cmp esi, dword [ebp - 0x24]
je 0x1016dafb
mov byte [ebp - 2], 0
inc eax
add edi, 4
cmp eax, dword [ebp - 0x28]
jb 0x1016dae0
mov esi, dword [ebp - 8]
cmp byte [ebp - 1], 0
jne 0x1016db13
cmp byte [ebp - 2], 0
je 0x1016db28
inc edx
mov dword [ebp - 0xc], edx
cmp edx, dword [ebp - 0x10]
jb 0x1016da36
jmp 0x1016db28
mov edx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
cmp edx, dword [ebp - 0x10]
jne 0x1016dc68
mov eax, dword [ebx + 0x3c]
mov edi, dword [ebx + 8]
add edi, dword [esi + 8]
mov ecx, dword [esi]
add ecx, dword [ebx]
and eax, 0xfff00000
mov edx, eax
push edi
xor edx, edi
push ecx
mov ecx, dword [ebp + 8]
and edx, 0xfffff
xor edx, eax
push edx
lea eax, [ebp - 0x2c]
push eax
push ecx
call fcn.10169e20
mov esi, dword [ebp - 0x2c]
mov dword [ebp - 0x30], eax
test eax, eax
jl 0x1016dc8b
mov edx, dword [ebx + 0x34]
mov dword [esi + 0x34], edx
mov eax, dword [ebx + 0x38]
mov dword [esi + 0x38], eax
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 0xc]
mov eax, dword [esi + 0xc]
add ecx, ecx
add ecx, ecx
push ecx
push edx
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 0xc]
mov eax, dword [ebx + 8]
add ecx, ecx
add esp, 0xc
add ecx, ecx
push ecx
mov ecx, dword [esi + 0xc]
push edx
lea edx, [ecx + eax*4]
push edx
call sub.msvcrt.dll_memcpy
xor eax, eax
add esp, 0xc
cmp dword [ebp - 0x10], eax
jbe 0x1016dc35
lea edx, [edi*4]
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x28]
lea ecx, [eax*4]
mov eax, dword [ebp - 0x10]
add edi, edi
add edi, edi
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x14], eax
mov ecx, dword [ebx + 4]
add ecx, dword [ebp - 0x24]
mov edx, dword [esi + 4]
add edx, dword [ebp - 0xc]
push edi
push ecx
push edx
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x30]
mov edx, dword [ecx + 4]
add edx, dword [ebp - 0x20]
add esp, 0xc
push eax
mov eax, dword [esi + 4]
add eax, dword [ebp - 0x28]
push edx
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x30]
add dword [ebp - 0x24], edi
add dword [ebp - 0x20], ecx
add dword [ebp - 0xc], eax
add dword [ebp - 0x28], eax
add esp, 0xc
sub dword [ebp - 0x14], 1
jne 0x1016dbe9
mov edi, dword [ebp + 8]
push 1
push ebx
lea edx, [ebp - 0x2c]
push edx
push 1
call fcn.1016a230
mov dword [ebp - 0x30], eax
test eax, eax
jl 0x1016dc8b
mov eax, dword [ebp - 8]
sub dword [ebp - 0x18], 4
xor ecx, ecx
dec dword [ebp - 0x1c]
mov dword [ebp - 0x2c], ecx
mov dword [eax + 0x3c], ecx
mov dword [eax], ecx
mov dword [eax + 8], ecx
mov ecx, edi
jmp 0x1016dc6b
mov ecx, dword [ebp + 8]
mov ebx, dword [ebp - 0x1c]
add dword [ebp - 0x18], 4
inc ebx
mov dword [ebp - 0x1c], ebx
cmp ebx, dword [ecx + 0x10]
jb 0x1016d7b2
mov eax, dword [ebp - 0x30]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
test esi, esi
je 0x1016dcde
call fcn.10171ee0
mov eax, dword [0x101e316c]
test eax, eax
jl 0x1016dcde
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
je 0x1016dcde
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 0x1016dcd8
mov dword [eax], esi
mov eax, dword [ebp - 0x30]
mov dword [edi + 0x1c], esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [edi + 0x18], esi
mov dword [edi + 0x1c], esi
mov eax, dword [ebp - 0x30]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4