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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xcc
push ebx
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 4]
test eax, eax
je 0x5379b1
mov edi, dword [ebp + 8]
test edi, edi
je 0x5379b1
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x5379b1
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x5379b1
mov dl, byte [esi + 0x17e]
test dl, dl
je 0x5379b1
test ecx, ecx
jge 0x536e75
mov ecx, dword [esi + 0xc]
mov dword [ebp + 0x14], ecx
test eax, eax
jge 0x536e7f
mov eax, dword [esi + 0x10]
mov dword [ebp + 0x18], eax
mov edx, dword [esi + 0x14c]
mov ebx, dword [esi + 0x1a0]
cmp edx, 0xffffffff
mov edx, dword [ebp + 0x1c]
setne byte [esp + 0x13]
test ebx, ebx
mov ebx, dword [sym.imp.GDI32.dll_DeleteObject]
setne byte [esp + 0x12]
test edx, edx
je 0x536edb
lea eax, [esp + 0xc8]
push eax
push edi
call dword [sym.imp.GDI32.dll_GetClipBox]
mov ecx, dword [ebp + 0x1c]
push ecx
call dword [sym.imp.GDI32.dll_CreateRectRgnIndirect]
push 1
push eax
push edi
mov dword [esp + 0x54], eax
call dword [sym.imp.GDI32.dll_ExtSelectClipRgn]
mov edx, dword [esp + 0x48]
push edx
call ebx
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
mov dl, byte [esp + 0x13]
test dl, dl
jne 0x537247
mov dl, byte [esp + 0x12]
test dl, dl
jne 0x537247
mov dl, byte [esi + 0x17d]
test dl, dl
jne 0x537247
cmp ecx, dword [esi + 0xc]
jne 0x536f41
cmp eax, dword [esi + 0x10]
jne 0x536f41
push 3
push edi
call dword [sym.imp.GDI32.dll_SetStretchBltMode]
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0x34]
push 0
mov edx, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x18]
push ecx
mov ecx, dword [ebp + 0xc]
push eax
push 0
push 0
push 0
push eax
mov eax, dword [ebp + 0x10]
push edx
push eax
push ecx
push edi
call dword [sym.imp.GDI32.dll_SetDIBitsToDevice]
jmp 0x53797c
lea edx, [esp + 0x60]
push edx
push edi
call dword [sym.imp.GDI32.dll_GetClipBox]
mov edi, dword [esp + 0x60]
mov ecx, dword [ebp + 0xc]
cmp edi, ecx
mov edx, edi
jg 0x536f5c
mov edx, ecx
mov eax, dword [esp + 0x68]
cmp eax, edx
jge 0x536f6a
mov dword [esp + 0x30], eax
jmp 0x536f76
cmp edi, ecx
mov dword [esp + 0x30], edi
jg 0x536f76
mov dword [esp + 0x30], ecx
mov edx, dword [ebp + 0x14]
add ecx, edx
mov edx, eax
cmp eax, ecx
jl 0x536f83
mov edx, ecx
cmp edi, edx
jle 0x536f8b
mov eax, edi
jmp 0x536f91
cmp eax, ecx
jl 0x536f91
mov eax, ecx
mov ebx, dword [esp + 0x64]
mov ecx, dword [ebp + 0x10]
cmp ebx, ecx
mov edi, ebx
jg 0x536fa0
mov edi, ecx
mov edx, dword [esp + 0x6c]
cmp edx, edi
jge 0x536fae
mov dword [esp + 0x34], edx
jmp 0x536fba
cmp ebx, ecx
mov dword [esp + 0x34], ebx
jg 0x536fba
mov dword [esp + 0x34], ecx
mov edi, dword [ebp + 0x18]
add ecx, edi
mov edi, edx
cmp edx, ecx
jl 0x536fc7
mov edi, ecx
cmp ebx, edi
jle 0x536fd1
mov dword [esp + 0x3c], ebx
jmp 0x536fdd
cmp edx, ecx
mov dword [esp + 0x3c], edx
jl 0x536fdd
mov dword [esp + 0x3c], ecx
mov ebx, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
sub eax, ebx
mov ebx, dword [esp + 0x3c]
mov edx, eax
sub ebx, edi
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x88]
mov dword [esp + 0x14], edx
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x40], ebx
push eax
mov dword [esp + 0x8c], 0x28
mov dword [esp + 0x90], edx
mov dword [esp + 0x94], ebx
mov word [esp + 0x98], 1
mov word [esp + 0x9a], 0x18
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push 0
lea ecx, [esp + 0x50]
push 0
mov edi, eax
mov eax, dword [ebp + 8]
push ecx
lea edx, [esp + 0x94]
push 0
push edx
push eax
mov dword [esp + 0x5c], edi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x5371fc
fild dword [esi + 0xc]
mov eax, dword [esp + 0x14]
fidiv dword [ebp + 0x14]
lea ecx, [eax + eax*2]
lea eax, [ecx*8 + 0x1f]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 2
test ebx, ebx
mov dword [esp + 0x50], eax
fstp dword [esp + 0x58]
fild dword [esi + 0x10]
fidiv dword [ebp + 0x18]
fstp dword [esp + 0x5c]
jle 0x5371fc
mov edx, dword [esp + 0x3c]
mov dword [esp + 0xc], 0
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ebx
mov eax, dword [esp + 0x24]
mov edi, dword [ebp + 0x10]
sub eax, edi
mov dword [esp + 0x48], eax
fild dword [esp + 0x48]
fmul dword [esp + 0x5c]
fstp qword [esp + 0x18]
mov edi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_ceil]
add esp, 8
call sub.MSVCRT.dll__ftol
mov ecx, dword [esi + 0x10]
sub ecx, eax
jns 0x537109
mov dword [esp + 0x20], 0
jmp 0x537122
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_ceil]
add esp, 8
call sub.MSVCRT.dll__ftol
mov ecx, dword [esi + 0x10]
sub ecx, eax
mov dword [esp + 0x20], ecx
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x4c]
xor ebx, ebx
lea edi, [edx + eax]
mov eax, dword [esp + 0x14]
test eax, eax
jle 0x5371ce
mov eax, dword [ebp + 0xc]
mov edx, dword [esp + 0x30]
mov ecx, ebx
sub esp, 8
sub ecx, eax
add ecx, edx
mov dword [esp + 0x50], ecx
fild dword [esp + 0x50]
fmul dword [esp + 0x60]
fstp qword [esp]
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
call sub.MSVCRT.dll__ftol
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x53719d
mov edx, dword [esp + 0x20]
mov ecx, esi
push edx
push eax
call sym.VisualBoyAdvance.exe_public:_unsigned_char___thiscall_CxImage::GetPixelIndex_long_int__long_int_
push eax
lea eax, [esp + 0x78]
push eax
mov ecx, esi
call sym.VisualBoyAdvance.exe_public:_struct_tagRGBQUAD___thiscall_CxImage::GetPaletteColor_unsigned_char_
mov ecx, dword [eax]
mov dword [esp + 0x2c], ecx
mov cl, byte [esp + 0x2e]
mov dl, byte [esp + 0x2d]
mov al, byte [esp + 0x2c]
jmp 0x5371b8
mov ecx, dword [esi + 0x30]
lea edx, [eax + eax*2]
imul ecx, dword [esp + 0x20]
mov eax, dword [esi + 0x34]
add ecx, edx
add ecx, eax
mov al, byte [ecx]
mov dl, byte [ecx + 1]
inc ecx
mov cl, byte [ecx + 1]
mov byte [edi], al
inc edi
mov eax, dword [esp + 0x14]
mov byte [edi], dl
inc edi
mov byte [edi], cl
inc edi
inc ebx
cmp ebx, eax
jl 0x53713b
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x24]
add ecx, eax
mov eax, dword [esp + 0x28]
dec edx
dec eax
mov dword [esp + 0x24], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x28], eax
jne 0x5370c7
mov edi, dword [esp + 0x44]
mov ebx, dword [esp + 0x40]
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x88]
push 0
push ecx
mov ecx, dword [esp + 0x3c]
push edx
mov edx, dword [esp + 0x3c]
push ebx
push 0
push 0
push 0
push ebx
push eax
mov eax, dword [ebp + 8]
push ecx
push edx
push eax
call dword [sym.imp.GDI32.dll_SetDIBitsToDevice]
mov ecx, dword [esp + 0x54]
push ecx
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov ebx, dword [sym.imp.GDI32.dll_DeleteObject]
push eax
call ebx
push edi
jmp 0x537976
lea edx, [esp + 0xb4]
push edx
push edi
call dword [sym.imp.GDI32.dll_GetClipBox]
mov edi, dword [esp + 0xb4]
mov ecx, dword [ebp + 0xc]
cmp edi, ecx
mov edx, edi
jg 0x537268
mov edx, ecx
mov eax, dword [esp + 0xbc]
cmp eax, edx
jge 0x537279
mov dword [esp + 0x30], eax
jmp 0x537285
cmp edi, ecx
mov dword [esp + 0x30], edi
jg 0x537285
mov dword [esp + 0x30], ecx
mov edx, dword [ebp + 0x14]
add ecx, edx
mov edx, eax
cmp eax, ecx
jl 0x537292
mov edx, ecx
cmp edi, edx
jle 0x53729a
mov eax, edi
jmp 0x5372a0
cmp eax, ecx
jl 0x5372a0
mov eax, ecx
mov ebx, dword [esp + 0xb8]
mov ecx, dword [ebp + 0x10]
cmp ebx, ecx
mov edi, ebx
jg 0x5372b2
mov edi, ecx
mov edx, dword [esp + 0xc0]
cmp edx, edi
jge 0x5372c3
mov dword [esp + 0x34], edx
jmp 0x5372cf
cmp ebx, ecx
mov dword [esp + 0x34], ebx
jg 0x5372cf
mov dword [esp + 0x34], ecx
mov edi, dword [ebp + 0x18]
add ecx, edi
mov edi, edx
cmp edx, ecx
jl 0x5372dc
mov edi, ecx
cmp ebx, edi
jle 0x5372e6
mov dword [esp + 0x3c], ebx
jmp 0x5372f2
cmp edx, ecx
mov dword [esp + 0x3c], edx
jl 0x5372f2
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x30]
mov ebx, dword [esp + 0x3c]
sub eax, ecx
mov ecx, esi
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x34]
sub ebx, eax
lea eax, [esp + 0x5c]
push eax
mov dword [esp + 0x80], ebx
mov byte [esp + 0x1c], 0
mov byte [esp + 0x1d], 0
mov byte [esp + 0x1e], 0
mov byte [esp + 0x1f], 0
call sym.VisualBoyAdvance.exe_public:_struct_tagRGBQUAD___thiscall_CxImage::GetTransColor_void_
mov ecx, dword [esi + 0x14c]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x58], ecx
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x88]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x88], 0x28
push eax
mov dword [esp + 0x90], edx
mov dword [esp + 0x94], ebx
mov word [esp + 0x98], 1
mov word [esp + 0x9a], 0x18
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push 0
lea ecx, [esp + 0x30]
push 0
mov edi, eax
mov eax, dword [ebp + 8]
push ecx
lea edx, [esp + 0x94]
push 0
push edx
push eax
mov dword [esp + 0x8c], edi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x84], eax
mov eax, dword [ebp + 8]
push 0xcc0020
push ecx
mov ecx, dword [esp + 0x2c]
push edx
push eax
push ebx
push ecx
push 0
push 0
push edi
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x537922
mov eax, dword [esp + 0x24]
mov ecx, dword [ebp + 0x14]
lea edx, [eax + eax*2]
lea eax, [edx*8 + 0x1f]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 2
mov dword [esp + 0x48], eax
mov eax, dword [esi + 0xc]
cmp ecx, eax
mov dword [esp + 0x60], eax
jne 0x537665
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp + 0x18]
cmp ecx, eax
jne 0x537665
mov edi, dword [esp + 0x3c]
mov edx, dword [ebp + 0x10]
sub eax, edi
add eax, edx
test ebx, ebx
mov dword [esp + 0x20], eax
jle 0x537922
mov edx, dword [esp + 0x30]
mov ecx, dword [ebp + 0xc]
sub edx, ecx
xor edi, edi
mov dword [esp + 0x60], edx
mov dword [esp + 0x40], edi
mov dword [esp + 0x50], ebx
jmp 0x537459
mov edx, dword [esp + 0x60]
mov ecx, dword [esp + 0x2c]
mov ebx, eax
add edi, ecx
mov ecx, dword [esi + 0x30]
imul ebx, dword [esi + 0xc]
imul ecx, eax
lea eax, [edx + edx*2]
mov dword [esp + 0x4c], ebx
add ecx, eax
mov eax, dword [esi + 0x34]
add ecx, eax
mov eax, dword [esp + 0x24]
test eax, eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x28], ecx
jle 0x53763a
mov ecx, eax
mov dword [esp + 0x44], ecx
jmp 0x53749d
mov ebx, dword [esp + 0x4c]
mov edx, dword [esp + 0x14]
mov al, byte [esp + 0x12]
test al, al
je 0x5374b6
mov eax, dword [esi + 0x1a0]
add eax, edx
mov cl, byte [eax + ebx]
mov byte [esp + 0xc], cl
jmp 0x5374bb
mov byte [esp + 0xc], 0xff
mov edx, dword [esp + 0xc]
xor ebx, ebx
mov bl, byte [esi + 0x17c]
and edx, 0xff
inc ebx
mov eax, dword [esi + 0x28]
imul ebx, edx
sar ebx, 8
test eax, eax
mov byte [esp + 0xc], bl
je 0x537548
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
push eax
push ecx
mov ecx, esi
call sym.VisualBoyAdvance.exe_public:_unsigned_char___thiscall_CxImage::GetPixelIndex_long_int__long_int_
mov edx, dword [esp + 0x20]
and eax, 0xff
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x14]
push edx
push eax
mov ecx, esi
call sym.VisualBoyAdvance.exe_public:_unsigned_char___thiscall_CxImage::GetPixelIndex_long_int__long_int_
lea ecx, [esp + 0x78]
push eax
push ecx
mov ecx, esi
call sym.VisualBoyAdvance.exe_public:_struct_tagRGBQUAD___thiscall_CxImage::GetPaletteColor_unsigned_char_
mov cl, byte [esi + 0x17d]
mov eax, dword [eax]
test cl, cl
mov dword [esp + 0x18], eax
je 0x53756a
mov ebx, dword [esp + 0x1b]
mov edx, dword [esp + 0xc]
and ebx, 0xff
and edx, 0xff
inc ebx
imul ebx, edx
sar ebx, 8
mov byte [esp + 0xc], bl
jmp 0x53756a
mov eax, dword [esp + 0x28]
mov cl, byte [eax]
mov dl, byte [eax + 1]
inc eax
mov byte [esp + 0x18], cl
inc eax
mov byte [esp + 0x19], dl
mov cl, byte [eax]
inc eax
mov byte [esp + 0x1a], cl
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x53757f
mov edx, dword [esp + 0x58]
cmp dword [esp + 0x70], edx
jne 0x537591
test ecx, ecx
jne 0x537585
cmp eax, dword [esp + 0x5c]
jne 0x537591
mov cl, byte [esp + 0x13]
test cl, cl
jne 0x53761f
test bl, bl
je 0x53761f
cmp bl, 0xff
jne 0x5375b5
mov al, byte [esp + 0x18]
mov cl, byte [esp + 0x19]
mov dl, byte [esp + 0x1a]
mov byte [edi], al
inc edi
mov byte [edi], cl
inc edi
mov byte [edi], dl
inc edi
jmp 0x537622
mov ecx, dword [esp + 0xc]
and eax, 0xff
not bl
mov byte [esp + 0x54], bl
xor ebx, ebx
mov edx, dword [esp + 0x54]
mov bl, byte [edi]
and ecx, 0xff
and edx, 0xff
imul eax, ecx
imul ebx, edx
add eax, ebx
xor ebx, ebx
sar eax, 8
mov byte [edi], al
mov eax, dword [esp + 0x19]
mov bl, byte [edi + 1]
inc edi
and eax, 0xff
imul ebx, edx
imul eax, ecx
add eax, ebx
sar eax, 8
mov byte [edi], al
mov eax, dword [esp + 0x1a]
and eax, 0xff
inc edi
imul eax, ecx
xor ecx, ecx
mov cl, byte [edi]
imul ecx, edx
add eax, ecx
sar eax, 8
mov byte [edi], al
inc edi
jmp 0x537622
add edi, 3
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x44]
inc ecx
dec eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x44], eax
jne 0x537495
mov edi, dword [esp + 0x40]
mov ebx, dword [esp + 0x48]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x50]
add edi, ebx
inc eax
dec ecx
mov dword [esp + 0x40], edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x50], ecx
jne 0x537455
jmp 0x537922
fild dword [esp + 0x60]
test ebx, ebx
fidiv dword [ebp + 0x14]
fstp dword [esp + 0x78]
fild dword [esi + 0x10]
fidiv dword [ebp + 0x18]
fstp dword [esp + 0x80]
jle 0x537922
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x28], 0
mov dword [esp + 0x44], edx
mov dword [esp + 0x50], ebx
mov eax, dword [esp + 0x44]
mov edi, dword [ebp + 0x10]
sub eax, edi
mov dword [esp + 0x60], eax
fild dword [esp + 0x60]
fmul dword [esp + 0x80]
fstp qword [esp + 0x60]
mov edi, dword [esp + 0x64]
mov ebx, dword [esp + 0x60]
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_ceil]
add esp, 8
call sub.MSVCRT.dll__ftol
mov ecx, dword [esi + 0x10]
sub ecx, eax
jns 0x5376d8
xor ecx, ecx
jmp 0x5376ed
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_ceil]
add esp, 8
call sub.MSVCRT.dll__ftol
mov ecx, dword [esi + 0x10]
sub ecx, eax
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x20], ecx
imul ecx, dword [esi + 0xc]
lea edi, [edx + eax]
mov eax, dword [esp + 0x24]
test eax, eax
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x40], 0
jle 0x5378fc
mov ecx, dword [esp + 0x40]
mov edx, dword [ebp + 0xc]
mov eax, dword [esp + 0x30]
sub ecx, edx
add ecx, eax
sub esp, 8
mov dword [esp + 0x68], ecx
fild dword [esp + 0x68]
fmul dword [esp + 0x80]
fstp qword [esp]
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
call sub.MSVCRT.dll__ftol
mov cl, byte [esp + 0x12]
mov dword [esp + 0x14], eax
test cl, cl
je 0x53776b
mov edx, dword [esi + 0x1a0]
add edx, eax
mov eax, dword [esp + 0x4c]
mov cl, byte [edx + eax]
mov byte [esp + 0xc], cl
jmp 0x537770
mov byte [esp + 0xc], 0xff
mov edx, dword [esp + 0xc]
xor ebx, ebx
mov bl, byte [esi + 0x17c]
and edx, 0xff
inc ebx
mov eax, dword [esi + 0x28]
imul ebx, edx
sar ebx, 8
test eax, eax
mov byte [esp + 0xc], bl
je 0x537800
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
push eax
push ecx
mov ecx, esi
call sym.VisualBoyAdvance.exe_public:_unsigned_char___thiscall_CxImage::GetPixelIndex_long_int__long_int_
mov edx, dword [esp + 0x20]
and eax, 0xff
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x14]
push edx
push eax
mov ecx, esi
call sym.VisualBoyAdvance.exe_public:_unsigned_char___thiscall_CxImage::GetPixelIndex_long_int__long_int_
lea ecx, [esp + 0xc4]
push eax
push ecx
mov ecx, esi
call sym.VisualBoyAdvance.exe_public:_struct_tagRGBQUAD___thiscall_CxImage::GetPaletteColor_unsigned_char_
mov cl, byte [esi + 0x17d]
mov eax, dword [eax]
test cl, cl
mov dword [esp + 0x18], eax
je 0x53782f
mov ebx, dword [esp + 0x1b]
mov edx, dword [esp + 0xc]
and ebx, 0xff
and edx, 0xff
inc ebx
imul ebx, edx
sar ebx, 8
mov byte [esp + 0xc], bl
jmp 0x53782f
mov eax, dword [esi + 0x30]
mov ecx, dword [esp + 0x14]
imul eax, dword [esp + 0x20]
mov edx, dword [esi + 0x34]
lea ecx, [ecx + ecx*2]
add eax, ecx
add eax, edx
mov dl, byte [eax]
mov cl, byte [eax + 1]
inc eax
mov byte [esp + 0x18], dl
mov byte [esp + 0x19], cl
mov dl, byte [eax + 1]
mov byte [esp + 0x1a], dl
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x537844
mov edx, dword [esp + 0x58]
cmp dword [esp + 0x70], edx
jne 0x537856
test ecx, ecx
jne 0x53784a
cmp eax, dword [esp + 0x5c]
jne 0x537856
mov cl, byte [esp + 0x13]
test cl, cl
jne 0x5378e4
test bl, bl
je 0x5378e4
cmp bl, 0xff
jne 0x53787a
mov al, byte [esp + 0x18]
mov cl, byte [esp + 0x19]
mov dl, byte [esp + 0x1a]
mov byte [edi], al
inc edi
mov byte [edi], cl
inc edi
mov byte [edi], dl
inc edi
jmp 0x5378e7
mov ecx, dword [esp + 0xc]
and eax, 0xff
not bl
mov byte [esp + 0x54], bl
xor ebx, ebx
mov edx, dword [esp + 0x54]
mov bl, byte [edi]
and ecx, 0xff
and edx, 0xff
imul eax, ecx
imul ebx, edx
add eax, ebx
xor ebx, ebx
sar eax, 8
mov byte [edi], al
mov eax, dword [esp + 0x19]
mov bl, byte [edi + 1]
inc edi
and eax, 0xff
imul ebx, edx
imul eax, ecx
add eax, ebx
sar eax, 8
mov byte [edi], al
mov eax, dword [esp + 0x1a]
and eax, 0xff
inc edi
imul eax, ecx
xor ecx, ecx
mov cl, byte [edi]
imul ecx, edx
add eax, ecx
sar eax, 8
mov byte [edi], al
inc edi
jmp 0x5378e7
add edi, 3
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x24]
inc eax
cmp eax, ecx
mov dword [esp + 0x40], eax
jl 0x537718
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x50]
dec edx
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x48]
add ecx, edx
dec eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x50], eax
jne 0x537699
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 0x88]
push 0
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x84]
push ecx
mov ecx, dword [esp + 0x3c]
push eax
push 0
push 0
push 0
push eax
mov eax, dword [esp + 0x54]
push edx
mov edx, dword [ebp + 8]
push eax
push ecx
push edx
call dword [sym.imp.GDI32.dll_SetDIBitsToDevice]
mov eax, dword [esp + 0x84]
mov esi, dword [esp + 0x74]
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov ebx, dword [sym.imp.GDI32.dll_DeleteObject]
push eax
call ebx
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x5379a3
lea ecx, [esp + 0xc8]
push ecx
call dword [sym.imp.GDI32.dll_CreateRectRgnIndirect]
mov edx, dword [ebp + 8]
mov esi, eax
push 2
push esi
push edx
call dword [sym.imp.GDI32.dll_ExtSelectClipRgn]
push esi
call ebx
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x18