Function at 0x421bc0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
fldz
sub esp, 0x368
fcom dword [ebp + 0x14]
push esi
push edi
fnstsw ax
test ah, 1
jne 0x421be7
fstp st(0)
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
fcomp dword [ebp + 0x10]
fnstsw ax
test ah, 1
je 0x421bdc
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 + 0x10]
fld dword [esp + 0x14]
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 + 0x30]
fld dword [esp + 0x30]
call fcn.0042eb10
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fstp dword [esp + 0x34]
fldz
fcom dword [esp + 0x34]
fnstsw ax
test ah, 5
jp 0x421dcc
fld dword [esp + 0x30]
fstp dword [esp + 0x2c]
fld st(0)
fld dword [esp + 0x2c]
fucom st(1)
fnstsw ax
fstp st(1)
test ah, 0x44
jnp 0x421c8d
fstp st(1)
call fcn.0042eb10
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fld1
fdivrp st(1)
fstp dword [esp + 0x30]
fldz
jmp 0x421c93
fstp st(0)
fst dword [esp + 0x30]
fld dword [esp + 0x30]
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 [esp + 0x10]
fld st(0)
fldz
fmul st(1), st(0)
fld dword [esp + 0x14]
fld st(0)
fmul st(2)
fld st(0)
fadd st(4)
fadd dword [esp + 0x18]
fstp dword [esp + 0x38]
fld dword [esp + 0x38]
fabs
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fcomp qword [0x4b34d8]
fnstsw ax
test ah, 5
jp 0x421dc2
fld dword [esp + 0x18]
fmul st(3)
fld st(0)
fsubrp st(3)
fxch st(2)
fstp dword [esp + 0x10]
fxch st(4)
fsubrp st(1)
fstp dword [esp + 0x14]
fxch st(2)
fsubrp st(1)
fstp dword [esp + 0x18]
fld dword [esp + 0x10]
fld dword [esp + 0x14]
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 + 0x2c]
fld st(1)
fld dword [esp + 0x2c]
fucom st(1)
fnstsw ax
fstp st(1)
test ah, 0x44
jnp 0x421d5e
fstp st(2)
fstp st(0)
call fcn.0042eb10
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fld1
fdivrp st(1)
fstp dword [esp + 0x30]
fldz
jmp 0x421d66
fstp st(0)
fxch st(1)
fstp dword [esp + 0x30]
fld dword [esp + 0x30]
push ecx
fld st(0)
fmul dword [esp + 0x14]
fstp dword [esp + 0x14]
fld dword [esp + 0x18]
fmul st(1)
fstp dword [esp + 0x18]
fld dword [esp + 0x1c]
fmul st(1)
fstp dword [esp + 0x1c]
fmulp st(1)
fstp dword [esp + 0x20]
fld dword [esp + 0x3c]
fstp dword [esp]
call fcn.0040ab80
lea eax, [esp + 0x14]
fstp dword [esp]
push eax
lea ecx, [esp + 0x118]
call fcn.0040ad60
lea ecx, [esp + 0x110]
push ecx
lea ecx, [esp + 0x44]
call fcn.0040a7f0
jmp 0x421dfe
fstp st(3)
fstp st(2)
fstp st(0)
fstp st(1)
fstp st(0)
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]
fld1
fst dword [esp + 0x40]
fst dword [esp + 0x54]
fstp dword [esp + 0x68]
fld dword [edi]
lea edx, [esp + 0x1c0]
fadd dword [esi]
mov dword [esp + 0x1b0], edx
mov dword [esp + 0x1b4], 0
mov dword [esp + 0x1b8], reloc.WSOCK32.dll_closesocket
fstp dword [esp + 0x10]
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]
mov edi, 2
fadd dword [esi + 0xc]
mov esi, edx
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 [0x4b3458]
fmul st(1)
fmul st(1)
fmul st(1)
fstp dword [esp + 0x2c]
fld qword [0x4b34d0]
fmul st(1)
fmulp st(1)
fmul dword [esp + 0x34]
fstp dword [esp + 0x38]
fld dword [esp + 0x38]
fld st(0)
fld dword [esp + 0x2c]
fld st(0)
faddp st(2)
fxch st(1)
fstp dword [esp + 0x3c]
fld dword [ebp + 0x14]
fld st(0)
fmulp st(2)
fld dword [esp + 0x3c]
fld st(0)
fdivp st(3)
fxch st(2)
fstp dword [esp + 0x30]
fmulp st(2)
fdivp st(1)
fstp dword [esp + 0x3c]
mov ecx, esi
call fcn.00401aa0
add esi, 0x90
sub edi, 1
jns 0x421ef3
lea ecx, [esp + 0x80]
call fcn.00401aa0
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0xd4]
call fcn.00401a20
fldz
fst dword [esp + 0x90]
push ecx
fst dword [esp + 0x98]
lea ecx, [esp + 0xa4]
fst dword [esp + 0x9c]
fst dword [esp + 0xa0]
fst dword [esp + 0xa8]
fst dword [esp + 0xac]
fst dword [esp + 0xb0]
fst dword [esp + 0xb4]
fst dword [esp + 0xbc]
fst dword [esp + 0xc0]
fst dword [esp + 0xc4]
fst dword [esp + 0xc8]
fstp dword [esp + 0xd0]
fld dword [esp + 0x38]
fld st(0)
fld qword [0x4b2f68]
fmul st(1), st(0)
fxch st(1)
fst qword [esp + 0x114]
fld dword [ebp + 0x10]
fmul st(0), st(0)
fxch st(3)
fmulp st(1)
fmul st(1)
fdiv qword [0x4b3350]
fld st(2)
fmul qword [0x4b34c8]
faddp st(1)
fstp dword [esp + 0xa4]
fld dword [esp + 0xa4]
fstp dword [esp + 0xb8]
fmulp st(1)
fstp dword [esp + 0xcc]
fld dword [esp + 0x40]
fstp dword [esp]
call fcn.00407710
fldz
mov ecx, dword [esp + 0x1b8]
mov eax, dword [esp + 0x1b4]
fst dword [esp + 0x9c]
fst dword [esp + 0x98]
and ecx, 0x3fffffff
cmp eax, ecx
fst dword [esp + 0x94]
fstp dword [esp + 0x90]
fld dword [esp + 0x38]
fstp dword [esp + 0x80]
fld dword [esp + 0x3c]
fstp dword [esp + 0x84]
jne 0x42204b
lea edx, [esp + 0x1b0]
push 0x90
push edx
call fcn.00402730
mov eax, dword [esp + 0x1bc]
add esp, 8
lea esi, [eax + eax*8]
add eax, 1
shl esi, 4
add esi, dword [esp + 0x1b0]
mov dword [esp + 0x1b4], eax
lea eax, [esp + 0x80]
push eax
mov ecx, esi
call fcn.00401c50
lea ecx, [esp + 0xd0]
push ecx
lea ecx, [esi + 0x50]
call fcn.00401a20
lea ecx, [esp + 0x120]
call fcn.00401aa0
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x174]
call fcn.00401a20
fldz
fst dword [esp + 0x10]
lea eax, [esp + 0x10]
fst dword [esp + 0x14]
push eax
fld qword [esp + 0x114]
lea ecx, [esp + 0x44]
fstp dword [esp + 0x1c]
push ecx
mov ecx, eax
fstp dword [esp + 0x24]
call fcn.0040d5c0
fld dword [esp + 0x10]
lea edx, [esp + 0x80]
fadd dword [esp + 0x1a0]
push edx
sub esp, 8
fstp dword [esp + 0x1c]
fld dword [esp + 0x20]
fadd dword [esp + 0x1b0]
fstp dword [esp + 0x20]
fld dword [esp + 0x24]
fadd dword [esp + 0x1b4]
fstp dword [esp + 0x24]
fld dword [esp + 0x28]
fadd dword [esp + 0x1b8]
fstp dword [esp + 0x28]
fld dword [esp + 0x1c]
fstp dword [esp + 0x1ac]
fld dword [esp + 0x20]
fstp dword [esp + 0x1b0]
fld dword [esp + 0x24]
fstp dword [esp + 0x1b4]
fld dword [esp + 0x28]
fstp dword [esp + 0x1b8]
fldz
fst dword [esp + 0x13c]
fst dword [esp + 0x140]
fld dword [ebp + 0x10]
fld qword [0x4b34c0]
fmul st(1)
fstp dword [esp + 0x144]
fxch st(1)
fst dword [esp + 0x148]
fst dword [esp + 0x8c]
fst dword [esp + 0x90]
fst dword [esp + 0xa8]
fst dword [esp + 0xa4]
fst dword [esp + 0xa0]
fst dword [esp + 0x9c]
fst dword [esp + 0xac]
fst dword [esp + 0xb0]
fst dword [esp + 0xb4]
fst dword [esp + 0xb8]
fst dword [esp + 0xbc]
fst dword [esp + 0xc0]
fst dword [esp + 0xc4]
fst dword [esp + 0xc8]
fst dword [esp + 0xcc]
fst dword [esp + 0xd0]
fst dword [esp + 0xd4]
fstp dword [esp + 0xd8]
fld dword [esp + 0x3c]
fstp dword [esp + 4]
fstp dword [esp]
call fcn.0041e600
add esp, 0xc
lea eax, [esp + 0xa0]
push eax
lea ecx, [esp + 0x144]
call fcn.00401680
fld dword [0x4b2f98]
push ecx
lea ecx, [esp + 0x144]
fstp dword [esp]
call fcn.00407710
fld dword [esp + 0x30]
fmul qword [0x4b2f68]
lea ecx, [esp + 0x140]
push ecx
push ecx
fstp dword [esp + 0x3c]
lea edx, [esp + 0x138]
fld dword [esp + 0x3c]
fstp dword [esp]
push edx
call fcn.0041e8d0
fld dword [esp + 0x38]
fmul qword [0x4b2f68]
mov ecx, dword [esp + 0x1c4]
mov eax, dword [esp + 0x1c0]
and ecx, 0x3fffffff
fstp dword [esp + 0x38]
add esp, 0xc
cmp eax, ecx
fld dword [esp + 0x2c]
fstp dword [esp + 0x120]
fld dword [esp + 0x34]
fstp dword [esp + 0x124]
jne 0x4222a7
lea edx, [esp + 0x1b0]
push 0x90
push edx
call fcn.00402730
mov eax, dword [esp + 0x1bc]
add esp, 8
lea esi, [eax + eax*8]
add eax, 1
shl esi, 4
add esi, dword [esp + 0x1b0]
mov dword [esp + 0x1b4], eax
lea eax, [esp + 0x120]
push eax
mov ecx, esi
call fcn.00401c50
lea ecx, [esp + 0x170]
push ecx
lea ecx, [esi + 0x50]
call fcn.00401a20
lea ecx, [esp + 0x120]
call fcn.00401aa0
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x174]
call fcn.00401a20
fldz
fst dword [esp + 0x10]
lea eax, [esp + 0x10]
fst dword [esp + 0x14]
push eax
fld qword [esp + 0x114]
lea ecx, [esp + 0x44]
fchs
push ecx
fstp dword [esp + 0x20]
mov ecx, eax
fstp dword [esp + 0x24]
call fcn.0040d5c0
fld dword [esp + 0x10]
lea edx, [esp + 0x80]
fadd dword [esp + 0x1a0]
push edx
fstp dword [esp + 0x14]
fld dword [esp + 0x18]
fadd dword [esp + 0x1a8]
fstp dword [esp + 0x18]
fld dword [esp + 0x1c]
fadd dword [esp + 0x1ac]
fstp dword [esp + 0x1c]
fld dword [esp + 0x20]
fadd dword [esp + 0x1b0]
fstp dword [esp + 0x20]
fld dword [esp + 0x14]
fstp dword [esp + 0x1a4]
fld dword [esp + 0x18]
fstp dword [esp + 0x1a8]
fld dword [esp + 0x1c]
fstp dword [esp + 0x1ac]
fld dword [esp + 0x20]
fstp dword [esp + 0x1b0]
fldz
fst dword [esp + 0x134]
fst dword [esp + 0x138]
fld dword [ebp + 0x10]
fld qword [0x4b34b8]
fmul st(1)
fstp dword [esp + 0x13c]
fxch st(1)
fst dword [esp + 0x140]
fst dword [esp + 0x84]
fst dword [esp + 0x88]
fst dword [esp + 0xa0]
fst dword [esp + 0x9c]
fst dword [esp + 0x98]
fst dword [esp + 0x94]
fst dword [esp + 0xa4]
fst dword [esp + 0xa8]
fst dword [esp + 0xac]
fst dword [esp + 0xb0]
fst dword [esp + 0xb4]
fst dword [esp + 0xb8]
fst dword [esp + 0xbc]
fst dword [esp + 0xc0]
fst dword [esp + 0xc4]
fst dword [esp + 0xc8]
fst dword [esp + 0xcc]
fstp dword [esp + 0xd0]
fld dword [esp + 0x34]
sub esp, 8
fstp dword [esp + 4]
fstp dword [esp]
call fcn.0041e600
add esp, 0xc
lea eax, [esp + 0xa0]
push eax
lea ecx, [esp + 0x144]
call fcn.00401680
fld dword [0x4b2f98]
push ecx
lea ecx, [esp + 0x144]
fstp dword [esp]
call fcn.00407710
fld dword [esp + 0x34]
lea ecx, [esp + 0x140]
push ecx
push ecx
lea edx, [esp + 0x138]
fstp dword [esp]
push edx
call fcn.0041e8d0
fld dword [esp + 0x38]
mov ecx, dword [esp + 0x1c4]
fstp dword [esp + 0x12c]
mov eax, dword [esp + 0x1c0]
fld dword [esp + 0x40]
and ecx, 0x3fffffff
fstp dword [esp + 0x130]
add esp, 0xc
cmp eax, ecx
jne 0x4224e9
lea edx, [esp + 0x1b0]
push 0x90
push edx
call fcn.00402730
mov eax, dword [esp + 0x1bc]
add esp, 8
lea esi, [eax + eax*8]
add eax, 1
shl esi, 4
add esi, dword [esp + 0x1b0]
mov dword [esp + 0x1b4], eax
lea eax, [esp + 0x120]
push eax
mov ecx, esi
call fcn.00401c50
lea ecx, [esp + 0x170]
push ecx
lea ecx, [esi + 0x50]
call fcn.00401a20
mov edx, dword [ebp + 0x18]
push edx
lea eax, [esp + 0x1b4]
push eax
call fcn.0041fba0
mov eax, dword [esp + 0x1c0]
add esp, 8
test eax, eax
js 0x42256a
mov ecx, dword [0x4c6060]
and eax, 0x3fffffff
push ecx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [esp + 0x1b0]
push 0x17
lea edx, [esi + esi*8]
shl edx, 4
push edx
push ecx
mov ecx, eax
call fcn.004023e0
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret