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

Disassembly:
sub esp, 0x94
push esi
push edi
mov edi, dword [esp + 0xa0]
xor esi, esi
cmp edi, esi
mov dword [esp + 0x14], esi
je 0x40154f
push esi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
cmp eax, esi
mov dword [esp + 0xc], eax
je 0x40154f
push ebx
mov ebx, dword [sym.imp.GDI32.dll_GetObjectA]
lea eax, [esp + 0x44]
push ebp
push eax
push 0x18
push edi
call ebx
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
push esi
lea eax, [esp + 0xa4]
mov dword [esp + 0x68], ecx
push esi
mov dword [esp + 0x70], edx
mov edx, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x6c]
push esi
mov ebp, 1
push ecx
push edx
mov dword [esp + 0x78], 0x28
mov word [esp + 0x84], bp
mov word [esp + 0x86], 0x20
mov dword [esp + 0x88], esi
mov dword [esp + 0x8c], esi
mov dword [esp + 0x90], esi
mov dword [esp + 0x94], esi
mov dword [esp + 0x98], esi
mov dword [esp + 0x9c], esi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov esi, eax
test esi, esi
je 0x401535
mov eax, dword [esp + 0x14]
push esi
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x44], eax
push ecx
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
test eax, eax
mov dword [esp + 0x3c], eax
je 0x40151e
lea edx, [esp + 0x88]
push edx
push 0x18
push esi
call ebx
mov eax, dword [esp + 0x94]
mov ecx, eax
and ecx, 0x80000003
jns 0x40120a
dec ecx
or ecx, 0xfffffffc
inc ecx
je 0x401225
inc eax
mov edx, eax
and edx, 0x80000003
jns 0x40121c
dec edx
or edx, 0xfffffffc
inc edx
jne 0x40120c
mov dword [esp + 0x94], eax
push edi
mov edi, dword [esp + 0x40]
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x14]
xor ebx, ebx
push 0xcc0020
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x54]
push ebx
push ebx
push edi
push eax
push ecx
push ebx
push ebx
push edx
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 + 0x34], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
push ebx
push ebx
push 0x7fffffff
lea eax, [esi + 0x10]
push 0x7fffffff
push eax
mov dword [esi], 0x20
mov dword [esi + 4], ebp
mov dword [esi + 0xc], ebx
mov dword [esi + 8], ebx
call dword [sym.imp.USER32.dll_SetRect]
mov ebx, dword [esp + 0xac]
xor eax, eax
mov ecx, dword [esp + 0xb0]
mov al, bh
mov byte [esp + 0x2c], al
mov eax, ebx
shr eax, 0x10
mov byte [esp + 0x38], al
mov eax, ecx
mov edx, 0xff
and eax, edx
and ebx, edx
add eax, ebx
mov byte [esp + 0x13], dl
cmp eax, edx
jg 0x4012d5
mov byte [esp + 0x13], al
mov ebx, dword [esp + 0x2c]
xor eax, eax
mov al, ch
and ebx, edx
and eax, edx
mov byte [esp + 0x11], dl
add eax, ebx
cmp eax, edx
jg 0x4012ef
mov byte [esp + 0x11], al
mov eax, dword [esp + 0x38]
mov byte [esp + 0x12], dl
shr ecx, 0x10
and ecx, edx
and eax, edx
add ecx, eax
cmp ecx, edx
jg 0x401308
mov byte [esp + 0x12], cl
mov ecx, dword [esp + 0x90]
mov edx, dword [esp + 0x9c]
dec ecx
mov eax, dword [esp + 0x50]
imul ecx, dword [esp + 0x94]
add ecx, edx
mov dword [esp + 0x20], 0
test eax, eax
mov dword [esp + 0x28], ecx
jle 0x4014d5
mov edi, dword [esp + 0x4c]
xor ebx, ebx
test edi, edi
jle 0x4014af
mov edx, dword [esp + 0x18]
lea eax, [edx + 2]
shl eax, 4
mov dword [esp + 0x24], eax
cmp ebx, edi
mov dword [esp + 0x34], ebx
lea ecx, [ecx + ebx*4]
jge 0x4014a2
mov al, byte [ecx]
mov dl, byte [esp + 0xac]
cmp al, dl
jb 0x40139d
cmp al, byte [esp + 0x13]
ja 0x40139d
mov dl, byte [esp + 0x2c]
xor eax, eax
mov al, byte [ecx + 1]
cmp al, dl
jb 0x40139d
cmp al, byte [esp + 0x11]
ja 0x40139d
mov eax, dword [ecx]
mov dl, byte [esp + 0x38]
sar eax, 0x10
cmp al, dl
jb 0x40139d
cmp al, byte [esp + 0x12]
jbe 0x4013a5
add ecx, 4
inc ebx
cmp ebx, edi
jl 0x401364
mov ebp, dword [esp + 0x34]
cmp ebx, ebp
jle 0x4014a2
mov eax, dword [esi + 8]
mov ecx, dword [esp + 0x18]
cmp eax, ecx
jb 0x4013f6
mov esi, dword [esp + 0x30]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esp + 0x24]
mov edi, dword [esp + 0x18]
add eax, 0x640
push 2
add edi, 0x64
push eax
push esi
mov dword [esp + 0x24], edi
mov dword [esp + 0x30], 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 + 0x20]
mov ecx, dword [esi + 8]
add ecx, 2
lea edi, [eax + 1]
push edi
push ebx
shl ecx, 4
push eax
add ecx, esi
push ebp
push ecx
call dword [sym.imp.USER32.dll_SetRect]
mov eax, dword [esp + 0x34]
mov ecx, dword [esi + 0x10]
lea ebp, [esi + 0x10]
cmp eax, ecx
jge 0x401424
mov dword [ebp], eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x14]
cmp eax, ecx
jge 0x401432
mov dword [esi + 0x14], eax
cmp ebx, dword [esi + 0x18]
jle 0x40143a
mov dword [esi + 0x18], ebx
cmp edi, dword [esi + 0x1c]
jle 0x401442
mov dword [esi + 0x1c], edi
mov ecx, dword [esi + 8]
inc ecx
mov eax, ecx
mov dword [esi + 8], ecx
cmp eax, 0x7d0
jne 0x40149e
mov edx, dword [esp + 0x24]
push esi
push edx
push 0
call dword [sym.imp.GDI32.dll_ExtCreateRegion]
mov edi, eax
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40147e
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 0x401482
mov dword [esp + 0x1c], edi
push 0
push 0
push 0x7fffffff
push 0x7fffffff
push ebp
mov dword [esi + 8], 0
call dword [sym.imp.USER32.dll_SetRect]
mov edi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x28]
inc ebx
cmp ebx, edi
jl 0x401355
mov ebp, dword [esp + 0x94]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x50]
sub ecx, ebp
inc eax
mov dword [esp + 0x28], ecx
cmp eax, edx
mov dword [esp + 0x20], eax
jl 0x40133d
mov edi, dword [esp + 0x3c]
mov eax, dword [esp + 0x18]
push esi
add eax, 2
shl eax, 4
push eax
push 0
call dword [sym.imp.GDI32.dll_ExtCreateRegion]
mov esi, eax
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x401507
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 0x40150b
mov dword [esp + 0x1c], esi
mov ecx, dword [esp + 0x40]
push ecx
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x14]
push edx
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [esp + 0x1c]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x94
ret
mov eax, esi
pop edi
pop esi
add esp, 0x94
ret