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

Disassembly:
push 0xffffffffffffffff
push 0x5dfa79
mov eax, dword fs:[0]
push eax
sub esp, 0x74
push ebx
push ebp
push esi
push edi
mov eax, dword [0x680f10]
xor eax, esp
push eax
lea eax, [esp + 0x88]
mov dword fs:[0], eax
mov esi, dword [esp + 0xa0]
mov ecx, dword [esi + 4]
lea eax, [esp + 0x1c]
push eax
xor ebp, ebp
push ecx
mov dword [esp + 0x24], ebp
call sub.gdiplus.dll_GdipGetImageWidth
cmp eax, ebp
je 0x53965c
mov dword [esi + 8], eax
mov eax, dword [esi + 4]
lea edx, [esp + 0x18]
push edx
push eax
mov dword [esp + 0x20], ebp
call sub.gdiplus.dll_GdipGetImageHeight
cmp eax, ebp
je 0x539675
mov dword [esi + 8], eax
mov ebx, dword [esp + 0x1c]
cmp ebx, ebp
jle 0x5399eb
mov edi, dword [esp + 0x18]
cmp edi, ebp
jle 0x5399eb
mov ecx, dword [esp + 0x98]
push ecx
call fcn.00536c50
mov ebp, dword [esp + 0xa8]
add esp, 4
test al, al
je 0x53988f
cmp byte [esp + 0xa8], 0xff
jne 0x53988f
mov edx, ebp
and edx, 0xff000000
cmp edx, 0xff000000
jne 0x53988f
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x24]
push ecx
mov ecx, esi
and ebp, 0xffffff
mov dword [esp + 0x1c], 0
mov dword [esp + 0x28], 0xffffffff
call fcn.0053d860
cmp dword [esp + 0x14], 0
je 0x5399eb
lea ecx, [esp + 0x28]
call fcn.0041ddf0
mov esi, dword [esp + 0x98]
lea edx, [esp + 0x28]
push edx
mov ecx, esi
mov dword [esp + 0x94], 0
call fcn.00421100
lea eax, [esp + 0x30]
push esi
push eax
call fcn.00537150
fld1
fstp dword [esp + 4]
lea ecx, [esp + 0x28]
fldz
sub esp, 0x10
fst dword [esp + 0x10]
fild dword [esp + 0x30]
fdivr qword [0x5ebd80]
fstp dword [esp + 0x38]
fld dword [esp + 0x38]
fstp dword [esp + 0xc]
fst dword [esp + 8]
fstp dword [esp + 4]
fild dword [esp + 0x34]
fld1
fdivrp st(1)
fstp dword [esp + 0x38]
fld dword [esp + 0x38]
fstp dword [esp]
call fcn.0049d310
push 0
push eax
lea ecx, [esp + 0x30]
call fcn.0049d370
mov ecx, dword [esp + 0x20]
push ecx
call sub.gdiplus.dll_GdipDeleteMatrix
fldz
sub esp, 0x18
fst dword [esp + 0x14]
fst dword [esp + 0x10]
lea ecx, [esp + 0x48]
fld dword [esp + 0x4c]
fstp dword [esp + 0xc]
fst dword [esp + 8]
fstp dword [esp + 4]
fld dword [esp + 0x48]
fstp dword [esp]
call fcn.0049d310
push 1
push eax
lea ecx, [esp + 0x30]
call fcn.0049d370
mov edx, dword [esp + 0x30]
push edx
call sub.gdiplus.dll_GdipDeleteMatrix
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x2c]
call fcn.0048a070
mov ecx, esi
call fcn.0053dd20
mov esi, eax
push esi
call dword [sym.imp.GDI32.dll_SaveDC]
push 1
push esi
call dword [sym.imp.GDI32.dll_SetMapMode]
fld dword [esp + 0x40]
fstp dword [esp + 0x58]
fld dword [esp + 0x44]
fstp dword [esp + 0x5c]
fld dword [esp + 0x48]
fstp dword [esp + 0x60]
fld dword [esp + 0x4c]
fstp dword [esp + 0x64]
fld dword [esp + 0x50]
fstp dword [esp + 0x68]
fld dword [esp + 0x54]
push 2
push esi
fstp dword [esp + 0x74]
call dword [sym.imp.GDI32.dll_SetGraphicsMode]
lea ecx, [esp + 0x58]
push ecx
push esi
call dword [sym.imp.GDI32.dll_SetWorldTransform]
mov edx, dword [esp + 0xac]
mov eax, dword [esp + 0x14]
push 0
push edx
push ebp
push edi
push ebx
push 0
push 0
push eax
push esi
call fcn.005395a0
add esp, 0x24
push 0xffffffffffffffff
push esi
call dword [sym.imp.GDI32.dll_RestoreDC]
mov ecx, dword [esp + 0x98]
push esi
call fcn.0053dd50
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov edx, dword [esp + 0x28]
push edx
call sub.gdiplus.dll_GdipDeleteMatrix
jmp 0x5399eb
push 0x26200a
push edi
push ebx
push 0
push 0
mov ecx, esi
call fcn.0040ec50
mov ecx, eax
xor edx, edx
cmp ecx, edx
mov dword [esp + 0x1c], ecx
je 0x5399eb
mov eax, dword [ecx + 8]
cmp eax, edx
mov dword [ecx + 8], edx
je 0x5398c8
mov eax, dword [ecx]
mov edx, dword [eax]
push 1
call edx
jmp 0x5399eb
lea eax, [esp + 0x70]
push eax
push 0x26200a
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], edx
push 3
lea edx, [esp + 0x3c]
push edx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], edi
call fcn.004894e0
mov eax, dword [esp + 0x80]
test eax, eax
mov esi, eax
je 0x5399b3
mov al, byte [esp + 0xa8]
cmp al, 0xff
jne 0x539946
test edi, edi
jle 0x5399b3
test ebx, ebx
mov eax, esi
jle 0x53993b
mov ecx, ebx
lea ebx, [ebx]
xor edx, edx
cmp dword [eax], 0xff000000
setne dl
add eax, 4
sub edx, 1
and edx, ebp
sub ecx, 1
mov dword [eax - 4], edx
jne 0x539920
add esi, dword [esp + 0x78]
sub edi, 1
jne 0x539912
jmp 0x5399b3
test edi, edi
movzx eax, al
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
fdiv qword [0x5f38b0]
jle 0x5399b1
fld qword [0x659f30]
test ebx, ebx
jle 0x5399a6
lea ecx, [esi + 3]
mov edx, ebx
movzx eax, byte [ecx]
fnstcw word [esp + 0x14]
mov dword [esp + 0x20], eax
movzx eax, word [esp + 0x14]
fild dword [esp + 0x20]
or eax, 0xc00
fmul st(2)
mov dword [esp + 0x20], eax
add ecx, 4
sub edx, 1
fadd st(1)
fldcw word [esp + 0x20]
fistp dword [esp + 0x20]
mov al, byte [esp + 0x20]
mov byte [ecx - 4], al
fldcw word [esp + 0x14]
jne 0x53996a
add esi, dword [esp + 0x78]
sub edi, 1
jne 0x539961
fstp st(1)
fstp st(0)
mov esi, dword [esp + 0x1c]
mov edx, dword [esi + 4]
lea ecx, [esp + 0x70]
push ecx
push edx
call sub.gdiplus.dll_GdipBitmapUnlockBits
test eax, eax
je 0x5399cc
mov dword [esi + 8], eax
mov eax, dword [esp + 0x9c]
mov ecx, dword [esp + 0x98]
push eax
push esi
call fcn.0040cfb0
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
mov ecx, dword [esp + 0x88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x80
ret