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

Disassembly:
sub esp, 0x30
push ebp
push esi
mov esi, dword [ecx + 4]
cmp dword [esi + 0x28], 0
je 0x505e3f
push 1
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x30]
lea ecx, [esi + 0x18]
push eax
call fcn.004aa6f0
mov ecx, eax
call fcn.005017c0
mov esi, dword [eax]
test esi, esi
je 0x505e21
mov esi, dword [esi]
mov edx, dword [eax + 8]
mov ecx, edx
mov eax, dword [esi + 8]
dec eax
shr ecx, 2
and ecx, eax
mov eax, dword [esi + 4]
and edx, 3
mov eax, dword [eax + ecx*4]
mov eax, dword [eax + edx*4]
mov esi, dword [eax]
jmp 0x505e49
mov esi, dword [esi]
test esi, esi
je 0x506274
test esi, esi
je 0x506274
mov ebp, dword [esp + 0x40]
test ebp, ebp
je 0x506274
mov eax, dword [ebp]
mov ecx, ebp
call dword [eax]
test eax, eax
jne 0x506274
movss xmm0, dword [esp + 0x48]
movss dword [esp + 8], xmm0
movss dword [esp + 0x10], xmm0
mulss xmm0, dword [0x6b92e8]
push edi
mov edi, dword [esp + 0x40]
mov ecx, edi
movss dword [esp + 0x10], xmm0
movss dword [esp + 0x18], xmm0
call fcn.00500580
fstp dword [esp + 0x40]
mov ecx, edi
call fcn.00500570
fsubr dword [esp + 0x40]
movss xmm0, dword [esp + 0x10]
fstp dword [esp + 0x40]
comiss xmm0, dword [esp + 0x40]
jbe 0x505f10
mov ecx, edi
call fcn.00500580
fstp dword [esp + 0x40]
mov ecx, edi
call fcn.00500570
fsubr dword [esp + 0x40]
mov ecx, edi
fadd st(0), st(0)
fstp dword [esp + 0x40]
call fcn.00500580
fstp dword [esp + 0x14]
mov ecx, edi
call fcn.00500570
fsubr dword [esp + 0x14]
movss xmm0, dword [esp + 0x40]
fsub dword [esp + 0x40]
movss dword [esp + 0xc], xmm0
fstp dword [esp + 0x14]
movss xmm0, dword [esp + 0x14]
movss dword [esp + 0x14], xmm0
push ebx
mov ecx, edi
call fcn.00500570
fstp dword [esp + 0x30]
mov ecx, edi
call fcn.005005e0
fstp dword [esp + 0x34]
mov ecx, edi
call fcn.00500550
fstp dword [esp + 0x44]
mov ecx, edi
call fcn.005005e0
fsubr dword [esp + 0x44]
mov ecx, ebp
fstp dword [esp + 0x44]
call fcn.00500900
mov edx, dword [ebp]
mov ecx, ebp
mov ebx, eax
call dword [edx + 0x24]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x6f8830]
cvtpd2ps xmm0, xmm0
test ebx, ebx
je 0x505f73
mov eax, dword [ebx + 4]
jmp 0x505f75
xor eax, eax
push 0
push 0
push 0
push 2
sub esp, 0x20
movss dword [esp + 0x1c], xmm0
movss xmm0, dword [esp + 0x40]
movss dword [esp + 0x18], xmm0
movss xmm0, dword [esp + 0x74]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
movss dword [esp + 0xc], xmm0
movss xmm0, dword [esp + 0x80]
movss dword [esp + 8], xmm0
movss xmm0, dword [esp + 0x64]
movss dword [esp + 4], xmm0
movss xmm0, dword [esp + 0x60]
movss dword [esp], xmm0
push eax
push dword [esi]
call sub.gdiplus.dll_GdipDrawImageRectRect
test eax, eax
je 0x505fe3
mov dword [esi + 4], eax
mov ecx, edi
call fcn.00500580
fstp dword [esp + 0x44]
mov ecx, edi
call fcn.00500570
fsubr dword [esp + 0x44]
mov ecx, dword [esp + 0x4c]
xorps xmm0, xmm0
fsub dword [esp + 0x1c]
mov eax, dword [ecx]
movss dword [esp + 0x10], xmm0
fstp dword [esp + 0x1c]
call dword [eax + 0x20]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x6f8830]
cvtpd2ps xmm1, xmm0
movss xmm0, dword [esp + 0x1c]
comiss xmm0, dword [0x6b7d80]
movss dword [esp + 0x44], xmm1
movss dword [esp + 0x14], xmm0
jbe 0x50617a
mov ebp, dword [esp + 0x4c]
mov edi, edi
comiss xmm0, xmm1
jbe 0x50605d
movss dword [esp + 0x4c], xmm1
jmp 0x506063
movss dword [esp + 0x4c], xmm0
mov ecx, edi
call fcn.00500560
fstp dword [esp + 0x20]
mov ecx, edi
call fcn.00500570
movss xmm0, dword [esp + 0x44]
mov ecx, edi
fadd dword [esp + 0x50]
mulss xmm0, dword [esp + 0x10]
movss dword [esp + 0x1c], xmm0
fadd dword [esp + 0x1c]
fstp dword [esp + 0x30]
call fcn.005005e0
mov ecx, ebp
fstp dword [esp + 0x34]
call fcn.00500900
mov edx, dword [ebp]
mov ecx, ebp
mov ebx, eax
call dword [edx + 0x24]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x6f8830]
cvtpd2ps xmm0, xmm0
test ebx, ebx
je 0x5060d0
mov eax, dword [ebx + 4]
jmp 0x5060d2
xor eax, eax
push 0
push 0
push 0
push 2
sub esp, 0x20
movss dword [esp + 0x1c], xmm0
movss xmm0, dword [esp + 0x74]
movss dword [esp + 0x18], xmm0
movss xmm0, dword [esp + 0x50]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
movss dword [esp + 0xc], xmm0
movss xmm0, dword [esp + 0x7c]
movss dword [esp + 8], xmm0
movss xmm0, dword [esp + 0x64]
movss dword [esp + 4], xmm0
movss xmm0, dword [esp + 0x60]
movss dword [esp], xmm0
push eax
push dword [esi]
call sub.gdiplus.dll_GdipDrawImageRectRect
test eax, eax
je 0x50613d
mov dword [esi + 4], eax
movss xmm1, dword [esp + 0x10]
movss xmm0, dword [esp + 0x14]
subss xmm0, dword [esp + 0x44]
addss xmm1, dword [0x6b7e70]
comiss xmm0, dword [0x6b7d80]
movss dword [esp + 0x10], xmm1
movss xmm1, dword [esp + 0x44]
movss dword [esp + 0x14], xmm0
ja 0x506050
mov ebp, dword [esp + 0x48]
mov ecx, edi
call fcn.00500580
fsub dword [esp + 0x50]
mov ecx, edi
fstp dword [esp + 0x48]
call fcn.005005e0
fstp dword [esp + 0x34]
mov ecx, edi
call fcn.00500560
mov ecx, ebp
fstp dword [esp + 0x3c]
call fcn.00500900
mov edx, dword [ebp]
mov ecx, ebp
mov edi, eax
call dword [edx + 0x20]
mov ecx, ebp
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x6f8830]
mov eax, dword [ebp]
cvtpd2ps xmm0, xmm0
subss xmm0, dword [esp + 0x18]
movss dword [esp + 0x4c], xmm0
call dword [eax + 0x24]
pop ebx
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x6f8830]
cvtpd2ps xmm0, xmm0
test edi, edi
je 0x5061fe
mov eax, dword [edi + 4]
jmp 0x506200
xor eax, eax
movss xmm1, dword [esp + 0x4c]
push 0
push 0
push 0
push 2
sub esp, 0x20
movss dword [esp + 0x1c], xmm0
movss xmm0, dword [esp + 0x78]
movss dword [esp + 0x18], xmm1
mov dword [esp + 0x14], 0
movss dword [esp + 0x10], xmm0
movss xmm0, dword [esp + 0x68]
movss dword [esp + 0xc], xmm0
movss xmm0, dword [esp + 0x60]
movss dword [esp + 8], xmm1
movss dword [esp + 4], xmm0
movss xmm0, dword [esp + 0x74]
movss dword [esp], xmm0
push eax
push dword [esi]
call sub.gdiplus.dll_GdipDrawImageRectRect
pop edi
test eax, eax
je 0x50626a
mov dword [esi + 4], eax
pop esi
mov al, 1
pop ebp
add esp, 0x30
ret 0x10
pop esi
xor al, al
pop ebp
add esp, 0x30
ret 0x10