Function at 0x606590
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x118
push esi
push edi
lea ecx, [esp + 0x34]
call fcn.005964c0
mov edi, dword [ebp + 0xc]
lea ecx, [esp + 0x70]
push 0
push dword [ebp + 8]
mov dword [esp + 0x50], 0
mov eax, dword [edi + 0xc]
mov dword [esp + 0x34], eax
lea eax, [esp + 0x3c]
mov byte [esp + 0x54], 0
mov dword [edi + 0xc], eax
call fcn.00596880
mov eax, dword [edi]
mov eax, dword [eax + 0x30]
mov dword [esp + 0x24], eax
test eax, eax
je 0x6065e7
mov ecx, eax
call fcn.0045c0c0
mov ecx, dword [edi]
lea eax, [esp + 0x70]
push eax
call fcn.00596360
push edi
lea ecx, [esp + 0x74]
call fcn.00596ec0
movss xmm0, dword [ebp + 0x10]
push ecx
movss dword [esp], xmm0
lea ecx, [esp + 0x74]
push edi
call fcn.00596fa0
mov eax, dword [edi]
mov ecx, dword [eax + 0x1c]
mov esi, dword [eax + 0x2c]
mov dword [esp + 0x20], esi
test ecx, ecx
jne 0x606626
xor eax, eax
jmp 0x60662b
call fcn.005cca00
mov ecx, dword [esi + 0x14]
push dword [0x884adc]
mov dword [esp + 0x1c], eax
mov ecx, dword [ecx + 0x1c]
mov dword [esp + 0x2c], ecx
mov ecx, dword [eax + 0x2c]
mov esi, dword [ecx + 0x1c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
lea eax, [esi + esi*2]
shl eax, 4
add eax, 0x7f
and eax, 0xffffff80
mov esi, dword [ecx + 0xc]
mov dword [esp + 0x30], eax
mov dword [esp + 0x1c], esi
lea edx, [esi + eax]
cmp eax, dword [ecx + 8]
jg 0x606676
cmp edx, dword [ecx + 0x10]
ja 0x606676
mov dword [ecx + 0xc], edx
jmp 0x606682
push eax
call fcn.0046a3c0
mov esi, eax
mov dword [esp + 0x1c], eax
push 0
push 0x15
push 0
push 0
push 0
push dword [esp + 0x3c]
lea ecx, [esp + 0x28]
call fcn.005dcf70
push 0
push ecx
mov dword [esp], 0
lea eax, [esp + 0x18]
push 0
push eax
push edi
lea ecx, [esp + 0x84]
call fcn.00598090
mov eax, dword [esp + 0x20]
push esi
push dword [eax + 0x1c]
mov eax, dword [esp + 0x18]
movsx ecx, word [eax + 0x34]
add ecx, eax
push ecx
call fcn.00606f50
lea eax, [esp + 0x6c]
push eax
mov eax, dword [esp + 0x20]
movsx ecx, word [eax + 0x14]
add ecx, eax
push ecx
push esi
push dword [esp + 0x30]
call fcn.00606b20
movss xmm0, dword [ebp + 0x14]
lea ecx, [esp + 0x8c]
add esp, 0x18
fstp st(0)
movss dword [esp], xmm0
push edi
call fcn.00596fa0
mov eax, dword [esp + 0x10]
xor edx, edx
cmp dword [eax + 4], edx
jle 0x606746
xor ecx, ecx
mov dword [ecx + eax + 0x18], 0
mov eax, dword [esp + 0x10]
and byte [ecx + eax + 0x1c], 0xfe
mov eax, dword [esp + 0x10]
test byte [ecx + eax + 0x1c], 6
je 0x606739
xor esi, esi
mov word [ecx + eax + 0x12], si
mov eax, dword [esp + 0x10]
inc edx
add ecx, 0x10
cmp edx, dword [eax + 4]
jl 0x606712
mov esi, dword [esp + 0x1c]
push 0
push ecx
mov dword [esp], 0
lea eax, [esp + 0x18]
push 0
push eax
push edi
lea ecx, [esp + 0x84]
call fcn.00598090
mov eax, dword [esp + 0x20]
push esi
push dword [eax + 0x1c]
mov eax, dword [esp + 0x18]
movsx ecx, word [eax + 0x34]
add ecx, eax
push ecx
call fcn.00606f50
lea eax, [esp + 0x5c]
push eax
mov eax, dword [esp + 0x20]
movsx ecx, word [eax + 0x14]
add ecx, eax
push ecx
push esi
push dword [esp + 0x30]
call fcn.00606b20
add esp, 0x1c
lea ecx, [esp + 0x70]
fstp st(0)
push edi
call fcn.00597570
push dword [esp + 0x24]
mov ecx, dword [edi]
call fcn.00596360
cmp byte [esp + 0x14], 0
movss xmm0, dword [0x718824]
divss xmm0, dword [ebp + 0x14]
mov eax, dword [ebp + 0x18]
movaps xmm1, xmmword [esp + 0x50]
subps xmm1, xmmword [esp + 0x60]
shufps xmm0, xmm0, 0
mulps xmm1, xmm0
movaps xmmword [eax], xmm1
mov eax, dword [esp + 0x2c]
mov dword [edi + 0xc], eax
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
je 0x606804
push dword [0x884adc]
mov esi, dword [esp + 0x14]
call edi
push esi
push dword [eax + 0x2c]
call fcn.00460680
mov esi, dword [esp + 0x24]
add esp, 8
push dword [0x884adc]
call edi
mov ecx, dword [esp + 0x30]
lea edx, [ecx + 0xf]
and edx, 0xfffffff0
cmp ecx, dword [eax + 8]
jg 0x60682d
lea ecx, [edx + esi]
cmp ecx, dword [eax + 0xc]
jne 0x60682d
cmp dword [eax + 0x14], esi
je 0x60682d
mov dword [eax + 0xc], esi
jmp 0x606836
push edx
push esi
mov ecx, eax
call fcn.0046a590
mov eax, dword [esp + 0x24]
test eax, eax
je 0x606845
mov ecx, eax
call fcn.0045c160
lea ecx, [esp + 0x70]
call fcn.00596a40
lea ecx, [esp + 0x34]
mov dword [esp + 0x48], 0
mov byte [esp + 0x4c], 0
call fcn.00596500
pop edi
pop esi
mov esp, ebp
pop ebp
ret