Function at 0x422580
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
fldz
sub esp, 0x118
fcom dword [ebp + 0x14]
push esi
push edi
fnstsw ax
test ah, 1
je 0x4229e8
fcomp dword [ebp + 0x10]
fnstsw ax
test ah, 1
je 0x4229ea
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
fld dword [esi]
fsub dword [edi]
fstp dword [esp + 0x10]
fld dword [esi + 4]
fsub dword [edi + 4]
fstp dword [esp + 0x14]
fld dword [esi + 8]
fsub dword [edi + 8]
fstp dword [esp + 0x18]
fld dword [esp + 0x14]
fld dword [esp + 0x10]
fld dword [esp + 0x18]
fld st(1)
fmulp st(2)
fld st(2)
fmulp st(3)
fxch st(1)
faddp st(2)
fmul st(0), st(0)
faddp st(1)
fstp dword [esp + 8]
fld dword [esp + 8]
call fcn.0042eb10
fstp dword [esp + 0xc]
fld dword [esp + 0xc]
fstp dword [esp + 0x3c]
fldz
fcom dword [esp + 0x3c]
fnstsw ax
test ah, 5
jp 0x4229e8
fld dword [esp + 8]
fstp dword [esp + 0xc]
fld st(0)
fld dword [esp + 0xc]
fucom st(1)
fnstsw ax
fstp st(1)
test ah, 0x44
jnp 0x422642
fstp st(1)
call fcn.0042eb10
fstp dword [esp + 0xc]
fld dword [esp + 0xc]
fld1
fdivrp st(1)
jmp 0x422644
fstp st(0)
fstp dword [esp + 8]
fld dword [esp + 8]
fld st(0)
fmul dword [esp + 0x10]
fstp dword [esp + 0x10]
fld dword [esp + 0x14]
fmul st(1)
fstp dword [esp + 0x14]
fmul dword [esp + 0x18]
fstp dword [esp + 0x18]
fld dword [0x4c3040]
fstp dword [esp + 0x20]
fld dword [0x4c3044]
fstp dword [esp + 0x24]
fld dword [0x4c3048]
fstp dword [esp + 0x28]
fld dword [esp + 0x24]
fld st(0)
fld dword [esp + 0x14]
fld st(0)
fmulp st(2)
fld dword [esp + 0x20]
fld st(0)
fld dword [esp + 0x10]
fld st(0)
fmulp st(2)
fxch st(4)
faddp st(1)
fld dword [esp + 0x28]
fld st(0)
fmul dword [esp + 0x18]
faddp st(2)
fxch st(1)
fstp dword [esp + 0xc]
fld dword [esp + 0xc]
fabs
fstp dword [esp + 8]
fld dword [esp + 8]
fcomp qword [0x4b34d8]
fnstsw ax
fld1
test ah, 5
jp 0x4227ad
fstp st(0)
fld st(4)
fmul dword [esp + 0x18]
fld st(1)
fmul st(4)
fsubp st(1)
fstp dword [esp + 0x20]
fmul st(3)
fld dword [esp + 0x18]
fmul st(2)
fsubp st(1)
fstp dword [esp + 0x24]
fmulp st(1)
fxch st(2)
fmulp st(1)
fsubp st(1)
fstp dword [esp + 0x28]
fld dword [esp + 0x24]
fld dword [esp + 0x20]
fld dword [esp + 0x28]
fld st(1)
fmulp st(2)
fld st(2)
fmulp st(3)
fxch st(1)
faddp st(2)
fmul st(0), st(0)
faddp st(1)
fstp dword [esp + 8]
fldz
fld st(0)
fld dword [esp + 8]
fucom st(1)
fnstsw ax
fstp st(1)
test ah, 0x44
jnp 0x42274d
fstp st(1)
call fcn.0042eb10
fstp dword [esp + 8]
fld dword [esp + 8]
fld1
fdivrp st(1)
jmp 0x42274f
fstp st(0)
fstp dword [esp + 8]
push ecx
fld dword [esp + 0xc]
fld st(0)
fmul dword [esp + 0x24]
fstp dword [esp + 0x24]
fld st(0)
fmul dword [esp + 0x28]
fstp dword [esp + 0x28]
fld st(0)
fmul dword [esp + 0x2c]
fstp dword [esp + 0x2c]
fmul qword [0x4bea18]
fstp dword [esp + 0x30]
fld dword [esp + 0x10]
fstp dword [esp]
call fcn.0040ab80
lea eax, [esp + 0x24]
fstp dword [esp]
push eax
lea ecx, [esp + 0x18]
call fcn.0040ad60
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x44]
call fcn.0040a7f0
jmp 0x4227e9
fstp st(5)
fstp st(2)
fstp st(0)
fstp st(1)
fstp st(0)
fldz
fst dword [esp + 0x44]
fst dword [esp + 0x48]
fst dword [esp + 0x4c]
fst dword [esp + 0x50]
fst dword [esp + 0x58]
fst dword [esp + 0x5c]
fst dword [esp + 0x60]
fst dword [esp + 0x64]
fstp dword [esp + 0x6c]
fst dword [esp + 0x40]
fst dword [esp + 0x54]
fstp dword [esp + 0x68]
fld dword [edi]
lea edx, [esp + 0x90]
fadd dword [esi]
mov ecx, edx
mov dword [esp + 0x80], edx
mov dword [esp + 0x84], 0
fstp dword [esp + 0x10]
mov dword [esp + 0x88], reloc.WSOCK32.dll_accept
fld dword [edi + 4]
fadd dword [esi + 4]
fstp dword [esp + 0x14]
fld dword [edi + 8]
fadd dword [esi + 8]
fstp dword [esp + 0x18]
fld dword [edi + 0xc]
fadd dword [esi + 0xc]
fstp dword [esp + 0x1c]
fld dword [esp + 0x10]
fld qword [0x4b2f68]
fmul st(1), st(0)
fxch st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x14]
fmul st(1)
fstp dword [esp + 0x14]
fld dword [esp + 0x18]
fmul st(1)
fstp dword [esp + 0x18]
fmul dword [esp + 0x1c]
fstp dword [esp + 0x1c]
fld dword [esp + 0x10]
fstp dword [esp + 0x70]
fld dword [esp + 0x14]
fstp dword [esp + 0x74]
fld dword [esp + 0x18]
fstp dword [esp + 0x78]
fld dword [esp + 0x1c]
fstp dword [esp + 0x7c]
fld dword [ebp + 0x10]
fld qword [0x4b34d0]
fmul st(1)
fmulp st(1)
fmul dword [esp + 0x3c]
fstp dword [esp + 8]
call fcn.00401aa0
mov ecx, dword [esp + 0x88]
mov eax, dword [esp + 0x84]
and ecx, 0x3fffffff
cmp eax, ecx
jne 0x4228d1
lea edx, [esp + 0x80]
push 0x90
push edx
call fcn.00402730
mov eax, dword [esp + 0x8c]
add esp, 8
lea esi, [eax + eax*8]
add eax, 1
shl esi, 4
add esi, dword [esp + 0x80]
mov dword [esp + 0x84], eax
lea eax, [esp + 0x40]
push eax
lea ecx, [esi + 0x50]
call fcn.00401a20
fldz
fst dword [esi + 0x10]
lea ecx, [esi + 0x20]
fst dword [esi + 0x14]
push ecx
fst dword [esi + 0x18]
fst dword [esi + 0x1c]
fst dword [ecx]
fst dword [ecx + 4]
fst dword [ecx + 8]
fst dword [ecx + 0xc]
fst dword [ecx + 0x10]
fst dword [ecx + 0x14]
fst dword [ecx + 0x18]
fst dword [ecx + 0x1c]
fst dword [ecx + 0x20]
fst dword [ecx + 0x24]
fst dword [ecx + 0x28]
fstp dword [ecx + 0x2c]
fld1
fst dword [ecx]
fst dword [ecx + 0x14]
fstp dword [ecx + 0x28]
fld dword [ebp + 0x10]
fmul st(0), st(0)
fld dword [esp + 0x40]
fld st(0)
fld qword [0x4b2f68]
fmul st(1), st(0)
fxch st(1)
fmulp st(2)
fmul st(1), st(0)
fxch st(1)
fdiv qword [0x4b3350]
fld st(2)
fmul qword [0x4b34c8]
faddp st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fst dword [ecx]
fstp dword [esi + 0x34]
fmulp st(1)
fstp dword [esi + 0x48]
fld dword [ebp + 0x14]
fstp dword [esp]
call fcn.00407710
fldz
mov ecx, dword [ebp + 0x18]
fst dword [esi + 0x1c]
push ecx
fst dword [esi + 0x18]
lea edx, [esp + 0x84]
fst dword [esi + 0x14]
push edx
fstp dword [esi + 0x10]
fld dword [esp + 0x10]
fstp dword [esi]
fld dword [ebp + 0x14]
fstp dword [esi + 4]
call fcn.0041fba0
mov eax, dword [esp + 0x90]
add esp, 8
test eax, eax
js 0x4229e0
and eax, 0x3fffffff
mov esi, eax
mov eax, dword [0x4c6060]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, dword [esp + 0x80]
push 0x17
lea ecx, [esi + esi*8]
shl ecx, 4
push ecx
push edx
mov ecx, eax
call fcn.004023e0
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
fstp st(0)
pop edi
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret