Function at 0x5cf780
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x74
push ebx
push esi
mov esi, ecx
mov ecx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push edi
cmp dword [esi + 0x7c], 0
mov eax, dword [esi + 0x78]
mov eax, dword [eax + 0x2c]
mov ebx, dword [eax + 0x1c]
mov dword [esp + 0x18], ebx
jne 0x5cf7cb
push dword [0x884adc]
call ecx
mov ecx, dword [eax + 0x2c]
lea eax, [ebx + ebx*2]
shl eax, 4
push eax
push ecx
call fcn.00460640
mov ecx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
add esp, 8
mov dword [esi + 0x7c], eax
mov eax, dword [esi + 0x78]
mov eax, dword [eax + 8]
mov eax, dword [eax]
test eax, eax
je 0x5cf7e0
mov eax, dword [eax + 8]
mov dword [esp + 0x14], eax
jmp 0x5cf7e8
mov dword [esp + 0x14], 0
push dword [0x884adc]
call ecx
lea edi, [ebx + ebx*2]
shl edi, 4
add edi, 0x7f
mov ebx, dword [eax + 0xc]
and edi, 0xffffff80
lea ecx, [ebx + edi]
cmp edi, dword [eax + 8]
jg 0x5cf811
cmp ecx, dword [eax + 0x10]
ja 0x5cf811
mov dword [eax + 0xc], ecx
jmp 0x5cf81b
push edi
mov ecx, eax
call fcn.0046a3c0
mov ebx, eax
cmp byte [esi + 0x15], 0
je 0x5cf833
cmp dword [esp + 0x14], 0
je 0x5cf833
mov ecx, dword [esi + 0x78]
push ebx
call fcn.0058a210
jmp 0x5cf83c
mov ecx, dword [esi + 0x78]
push ebx
call fcn.0058a070
mov eax, dword [esi + 0x74]
mov eax, dword [eax + 0x48]
movss xmm0, dword [eax + 0x20]
comiss xmm0, dword [0x718814]
movss dword [esp + 0x1c], xmm0
movss xmm0, dword [0x718824]
ja 0x5cf864
movss dword [esp + 0x1c], xmm0
push ecx
mov dword [esp], 0x3f800000
push dword [esi + 0x7c]
push ebx
push dword [esp + 0x24]
push 0
call fcn.005ce9c0
mov eax, dword [esi + 0x74]
add esp, 0x14
cmp byte [esi + 0x56], 4
mov eax, dword [eax + 0x48]
movaps xmm0, xmmword [eax]
movaps xmmword [esp + 0x20], xmm0
movaps xmm0, xmmword [eax + 0x10]
movaps xmmword [esp + 0x30], xmm0
movaps xmm0, xmmword [eax + 0x20]
movaps xmmword [esp + 0x40], xmm0
jne 0x5cf8c7
mov ecx, dword [esi + 0x78]
lea eax, [esp + 0x50]
push eax
push 0
call fcn.0058aba0
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x54]
push eax
push 0
call fcn.005cea30
add esp, 0xc
movaps xmm0, xmmword [0x719da0]
push dword [0x884adc]
movaps xmmword [esp + 0x44], xmm0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x14], eax
lea edx, [eax + edi]
cmp edi, dword [ecx + 8]
jg 0x5cf8fa
cmp edx, dword [ecx + 0x10]
ja 0x5cf8fa
mov dword [ecx + 0xc], edx
jmp 0x5cf904
push edi
call fcn.0046a3c0
mov dword [esp + 0x14], eax
mov ecx, dword [esi + 0x78]
push eax
push dword [esi + 0x7c]
lea eax, [esp + 0x28]
mov ecx, dword [ecx + 0x2c]
push eax
push dword [ecx + 0xc]
push dword [esp + 0x28]
call fcn.0057e750
movss xmm0, dword [0x718824]
add esp, 0x14
divss xmm0, dword [esp + 0x1c]
push dword [esp + 0x18]
push dword [esp + 0x18]
push ecx
movss dword [esp], xmm0
call fcn.0057e1a0
push dword [esi + 0x7c]
lea eax, [esp + 0x30]
push dword [esp + 0x24]
push eax
mov eax, dword [esi + 0x78]
mov eax, dword [eax + 0x2c]
push dword [eax + 0xc]
push dword [esp + 0x34]
call fcn.0057e640
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
add esp, 0x20
push dword [0x884adc]
call esi
mov edx, eax
lea eax, [edi + 0xf]
and eax, 0xfffffff0
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
cmp edi, dword [edx + 8]
jg 0x5cf99c
mov ecx, dword [esp + 0x1c]
add ecx, eax
cmp ecx, dword [edx + 0xc]
jne 0x5cf99c
cmp dword [edx + 0x14], eax
je 0x5cf99c
mov dword [edx + 0xc], eax
jmp 0x5cf9a8
push dword [esp + 0x1c]
mov ecx, edx
push eax
call fcn.0046a590
push dword [0x884adc]
call esi
lea edx, [edi + 0xf]
and edx, 0xfffffff0
cmp edi, dword [eax + 8]
jg 0x5cf9d2
lea ecx, [edx + ebx]
cmp ecx, dword [eax + 0xc]
jne 0x5cf9d2
cmp dword [eax + 0x14], ebx
je 0x5cf9d2
mov dword [eax + 0xc], ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edx
push ebx
mov ecx, eax
call fcn.0046a590
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret