Function at 0x501330
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x410
push esi
mov esi, dword [esp + 0x430]
push edi
push dword [0x884adc]
mov edi, dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
shl edi, 5
add edi, 0x7f
and edi, 0xffffff80
mov ecx, dword [eax + 0xc]
mov dword [esp + 0x410], ecx
lea edx, [ecx + edi]
cmp edi, dword [eax + 8]
jg 0x501373
cmp edx, dword [eax + 0x10]
ja 0x501373
mov dword [eax + 0xc], edx
jmp 0x501384
push edi
mov ecx, eax
call fcn.0046a3c0
mov ecx, eax
mov dword [esp + 0x410], eax
mov edi, ecx
xor ecx, ecx
mov dword [esp + 0x414], ecx
cmp dword [esi + 4], ecx
jle 0x501406
mov eax, dword [esi]
mov ecx, dword [eax + ecx*4]
mov eax, dword [esp + 0x41c]
mov edx, dword [ecx + 0xa4]
add edx, dword [eax + 0xc]
mov eax, edi
movaps xmm0, xmmword [edx + 0x10]
movaps xmmword [eax], xmm0
lea eax, [edi + 0x10]
movaps xmm0, xmmword [edx + 0x20]
add edi, 0x20
movaps xmmword [eax], xmm0
movaps xmm0, xmmword [ecx + 0x140]
subps xmm0, xmmword [ecx + 0x130]
movaps xmmword [edx + 0x10], xmm0
movss xmm1, dword [ecx + 0x14c]
shufps xmm1, xmm1, 0
mulps xmm0, xmm1
movaps xmmword [edx + 0x10], xmm0
movaps xmm0, xmmword [ecx + 0x180]
mov ecx, dword [esp + 0x414]
mulps xmm0, xmm1
inc ecx
mov dword [esp + 0x414], ecx
movaps xmmword [edx + 0x20], xmm0
cmp ecx, dword [esi + 4]
jl 0x501394
mov eax, dword [esp + 0x428]
mov ecx, dword [esp + 0x424]
mov eax, dword [eax]
mov dword [esp + 0x40c], eax
cmp eax, dword [ecx + 4]
jge 0x5015a4
lea edi, [eax + eax*2]
shl edi, 2
nop dword [eax]
mov eax, dword [esp + 0x424]
mov eax, dword [eax]
add eax, edi
mov dword [esp + 0x408], eax
mov edx, dword [eax]
movzx eax, byte [edx + 0x1c]
cmp dword [esp + 0x42c], eax
jg 0x50157b
mov eax, dword [esp + 0x430]
xor ecx, ecx
mov edx, dword [edx + 0x30]
mov esi, dword [eax]
mov eax, dword [edx + 4]
movzx eax, word [eax + 0xa8]
cmp byte [eax + esi], 0x10
sete cl
mov eax, dword [edx + ecx*4 + 4]
mov dword [esp + 0x414], eax
movzx eax, word [eax + 0xa8]
test byte [eax + esi], 4
jne 0x50153d
mov esi, dword [esp + 0x408]
lea eax, [esp + 8]
push eax
mov eax, dword [esp + 0x420]
push 0x100
push dword [eax + 0xc]
push dword [esi + 4]
push dword [eax + 4]
call fcn.006e9e60
add esp, 0x14
push dword [esp + 0x420]
push eax
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0x428]
push esi
push ecx
mov eax, dword [eax]
movss xmm0, dword [eax + 8]
movss dword [esp], xmm0
call fcn.00501640
add esp, 0x14
cmp eax, 0xffffffff
je 0x50157b
mov eax, dword [esp + 0x414]
mov esi, dword [esp + 0x438]
movzx ecx, word [eax + 0xa8]
mov eax, dword [esp + 0x430]
mov eax, dword [eax]
or byte [ecx + eax], 4
mov eax, dword [esi + 8]
and eax, 0x3fffffff
cmp dword [esi + 4], eax
jne 0x50152b
push 4
push esi
push 0x7d8954
call fcn.00467c00
add esp, 0xc
mov ecx, dword [esi + 4]
mov eax, dword [esi]
mov edx, dword [esp + 0x414]
mov dword [eax + ecx*4], edx
inc dword [esi + 4]
mov edx, dword [esp + 0x428]
mov ecx, dword [edx]
lea eax, [ecx + 1]
mov dword [edx], eax
lea edx, [ecx + ecx*2]
mov eax, dword [esp + 0x424]
mov esi, dword [eax]
movq xmm0, qword [edi + esi]
movq xmm1, qword [esi + edx*4]
mov ecx, dword [esi + edx*4 + 8]
movq qword [esi + edx*4], xmm0
mov eax, dword [edi + esi + 8]
mov dword [esi + edx*4 + 8], eax
movq qword [edi + esi], xmm1
mov dword [edi + esi + 8], ecx
mov eax, dword [esp + 0x40c]
add edi, 0xc
mov ecx, dword [esp + 0x424]
inc eax
mov dword [esp + 0x40c], eax
cmp eax, dword [ecx + 4]
jl 0x501430
mov esi, dword [esp + 0x434]
mov edi, dword [esp + 0x410]
xor edx, edx
mov ecx, edi
cmp dword [esi + 4], edx
jle 0x5015ee
mov edi, dword [esp + 0x41c]
nop dword [eax + eax]
mov eax, dword [esi]
lea ecx, [ecx + 0x20]
movaps xmm0, xmmword [ecx - 0x20]
mov eax, dword [eax + edx*4]
inc edx
mov eax, dword [eax + 0xa4]
add eax, dword [edi + 0xc]
movaps xmmword [eax + 0x10], xmm0
movaps xmm0, xmmword [ecx - 0x10]
movaps xmmword [eax + 0x20], xmm0
cmp edx, dword [esi + 4]
jl 0x5015c0
mov edi, dword [esp + 0x410]
mov esi, dword [esi + 4]
push dword [0x884adc]
shl esi, 5
add esi, 0x7f
and esi, 0xffffff80
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea edx, [esi + 0xf]
and edx, 0xfffffff0
cmp esi, dword [eax + 8]
jg 0x50162a
lea ecx, [edx + edi]
cmp ecx, dword [eax + 0xc]
jne 0x50162a
cmp dword [eax + 0x14], edi
je 0x50162a
mov dword [eax + 0xc], edi
pop edi
pop esi
add esp, 0x410
ret
push edx
push edi
mov ecx, eax
call fcn.0046a590
pop edi
pop esi
add esp, 0x410
ret