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

Disassembly:
sub esp, 0x98
push ebx
push ebp
mov ebx, eax
xor ebp, ebp
xor eax, eax
push esi
push edi
mov dword [esp + 0x14], eax
cmp dword [esp + 0xac], ebp
je 0x40d382
mov edi, dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push ebp
call edi
mov esi, eax
mov dword [esp + 0x48], esi
cmp esi, ebp
je 0x40d380
mov ecx, dword [esp + 0xac]
lea eax, [esp + 0x4c]
push eax
push 0x18
push ecx
call dword [sym.imp.GDI32.dll_GetObjectW]
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x50]
push ebp
push ebp
mov dword [esp + 0x74], eax
lea eax, [esp + 0xac]
push eax
mov ecx, 1
mov word [esp + 0x7c], cx
push ebp
lea ecx, [esp + 0x74]
mov dword [esp + 0x78], edx
push ecx
mov edx, 0x20
push esi
mov dword [esp + 0x7c], 0x28
mov word [esp + 0x8a], dx
mov dword [esp + 0x8c], ebp
mov dword [esp + 0x90], ebp
mov dword [esp + 0x94], ebp
mov dword [esp + 0x98], ebp
mov dword [esp + 0x9c], ebp
mov dword [esp + 0xa0], ebp
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [esp + 0x1c], eax
cmp eax, ebp
je 0x40d36a
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
push esi
mov dword [esp + 0x3c], eax
call edi
mov edi, eax
mov dword [esp + 0x44], edi
cmp edi, ebp
je 0x40d357
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x8c]
push edx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectW]
mov eax, dword [esp + 0x98]
mov ecx, eax
and ecx, 0x80000003
jns 0x40d061
dec ecx
or ecx, 0xfffffffc
inc ecx
je 0x40d07c
inc eax
mov edx, eax
and edx, 0x80000003
jns 0x40d073
dec edx
or edx, 0xfffffffc
inc edx
jne 0x40d063
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0xac]
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x50]
push 0xcc0020
push ebp
push ebp
push edi
push ecx
push edx
push ebp
push ebp
push esi
mov dword [esp + 0x58], eax
call dword [sym.imp.GDI32.dll_BitBlt]
push 0x660
push 2
mov dword [esp + 0x20], 0x64
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push ebp
mov esi, eax
push ebp
push SysReAllocString
push SysReAllocString
lea eax, [esi + 0x10]
push eax
mov dword [esi], 0x20
mov dword [esi + 4], 1
mov dword [esi + 0xc], ebp
mov dword [esi + 8], ebp
call dword [sym.imp.USER32.dll_SetRect]
movzx edi, bl
mov eax, ebx
mov ecx, ebx
mov edx, 0xff
shr eax, 8
shr ecx, 0x10
cmp edi, edx
mov dword [esp + 0x30], edi
jle 0x40d115
mov byte [esp + 0x12], dl
jmp 0x40d11d
mov bl, byte [esp + 0x30]
mov byte [esp + 0x12], bl
movzx eax, al
cmp eax, edx
mov dword [esp + 0x40], eax
mov byte [esp + 0x13], dl
jg 0x40d130
mov byte [esp + 0x13], al
movzx eax, cl
cmp eax, edx
mov dword [esp + 0x3c], eax
mov byte [esp + 0x11], dl
jg 0x40d143
mov byte [esp + 0x11], al
mov ecx, dword [esp + 0x94]
dec ecx
imul ecx, dword [esp + 0x98]
add ecx, dword [esp + 0xa0]
cmp dword [esp + 0x54], ebp
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], ebp
jle 0x40d2f4
mov ebp, dword [esp + 0x50]
xor edi, edi
test ebp, ebp
jle 0x40d2d6
mov eax, dword [esp + 0x18]
add eax, 2
shl eax, 4
mov dword [esp + 0x2c], eax
jmp 0x40d190
cmp edi, ebp
mov dword [esp + 0x1c], edi
lea eax, [ecx + edi*4]
jge 0x40d2c9
nop
mov cl, byte [eax]
movzx edx, cl
cmp edx, dword [esp + 0x30]
jl 0x40d1d5
cmp cl, byte [esp + 0x12]
ja 0x40d1d5
mov cl, byte [eax + 1]
movzx edx, cl
cmp edx, dword [esp + 0x40]
jl 0x40d1d5
cmp cl, byte [esp + 0x13]
ja 0x40d1d5
mov cl, byte [eax + 2]
movzx edx, cl
cmp edx, dword [esp + 0x3c]
jl 0x40d1d5
cmp cl, byte [esp + 0x11]
jbe 0x40d1dd
inc edi
add eax, 4
cmp edi, ebp
jl 0x40d1a0
mov ebx, dword [esp + 0x1c]
cmp edi, ebx
jle 0x40d2c9
mov eax, dword [esi + 8]
cmp eax, dword [esp + 0x18]
jb 0x40d226
mov esi, dword [esp + 0x24]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esp + 0x2c]
add dword [esp + 0x18], 0x64
add eax, 0x640
push 2
push eax
push esi
mov dword [esp + 0x38], eax
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
push eax
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 8]
lea ebp, [eax + 1]
push ebp
push edi
add ecx, 2
push eax
shl ecx, 4
push ebx
add ecx, esi
push ecx
call dword [sym.imp.USER32.dll_SetRect]
mov eax, dword [esp + 0x1c]
cmp eax, dword [esi + 0x10]
lea ebx, [esi + 0x10]
jge 0x40d251
mov dword [ebx], eax
mov eax, dword [esp + 0x20]
cmp eax, dword [esi + 0x14]
jge 0x40d25d
mov dword [esi + 0x14], eax
cmp edi, dword [esi + 0x18]
jle 0x40d265
mov dword [esi + 0x18], edi
cmp ebp, dword [esi + 0x1c]
jle 0x40d26d
mov dword [esi + 0x1c], ebp
inc dword [esi + 8]
cmp dword [esi + 8], 0x7d0
jne 0x40d2c5
mov edx, dword [esp + 0x2c]
push esi
push edx
push 0
call dword [sym.imp.GDI32.dll_ExtCreateRegion]
mov ebp, eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40d2a5
push 2
push ebp
push eax
push eax
call dword [sym.imp.GDI32.dll_CombineRgn]
push ebp
call dword [sym.imp.GDI32.dll_DeleteObject]
jmp 0x40d2a9
mov dword [esp + 0x14], ebp
push 0
push 0
push SysReAllocString
push SysReAllocString
push ebx
mov dword [esi + 8], 0
call dword [sym.imp.USER32.dll_SetRect]
mov ebp, dword [esp + 0x50]
mov ecx, dword [esp + 0x28]
inc edi
cmp edi, ebp
jl 0x40d190
mov eax, dword [esp + 0x20]
sub ecx, dword [esp + 0x98]
inc eax
cmp eax, dword [esp + 0x54]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], eax
jl 0x40d170
mov eax, dword [esp + 0x18]
add eax, 2
push esi
shl eax, 4
push eax
push 0
call dword [sym.imp.GDI32.dll_ExtCreateRegion]
mov esi, eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40d326
push 2
push esi
push eax
push eax
call dword [sym.imp.GDI32.dll_CombineRgn]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
jmp 0x40d32a
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x24]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x34]
mov esi, dword [esp + 0x44]
push ecx
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov esi, dword [esp + 0x48]
mov edx, dword [esp + 0x38]
push edx
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98
ret
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98
ret