Function at 0x46e930
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x68
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ecx, dword [edi + 0xb828]
mov eax, dword [ecx + 0x3c]
and eax, 0xfffff
mov dword [ebp - 0xc], eax
je 0x46ecf1
xor esi, esi
cmp dword [ecx], esi
je 0x46ecf1
cmp dword [ecx + 8], esi
je 0x46ecf1
mov ebx, dword [ecx + 0x3c]
mov eax, dword [ecx]
and ebx, 0xfffff
xor edx, edx
div ebx
xor ebx, ebx
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x1c], eax
test eax, eax
jbe 0x46ecf1
mov ecx, dword [ecx + 4]
mov dword [ebp - 8], ecx
lea ecx, [ecx]
mov eax, dword [ecx]
mov ecx, dword [eax + 0x24]
cmp ecx, 0xffffffff
je 0x46e9c8
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + 8]
and eax, 4
xor edx, edx
or eax, edx
jne 0x46e9c8
mov dword [ebp + ebx*4 - 0x34], ecx
test ebx, ebx
jbe 0x46e9c0
mov ecx, dword [ebp + esi*4 - 0x34]
cmp dword [ebp + eax*4 - 0x34], ecx
je 0x46e9c0
inc eax
cmp eax, ebx
jb 0x46e9b5
cmp eax, ebx
jne 0x46e9c7
inc dword [ebp - 0x10]
inc ebx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
add eax, eax
add eax, eax
inc esi
add ecx, eax
mov dword [ebp - 8], ecx
cmp esi, dword [ebp - 0x1c]
jb 0x46e990
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x46ecf1
xor esi, esi
test ebx, ebx
jbe 0x46ea68
xor eax, eax
test esi, esi
jbe 0x46ea11
mov ecx, dword [ebp + esi*4 - 0x34]
cmp dword [ebp + eax*4 - 0x34], ecx
je 0x46ea05
inc eax
cmp eax, esi
jb 0x46e9f8
jmp 0x46ea11
mov ecx, dword [ebp + eax*4 - 0x44]
mov dword [ebp + esi*4 - 0x44], ecx
cmp eax, esi
jb 0x46ea63
cmp dword [ebp - 0x10], 1
mov eax, 3
je 0x46ea1e
mov eax, esi
fldz
mov edx, dword [edi + 0x368c]
sub esp, 8
fstp qword [esp]
push 0
push 0
push eax
push 0
push edx
lea ebx, [ebp + esi*4 - 0x44]
push ebx
push edi
call fcn.00508980
test eax, eax
jl 0x46ecf6
mov eax, dword [edi + 0xb828]
mov ecx, dword [eax + 0xc]
mov eax, dword [ecx]
mov ebx, dword [ebx]
mov edx, dword [eax + 0x30]
mov dword [ebx + 0x30], edx
mov al, byte [eax + 0x34]
mov byte [ebx + 0x34], al
mov ebx, dword [ebp - 8]
inc esi
cmp esi, ebx
jb 0x46e9ee
xor ecx, ecx
xor esi, esi
mov dword [ebp - 8], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], esi
jmp 0x46ea82
xor ecx, ecx
mov edx, dword [edi + 0xb828]
mov eax, dword [edx + 4]
mov eax, dword [esi + eax]
mov eax, dword [eax + 0x24]
cmp eax, 0xffffffff
je 0x46eb92
mov eax, dword [eax + 0x10]
mov eax, dword [eax + 8]
and eax, 4
or eax, ecx
jne 0x46eb92
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0xc], ecx
jbe 0x46eb8f
jmp 0x46eac0
fldz
mov ecx, dword [edi + 0xb828]
mov edx, dword [ecx + 4]
mov eax, dword [edi + 0x3668]
mov ebx, dword [esi + edx]
sub esp, 8
fstp qword [esp]
push 0
push 0
push 0
push 0
push eax
lea ecx, [ebp - 0x20]
push ecx
push edi
call fcn.00508980
test eax, eax
jl 0x46ecf6
mov edi, dword [ebp - 0x20]
mov eax, ebx
mov edx, edi
call fcn.00504ed0
test eax, eax
jl 0x46ecf6
cmp dword [edi + 0x44], 0xffffffff
je 0x46eb5d
fldz
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x3668]
sub esp, 8
fstp qword [esp]
push 0
push 0
push 0
push 0
push edx
lea ecx, [ebp - 0x24]
push ecx
push eax
call fcn.00508980
test eax, eax
jl 0x46ecf6
mov eax, dword [ebx + 0x44]
mov ebx, dword [ebp - 0x24]
mov edx, ebx
call fcn.00504ed0
test eax, eax
jl 0x46ecf6
mov edx, dword [ebp - 8]
mov eax, dword [ebp + edx*4 - 0x44]
mov dword [edi + 0x44], ebx
mov dword [ebx + 0x24], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + ecx*4 - 0x44]
mov eax, dword [ebp + 8]
mov dword [edi + 0x24], edx
mov ecx, dword [eax + 0xb828]
mov eax, dword [ebp - 0x10]
mov edx, dword [ecx + 4]
mov dword [esi + edx], edi
mov edi, dword [ebp + 8]
inc eax
add esi, 4
mov dword [ebp - 0x10], eax
cmp eax, dword [ebp - 0xc]
jb 0x46eac0
mov esi, dword [ebp - 0x18]
inc dword [ebp - 8]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
add eax, eax
add eax, eax
inc ecx
add esi, eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], esi
cmp ecx, dword [ebp - 0x1c]
jb 0x46ea80
mov eax, dword [0x551d48]
test eax, eax
jge 0x46ebbb
xor eax, eax
jmp 0x46ebc2
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x14], 0
je 0x46ebe9
mov ecx, dword [eax + 0x14]
test ecx, ecx
jne 0x46ebd3
mov edi, ecx
jmp 0x46ebf7
mov edx, dword [ecx]
mov dword [eax + 0x14], edx
test edx, edx
jne 0x46ebdf
mov dword [eax + 0x18], edx
mov dword [ecx], 0xfefefefe
mov edi, ecx
jmp 0x46ebf7
mov ecx, dword [eax + 0x10]
push 0x10
push 0x44
call fcn.00547721
mov edi, eax
xor ebx, ebx
cmp edi, ebx
je 0x46ece3
or eax, 0xffffffff
mov dword [edi + 0x10], eax
xor ecx, ecx
xor edx, edx
mov dword [edi + 0x20], eax
xor esi, esi
xor eax, eax
mov dword [edi], ebx
mov dword [edi + 8], ebx
mov dword [edi + 0x3c], ebx
mov dword [edi + 4], ebx
mov word [edi + 0x40], cx
mov dword [edi + 0xc], ebx
mov word [edi + 0x42], dx
mov dword [edi + 0x14], ebx
mov dword [edi + 0x18], ebx
mov dword [edi + 0x1c], ebx
mov dword [edi + 0x24], ebx
mov dword [edi + 0x34], ebx
mov dword [edi + 0x38], ebx
cmp dword [ebp - 8], ebx
jbe 0x46ec76
nop
xor ecx, ecx
cmp eax, ebx
jbe 0x46ec5b
mov edx, dword [ebp + eax*4 - 0x34]
lea ebx, [ebx]
cmp dword [ebp + ecx*4 - 0x34], edx
je 0x46ec5b
inc ecx
cmp ecx, eax
jb 0x46ec50
cmp ecx, eax
jne 0x46ec70
mov ecx, dword [ebp + eax*4 - 0x44]
mov edx, dword [ebp + eax*4 - 0x34]
mov dword [ebp + esi*4 - 0x54], ecx
mov dword [ebp + esi*4 - 0x64], edx
inc esi
inc eax
cmp eax, dword [ebp - 8]
jb 0x46ec40
mov eax, esi
push ebx
and eax, 0xfffff
or eax, 0x10000000
push edi
mov edx, esi
mov ecx, esi
call fcn.0050a980
cmp eax, ebx
jl 0x46ecf6
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0xb828]
mov ecx, dword [eax + 0x34]
mov dword [edi + 0x34], ecx
mov edx, dword [eax + 0x38]
mov ecx, dword [edi + 0xc]
add esi, esi
add esi, esi
push esi
lea eax, [ebp - 0x54]
push eax
push ecx
mov dword [edi + 0x38], edx
call sub.msvcrt.dll_memcpy
mov eax, dword [edi + 4]
add esp, 0xc
push esi
lea edx, [ebp - 0x64]
push edx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
push edi
mov esi, ebx
call fcn.00508740
test eax, eax
jl 0x46ecf6
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, 0x8007000e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4