Function at 0x46cff0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x34
push ebx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
mov edx, dword [eax + 0x24]
push esi
push edi
mov edi, ecx
mov ecx, ebx
call edx
mov esi, eax
mov eax, dword [0x4c6060]
push eax
mov dword [esp + 0x28], esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea edx, [esi + 1]
mov esi, dword [eax + 0x20]
shl edx, 4
and edx, 0xfffffff0
lea ecx, [esi + edx]
cmp ecx, dword [eax + 0x2c]
ja 0x46d035
mov dword [eax + 0x20], ecx
jmp 0x46d041
mov esi, dword [eax]
push edx
mov edx, dword [esi + 0x14]
mov ecx, eax
call edx
mov esi, eax
mov eax, dword [ebx]
mov edx, dword [eax + 0x28]
push esi
mov ecx, ebx
call edx
mov eax, dword [edi + 0x10]
add edi, 8
and eax, 0x3fffffff
cmp dword [edi + 4], eax
jne 0x46d066
push 0x6c
push edi
call fcn.00402730
add esp, 8
mov ecx, dword [edi + 4]
mov eax, ecx
imul eax, eax, 0x6c
add eax, dword [edi]
add ecx, 1
mov dword [edi + 4], ecx
mov ecx, dword [ebp + 0xc]
mov dword [eax], ecx
mov ecx, dword [ebp + 0x14]
test ecx, ecx
jle 0x46d395
mov ebx, dword [ebp + 0x10]
fldz
add eax, 8
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
mov eax, dword [esp + 0x24]
test eax, eax
jle 0x46d3bd
mov ecx, dword [ebx + 4]
fld dword [esi + 0xc]
mov edx, dword [ebx]
fstp dword [esp + 0x20]
fld dword [esi + 4]
mov dword [esp + 0x34], ecx
fld dword [esp + 0x34]
mov dword [esp + 0x30], edx
mov edx, dword [ebx + 8]
fld st(0)
fmulp st(2)
mov dword [esp + 0x38], edx
fld dword [esi]
mov ecx, dword [ebx + 0xc]
fld dword [esp + 0x30]
lea edx, [eax - 1]
cmp edx, 4
fld st(0)
fmulp st(2)
mov dword [esp + 0x3c], ecx
fxch st(3)
mov edi, 1
faddp st(1)
fld dword [esi + 8]
fld dword [esp + 0x38]
fld st(0)
fmulp st(2)
fxch st(2)
faddp st(1)
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fld st(0)
fld dword [esp + 0x20]
fld st(0)
fsubp st(2)
fxch st(1)
fstp dword [esp + 0x14]
faddp st(1)
fstp dword [esp + 0x18]
jl 0x46d2e4
lea edx, [eax - 5]
shr edx, 2
add edx, edi
lea ecx, [esi + 0x28]
lea edi, [edx*4 + 1]
fld dword [ecx - 0x14]
fmul st(2)
fld dword [ecx - 0x18]
fmul st(4)
faddp st(1)
fld dword [ecx - 0x10]
fmul st(2)
faddp st(1)
fstp dword [esp + 0x1c]
fld dword [ecx - 0xc]
fstp dword [esp + 0x20]
fld dword [esp + 0x1c]
fld st(0)
fld dword [esp + 0x20]
fld st(0)
fsubp st(2)
fxch st(1)
fstp dword [esp + 0x20]
faddp st(1)
fstp dword [esp + 0x1c]
fld dword [esp + 0x20]
fld dword [esp + 0x14]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x46d17c
fstp dword [esp + 0x14]
jmp 0x46d17e
fstp st(0)
fld dword [esp + 0x1c]
fld dword [esp + 0x18]
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x46d195
fstp dword [esp + 0x18]
jmp 0x46d197
fstp st(0)
fld dword [ecx - 4]
fmul st(2)
fld dword [ecx - 8]
fmul st(4)
faddp st(1)
fld dword [ecx]
fmul st(2)
faddp st(1)
fstp dword [esp + 0x1c]
fld dword [ecx + 4]
fstp dword [esp + 0x20]
fld dword [esp + 0x1c]
fld st(0)
fld dword [esp + 0x20]
fld st(0)
fsubp st(2)
fxch st(1)
fstp dword [esp + 0x20]
faddp st(1)
fstp dword [esp + 0x1c]
fld dword [esp + 0x20]
fld dword [esp + 0x14]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x46d1e5
fstp dword [esp + 0x14]
jmp 0x46d1e7
fstp st(0)
fld dword [esp + 0x1c]
fld dword [esp + 0x18]
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x46d1fe
fstp dword [esp + 0x18]
jmp 0x46d200
fstp st(0)
fld dword [ecx + 0xc]
fmul st(2)
fld dword [ecx + 8]
fmul st(4)
faddp st(1)
fld dword [ecx + 0x10]
fmul st(2)
faddp st(1)
fstp dword [esp + 0x1c]
fld dword [ecx + 0x14]
fstp dword [esp + 0x20]
fld dword [esp + 0x1c]
fld st(0)
fld dword [esp + 0x20]
fld st(0)
fsubp st(2)
fxch st(1)
fstp dword [esp + 0x20]
faddp st(1)
fstp dword [esp + 0x1c]
fld dword [esp + 0x20]
fld dword [esp + 0x14]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x46d24f
fstp dword [esp + 0x14]
jmp 0x46d251
fstp st(0)
fld dword [esp + 0x1c]
fld dword [esp + 0x18]
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x46d268
fstp dword [esp + 0x18]
jmp 0x46d26a
fstp st(0)
fld dword [ecx + 0x1c]
fmul st(2)
fld dword [ecx + 0x18]
fmul st(4)
faddp st(1)
fld dword [ecx + 0x20]
fmul st(2)
faddp st(1)
fstp dword [esp + 0x1c]
fld dword [ecx + 0x24]
fstp dword [esp + 0x20]
fld dword [esp + 0x1c]
fld st(0)
fld dword [esp + 0x20]
fld st(0)
fsubp st(2)
fxch st(1)
fstp dword [esp + 0x20]
faddp st(1)
fstp dword [esp + 0x1c]
fld dword [esp + 0x20]
fld dword [esp + 0x14]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x46d2b9
fstp dword [esp + 0x14]
jmp 0x46d2bb
fstp st(0)
fld dword [esp + 0x1c]
fld dword [esp + 0x18]
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x46d2d2
fstp dword [esp + 0x18]
jmp 0x46d2d4
fstp st(0)
add ecx, 0x40
sub edx, 1
jne 0x46d12d
mov eax, dword [esp + 0x24]
cmp edi, eax
jge 0x46d366
mov ecx, edi
shl ecx, 4
lea edx, [ecx + esi + 8]
mov ecx, eax
sub ecx, edi
fld dword [edx - 4]
fmul st(2)
fld dword [edx - 8]
fmul st(4)
faddp st(1)
fld st(1)
fmul dword [edx]
faddp st(1)
fstp dword [esp + 0x1c]
fld dword [edx + 4]
fstp dword [esp + 0x20]
fld dword [esp + 0x1c]
fld st(0)
fld dword [esp + 0x20]
fld st(0)
fsubp st(2)
fxch st(1)
fstp dword [esp + 0x20]
faddp st(1)
fstp dword [esp + 0x1c]
fld dword [esp + 0x20]
fld dword [esp + 0x14]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x46d343
fstp dword [esp + 0x14]
jmp 0x46d345
fstp st(0)
fld dword [esp + 0x1c]
fld dword [esp + 0x18]
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x46d35c
fstp dword [esp + 0x18]
jmp 0x46d35e
fstp st(0)
add edx, 0x10
sub ecx, 1
jne 0x46d2f5
fstp st(1)
fstp st(1)
fstp st(0)
mov eax, dword [esp + 0x28]
fld dword [esp + 0x14]
fstp dword [eax - 4]
add eax, 8
fld dword [esp + 0x18]
add ebx, 0x20
sub dword [esp + 0x2c], 1
fstp dword [eax - 8]
mov dword [esp + 0x28], eax
jne 0x46d096
fstp st(0)
mov edx, dword [0x4c6060]
push edx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp esi, dword [eax + 0x28]
mov dword [eax + 0x20], esi
jne 0x46d3b4
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x18]
push esi
call eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
fst dword [esp + 0x14]
fst dword [esp + 0x18]
jmp 0x46d36c