Function at 0x50e920
Capabilities:
Execute anti-debugging instructions
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x458
push esi
mov esi, dword [ebp + 8]
lea eax, [esp + 0x2c]
push edi
mov edi, ecx
push eax
mov ecx, dword [esi]
push ecx
mov eax, dword [edi + 0x78]
mov dword [esp + 0x24], edi
mov edx, dword [ecx]
movss xmm1, dword [eax + 0xc]
mov eax, dword [ebp + 0xc]
mulss xmm1, dword [0x719760]
movss xmm0, dword [eax + 0xc]
subss xmm0, xmm1
movss dword [esp], xmm0
push dword [esi + 8]
call dword [edx + 0x1c]
mov ecx, dword [edi + 0x5c]
test ecx, ecx
je 0x50ec67
mov eax, dword [ecx]
mov eax, dword [eax + 0x10]
call eax
test al, al
je 0x50ec67
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov ecx, dword [edi + 4]
cmp ecx, dword [edi + 0xc]
jae 0x50e9b8
mov dword [ecx], str.LthkpWorld::getClosestPoints_Trees_
mov dword [ecx + 0xc], str.StAabbTreeBp
rdtsc
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xc]
mov dword [ecx + 4], eax
lea eax, [ecx + 0x10]
mov dword [edi + 4], eax
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 0x5c]
mov ecx, dword [eax + 0xc]
mov eax, dword [eax + 0x10]
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x50eadd
lea eax, [esp + 0x5c]
mov dword [esp + 0x54], 0
mov dword [esp + 0x50], eax
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x34]
mov dword [esp + 0x5c], 0x80000080
push eax
push ecx
call dword [0x8cfdfc]
add esp, 0xc
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x10], eax
mov edi, dword [eax + 4]
cmp edi, dword [eax + 0xc]
jae 0x50ea32
mov dword [edi], str.StAabbTreeNp
rdtsc
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0xc]
lea eax, [edi + 0xc]
mov dword [edi + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [ecx + 4], eax
mov eax, dword [esi]
xor edi, edi
mov eax, dword [eax + 0xc]
mov dword [esp + 0xc], eax
cmp dword [esp + 0x54], edi
jle 0x50eab3
mov eax, dword [esp + 0x50]
mov edx, dword [eax + edi*4]
mov dword [esp + 0x10], edx
cmp esi, edx
je 0x50eaac
mov eax, dword [esp + 0x1c]
push edx
push esi
lea edx, [esp + 0x1f]
mov ecx, dword [eax + 0x7c]
mov eax, dword [ecx + 8]
add ecx, 8
push edx
mov eax, dword [eax + 4]
call eax
cmp byte [eax], 0
je 0x50eaac
mov edx, dword [esp + 0x10]
mov eax, dword [edx]
test eax, eax
je 0x50eaac
mov eax, dword [ebp + 0xc]
mov esi, dword [edx]
push dword [ebp + 0x10]
mov ecx, dword [eax]
mov eax, dword [esp + 0x10]
push dword [ebp + 0xc]
add eax, 0xd
shl eax, 5
add eax, dword [esi + 0xc]
mov esi, dword [ebp + 8]
push edx
push esi
movzx eax, byte [eax + ecx]
lea eax, [eax + eax*4]
mov eax, dword [ecx + eax*4 + 0x9a8]
call eax
add esp, 0x10
inc edi
cmp edi, dword [esp + 0x54]
jl 0x50ea43
mov eax, dword [esp + 0x58]
mov dword [esp + 0x54], 0
test eax, eax
js 0x50eadd
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x54]
call dword [eax + 0x10]
cmp dword [esp + 0x18], 0
je 0x50ec2c
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0xc], eax
mov edi, dword [eax + 4]
cmp edi, dword [eax + 0xc]
jae 0x50eb1d
mov dword [edi], str.StKdTreeBp
rdtsc
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
lea eax, [edi + 0xc]
mov dword [edi + 4], ecx
mov ecx, dword [esp + 0xc]
mov dword [ecx + 4], eax
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push eax
lea eax, [esp + 0x34]
mov dword [esp + 0x2c], 0
push eax
push dword [esp + 0x20]
mov dword [esp + 0x38], connect
call dword [0x8cfdf0]
add esp, 0xc
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0xc], eax
mov edi, dword [eax + 4]
cmp edi, dword [eax + 0xc]
jae 0x50eb81
mov dword [edi], str.StKdTreeNp
rdtsc
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
lea eax, [edi + 0xc]
mov dword [edi + 4], ecx
mov ecx, dword [esp + 0xc]
mov dword [ecx + 4], eax
mov eax, dword [esi]
xor edi, edi
mov eax, dword [eax + 0xc]
mov dword [esp + 0xc], eax
cmp dword [esp + 0x28], edi
jle 0x50ec02
mov eax, dword [esp + 0x24]
mov edx, dword [eax + edi*4]
mov dword [esp + 0x10], edx
cmp esi, edx
je 0x50ebfb
mov eax, dword [esp + 0x1c]
push edx
push esi
lea edx, [esp + 0x1f]
mov ecx, dword [eax + 0x7c]
mov eax, dword [ecx + 8]
add ecx, 8
push edx
mov eax, dword [eax + 4]
call eax
cmp byte [eax], 0
je 0x50ebfb
mov edx, dword [esp + 0x10]
mov eax, dword [edx]
test eax, eax
je 0x50ebfb
mov eax, dword [ebp + 0xc]
mov esi, dword [edx]
push dword [ebp + 0x10]
mov ecx, dword [eax]
mov eax, dword [esp + 0x10]
push dword [ebp + 0xc]
add eax, 0xd
shl eax, 5
add eax, dword [esi + 0xc]
mov esi, dword [ebp + 8]
push edx
push esi
movzx eax, byte [eax + ecx]
lea eax, [eax + eax*4]
mov eax, dword [ecx + eax*4 + 0x9a8]
call eax
add esp, 0x10
inc edi
cmp edi, dword [esp + 0x28]
jl 0x50eb92
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x28], 0
test eax, eax
js 0x50ec2c
and eax, 0x3fffffff
mov ecx, 0x7d8950
shl eax, 2
push eax
mov eax, dword [0x7d8950]
push dword [esp + 0x28]
call dword [eax + 0x10]
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x50edf8
mov dword [esi], 0x77f784
rdtsc
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [edi + 4], eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov ecx, dword [edi + 4]
cmp ecx, dword [edi + 0xc]
jae 0x50ec9d
mov dword [ecx], str.LthkpWorld::getClosestPoints_Broadphase_
mov dword [ecx + 0xc], str.St3AxisBp
rdtsc
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
mov dword [ecx + 4], eax
lea eax, [ecx + 0x10]
mov dword [edi + 4], eax
lea eax, [esp + 0x5c]
mov dword [esp + 0x54], 0
mov dword [esp + 0x50], eax
lea edx, [esp + 0x50]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x58], 0x80000080
push edx
lea edx, [esp + 0x34]
mov ecx, dword [eax + 0x58]
push edx
mov eax, dword [ecx]
call dword [eax + 0x48]
mov eax, dword [esp + 0x50]
push dword [0x884c50]
mov dword [esp + 0x1c], eax
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0xc], eax
mov edi, dword [eax + 4]
cmp edi, dword [eax + 0xc]
jae 0x50ed11
mov dword [edi], str.St3AxisNp
rdtsc
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
lea eax, [edi + 0xc]
mov dword [edi + 4], ecx
mov ecx, dword [esp + 0xc]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x54]
add eax, 0xffffffff
mov dword [esp + 0xc], eax
js 0x50ed9f
mov eax, dword [esp + 0x18]
add eax, 4
mov dword [esp + 0x18], eax
nop dword [eax]
mov eax, dword [eax]
movsx edi, byte [eax + 5]
add edi, eax
cmp esi, edi
je 0x50ed8d
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x17]
push edi
push esi
push edx
mov ecx, dword [eax + 0x7c]
mov eax, dword [ecx + 8]
add ecx, 8
mov eax, dword [eax + 4]
call eax
cmp byte [eax], 0
je 0x50ed8d
mov edx, dword [edi]
test edx, edx
je 0x50ed8d
mov eax, dword [ebp + 0xc]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
mov ecx, dword [eax]
mov eax, dword [esp + 0x28]
add eax, 0xd
shl eax, 5
add eax, dword [edx + 0xc]
push edi
push esi
movzx eax, byte [eax + ecx]
lea eax, [eax + eax*4]
mov eax, dword [ecx + eax*4 + 0x9a8]
call eax
add esp, 0x10
mov eax, dword [esp + 0x18]
add eax, 8
sub dword [esp + 0xc], 1
mov dword [esp + 0x18], eax
jns 0x50ed30
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x50edce
mov dword [esi], 0x77f784
rdtsc
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 0x20]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [edi + 4], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x54], 0
test eax, eax
js 0x50edf8
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 3
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x54]
call dword [eax + 0x10]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc