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

Disassembly:
sub esp, 0x9c
push ebx
mov ebx, dword [esp + 0xa8]
push ebp
xor ebp, ebp
xor eax, eax
cmp ebx, ebp
mov dword [esp + 0x18], eax
je 0x40fcc6
push esi
push edi
mov edi, dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push ebp
call edi
mov esi, eax
cmp esi, ebp
mov dword [esp + 0x3c], esi
je 0x40fcc0
lea eax, [esp + 0x50]
push eax
push 0x18
push ebx
call dword [sym.imp.GDI32.dll_GetObjectA]
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x58]
push ebp
push ebp
lea eax, [esp + 0xb0]
push eax
mov dword [esp + 0x78], ecx
push ebp
lea ecx, [esp + 0x78]
push ecx
push esi
mov dword [esp + 0x80], 0x28
mov dword [esp + 0x88], edx
mov word [esp + 0x8c], 1
mov word [esp + 0x8e], 0x20
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
mov dword [esp + 0xa4], ebp
call dword [sym.imp.GDI32.dll_CreateDIBSection]
cmp eax, ebp
mov dword [esp + 0x18], eax
je 0x40fcb9
mov ebx, dword [sym.imp.GDI32.dll_SelectObject]
push eax
push esi
call ebx
push esi
mov dword [esp + 0x44], eax
call edi
mov edi, eax
cmp edi, ebp
mov dword [esp + 0x48], edi
je 0x40fcaa
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x90]
push edx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectA]
mov eax, dword [esp + 0x9c]
mov ecx, eax
and ecx, 0x80000003
jns 0x40f90f
dec ecx
or ecx, 0xfffffffc
inc ecx
je 0x40f92a
inc eax
mov edx, eax
and edx, 0x80000003
jns 0x40f921
dec edx
or edx, 0xfffffffc
inc edx
jne 0x40f911
mov dword [esp + 0x9c], eax
mov eax, dword [esp + 0xb4]
push eax
push edi
call ebx
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x54]
push 0xcc0020
push ebp
push ebp
push edi
push ecx
push edx
push ebp
push ebp
push esi
mov dword [esp + 0x68], eax
call dword [sym.imp.GDI32.dll_BitBlt]
push 0x660
push 2
mov dword [esp + 0x34], 0x64
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [esp + 0x34], 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 ecx, byte [esp + 0xbc]
mov edx, dword [esp + 0xb8]
mov dword [esp + 0x28], ecx
mov edi, ecx
movzx ecx, dl
mov eax, edx
mov dword [esp + 0x24], ecx
add ecx, edi
shr eax, 0x10
cmp ecx, 0xff
mov byte [esp + 0x11], 0xff
jg 0x40f9d3
mov byte [esp + 0x11], cl
mov cx, word [esp + 0xbc]
shr cx, 8
mov word [esp + 0x16], cx
movzx ecx, cl
mov dword [esp + 0x38], ecx
mov edi, ecx
movzx ecx, dh
mov dword [esp + 0x1c], ecx
add ecx, edi
cmp ecx, 0xff
mov byte [esp + 0x14], 0xff
jg 0x40fa07
mov byte [esp + 0x14], cl
mov ecx, dword [esp + 0xbc]
shr ecx, 0x10
mov dword [esp + 0x4c], ecx
movzx ecx, cl
mov dword [esp + 0x18], ecx
mov edi, ecx
movzx ecx, al
mov dword [esp + 0x34], ecx
add ecx, edi
cmp ecx, 0xff
mov byte [esp + 0x15], 0xff
jg 0x40fa38
mov byte [esp + 0x15], cl
cmp dl, byte [esp + 0xbc]
jb 0x40fa4f
mov cl, byte [esp + 0x24]
sub cl, byte [esp + 0x28]
mov byte [esp + 0x12], cl
jmp 0x40fa54
mov byte [esp + 0x12], 0
cmp dh, byte [esp + 0x16]
jb 0x40fa68
mov cl, byte [esp + 0x1c]
sub cl, byte [esp + 0x38]
mov byte [esp + 0x16], cl
jmp 0x40fa6d
mov byte [esp + 0x16], 0
cmp al, byte [esp + 0x4c]
jb 0x40fa81
mov al, byte [esp + 0x34]
sub al, byte [esp + 0x18]
mov byte [esp + 0x13], al
jmp 0x40fa86
mov byte [esp + 0x13], 0
mov ecx, dword [esp + 0x98]
mov edx, dword [esp + 0xa4]
mov eax, dword [esp + 0x58]
dec ecx
imul ecx, dword [esp + 0x9c]
add ecx, edx
test eax, eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x1c], 0
jle 0x40fc4c
mov edi, dword [esp + 0x54]
jmp 0x40fac0
xor ebx, ebx
test edi, edi
jle 0x40fc2a
mov eax, dword [esp + 0x2c]
add eax, 2
shl eax, 4
mov dword [esp + 0x28], eax
jmp 0x40fae0
cmp ebx, edi
mov dword [esp + 0x18], ebx
lea eax, [ecx + ebx*4]
jge 0x40fc1d
nop
mov cl, byte [eax]
cmp cl, byte [esp + 0x13]
jb 0x40fb1c
cmp cl, byte [esp + 0x15]
ja 0x40fb1c
mov cl, byte [eax + 1]
cmp cl, byte [esp + 0x16]
jb 0x40fb1c
cmp cl, byte [esp + 0x14]
ja 0x40fb1c
mov cl, byte [eax + 2]
cmp cl, byte [esp + 0x12]
jb 0x40fb1c
cmp cl, byte [esp + 0x11]
jbe 0x40fb24
add eax, 4
inc ebx
cmp ebx, edi
jl 0x40faf0
mov ebp, dword [esp + 0x18]
cmp ebx, ebp
jle 0x40fc1d
mov edx, dword [esi + 8]
cmp edx, dword [esp + 0x2c]
jb 0x40fb73
mov esi, dword [esp + 0x30]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
add eax, 0x640
push 2
push eax
add edi, 0x64
push esi
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], eax
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
push eax
mov dword [esp + 0x34], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
mov eax, dword [esp + 0x1c]
lea edi, [eax + 1]
push edi
push ebx
push eax
mov eax, dword [esi + 8]
add eax, 2
shl eax, 4
push ebp
add eax, esi
push eax
call dword [sym.imp.USER32.dll_SetRect]
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x10]
cmp eax, ecx
lea ebp, [esi + 0x10]
jge 0x40fba1
mov dword [ebp], eax
mov eax, dword [esp + 0x1c]
cmp eax, dword [esi + 0x14]
jge 0x40fbad
mov dword [esi + 0x14], eax
cmp ebx, dword [esi + 0x18]
jle 0x40fbb5
mov dword [esi + 0x18], ebx
cmp edi, dword [esi + 0x1c]
jle 0x40fbbd
mov dword [esi + 0x1c], edi
mov ecx, dword [esi + 8]
inc ecx
mov eax, ecx
cmp eax, 0x7d0
mov dword [esi + 8], ecx
jne 0x40fc19
mov ecx, dword [esp + 0x28]
push esi
push ecx
push 0
call dword [sym.imp.GDI32.dll_ExtCreateRegion]
mov edi, eax
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40fbf9
push 2
push edi
push eax
push eax
call dword [sym.imp.GDI32.dll_CombineRgn]
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
jmp 0x40fbfd
mov dword [esp + 0x20], edi
push 0
push 0
push SysReAllocString
push SysReAllocString
push ebp
mov dword [esi + 8], 0
call dword [sym.imp.USER32.dll_SetRect]
mov edi, dword [esp + 0x54]
mov ecx, dword [esp + 0x24]
inc ebx
cmp ebx, edi
jl 0x40fae0
mov ebp, dword [esp + 0x9c]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x58]
sub ecx, ebp
inc eax
cmp eax, edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x1c], eax
jl 0x40fac0
mov edx, dword [esp + 0x2c]
add edx, 2
push esi
shl edx, 4
push edx
push 0
call dword [sym.imp.GDI32.dll_ExtCreateRegion]
mov esi, eax
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40fc7e
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 0x40fc82
mov dword [esp + 0x20], esi
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x44]
mov esi, dword [esp + 0x48]
mov ebx, dword [sym.imp.GDI32.dll_SelectObject]
push ecx
push esi
call ebx
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov esi, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
push edx
push esi
call ebx
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9c
ret