Function at 0x5111d0
Capabilities:
Execute anti-debugging instructions

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x64
mov eax, dword [0x961870]
push ebx
mov dword [esp + 0xc], ecx
mov ecx, dword [0x96186c]
cmp ecx, eax
push esi
push edi
jae 0x51120b
mov dword [ecx], str.TtSphereTriangle
rdtsc
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x18]
mov dword [ecx + 4], eax
add ecx, 0xc
mov dword [0x96186c], ecx
mov ecx, dword [ebp + 0x14]
mov edi, dword [ecx]
mov edx, dword [edi + 8]
mov eax, dword [edi + 4]
and edx, 0x7fffffff
cmp eax, edx
jne 0x51122b
push 0x30
push edi
call fcn.0054d2c0
add esp, 8
mov eax, dword [edi + 4]
mov ebx, dword [edi]
lea esi, [eax + eax*2]
shl esi, 4
add esi, ebx
inc eax
mov dword [edi + 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov ebx, dword [eax + 8]
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp + 0xc]
mov edi, dword [ecx]
fld dword [edi + 0x10]
mov eax, dword [ecx + 8]
fld dword [edi + 0x14]
add ebx, 0x50
fld dword [edi + 0x18]
add eax, 0x20
fld st(2)
fmul dword [eax]
fld st(1)
fmul dword [eax + 0x20]
faddp st(1)
fld st(2)
fmul dword [eax + 0x10]
faddp st(1)
fadd dword [eax + 0x30]
fstp dword [esp + 0x40]
fld st(2)
fmul dword [eax + 4]
fld st(1)
fmul dword [eax + 0x24]
faddp st(1)
fld st(2)
fmul dword [eax + 0x14]
faddp st(1)
fadd dword [eax + 0x34]
fstp dword [esp + 0x44]
fxch st(2)
fmul dword [eax + 8]
fxch st(2)
fmul dword [eax + 0x28]
faddp st(2)
fmul dword [eax + 0x18]
faddp st(1)
fadd dword [eax + 0x38]
mov dword [esp + 0x4c], 0
fstp dword [esp + 0x48]
fld dword [edi + 0x20]
fld dword [edi + 0x24]
fld dword [edi + 0x28]
fld st(2)
fmul dword [eax]
fld st(1)
fmul dword [eax + 0x20]
faddp st(1)
fld st(2)
fmul dword [eax + 0x10]
faddp st(1)
fadd dword [eax + 0x30]
fstp dword [esp + 0x50]
fld st(2)
fmul dword [eax + 4]
fld st(1)
fmul dword [eax + 0x24]
faddp st(1)
fld st(2)
fmul dword [eax + 0x14]
faddp st(1)
fadd dword [eax + 0x34]
fstp dword [esp + 0x54]
fxch st(2)
fmul dword [eax + 8]
fxch st(2)
fmul dword [eax + 0x28]
faddp st(2)
fmul dword [eax + 0x18]
faddp st(1)
fadd dword [eax + 0x38]
fstp dword [esp + 0x58]
mov dword [esp + 0x5c], 0
fld dword [edi + 0x30]
fld dword [edi + 0x34]
lea edx, [esp + 0x20]
fld dword [edi + 0x38]
push edx
fld st(2)
lea ecx, [esp + 0x44]
fmul dword [eax]
fld st(1)
fmul dword [eax + 0x20]
faddp st(1)
fld st(2)
fmul dword [eax + 0x10]
faddp st(1)
fadd dword [eax + 0x30]
fstp dword [esp + 0x64]
fld st(2)
fmul dword [eax + 4]
fld st(1)
fmul dword [eax + 0x24]
faddp st(1)
fld st(2)
fmul dword [eax + 0x14]
faddp st(1)
fadd dword [eax + 0x34]
fstp dword [esp + 0x68]
fxch st(2)
fmul dword [eax + 8]
fxch st(2)
fmul dword [eax + 0x28]
faddp st(2)
fmul dword [eax + 0x18]
faddp st(1)
fadd dword [eax + 0x38]
mov eax, dword [esp + 0x18]
add eax, 0x10
push eax
push ecx
fstp dword [esp + 0x74]
push ebx
mov dword [esp + 0x7c], 0
call fcn.00529f30
mov edx, dword [esp + 0x28]
fld dword [edx + 0xc]
mov edx, dword [ebp + 0x10]
fadd dword [edi + 0xc]
mov dword [esp + 0x2c], eax
add esp, 0x10
fld st(0)
fadd dword [edx + 8]
fcomp dword [esp + 0x30]
fnstsw ax
test ah, 0x41
jne 0x51145b
fld dword [edi + 0xc]
mov eax, dword [ebx]
fsub dword [esp + 0x30]
mov dword [esi], eax
mov ecx, dword [ebx + 4]
fld dword [esp + 0x20]
mov dword [esi + 4], ecx
mov eax, dword [ebx + 8]
fmul st(1)
mov dword [esi + 8], eax
mov ecx, dword [ebx + 0xc]
fadd dword [esi]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x14]
mov dword [esi + 0xc], ecx
fstp dword [esi]
mov ecx, dword [esp + 0x24]
fld dword [esp + 0x24]
fmul st(1)
fadd dword [esi + 4]
fstp dword [esi + 4]
fld dword [esp + 0x28]
fmul st(1)
fadd dword [esi + 8]
fstp dword [esi + 8]
fld dword [esp + 0x2c]
fmul st(1)
fadd dword [esi + 0xc]
fstp dword [esi + 0xc]
mov dword [esi + 0x10], eax
mov eax, dword [esp + 0x28]
fstp st(0)
mov dword [esi + 0x14], ecx
fld dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
fsub st(1)
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ecx
fstp dword [esi + 0xc]
cmp word [edi + 0xc], 0xffff
fstp st(0)
jne 0x511440
mov ecx, dword [edi + 8]
mov eax, dword [ecx]
push esi
push edx
mov edx, dword [ebp + 0xc]
push edx
mov edx, dword [ebp + 8]
push edx
call dword [eax + 4]
mov word [edi + 0xc], ax
mov di, word [edi + 0xc]
cmp di, 0xffff
je 0x511451
mov word [esi + 0x20], di
jmp 0x511488
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
dec dword [eax + 4]
jmp 0x511488
mov ecx, dword [ebp + 0x14]
fstp st(0)
mov eax, dword [ecx]
mov edx, dword [eax + 4]
mov esi, dword [esp + 0x14]
dec edx
mov dword [eax + 4], edx
xor eax, eax
mov ax, word [esi + 0xc]
cmp ax, 0xffff
je 0x511488
mov ecx, dword [esi + 8]
mov edx, dword [ecx]
push eax
call dword [edx + 8]
mov word [esi + 0xc], 0xffff
mov ecx, dword [0x96186c]
cmp ecx, dword [0x961870]
jae 0x5114b2
mov dword [ecx], 0x6594f4
rdtsc
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x18]
mov dword [ecx + 4], eax
add ecx, 0xc
mov dword [0x96186c], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10