Function at 0x5006b0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x7f4
mov ecx, dword [esp + 0x800]
lea eax, [esp + 0xc]
mov dword [esp], eax
mov dword [esp + 4], 0
mov dword [esp + 8], 0x80000040
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x7d4], 0
cmp byte [eax + 0xe8], 5
jne 0x5006ee
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + 0xcc]
xor ecx, ecx
push esi
mov dword [esp + 0x7d4], eax
push edi
mov esi, dword [eax + 0x50]
mov dword [esp + 0x7e4], 0
mov dword [esp + 0x7e8], ecx
mov dword [esp + 0x7ec], 0x80000000
mov dword [esp + 0x7f4], esi
test esi, esi
je 0x50076d
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
lea edx, [esi*4 + 0x7f]
and edx, 0xffffff80
mov eax, dword [ecx + 0xc]
lea edi, [eax + edx]
cmp edx, dword [ecx + 8]
jg 0x50075e
cmp edi, dword [ecx + 0x10]
ja 0x50075e
mov dword [ecx + 0xc], edi
mov ecx, dword [esp + 0x7e8]
jmp 0x50076f
push edx
call fcn.0046a3c0
mov ecx, dword [esp + 0x7e8]
jmp 0x50076f
xor eax, eax
or esi, 0x80000000
mov dword [esp + 0x7e4], eax
mov dword [esp + 0x7ec], esi
mov esi, dword [esp + 0x808]
mov dword [esp + 0x7f0], eax
mov edx, dword [esi + 0xc]
cmp byte [edx + 0xe8], 5
je 0x5007ed
mov dword [eax + ecx*4], edx
mov eax, dword [esi + 0xc]
movss xmm0, dword [esi]
add eax, 0xf0
inc dword [esp + 0x7e8]
push eax
push ecx
add eax, 0x40
movss dword [esp], xmm0
push eax
call fcn.00650310
mov eax, dword [esi + 0xc]
add esp, 0xc
mov edi, dword [esp + 0x818]
movzx ecx, word [eax + 0xa8]
mov eax, dword [edi]
mov byte [ecx + eax], 2
mov ecx, dword [esp + 0x7e8]
mov eax, dword [esp + 0x7e4]
jmp 0x5007f4
mov edi, dword [esp + 0x818]
mov edx, dword [esi + 0x10]
cmp byte [edx + 0xe8], 5
je 0x500839
mov dword [eax + ecx*4], edx
mov eax, dword [esi + 0x10]
movss xmm0, dword [esi]
add eax, 0xf0
inc dword [esp + 0x7e8]
push eax
push ecx
add eax, 0x40
movss dword [esp], xmm0
push eax
call fcn.00650310
mov eax, dword [esi + 0x10]
add esp, 0xc
movzx ecx, word [eax + 0xa8]
mov eax, dword [edi]
mov byte [ecx + eax], 2
mov ecx, dword [esi + 0x14]
lea edx, [esp + 0x5ac]
movss xmm0, dword [esp + 0x81c]
lea eax, [esp + 0x5b8]
push edx
mov dword [esp + 0x5b0], eax
mov dword [esp + 0x5b4], 0
mov dword [esp + 0x5b8], 0x80000040
mov eax, dword [ecx]
push ecx
movss dword [esp], xmm0
push esi
call dword [eax + 0x48]
mov edx, dword [esp + 0x5b0]
test edx, edx
jne 0x500941
mov esi, dword [esi + 0xc]
cmp byte [esi + 0xe8], 5
je 0x5008de
add esi, 0xf0
mov ecx, esi
lea eax, [esi + 0x70]
push eax
call fcn.00473730
movaps xmm1, xmmword [esi + 0x80]
movaps xmm2, xmm1
movaps xmm0, xmm1
shufps xmm2, xmm1, 0x55
mulps xmm2, xmmword [esi + 0x10]
shufps xmm0, xmm1, 0
mulps xmm0, xmmword [esi]
shufps xmm1, xmm1, 0xaa
mulps xmm1, xmmword [esi + 0x20]
addps xmm2, xmm0
movaps xmm0, xmmword [esi + 0x50]
addps xmm2, xmm1
subps xmm0, xmm2
movaps xmmword [esi + 0x30], xmm0
mov esi, dword [esp + 0x808]
mov esi, dword [esi + 0x10]
cmp byte [esi + 0xe8], 5
je 0x500937
add esi, 0xf0
mov ecx, esi
lea eax, [esi + 0x70]
push eax
call fcn.00473730
movaps xmm1, xmmword [esi + 0x80]
movaps xmm2, xmm1
movaps xmm0, xmm1
shufps xmm2, xmm1, 0x55
mulps xmm2, xmmword [esi + 0x10]
shufps xmm0, xmm1, 0
mulps xmm0, xmmword [esi]
shufps xmm1, xmm1, 0xaa
mulps xmm1, xmmword [esi + 0x20]
addps xmm2, xmm0
movaps xmm0, xmmword [esi + 0x50]
addps xmm2, xmm1
subps xmm0, xmm2
movaps xmmword [esi + 0x30], xmm0
mov edi, 1
jmp 0x5011de
mov ecx, dword [esp + 0x5ac]
mov eax, dword [ecx]
mov dword [esp + 0x7c4], eax
cmp edx, 1
jle 0x500969
mov esi, dword [ecx + 4]
mov dword [esp + 0x7e0], esi
mov dword [esp + 0x7c8], esi
jmp 0x500979
xor eax, eax
mov dword [esp + 0x7e0], eax
mov dword [esp + 0x7c8], eax
call fcn.006e59c0
push dword [esp + 0x7e8]
push dword [esp + 0x7e8]
push dword [esp + 0x80c]
call fcn.005258a0
lea ecx, [esp + 0x6d0]
mov dword [esp + 0x6c8], 0
mov dword [esp + 0x6c4], ecx
add esp, 0xc
lea ecx, [esp + 0x4ac]
mov dword [esp + 0x6c0], 0x80000040
mov dword [esp + 0x4a0], ecx
mov al, 1
mov ecx, dword [esp + 0x800]
mov byte [esp + 0x7fb], al
mov dword [esp + 0x4a4], 0
mov dword [esp + 0x4a8], 0x80000040
mov edx, dword [ecx + 0x10]
mov dword [esp + 0x7cc], edx
test edx, edx
jg 0x500abd
mov edi, dword [esp + 0x804]
mov eax, dword [edi + 0x40]
cmp eax, dword [edi + 0x48]
je 0x50105b
lea eax, [esp + 0x7e4]
push eax
push edi
call fcn.00501dc0
mov eax, dword [esp + 0x818]
push 0
push dword [eax + 0x78]
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x80f]
push edi
push eax
call fcn.00501e40
mov al, byte [esp + 0x817]
add esp, 0x1c
test al, al
jne 0x50105b
mov ecx, dword [esp + 0x800]
mov esi, dword [ecx + 0x14]
sub esi, 1
js 0x500f19
push dword [edi + 0x58]
push dword [edi + 0xc]
push dword [edi + 0x40]
push dword [edi + 4]
call fcn.006e59d0
lea eax, [esp + 0x7f4]
push eax
push edi
call fcn.00501dc0
mov eax, dword [esp + 0x828]
push 0
push dword [eax + 0x78]
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x81e]
push edi
push eax
call fcn.00501e40
add esp, 0x2c
mov al, byte [eax]
test al, al
je 0x500a61
jmp 0x50105b
mov ecx, dword [esp + 0x800]
mov esi, dword [esp + 0x7dc]
mov dword [esp + 0x4a4], 0
mov dword [esp + 0x6bc], 0
mov dword [esp + 0x7d0], esi
test al, al
jne 0x500b4f
cmp esi, dword [esp + 0xc]
jge 0x500e86
lea eax, [esp + 0x5ac]
mov dword [esp + 0x5b0], 0
push eax
lea eax, [esp + 0x7e8]
push eax
push edi
push dword [ecx]
lea eax, [esp + 0x7e0]
push eax
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x828]
push dword [eax + 0x78]
push dword [esp + 0x820]
call fcn.00501330
add esp, 0x20
cmp dword [esp + 0x5b0], 0
je 0x500e86
mov esi, dword [esp + 0x7d0]
mov ecx, dword [esp + 0x800]
lea eax, [esp + 0x4a0]
push eax
lea eax, [esp + 0x6bc]
push eax
push edi
lea eax, [esp + 0x5b8]
push eax
mov eax, dword [esp + 0x818]
push ecx
movss xmm0, dword [eax]
mov eax, dword [esp + 0x824]
movss dword [esp], xmm0
push dword [ecx]
push dword [eax + 0x78]
call fcn.00501720
push dword [esp + 0x6d8]
mov edi, dword [esp + 0x824]
lea eax, [esp + 0x7f7]
push dword [esp + 0x6d8]
mov byte [esp + 0x81f], 0
push edi
push eax
call fcn.00526800
add esp, 0x2c
cmp byte [eax], 0
je 0x500e04
push dword [esp + 0x4a4]
lea eax, [esp + 0x7fe]
push dword [esp + 0x4a4]
push edi
push eax
call fcn.00526830
add esp, 0x10
cmp byte [eax], 0
je 0x500e04
mov ecx, dword [esp + 0x800]
mov eax, dword [esp + 0x4a4]
add eax, dword [esp + 0xc]
cmp dword [ecx + 0xc], eax
jl 0x500e04
mov edi, dword [esp + 0x814]
mov ecx, dword [esp + 0x6bc]
mov edx, dword [edi + 4]
mov edi, dword [esp + 0x800]
lea eax, [edx + ecx]
add eax, dword [esp + 0x7e8]
cmp dword [edi + 4], eax
mov edi, dword [esp + 0x814]
jl 0x500e12
mov eax, dword [esp + 0x5b0]
add eax, edx
mov edx, dword [esp + 0x800]
cmp dword [edx + 8], eax
jl 0x500e12
push ecx
push dword [esp + 0x6bc]
push dword [esp + 0x80c]
call fcn.005258a0
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x4b4]
push dword [esp + 0x4b4]
push dword [esp + 0x81c]
call fcn.00525ec0
mov dword [esp + 0x7f8], esi
add esp, 0x1c
mov esi, dword [esp + 0x7e8]
xor edx, edx
test esi, esi
jle 0x500ce6
mov edi, dword [esp + 0x7e4]
mov eax, dword [edi + edx*4]
movzx ecx, word [eax + 0xa8]
mov eax, dword [esp + 0x818]
mov eax, dword [eax]
cmp byte [ecx + eax], 0x10
jne 0x500cda
dec esi
mov dword [esp + 0x7e8], esi
cmp esi, edx
je 0x500cd9
mov eax, dword [edi + esi*4]
mov dword [edi + edx*4], eax
mov esi, dword [esp + 0x7e8]
mov edi, dword [esp + 0x7e4]
dec edx
inc edx
cmp edx, esi
jl 0x500ca0
mov edi, dword [esp + 0x814]
push dword [esp + 0x5b0]
mov ecx, edi
push dword [esp + 0x5b0]
push dword [edi + 4]
push 0x7d8954
call fcn.005027d0
mov ecx, dword [esp + 0x6bc]
mov esi, dword [esp + 0x7e8]
mov eax, dword [esp + 0x7ec]
and eax, 0x3fffffff
lea edx, [ecx + esi]
cmp eax, edx
jge 0x500d51
add eax, eax
cmp edx, eax
push 4
cmovl edx, eax
lea eax, [esp + 0x7e8]
push edx
push eax
push 0x7d8954
call fcn.00467b80
mov esi, dword [esp + 0x7f8]
add esp, 0x10
mov ecx, dword [esp + 0x6bc]
xor edx, edx
test ecx, ecx
jle 0x500d98
nop word [eax + eax]
mov edi, dword [esp + 0x6b8]
mov eax, dword [edi + edx*4]
cmp byte [eax + 0xe8], 4
je 0x500d93
mov ecx, dword [esp + 0x7e4]
mov dword [ecx + esi*4], eax
mov esi, dword [esp + 0x7e8]
mov ecx, dword [esp + 0x6bc]
inc esi
mov dword [esp + 0x7e8], esi
inc edx
cmp edx, ecx
jl 0x500d60
push dword [esp + 0x4a4]
lea eax, [esp + 0x7e0]
push eax
lea eax, [esp + 0x10]
push eax
call fcn.00501c80
mov edi, dword [esp + 0x824]
lea eax, [esp + 0x7e8]
push edi
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.00501d20
push 1
push dword [esp + 0x820]
call fcn.00526670
mov al, byte [esp + 0x81b]
add esp, 0x20
cmp dword [esp + 0x4a4], 0
jne 0x500ab6
cmp dword [esp + 0x6bc], 0
jne 0x500ab6
jmp 0x500e86
mov ecx, dword [esp + 0x6bc]
mov edi, dword [esp + 0x814]
mov esi, dword [esp + 0x818]
xor edx, edx
cmp dword [esp + 0x5b0], edx
jle 0x500e4c
mov eax, dword [esp + 0x5ac]
mov eax, dword [eax + edx*4]
inc edx
movzx ecx, word [eax + 0xa8]
mov eax, dword [esi]
mov byte [ecx + eax], 8
cmp edx, dword [esp + 0x5b0]
jl 0x500e24
mov ecx, dword [esp + 0x6bc]
xor edx, edx
test ecx, ecx
jle 0x500e73
mov eax, dword [esp + 0x6b8]
mov eax, dword [eax + edx*4]
inc edx
movzx ecx, word [eax + 0xa8]
mov eax, dword [esi]
mov byte [ecx + eax], 1
cmp edx, dword [esp + 0x6bc]
jl 0x500e52
mov ecx, dword [esp + 0x80c]
mov eax, dword [ecx]
mov eax, dword [eax + 0x14]
call eax
cmp eax, 2
je 0x500ec1
push 0
push dword [esp + 0x808]
call fcn.00526670
mov edx, dword [esp + 0x7d4]
add esp, 8
mov al, byte [esp + 0x7fb]
dec edx
mov edi, dword [esp + 0x818]
mov dword [esp + 0x7cc], edx
test edx, edx
jg 0x500ab6
jmp 0x500a05
mov eax, dword [esp + 0x808]
push edi
push esi
push dword [esp + 0x7e0]
movss xmm0, dword [eax]
push ecx
movss dword [esp], xmm0
call fcn.00501fc0
xor esi, esi
add esp, 0x10
cmp dword [edi + 4], esi
jle 0x500f0d
nop word [eax + eax]
mov eax, dword [esp + 0x810]
push dword [eax + 0x78]
mov eax, dword [edi]
push dword [eax + esi*4]
call fcn.0052dc50
inc esi
add esp, 8
cmp esi, dword [edi + 4]
jl 0x500ef0
mov dword [edi + 4], 0
jmp 0x50114e
test al, al
jne 0x50105b
lea eax, [esp + 0x320]
mov dword [esp + 0x318], 0
mov dword [esp + 0x314], eax
lea eax, [esp + 0x314]
push eax
mov eax, dword [esp + 0x814]
mov dword [esp + 0x320], 0x80000020
push dword [eax + 0x78]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x806]
push edi
push eax
call fcn.00501e40
mov ecx, dword [esp + 0x820]
lea edx, [esp + 0x328]
add esp, 0x14
mov eax, dword [ecx]
push edx
mov eax, dword [eax + 0x10]
call eax
cmp eax, 2
jne 0x501025
mov edi, dword [esp + 0x814]
mov eax, dword [esp + 0x808]
push edi
push dword [esp + 0x81c]
push dword [esp + 0x7e0]
movss xmm0, dword [eax]
push ecx
movss dword [esp], xmm0
call fcn.00501fc0
xor esi, esi
add esp, 0x10
cmp dword [edi + 4], esi
jle 0x500fdf
mov eax, dword [esp + 0x810]
push dword [eax + 0x78]
mov eax, dword [edi]
push dword [eax + esi*4]
call fcn.0052dc50
inc esi
add esp, 8
cmp esi, dword [edi + 4]
jl 0x500fc2
mov eax, dword [esp + 0x31c]
mov dword [edi + 4], 0
mov dword [esp + 0x318], 0
test eax, eax
js 0x50114e
and eax, 0x3fffffff
mov ecx, 0x7d8954
lea eax, [eax + eax*2]
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x318]
call dword [eax + 0x10]
jmp 0x50114e
mov eax, dword [esp + 0x31c]
mov dword [esp + 0x318], 0
test eax, eax
js 0x50105b
and eax, 0x3fffffff
mov ecx, 0x7d8954
lea eax, [eax + eax*2]
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x318]
call dword [eax + 0x10]
mov edi, dword [esp + 0x814]
cmp dword [edi + 4], 0
jne 0x5010c8
lea eax, [esp + 0x7c4]
mov ecx, edi
push eax
push 0
push 0x7d8954
call fcn.005027b0
cmp dword [esp + 0x7e0], 0
mov eax, dword [edi]
mov esi, dword [esp + 0x818]
mov eax, dword [eax]
movzx ecx, word [eax + 0xa8]
mov eax, dword [esi]
mov byte [ecx + eax], 0x10
je 0x5010c8
lea eax, [esp + 0x7c8]
mov ecx, edi
push eax
push 1
push 0x7d8954
call fcn.005027b0
mov eax, dword [edi]
mov eax, dword [eax + 4]
movzx ecx, word [eax + 0xa8]
mov eax, dword [esi]
mov byte [ecx + eax], 0x10
xor esi, esi
cmp dword [edi + 4], esi
jle 0x5010fa
nop
mov eax, dword [edi]
mov eax, dword [eax + esi*4]
add eax, 0xf0
push eax
mov eax, dword [esp + 0x80c]
push ecx
movss xmm0, dword [eax]
movss dword [esp], xmm0
call fcn.006509b0
inc esi
add esp, 8
cmp esi, dword [edi + 4]
jl 0x5010d0
push dword [edi + 4]
mov esi, dword [esp + 0x808]
push dword [edi]
push dword [esi + 0xc]
push dword [esi]
push dword [esi + 4]
call fcn.005266f0
push esi
push dword [esp + 0x830]
push dword [esp + 0x7f4]
call fcn.00502250
xor esi, esi
add esp, 0x20
cmp dword [edi + 4], esi
jle 0x50114e
mov eax, dword [esp + 0x810]
push dword [eax + 0x78]
mov eax, dword [edi]
push dword [eax + esi*4]
call fcn.0052dc50
inc esi
add esp, 8
cmp esi, dword [edi + 4]
jl 0x501131
mov eax, dword [esp + 0x4a8]
xor edi, edi
mov dword [esp + 0x4a4], edi
test eax, eax
js 0x50117f
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x4a4]
call dword [eax + 0x10]
mov eax, dword [esp + 0x6c0]
mov dword [esp + 0x4a0], 0
mov dword [esp + 0x4a8], 0x80000000
mov dword [esp + 0x6bc], 0
test eax, eax
js 0x5011c8
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x6bc]
call dword [eax + 0x10]
mov dword [esp + 0x6b8], 0
mov dword [esp + 0x6c0], 0x80000000
mov eax, dword [esp + 0x5b4]
mov dword [esp + 0x5b0], 0
test eax, eax
js 0x501211
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x5b0]
call dword [eax + 0x10]
mov ecx, dword [esp + 0x7f0]
xor edx, edx
mov eax, dword [esp + 0x7e8]
cmp ecx, dword [esp + 0x7e4]
push dword [0x884adc]
cmove eax, edx
mov dword [esp + 0x5b0], 0
mov dword [esp + 0x7ec], eax
mov eax, dword [esp + 0x7f8]
mov dword [esp + 0x5b8], 0x80000000
mov dword [esp + 0x80c], ecx
lea esi, [eax*4 + 0x7f]
and esi, 0xffffff80
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, eax
lea eax, [esi + 0xf]
and eax, 0xfffffff0
mov dword [esp + 0x7e0], eax
mov eax, dword [esp + 0x808]
cmp esi, dword [edx + 8]
mov esi, dword [esp + 0x7e0]
jg 0x5012a0
lea ecx, [esi + eax]
cmp ecx, dword [edx + 0xc]
jne 0x5012a0
cmp dword [edx + 0x14], eax
je 0x5012a0
mov dword [edx + 0xc], eax
jmp 0x5012a9
push esi
push eax
mov ecx, edx
call fcn.0046a590
mov eax, dword [esp + 0x7ec]
mov dword [esp + 0x7e8], 0
test eax, eax
js 0x5012dc
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x7e8]
call dword [eax + 0x10]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x7e4], 0
mov dword [esp + 0x7ec], 0x80000000
mov dword [esp + 0xc], 0
test eax, eax
js 0x501320
and eax, 0x3fffffff
mov ecx, 0x7d8954
lea edx, [eax + eax*2]
shl edx, 2
push edx
mov edx, dword [0x7d8954]
push dword [esp + 0xc]
call dword [edx + 0x10]
mov eax, edi
pop edi
pop esi
add esp, 0x7f4
ret