Function at 0x46fa60
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x34
mov eax, dword [0x4c6060]
push ebx
push esi
push edi
xor edi, edi
push eax
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], bind
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax + 0x20]
lea edx, [ecx + 0xfb0]
cmp edx, dword [eax + 0x2c]
ja 0x46fa9f
mov dword [eax + 0x20], edx
mov eax, ecx
jmp 0x46faad
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x14]
push 0xfb0
call eax
mov ebx, dword [ebp + 0x14]
cmp dword [ebx + 4], edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], 0x800003e8
mov dword [esp + 0x2c], eax
jle 0x46fb2c
mov ecx, dword [ebx]
mov esi, dword [ecx + edi*4]
movzx edx, word [esi + 0x94]
mov ecx, dword [ebp + 0x18]
mov eax, dword [ecx]
add eax, edx
cmp byte [eax], 0
jne 0x46fafd
fld dword [ebp + 0x10]
mov byte [eax], 1
lea eax, [esi + 0xe0]
push eax
push ecx
add eax, 0x40
fstp dword [esp]
push eax
call fcn.004686f0
mov ecx, dword [ebp + 0x18]
add esp, 0xc
movzx edx, word [esi + 0x94]
fld dword [ebp + 0x10]
mov eax, dword [ecx]
mov byte [edx + eax], 2
mov eax, dword [ebp + 0xc]
lea edx, [esp + 0x20]
push edx
push ecx
push ecx
fstp dword [esp]
push eax
push esi
call fcn.0046e140
add edi, 1
add esp, 0x14
cmp edi, dword [ebx + 4]
jl 0x46fac5
mov esi, dword [ebp + 8]
fld dword [ebp + 0x10]
mov eax, dword [esi + 0x5c]
mov ecx, dword [esi + 0x54]
mov edx, dword [esi + 0x58]
mov edi, dword [esi + 0x50]
fst dword [esi + 0x54]
fsub dword [esi + 0x50]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], edx
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
fst dword [esi + 0x58]
fldz
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x46fb6c
fld1
fdivrp st(1)
jmp 0x46fb70
fstp st(0)
fldz
fstp dword [esi + 0x5c]
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 8]
mov ecx, dword [eax + 8]
push ecx
mov eax, esp
mov byte [eax], 1
mov edx, dword [ebx]
mov eax, dword [edx]
mov eax, dword [eax + 0xb8]
mov edx, dword [ecx]
mov edx, dword [edx + 0x44]
push eax
push esi
lea eax, [esp + 0x2c]
push eax
call edx
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov dword [esi + 0x50], edi
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esi + 0x54], eax
mov dword [esi + 0x58], ecx
mov dword [esi + 0x5c], edx
mov eax, dword [0x4c6060]
mov esi, dword [esp + 0x2c]
push eax
call edi
cmp esi, dword [eax + 0x28]
mov dword [eax + 0x20], esi
jne 0x46fbd7
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x18]
push esi
call eax
mov eax, dword [esp + 0x28]
test eax, eax
js 0x46fc05
mov ecx, dword [0x4c6060]
and eax, 0x3fffffff
push ecx
mov esi, eax
call edi
mov ecx, dword [esp + 0x20]
push 0x17
lea edx, [esi*4]
push edx
push ecx
mov ecx, eax
call fcn.004023e0
xor ecx, ecx
cmp dword [ebx + 4], ecx
mov dword [esp + 0x14], ecx
jle 0x46ff3f
mov esi, dword [ebp + 0x20]
jmp 0x46fc22
xor ecx, ecx
mov edx, dword [ebx]
mov eax, dword [esp + 0x14]
mov eax, dword [edx + eax*4]
movzx edx, word [eax + 0x94]
mov edi, dword [ebp + 0x18]
mov edi, dword [edi]
mov byte [edx + edi], 0x10
cmp word [eax + 0x9c], cx
mov dword [esp + 0xc], eax
mov dword [esp + 0x18], ecx
jbe 0x46fd84
mov dword [esp + 0x10], ecx
mov ebx, dword [eax + 0x98]
add ebx, dword [esp + 0x10]
mov ecx, dword [ebx]
movzx edx, byte [ecx + 0x1c]
cmp dword [ebp + 0xc], edx
jg 0x46fd62
mov edi, dword [ebx + 8]
xor edi, dword [ebx + 4]
xor edi, eax
cmp byte [edi + 0xd8], 7
jne 0x46fca9
mov eax, dword [esi + 8]
and eax, 0x3fffffff
cmp dword [esi + 4], eax
jne 0x46fc96
push 4
push esi
call fcn.00402730
add esp, 8
mov ecx, dword [esi + 4]
mov eax, dword [ebx]
mov edx, dword [esi]
mov dword [edx + ecx*4], eax
add dword [esi + 4], 1
jmp 0x46fd5e
movzx ecx, word [edi + 0x94]
mov edx, dword [ebp + 0x18]
mov edx, dword [edx]
cmp byte [ecx + edx], 0x10
je 0x46fd62
mov eax, dword [esi + 8]
and eax, 0x3fffffff
cmp dword [esi + 4], eax
jne 0x46fcd7
push 4
push esi
call fcn.00402730
add esp, 8
mov ecx, dword [esi + 4]
mov eax, dword [ebx]
mov edx, dword [esi]
mov dword [edx + ecx*4], eax
add dword [esi + 4], 1
movzx ecx, word [edi + 0x94]
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
cmp byte [ecx + eax], 4
jae 0x46fd5e
mov ebx, dword [ebp + 0x1c]
mov ecx, dword [ebx + 8]
and ecx, 0x3fffffff
cmp dword [ebx + 4], ecx
jne 0x46fd13
push 4
push ebx
call fcn.00402730
add esp, 8
mov edx, dword [ebx + 4]
mov eax, dword [ebx]
mov dword [eax + edx*4], edi
add dword [ebx + 4], 1
movzx ecx, word [edi + 0x94]
mov ebx, dword [ebp + 0x18]
mov edx, dword [ebx]
cmp byte [ecx + edx], 0
lea eax, [ecx + edx]
jne 0x46fd51
fld dword [ebp + 0x10]
mov byte [eax], 1
lea eax, [edi + 0xe0]
push eax
push ecx
add eax, 0x40
fstp dword [esp]
push eax
call fcn.004686f0
add esp, 0xc
movzx eax, word [edi + 0x94]
mov ecx, dword [ebx]
mov byte [eax + ecx], 4
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x18]
movzx edx, word [eax + 0x9c]
add dword [esp + 0x10], 0x30
add ecx, 1
cmp ecx, edx
mov dword [esp + 0x18], ecx
jl 0x46fc54
mov ebx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x1c]
mov edi, dword [edx + 4]
mov ecx, dword [esi + 4]
xor edx, edx
cmp dword [eax + 0xa4], edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], edx
jle 0x46fee2
jmp 0x46fdb0
mov ecx, dword [eax + 0xa0]
mov edx, dword [ecx + edx*4]
mov ebx, dword [edx + 0x28]
mov ecx, dword [ebx]
movzx edx, byte [ecx + 0x1c]
cmp dword [ebp + 0xc], edx
jg 0x46fec0
mov edi, dword [ebx + 8]
xor edi, dword [ebx + 4]
xor edi, eax
cmp byte [edi + 0xd8], 7
jne 0x46fe07
mov eax, dword [esi + 8]
and eax, 0x3fffffff
cmp dword [esi + 4], eax
jne 0x46fdf4
push 4
push esi
call fcn.00402730
add esp, 8
mov ecx, dword [esi + 4]
mov eax, dword [ebx]
mov edx, dword [esi]
mov dword [edx + ecx*4], eax
add dword [esi + 4], 1
jmp 0x46febc
movzx ecx, word [edi + 0x94]
mov edx, dword [ebp + 0x18]
mov edx, dword [edx]
cmp byte [ecx + edx], 0x10
je 0x46fec0
mov eax, dword [esi + 8]
and eax, 0x3fffffff
cmp dword [esi + 4], eax
jne 0x46fe35
push 4
push esi
call fcn.00402730
add esp, 8
mov ecx, dword [esi + 4]
mov eax, dword [ebx]
mov edx, dword [esi]
mov dword [edx + ecx*4], eax
add dword [esi + 4], 1
movzx ecx, word [edi + 0x94]
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
cmp byte [ecx + eax], 4
jae 0x46febc
mov ebx, dword [ebp + 0x1c]
mov ecx, dword [ebx + 8]
and ecx, 0x3fffffff
cmp dword [ebx + 4], ecx
jne 0x46fe71
push 4
push ebx
call fcn.00402730
add esp, 8
mov edx, dword [ebx + 4]
mov eax, dword [ebx]
mov dword [eax + edx*4], edi
add dword [ebx + 4], 1
movzx ecx, word [edi + 0x94]
mov ebx, dword [ebp + 0x18]
mov edx, dword [ebx]
cmp byte [ecx + edx], 0
lea eax, [ecx + edx]
jne 0x46feaf
fld dword [ebp + 0x10]
mov byte [eax], 1
lea eax, [edi + 0xe0]
push eax
push ecx
add eax, 0x40
fstp dword [esp]
push eax
call fcn.004686f0
add esp, 0xc
movzx eax, word [edi + 0x94]
mov ecx, dword [ebx]
mov byte [eax + ecx], 4
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x18]
add edx, 1
cmp edx, dword [eax + 0xa4]
mov dword [esp + 0x18], edx
jl 0x46fdb0
mov ebx, dword [ebp + 0x14]
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x1c]
mov eax, dword [esi + 4]
sub eax, ecx
cmp eax, 1
jle 0x46ff05
mov edx, dword [esi]
push 0x46d5f0
add eax, 0xffffffff
push eax
lea eax, [edx + ecx*4]
push 0
push eax
call fcn.00471750
add esp, 0x10
mov ecx, dword [ebp + 0x1c]
mov eax, dword [ecx + 4]
sub eax, edi
cmp eax, 1
jle 0x46ff2b
mov ecx, dword [ecx]
push 0x46d5d0
add eax, 0xffffffff
push eax
lea edx, [ecx + edi*4]
push 0
push edx
call fcn.00471750
add esp, 0x10
mov eax, dword [esp + 0x14]
add eax, 1
cmp eax, dword [ebx + 4]
mov dword [esp + 0x14], eax
jl 0x46fc20
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret