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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x58
push esi
push edi
push dword [0x884c50]
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov ecx, dword [esi + 4]
cmp ecx, dword [esi + 0xc]
jae 0x502b53
mov dword [ecx], str.LtPhysics
mov dword [ecx + 0xc], str.StInit
rdtsc
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
mov dword [ecx + 4], eax
lea eax, [ecx + 0x10]
mov dword [esi + 4], eax
movss xmm0, dword [ebp + 0xc]
mov byte [edi + 0x68], 1
mov eax, dword [edi + 0xc]
inc dword [eax + 0x94]
movss xmm1, dword [edi + 0x18]
movaps xmm2, xmm1
movss dword [edi + 0x1c], xmm0
addss xmm2, xmm0
movss dword [esp + 0x20], xmm1
xorps xmm0, xmm0
movss dword [esp + 0x24], xmm2
subss xmm2, xmm1
ucomiss xmm2, xmm0
movss dword [esp + 0x28], xmm2
lahf
test ah, 0x44
jnp 0x502ba4
movss xmm0, dword [0x718824]
divss xmm0, xmm2
mov eax, dword [edi + 0xc]
lea esi, [esp + 0x20]
movss dword [esp + 0x2c], xmm0
movups xmm0, xmmword [esp + 0x20]
push esi
movups xmmword [eax + 0x1e0], xmm0
mov eax, dword [edi + 0xc]
movups xmm0, xmmword [esp + 0x24]
mov eax, dword [eax + 0x78]
movups xmmword [eax + 0x50], xmm0
mov eax, dword [edi + 0xc]
push eax
mov ecx, dword [eax + 0x4c]
mov edx, dword [ecx]
call dword [edx + 0x14]
mov ecx, dword [edi + 0xc]
lea eax, [esp + 0x14]
push eax
call fcn.0050cf90
call fcn.004758b0
push dword [esp + 0x14]
mov ecx, eax
mov edx, dword [eax]
mov eax, dword [edx + 0x1c]
call eax
test al, al
jne 0x502c5e
mov ecx, dword [edi + 0xc]
call fcn.0050d7a0
test eax, eax
je 0x502ec7
mov esi, dword [edi + 0xc]
add dword [esi + 0x94], 0xffffffff
jne 0x502c4a
cmp byte [esi + 0x9c], 0
jne 0x502c4a
cmp dword [esi + 0x8c], 0
je 0x502c31
mov ecx, esi
call fcn.00510540
cmp dword [esi + 0xa4], 1
jne 0x502c4a
cmp dword [esi + 0x90], 0
je 0x502c4a
mov ecx, esi
call fcn.00510560
push dword [edi + 0xc]
call fcn.0052cf00
mov eax, dword [edi + 0xc]
add esp, 4
inc dword [eax + 0x94]
call fcn.006e59c0
mov eax, dword [edi + 0xc]
movups xmm0, xmmword [esp + 0x20]
movups xmmword [eax + 0x1e0], xmm0
mov ecx, dword [edi + 0xc]
add ecx, 0x1f0
movss xmm0, dword [ecx + 0x120]
mulss xmm0, dword [esp + 0x28]
movss dword [ecx + 0x10c], xmm0
movd xmm0, dword [ecx + 0x114]
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [esp + 0x2c]
movss dword [ecx + 0x110], xmm0
mov eax, dword [edi + 0xc]
movss xmm0, dword [ecx + 0x10c]
shufps xmm0, xmm0, 0
mulps xmm0, xmmword [eax + 0x10]
movaps xmmword [ecx + 0x10], xmm0
mov eax, dword [edi + 0xc]
movss xmm0, dword [esp + 0x28]
shufps xmm0, xmm0, 0
mulps xmm0, xmmword [eax + 0x10]
movaps xmmword [ecx + 0x20], xmm0
mov eax, dword [edi + 0xc]
mov eax, dword [eax + 0x1d0]
mov dword [eax], 0
mov eax, dword [edi + 0xc]
mov esi, dword [eax + 0x74]
add eax, 0x1e0
mov dword [esi + 0x114], eax
lea ecx, [esi + 0x90]
mov eax, dword [edi + 0xc]
push dword [eax + 0x78]
call fcn.004fd5b0
mov ecx, dword [edi + 0xc]
push dword [ecx + 0x1d0]
lea eax, [ecx + 0x1e0]
push eax
lea eax, [ecx + 0x1f0]
push eax
lea ecx, [esi + 0x10]
call fcn.004fd630
mov dword [esi + 0x110], edi
mov eax, dword [edi + 0xc]
mov eax, dword [eax + 0x78]
mov eax, dword [eax + 0xc]
mov dword [esi + 0x118], eax
mov dword [esi + 0x11c], 0x8cde50
mov eax, dword [edi + 0xc]
mov dword [esi], eax
mov eax, dword [edi + 0xc]
mov ecx, dword [eax + 0x2c]
mov dword [esp + 8], ecx
test ecx, ecx
jle 0x502e22
cmp byte [eax + 0xb4], 0
je 0x502db7
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x10], eax
mov esi, dword [eax + 4]
cmp esi, dword [eax + 0xc]
jae 0x502d9a
mov dword [esi], str.StActions
rdtsc
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0xc]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [ecx + 4], eax
mov eax, dword [edi + 0xc]
mov ecx, edi
dec dword [eax + 0x98]
call fcn.004fcb10
mov eax, dword [edi + 0xc]
mov ecx, dword [esp + 8]
inc dword [eax + 0x98]
mov esi, dword [ebp + 8]
mov eax, 0x30
mov word [esp + 0x34], ax
or eax, 0xffffffff
mov word [esp + 0x36], ax
xor eax, eax
mov word [esp + 0x40], ax
mov eax, dword [edi + 0xc]
push ecx
mov dword [esp + 0x54], ecx
mov ecx, esi
mov word [esp + 0x34], 0
mov byte [esp + 0x36], 2
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov eax, dword [eax + 0x74]
push 0
mov dword [esp + 0x54], eax
call fcn.0064e910
push dword [esp + 8]
mov ecx, esi
push 1
call fcn.0064e910
push 1
lea eax, [esp + 0x34]
mov ecx, esi
push eax
call fcn.0064ee60
mov ecx, dword [edi + 0xc]
inc byte [ecx + 0x317]
add ecx, 0x1f0
movzx eax, byte [ecx + 0x127]
sub eax, 4
test al, 7
jne 0x502e46
xor byte [ecx + 0x125], 1
test byte [ecx + 0x127], 7
jne 0x502e56
xor byte [ecx + 0x125], 2
test byte [ecx + 0x127], 0xf
jne 0x502e74
mov al, 1
sub al, byte [ecx + 0x126]
mov byte [ecx + 0x126], al
mov byte [ecx + 0x127], 0
mov ecx, dword [edi + 0xc]
mov eax, dword [ecx + 0x2c]
mov dword [edi + 0xb8], eax
mov eax, dword [ecx + 0x38]
mov dword [edi + 0xbc], eax
call fcn.0050d780
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x502ebd
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
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
mov eax, dword [edi + 0xc]
cmp byte [eax + 0x54], 0
je 0x502ed1
int3
mov dword [edi + 0x28], 1
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8