Function at 0x505380
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x1d8
push esi
mov esi, ecx
mov ecx, 0x70a6a4
push edi
mov dword [esp + 0x3c], esi
call fcn.0056b0a5
cmp dword [esi + 0xa8], 0
je 0x505ca3
test byte [esi + 0xb8], 4
je 0x505ca3
cmp byte [esi + 0x94], 0
push 0xc11
je 0x505484
call dword [sym.imp.OPENGL32.dll_glEnable]
movss xmm2, dword [esi + 0xa4]
xorps xmm5, xmm5
cvtsi2ss xmm5, dword [0x5ce50c]
movaps xmm0, xmm2
movss xmm4, dword [esi + 0x98]
subss xmm0, dword [esi + 0x9c]
xorps xmm1, xmm1
xorps xmm6, xmm6
cvtsi2ss xmm1, dword [0x5ce520]
mulss xmm0, xmm5
xorps xmm3, xmm3
cvtsi2ss xmm6, dword [0x5ce510]
divss xmm0, xmm1
cvtsi2ss xmm3, dword [0x5ce51c]
cvttss2si eax, xmm0
movss xmm0, dword [esi + 0xa0]
subss xmm0, xmm4
push eax
mulss xmm0, xmm6
mulss xmm6, xmm4
divss xmm0, xmm3
divss xmm6, xmm3
cvttss2si eax, xmm0
movaps xmm0, xmm5
mulss xmm0, xmm2
push eax
divss xmm0, xmm1
subss xmm5, xmm0
xorps xmm0, xmm0
cvtsi2ss xmm0, dword [0x5cdf2c]
addss xmm5, xmm0
xorps xmm0, xmm0
cvtsi2ss xmm0, dword [0x5cdf5c]
cvttss2si eax, xmm5
addss xmm6, xmm0
push eax
cvttss2si eax, xmm6
push eax
call dword [sym.imp.OPENGL32.dll_glScissor]
jmp 0x50548a
call dword [sym.imp.OPENGL32.dll_glDisable]
mov eax, dword [0x6d07d4]
movss xmm2, dword [esi + 0x68]
movss xmm3, dword [esi + 0x5c]
movss xmm4, dword [esi + 0x60]
mov ecx, dword [eax + 0x430]
movss xmm5, dword [esi + 0x64]
movss dword [esp + 0x14], xmm2
test ecx, ecx
je 0x50551b
mov edx, dword [eax + 0x440]
cmp edx, 0xffffffff
je 0x5054dc
cmp dword [eax + 0x444], 0xffffffff
mov edi, dword [esi + 0x44]
jne 0x5054d0
cmp edx, edi
jne 0x50551b
jmp 0x5054dc
cmp edi, edx
jl 0x50551b
cmp edi, dword [eax + 0x444]
jg 0x50551b
cmp ecx, 1
jne 0x5054ec
xorps xmm3, xmm3
xorps xmm4, xmm4
xorps xmm5, xmm5
jmp 0x505504
cmp ecx, 4
je 0x5054f6
cmp ecx, 5
jne 0x505504
mulss xmm2, dword [eax + 0x434]
movss dword [esp + 0x14], xmm2
movss xmm1, dword [eax + 0x434]
movaps xmm0, xmm1
mulss xmm5, xmm1
mulss xmm3, xmm0
mulss xmm4, xmm0
sub esp, 0x10
movss dword [esp + 0xc], xmm2
movss dword [esp + 8], xmm5
movss dword [esp + 4], xmm4
movss dword [esp], xmm3
call dword [sym.imp.OPENGL32.dll_glColor4f]
push 0xb44
call dword [sym.imp.OPENGL32.dll_glDisable]
push dword [esi + 0x15c]
mov eax, dword [esi + 0x160]
push dword [esi + 0x158]
mov ecx, dword [esi + 0xb0]
push dword [esi + 0x154]
push dword [esi + 0x150]
push dword [esi + 0x14c]
push dword [esi + 0x148]
push dword [esi + 0x144]
push dword [esi + 0x140]
push eax
push eax
push dword [esi + 0xa8]
call fcn.005178b0
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x10], eax
cmp dword [esi + 0x168], eax
jle 0x505ca3
nop word [eax + eax]
xor edi, edi
mov dword [esp + 0x24], edi
cmp dword [esi + 0x164], edi
jle 0x505c92
lea ecx, [esp + 0x60]
call fcn.004db1f0
lea ecx, [esp + 0x160]
call fcn.004db1f0
mov ecx, dword [esi + 0xa8]
xorps xmm4, xmm4
mov dword [esp + 0x9c], 0x3f800000
mov dword [esp + 0x98], 0
mov dword [esp + 0x94], 0
movsx eax, word [ecx + 0x54]
imul eax, edi
mov dword [esp + 0x90], 0
movups xmm1, xmmword [esp + 0x90]
mov dword [esp + 0x60], 0x3f800000
mov dword [esp + 0x6c], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x64], 0
movups xmm0, xmmword [esp + 0x60]
mov dword [esp + 0x74], 0x3f800000
movd xmm2, eax
movsx eax, word [ecx + 0x56]
imul eax, dword [esp + 0x10]
cvtdq2ps xmm2, xmm2
mov dword [esp + 0x7c], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x88], 0x3f800000
movss xmm6, dword [esi + 0xcc]
shufps xmm2, xmm2, 0
mulps xmm2, xmm1
mov dword [esp + 0x8c], 0
movd xmm3, eax
movsx eax, word [ecx + 0x5c]
cvtdq2ps xmm3, xmm3
mov dword [esp + 0x84], 0
mov dword [esp + 0x80], 0
addps xmm2, xmm0
movups xmm0, xmmword [esp + 0x70]
movups xmm5, xmmword [esp + 0x80]
shufps xmm3, xmm3, 0
mulps xmm3, xmm1
addps xmm3, xmm0
movaps xmm0, xmm1
mulps xmm0, xmm4
movd xmm4, eax
movsx eax, word [ecx + 0x5e]
cvtdq2ps xmm4, xmm4
movd xmm7, eax
addps xmm5, xmm0
cvtdq2ps xmm7, xmm7
shufps xmm4, xmm4, 0
addps xmm5, xmm0
mulps xmm4, xmm1
xorps xmm0, xmm0
shufps xmm7, xmm7, 0
mulps xmm7, xmm1
addps xmm4, xmm2
movaps xmm2, xmm6
mulss xmm2, xmm0
addps xmm7, xmm3
movss xmm3, dword [esi + 0xc0]
movups xmmword [esp + 0x28], xmm5
movss xmm5, dword [esi + 0xc8]
movups xmmword [esp + 0x40], xmm4
movss xmm1, dword [esp + 0x40]
movaps xmm0, xmm7
movss xmm4, dword [esi + 0xc4]
mulss xmm1, xmm3
mulss xmm0, xmm4
movups xmmword [esp + 0x50], xmm7
addss xmm1, xmm0
movss xmm0, dword [esp + 0x28]
mulss xmm0, xmm5
addss xmm1, xmm0
addss xmm1, xmm2
movss dword [esp + 0x60], xmm1
movups xmm1, xmmword [esp + 0x40]
movaps xmm0, xmm1
shufps xmm0, xmm1, 0x55
movups xmmword [esp + 0xe0], xmm0
movaps xmm1, xmm0
mulss xmm1, xmm3
movaps xmm0, xmm7
shufps xmm0, xmm7, 0x55
movups xmmword [esp + 0xf0], xmm0
mulss xmm0, xmm4
movups xmm7, xmmword [esp + 0x28]
addss xmm1, xmm0
movups xmm0, xmmword [esp + 0x28]
shufps xmm0, xmm7, 0x55
movups xmmword [esp + 0x100], xmm0
mulss xmm0, xmm5
movups xmm7, xmmword [esp + 0x50]
addss xmm1, xmm0
addss xmm1, xmm2
movss dword [esp + 0x64], xmm1
movups xmm1, xmmword [esp + 0x40]
movaps xmm0, xmm1
shufps xmm0, xmm1, 0xaa
movaps xmm1, xmm0
movups xmmword [esp + 0x110], xmm0
mulss xmm1, xmm3
movaps xmm0, xmm7
shufps xmm0, xmm7, 0xaa
movups xmm7, xmmword [esp + 0x28]
movups xmmword [esp + 0x120], xmm0
mulss xmm0, xmm4
addss xmm1, xmm0
movups xmm0, xmmword [esp + 0x28]
shufps xmm0, xmm7, 0xaa
movups xmmword [esp + 0x130], xmm0
mulss xmm0, xmm5
movups xmm7, xmmword [esp + 0x50]
addss xmm1, xmm0
addss xmm1, xmm2
movss dword [esp + 0x68], xmm1
movups xmm1, xmmword [esp + 0x40]
movaps xmm0, xmm1
shufps xmm0, xmm1, 0xff
movaps xmm1, xmm0
movups xmmword [esp + 0x140], xmm0
mulss xmm1, xmm3
movaps xmm0, xmm7
shufps xmm0, xmm7, 0xff
movaps xmmword [esp + 0x150], xmm0
mulss xmm0, xmm4
movss xmm3, dword [esi + 0xd0]
movss xmm4, dword [esi + 0xd8]
addss xmm1, xmm0
movups xmm0, xmmword [esp + 0x28]
movaps xmm7, xmm0
shufps xmm7, xmm0, 0xff
movaps xmm0, xmm7
mulss xmm0, xmm5
movss xmm5, dword [esi + 0xdc]
movaps xmm2, xmm5
addss xmm1, xmm0
xorps xmm0, xmm0
mulss xmm2, xmm0
movss xmm0, dword [esp + 0x50]
addss xmm1, xmm6
movss xmm6, dword [esi + 0xd4]
mulss xmm0, xmm6
movss dword [esp + 0x6c], xmm1
movss xmm1, dword [esp + 0x40]
mulss xmm1, xmm3
addss xmm1, xmm0
movss xmm0, dword [esp + 0x28]
mulss xmm0, xmm4
addss xmm1, xmm0
movss xmm0, dword [esp + 0xf0]
mulss xmm0, xmm6
addss xmm1, xmm2
movss dword [esp + 0x70], xmm1
movss xmm1, dword [esp + 0xe0]
mulss xmm1, xmm3
addss xmm1, xmm0
movss xmm0, dword [esp + 0x100]
mulss xmm0, xmm4
addss xmm1, xmm0
addss xmm1, xmm2
movss dword [esp + 0x74], xmm1
movss xmm1, dword [esp + 0x110]
movss xmm0, dword [esp + 0x120]
mulss xmm1, xmm3
mulss xmm0, xmm6
addss xmm1, xmm0
movss xmm0, dword [esp + 0x130]
mulss xmm0, xmm4
addss xmm1, xmm0
movss xmm0, dword [esp + 0x150]
mulss xmm0, xmm6
movss xmm6, dword [esi + 0xe4]
addss xmm1, xmm2
movss dword [esp + 0x78], xmm1
movss xmm1, dword [esp + 0x140]
mulss xmm1, xmm3
movss xmm3, dword [esi + 0xe0]
addss xmm1, xmm0
movaps xmm0, xmm7
mulss xmm0, xmm4
movss xmm4, dword [esi + 0xe8]
addss xmm1, xmm0
xorps xmm0, xmm0
addss xmm1, xmm5
movss xmm5, dword [esi + 0xec]
movaps xmm2, xmm5
mulss xmm2, xmm0
movss xmm0, dword [esp + 0x50]
movss dword [esp + 0x7c], xmm1
movss xmm1, dword [esp + 0x40]
mulss xmm1, xmm3
mulss xmm0, xmm6
addss xmm1, xmm0
movss xmm0, dword [esp + 0x28]
mulss xmm0, xmm4
addss xmm1, xmm0
movss xmm0, dword [esp + 0xf0]
mulss xmm0, xmm6
addss xmm1, xmm2
movss dword [esp + 0x80], xmm1
movss xmm1, dword [esp + 0xe0]
mulss xmm1, xmm3
addss xmm1, xmm0
movss xmm0, dword [esp + 0x100]
mulss xmm0, xmm4
addss xmm1, xmm0
movss xmm0, dword [esp + 0x120]
mulss xmm0, xmm6
addss xmm1, xmm2
movss dword [esp + 0x84], xmm1
movss xmm1, dword [esp + 0x110]
mulss xmm1, xmm3
addss xmm1, xmm0
movss xmm0, dword [esp + 0x130]
mulss xmm0, xmm4
addss xmm1, xmm0
movss xmm0, dword [esp + 0x150]
mulss xmm0, xmm6
movups xmm6, xmmword [esp + 0x40]
addss xmm1, xmm2
movss xmm2, dword [esi + 0xf8]
movss dword [esp + 0x88], xmm1
movss xmm1, dword [esp + 0x140]
mulss xmm1, xmm3
movss xmm3, dword [esi + 0xfc]
addss xmm1, xmm0
movaps xmm0, xmm7
mulss xmm0, xmm4
movss xmm4, dword [esi + 0xf4]
addss xmm1, xmm0
movaps xmm0, xmm3
addss xmm1, xmm5
xorps xmm5, xmm5
mulss xmm0, xmm5
movups xmm5, xmmword [esp + 0x50]
movss dword [esp + 0x8c], xmm1
movss xmm1, dword [esi + 0xf0]
mulss xmm5, xmm4
mulss xmm6, xmm1
addss xmm6, xmm5
movups xmm5, xmmword [esp + 0x28]
mulss xmm5, xmm2
addss xmm6, xmm5
mulss xmm7, xmm2
mov ecx, 0x20
lea esi, [esp + 0x60]
movups xmm5, xmmword [esp + 0xf0]
mov edi, 0x6f3718
addss xmm6, xmm0
mulss xmm5, xmm4
movss dword [esp + 0x90], xmm6
movups xmm6, xmmword [esp + 0xe0]
mulss xmm6, xmm1
addss xmm6, xmm5
movups xmm5, xmmword [esp + 0x100]
mulss xmm5, xmm2
addss xmm6, xmm5
movups xmm5, xmmword [esp + 0x120]
mulss xmm5, xmm4
addss xmm6, xmm0
movss dword [esp + 0x94], xmm6
movups xmm6, xmmword [esp + 0x110]
mulss xmm6, xmm1
addss xmm6, xmm5
movups xmm5, xmmword [esp + 0x130]
mulss xmm5, xmm2
addss xmm6, xmm5
movups xmm5, xmmword [esp + 0x140]
mulss xmm5, xmm1
addss xmm6, xmm0
movaps xmm0, xmmword [esp + 0x150]
mulss xmm0, xmm4
addss xmm5, xmm0
movss dword [esp + 0x98], xmm6
addss xmm5, xmm7
addss xmm5, xmm3
movss dword [esp + 0x9c], xmm5
rep movsd dword es:[edi], dword [esi]
xor cl, cl
call fcn.00518aa0
mov esi, dword [esp + 0x3c]
xor ecx, ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x20], ecx
mov edx, dword [esi + 0xb0]
cmp dword [edx + 0x2c], ecx
jle 0x505c79
xor edi, edi
mov eax, edx
cmp dword [edx + 0x28], edi
jle 0x505c65
nop dword [eax]
mov al, byte [esi + 0x16c]
shr al, 2
and al, 1
movzx eax, al
push eax
push ecx
push dword [esi + 0x17c]
mov ecx, dword [esi + 0xa8]
call fcn.00516e60
mov eax, dword [esi + 0xa8]
cmp byte [eax + 0x62], 0
jne 0x505c0d
movss xmm0, dword [esp + 0x14]
ucomiss xmm0, dword [0x5b4600]
lahf
test ah, 0x44
jp 0x505c0d
push 0xbe2
call dword [sym.imp.OPENGL32.dll_glDisable]
jmp 0x505c28
push 0xbe2
call dword [sym.imp.OPENGL32.dll_glEnable]
push 0x303
push 0x302
call dword [sym.imp.OPENGL32.dll_glBlendFunc]
push dword [esp + 0x18]
push dword [esp + 0x10]
push 4
call dword [sym.imp.OPENGL32.dll_glDrawArrays]
mov eax, dword [0x6d07d4]
inc edi
mov ecx, dword [esp + 0x18]
add dword [esp + 0xc], 6
add dword [eax + 0x38], ecx
inc dword [eax + 0x3c]
mov eax, dword [esi + 0xb0]
mov ecx, dword [esp + 0x1c]
inc ecx
mov dword [esp + 0x1c], ecx
cmp edi, dword [eax + 0x28]
jl 0x505bc0
mov edi, dword [esp + 0x20]
mov edx, eax
inc edi
mov dword [esp + 0x20], edi
cmp edi, dword [eax + 0x2c]
jl 0x505bb0
mov edi, dword [esp + 0x24]
inc edi
mov dword [esp + 0x24], edi
cmp edi, dword [esi + 0x164]
jl 0x5055c2
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, dword [esi + 0x168]
jl 0x5055b0
pop edi
pop esi
mov esp, ebp
pop ebp
ret