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

Disassembly:
push 0xffffffffffffffff
push 0x69f283
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
mov eax, dword [0x73d6e0]
xor eax, esp
mov dword [esp + 0xcc], eax
push esi
push edi
mov eax, dword [0x73d6e0]
xor eax, esp
push eax
lea eax, [esp + 0xdc]
mov dword fs:[0], eax
mov edx, ecx
mov dword [esp + 0x3c], edx
mov eax, dword [esp + 0xec]
mov edi, dword [edx + 4]
mov ecx, dword [esp + 0xf0]
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0xf4]
cmp dword [edi + 0x28], 0
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0xf8]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x60], eax
je 0x502dd9
push 1
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x14]
lea ecx, [edi + 0x18]
push eax
call fcn.004aa6f0
mov ecx, eax
call fcn.005017c0
mov esi, dword [eax]
test esi, esi
je 0x502db7
mov esi, dword [esi]
mov edx, dword [eax + 8]
mov eax, edx
mov ecx, dword [esi + 8]
shr eax, 2
dec ecx
and ecx, eax
mov eax, dword [esi + 4]
and edx, 3
mov eax, dword [eax + ecx*4]
mov ecx, dword [esp + 0x54]
mov eax, dword [eax + edx*4]
mov edi, dword [eax]
jmp 0x502de3
mov edi, dword [edi]
test edi, edi
je 0x5031d1
test edi, edi
je 0x5031d1
mov eax, dword [ecx]
mov eax, dword [eax]
call eax
test eax, eax
jne 0x5031d1
xorps xmm0, xmm0
movq qword [esp + 0xd0], xmm0
mov dword [esp + 0xd0], eax
lea eax, [esp + 0xd0]
push eax
call sub.gdiplus.dll_GdipCreateImageAttributes
mov dword [esp + 0xd4], eax
mov dword [esp + 0xe4], 0
movaps xmm0, xmmword [0x6b9d40]
mov eax, dword [esp + 0x60]
movups xmmword [esp + 0x68], xmm0
movzx eax, al
movaps xmm0, xmmword [0x6b9d50]
movups xmmword [esp + 0x78], xmm0
mov dword [esp + 0xa8], 0
xorps xmm0, xmm0
mov dword [esp + 0xac], 0
movups xmmword [esp + 0x88], xmm0
push 0
movaps xmm0, xmmword [0x6b9d40]
movups xmmword [esp + 0x9c], xmm0
push 0
movd xmm0, eax
lea eax, [esp + 0x70]
cvtdq2pd xmm0, xmm0
push eax
push 1
push 0
mov dword [esp + 0xd8], 0
mov dword [esp + 0xdc], 0x3f800000
push dword [esp + 0xe4]
divsd xmm0, qword [0x6f8790]
cvtpd2ps xmm0, xmm0
movss dword [esp + 0xc8], xmm0
xorps xmm0, xmm0
movups xmmword [esp + 0xcc], xmm0
call sub.gdiplus.dll_GdipSetImageAttributesColorMatrix
mov ecx, dword [esp + 0xd4]
test eax, eax
cmovne ecx, eax
lea eax, [esp + 0xd0]
mov dword [esp + 0xd4], ecx
xor ecx, ecx
cmp byte [esp + 0x60], 0xff
cmove eax, ecx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0xfc]
sub eax, 2
je 0x502f13
dec eax
je 0x502f0c
xor esi, esi
jmp 0x502f18
mov esi, 2
jmp 0x502f18
mov esi, 1
mov ecx, dword [esp + 0x64]
call fcn.00500570
mov ecx, dword [esp + 0x64]
fstp dword [esp + 0x2c]
call fcn.005005e0
mov ecx, dword [esp + 0x64]
fstp dword [esp + 0x30]
call fcn.005005f0
mov ecx, dword [esp + 0x64]
fstp dword [esp + 0x24]
call fcn.00500560
lea eax, [esp + 0xcc]
push eax
push dword [edi]
fstp dword [esp + 0x30]
call sub.gdiplus.dll_GdipBeginContainer2
test eax, eax
je 0x502f62
mov dword [edi + 4], eax
push esi
push dword [edi]
call sub.gdiplus.dll_GdipSetCompositingQuality
test eax, eax
je 0x502f71
mov dword [edi + 4], eax
push 0
push 0xff000000
push 3
push dword [esp + 0xdc]
call sub.gdiplus.dll_GdipSetImageAttributesWrapMode
mov ecx, dword [esp + 0xd4]
test eax, eax
cmovne ecx, eax
mov dword [esp + 0xd4], ecx
mov ecx, dword [esp + 0x54]
call fcn.00500900
mov esi, dword [esp + 0x48]
mov ecx, esi
mov dword [esp + 0x64], eax
call fcn.00500570
fstp dword [esp + 0x58]
mov ecx, esi
call fcn.005005e0
fstp dword [esp + 0x60]
mov ecx, esi
call fcn.005005f0
fstp dword [esp + 0x4c]
mov ecx, esi
call fcn.00500560
movss xmm1, dword [esp + 0x58]
xor esi, esi
movss xmm2, dword [esp + 0x60]
fstp dword [esp + 0x50]
mov dword [esp + 0x40], esi
mov byte [esp + 0xe4], 1
mov eax, dword [esp + 0x3c]
movsd xmm4, qword [0x6f8788]
movsd xmm5, qword [0x6b8900]
mov eax, dword [eax + 4]
movsd xmm3, qword [eax + 0xa8]
divsd xmm3, qword [eax + 0xa0]
movapd xmm0, xmm3
subsd xmm0, xmm4
andpd xmm0, xmmword [0x6b8930]
comisd xmm5, xmm0
ja 0x5030f7
comisd xmm4, xmm3
ja 0x5030f7
mov ecx, dword [esp + 0x54]
mov eax, dword [ecx]
mov eax, dword [eax + 0x20]
call eax
mov ecx, dword [esp + 0x48]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x6f8830]
movsd qword [esp + 0x38], xmm0
call fcn.005005f0
movsd xmm1, qword [esp + 0x38]
movsd xmm3, qword [0x6b8900]
movapd xmm0, xmm1
fstp qword [esp + 0x44]
movsd xmm2, qword [esp + 0x44]
subsd xmm0, xmm2
andpd xmm0, xmmword [0x6b8930]
comisd xmm3, xmm0
ja 0x5030eb
comisd xmm2, xmm1
ja 0x5030eb
movss xmm0, dword [esp + 0x50]
mov ecx, dword [esp + 0x64]
push 0x26200a
sub esp, 0x10
movss dword [esp + 0xc], xmm0
movss xmm0, dword [esp + 0x60]
movss dword [esp + 8], xmm0
movss xmm0, dword [esp + 0x74]
movss dword [esp + 4], xmm0
movss xmm0, dword [esp + 0x6c]
movss dword [esp], xmm0
call fcn.00501f80
mov esi, eax
xorps xmm1, xmm1
mov dword [esp + 0x40], esi
xorps xmm2, xmm2
jmp 0x5030fb
movss xmm2, dword [esp + 0x60]
movss xmm1, dword [esp + 0x58]
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x503107
mov ecx, dword [ecx]
jmp 0x503109
xor ecx, ecx
test eax, eax
je 0x503112
mov eax, dword [eax + 4]
jmp 0x503114
xor eax, eax
movss xmm0, dword [esp + 0x50]
push 0
push 0
push ecx
push 2
sub esp, 0x20
movss dword [esp + 0x1c], xmm0
movss xmm0, dword [esp + 0x7c]
movss dword [esp + 0x18], xmm0
movss xmm0, dword [esp + 0x58]
movss dword [esp + 0x14], xmm2
movss dword [esp + 0x10], xmm1
movss dword [esp + 0xc], xmm0
movss xmm0, dword [esp + 0x54]
movss dword [esp + 8], xmm0
movss xmm0, dword [esp + 0x60]
movss dword [esp + 4], xmm0
movss xmm0, dword [esp + 0x5c]
movss dword [esp], xmm0
push eax
push dword [edi]
call sub.gdiplus.dll_GdipDrawImageRectRect
test eax, eax
je 0x503182
mov dword [edi + 4], eax
jmp 0x503184
xor eax, eax
push dword [esp + 0xcc]
test eax, eax
push dword [edi]
sete byte [esp + 0x67]
call sub.gdiplus.dll_GdipEndContainer
test eax, eax
je 0x5031a0
mov dword [edi + 4], eax
mov byte [esp + 0xe4], 0
test esi, esi
je 0x5031b4
mov edx, dword [esi]
mov ecx, esi
push 1
call dword [edx]
mov dword [esp + 0xe4], 0xffffffff
push dword [esp + 0xd0]
call sub.gdiplus.dll_GdipDisposeImageAttributes
mov al, byte [esp + 0x5f]
jmp 0x5031d3
xor al, al
mov ecx, dword [esp + 0xdc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0xcc]
xor ecx, esp
call fcn.005472b9
add esp, 0xdc
ret 0x14