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

Disassembly:
sub esp, 0x54
mov eax, dword [esp + 0x58]
push ebx
push ebp
push esi
push edi
mov edi, dword [eax + 4]
xor ebp, ebp
mov dword [esp + 0x1c], edi
push ebp
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov esi, eax
cmp esi, ebp
mov dword [esp + 0x18], esi
jne 0x40946f
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x54
ret
lea ecx, [esp + 0x24]
push ecx
push 0x18
push edi
call dword [sym.imp.GDI32.dll_GetObjectA]
mov edx, dword [esp + 0x2c]
imul edx, dword [esp + 0x28]
add edx, 2
shl edx, 4
push edx
call sub.MFC42.DLL_operatornew
mov ebx, eax
add esp, 4
cmp ebx, ebp
mov dword [esp + 0x20], ebx
jne 0x4094b0
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x54
ret
mov eax, dword [esp + 0x28]
lea ecx, [eax*4]
push ecx
call sub.MFC42.DLL_operatornew
mov edx, eax
add esp, 4
cmp edx, ebp
mov dword [esp + 0x68], edx
jne 0x4094e8
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
push ebx
call sub.MFC42.DLL_operatordelete
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x3c]
mov dword [esp + 0x14], ebp
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x10], ebp
mov ebp, dword [esp + 0x70]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x2c]
mov edi, 1
cmp ebp, ecx
mov dword [esp + 0x3c], 0x28
mov dword [esp + 0x44], eax
mov word [esp + 0x48], di
mov word [esp + 0x4a], 0x20
lea esi, [ebx + 0x20]
jge 0x4095ed
jmp 0x409547
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x68]
lea ecx, [esp + 0x3c]
push 0
sub eax, ebp
push ecx
push edx
mov edx, dword [esp + 0x28]
dec eax
push edi
push eax
mov eax, dword [esp + 0x2c]
push edx
push eax
call dword [sym.imp.GDI32.dll_GetDIBits]
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x74]
cmp eax, ecx
jge 0x4095dc
mov ecx, dword [esp + 0x68]
cmp dword [ecx + eax*4], 0xff00ff
je 0x4095cf
mov ebx, eax
mov edx, edi
mov edi, dword [esp + 0x28]
inc eax
cmp eax, edi
jge 0x4095a8
lea ecx, [ecx + eax*4]
cmp dword [ecx], 0xff00ff
je 0x4095a0
inc eax
add ecx, 4
inc edx
cmp eax, edi
jl 0x40958d
jmp 0x4095a8
mov dword [esp + 0x10], 1
mov ecx, dword [esp + 0x14]
add edx, ebx
mov dword [esi + 8], edx
lea edx, [ebp + 1]
mov dword [esi], ebx
mov ebx, dword [esp + 0x20]
mov dword [esi + 4], ebp
mov dword [esi + 0xc], edx
add esi, 0x10
inc ecx
mov dword [esp + 0x14], ecx
mov edi, 1
jmp 0x4095d3
mov dword [esp + 0x10], edi
mov ecx, dword [esp + 0x74]
inc eax
cmp eax, ecx
jl 0x409570
mov eax, dword [esp + 0x78]
inc ebp
cmp ebp, eax
jl 0x40953f
mov edx, dword [esp + 0x68]
push edx
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x1c]
add esp, 4
push eax
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [esp + 0x10]
xor esi, esi
cmp eax, esi
je 0x409643
mov ecx, dword [esp + 0x14]
mov dword [ebx], 0x20
mov dword [ebx + 4], edi
mov dword [ebx + 8], ecx
lea eax, [ecx + 2]
mov dword [ebx + 0x10], esi
shl eax, 4
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x14], esi
mov ecx, dword [esp + 0x28]
push ebx
mov dword [ebx + 0x18], ecx
mov edx, dword [esp + 0x30]
push eax
push esi
mov dword [ebx + 0x1c], edx
call dword [sym.imp.GDI32.dll_ExtCreateRegion]
mov esi, eax
push ebx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret