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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
mov eax, 0x30b8
call fcn.00607e10
push esi
push edi
push dword [0x884c50]
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0xc], eax
mov edi, dword [eax + 4]
cmp edi, dword [eax + 0xc]
jae 0x502f39
mov dword [edi], str.TtPhysics
rdtsc
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x18]
lea eax, [edi + 0xc]
mov dword [edi + 4], ecx
mov ecx, dword [esp + 0xc]
mov dword [ecx + 4], eax
mov ecx, dword [esi + 0xc]
call fcn.0050d7e0
mov edi, dword [ebp + 8]
mov dword [esp + 0x18], 0
test edi, edi
je 0x502f83
cmp dword [ebp + 0xc], 0
je 0x502f83
mov ecx, edi
call fcn.0064e890
push 1
mov ecx, edi
mov dword [esp + 0x1c], eax
call fcn.0064e830
push 0xc0002
mov ecx, edi
call fcn.0064e8a0
mov eax, dword [ebp + 0xc]
mov ecx, eax
push 0x15
push edi
mov edx, dword [eax]
call dword [edx + 0xc]
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 0xb8]
mov eax, dword [ecx + 0x2c]
sub eax, edx
cmp eax, 1
jle 0x502fae
dec eax
push 0x505090
push eax
mov eax, dword [ecx + 0x28]
push 0
lea eax, [eax + edx*4]
push eax
call fcn.005050c0
add esp, 0x10
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0xb8]
cmp ecx, dword [eax + 0x2c]
jge 0x502fd6
nop dword [eax]
mov eax, dword [esi + 0xc]
mov eax, dword [eax + 0x28]
mov eax, dword [eax + ecx*4]
mov word [eax + 0x20], cx
inc ecx
mov eax, dword [esi + 0xc]
cmp ecx, dword [eax + 0x2c]
jl 0x502fc0
mov ecx, dword [esi + 0xc]
call fcn.0050d780
mov eax, dword [esi + 0x70]
add eax, dword [esi + 0x94]
je 0x503348
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov ecx, dword [edi + 4]
cmp ecx, dword [edi + 0xc]
jae 0x503023
mov dword [ecx], str.LtInterIsland
mov dword [ecx + 0xc], str.Stduplicates
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
lea ecx, [esi + 0x90]
lea eax, [esi + 0x6c]
push ecx
push eax
call fcn.006aef90
add esp, 8
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x14], eax
mov edi, dword [eax + 4]
cmp edi, dword [eax + 0xc]
jae 0x50306b
mov dword [edi], str.StsortPairs
rdtsc
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0xc]
lea eax, [edi + 0xc]
mov dword [edi + 4], ecx
mov ecx, dword [esp + 0x14]
mov dword [ecx + 4], eax
lea eax, [esi + 0x6c]
push eax
call fcn.00505030
lea eax, [esi + 0x90]
push eax
call fcn.00505030
add esp, 8
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x14], eax
mov edi, dword [eax + 4]
cmp edi, dword [eax + 0xc]
jae 0x5030b8
mov dword [edi], str.StaddAgt
rdtsc
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0xc]
lea eax, [edi + 0xc]
mov dword [edi + 4], ecx
mov ecx, dword [esp + 0x14]
mov dword [ecx + 4], eax
xor edi, edi
mov dword [esp + 0x3060], 0x7f7fffee
mov dword [esp + 0x3080], 0
mov dword [esp + 0x3084], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x1c], edi
cmp dword [esi + 0x70], edi
jle 0x503281
mov ecx, dword [esi + 0x6c]
mov eax, dword [ecx + edi*8]
movsx edx, byte [eax + 5]
add edx, eax
mov eax, dword [ecx + edi*8 + 4]
mov dword [esp + 0x10], edx
movsx ecx, byte [eax + 5]
add ecx, eax
movsx eax, byte [edx + 0x10]
add eax, edx
mov dword [esp + 0x14], ecx
mov edi, dword [esp + 0x14]
mov dword [esp + 0xc], eax
mov ecx, dword [eax + 0xcc]
mov eax, dword [esp + 0x14]
movsx eax, byte [eax + 0x10]
mov eax, dword [eax + edi + 0xcc]
mov edi, dword [esp + 0x1c]
cmp ecx, eax
je 0x503154
push eax
push ecx
push dword [esi + 0xc]
call fcn.0052a220
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ecx + 0xcc]
mov eax, dword [esi + 0xc]
mov dword [esp + 0x34], ecx
mov eax, dword [eax + 0x78]
mov dword [esp + 0x10], eax
mov eax, dword [eax]
mov dword [esp + 0xc], eax
movsx eax, byte [edx + 0x1a]
lea ecx, [eax + eax*4]
mov eax, dword [esp + 0x14]
movsx eax, byte [eax + 0x1a]
add eax, dword [esp + 0xc]
mov al, byte [eax + ecx*2 + 0x1c50]
test al, al
je 0x50326a
mov ecx, dword [esp + 0xc]
movsx eax, al
shl eax, 6
mov eax, dword [eax + ecx + 0x1cd0]
mov ecx, dword [esp + 0x10]
push ecx
push dword [esp + 0x18]
push edx
mov dword [ecx + 0x18], eax
call fcn.0052d890
mov edi, eax
add esp, 0xc
test edi, edi
je 0x503266
mov ecx, dword [esi + 0xc]
mov eax, dword [edi + 0x10]
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x14]
mov edx, dword [ecx + 0x78]
movsx ecx, byte [edi + 0xc]
mov dword [esp + 0xc], eax
add ecx, 0x73
shl ecx, 6
mov eax, dword [edx]
add eax, ecx
mov dword [esp + 0x10], edx
mov dword [edx + 0x60], eax
mov eax, dword [eax + 0x10]
mov dword [edx + 0x18], eax
lea eax, [esp + 0x40]
mov dword [esp + 0x30], eax
lea eax, [esp + 0x30]
mov dword [esp + 0x3060], 0x7f7fffee
mov dword [esp + 0x30b0], 0
push dword [edi + 8]
push eax
push edx
push edi
call fcn.006ad820
lea eax, [esp + 0x50]
add esp, 0x10
cmp dword [esp + 0x30], eax
je 0x50323c
mov ecx, dword [edi + 8]
lea edx, [esp + 0x30]
push edx
push dword [esp + 0x14]
push dword [esp + 0x14]
mov eax, dword [ecx]
push dword [esp + 0x20]
call dword [eax + 0x18]
movss xmm0, dword [esp + 0x3060]
ucomiss xmm0, dword [0x77fe14]
lahf
test ah, 0x44
jnp 0x503266
lea eax, [esi + 0x100]
mov ecx, esi
push eax
push edi
lea eax, [esp + 0x38]
push eax
call fcn.00503fb0
mov edi, dword [esp + 0x1c]
cmp dword [0x8d7868], 1
je 0x503281
inc edi
mov dword [esp + 0x1c], edi
cmp edi, dword [esi + 0x70]
jl 0x5030f0
mov dword [esi + 0x70], 0
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 0x5032bd
mov dword [edi], str.StremoveAgt
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
xor edi, edi
cmp dword [esi + 0x94], edi
jle 0x503309
nop word [eax + eax]
mov ecx, dword [esi + 0x90]
mov eax, dword [ecx + edi*8]
movsx edx, byte [eax + 5]
add edx, eax
mov eax, dword [ecx + edi*8 + 4]
movsx ecx, byte [eax + 5]
add ecx, eax
push ecx
push edx
call fcn.006ae970
add esp, 8
test eax, eax
je 0x503300
push eax
call fcn.0052dac0
add esp, 4
inc edi
cmp edi, dword [esi + 0x94]
jl 0x5032d0
mov dword [esi + 0x94], 0
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 0x503348
mov dword [edi], 0x77f784
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 byte [esi + 0x68], 0
mov ecx, dword [esi + 0xc]
call fcn.005104e0
movss xmm0, dword [esi + 0x18]
addss xmm0, dword [esi + 0x1c]
mov edi, dword [esi + 0xc]
movss dword [esi + 0x18], xmm0
add dword [edi + 0x94], 0xffffffff
jne 0x5033a1
cmp byte [edi + 0x9c], 0
jne 0x5033a1
cmp dword [edi + 0x8c], 0
je 0x503388
mov ecx, edi
call fcn.00510540
cmp dword [edi + 0xa4], 1
jne 0x5033a1
cmp dword [edi + 0x90], 0
je 0x5033a1
mov ecx, edi
call fcn.00510560
xor edi, edi
cmp dword [0x8d7868], 1
jne 0x503409
movss xmm0, dword [esi + 0x18]
subss xmm0, dword [esi + 0x1c]
mov ecx, dword [esi + 0xc]
mov dword [esp + 0xc], 2
movss dword [esi + 0x18], xmm0
call fcn.0050d800
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x14], eax
mov edi, dword [eax + 4]
cmp edi, dword [eax + 0xc]
jae 0x503568
mov dword [edi], 0x77f5ec
rdtsc
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
lea eax, [edi + 0xc]
mov dword [edi + 4], ecx
mov ecx, dword [esp + 0x14]
mov dword [ecx + 4], eax
jmp 0x503568
mov eax, dword [esi + 0xc]
cmp dword [eax + 0x18c], edi
je 0x5034e7
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
mov dword [esp + 0x14], ecx
mov eax, dword [ecx + 4]
mov dword [esp + 0xc], eax
cmp eax, dword [ecx + 0xc]
jae 0x503457
mov dword [eax], str.TtPostCollideCB
rdtsc
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [eax + 4], ecx
add eax, 0xc
mov ecx, dword [esp + 0x14]
mov dword [ecx + 4], eax
movss xmm1, dword [esi + 0x18]
movaps xmm0, xmm1
movss dword [esp + 0x24], xmm1
subss xmm0, dword [esi + 0x1c]
subss xmm1, xmm0
movss dword [esp + 0x20], xmm0
xorps xmm0, xmm0
ucomiss xmm1, xmm0
movss dword [esp + 0x28], xmm1
lahf
test ah, 0x44
jnp 0x503492
movss xmm0, dword [0x718824]
divss xmm0, xmm1
lea eax, [esp + 0x20]
movss dword [esp + 0x2c], xmm0
push eax
push dword [esi + 0xc]
call fcn.005286d0
add esp, 8
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
mov dword [esp + 0x14], ecx
mov eax, dword [ecx + 4]
mov dword [esp + 0xc], eax
cmp eax, dword [ecx + 0xc]
jae 0x5034e7
mov dword [eax], 0x77f5ec
rdtsc
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [eax + 4], ecx
add eax, 0xc
mov ecx, dword [esp + 0x14]
mov dword [ecx + 4], eax
mov ecx, dword [esi + 0xc]
call fcn.0050d780
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
mov dword [esp + 0x14], ecx
mov eax, dword [ecx + 4]
mov dword [esp + 0xc], eax
cmp eax, dword [ecx + 0xc]
jae 0x50352e
mov dword [eax], 0x77f5ec
rdtsc
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [eax + 4], ecx
add eax, 0xc
mov ecx, dword [esp + 0x14]
mov dword [ecx + 4], eax
mov ecx, dword [esi + 0xc]
cmp byte [ecx + 0xec], 0
je 0x503543
mov eax, dword [ebp + 8]
mov dword [esi + 0xc0], eax
call fcn.0050d800
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x18]
mov dword [esi + 0xc0], edi
mov eax, 3
cmp dword [0x8d7868], 1
cmove edi, eax
mov dword [esp + 0xc], edi
cmp dword [ebp + 0xc], 0
je 0x5035f4
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
mov edi, dword [ecx + 4]
cmp edi, dword [ecx + 0xc]
jae 0x5035a1
mov dword [edi], str.TtWaitForWorkerThreads
rdtsc
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x10]
lea eax, [edi + 0xc]
mov dword [edi + 4], edx
mov dword [ecx + 4], eax
mov ecx, dword [ebp + 8]
push 0
call fcn.0064e830
push dword [esp + 0x18]
mov ecx, dword [ebp + 8]
call fcn.0064e8a0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
call dword [eax + 0x10]
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x18], eax
mov edi, dword [eax + 4]
cmp edi, dword [eax + 0xc]
jae 0x5035f4
mov dword [edi], 0x77f5ec
rdtsc
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
lea eax, [edi + 0xc]
mov dword [edi + 4], ecx
mov ecx, dword [esp + 0x18]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0xc]
mov dword [esi + 0x28], eax
test eax, eax
je 0x503619
mov ecx, dword [esi + 0xc]
call fcn.0050d7a0
test eax, eax
je 0x503616
push dword [esi + 0xc]
call fcn.0052d040
add esp, 4
mov eax, dword [esi + 0x28]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8