Function at 0x406250
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x84
push ecx
push edi
lea edi, [esp + 8]
mov eax, 0xcccccccc
mov ecx, 0x21
rep stosd dword es:[edi], eax
pop edi
pop ecx
mov eax, dword [ebp + 0xc]
movsx ebx, word [eax + 2]
mov eax, dword [ebp + 0xc]
movsx edx, word [eax + 6]
sub edx, ebx
mov dword [ebp - 0x38], edx
mov eax, dword [ebp + 0xc]
movsx ebx, word [eax]
mov eax, dword [ebp + 0xc]
movsx edx, word [eax + 4]
sub edx, ebx
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x38]
cdq
and edx, 3
add eax, edx
and eax, 3
sub eax, edx
cmp eax, 0
je 0x4062be
mov eax, dword [ebp - 0x38]
cdq
and edx, 3
add eax, edx
and eax, 3
sub eax, edx
mov edx, 4
sub edx, eax
add dword [ebp - 0x38], edx
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov dword [ebp - 0x40], eax
mov edx, 0
mov ebx, dword [edx + 0x501658]
mov dword [ebp + edx - 0x30], ebx
mov ebx, dword [edx + 0x50165c]
mov dword [ebp + edx - 0x2c], ebx
mov ebx, dword [edx + 0x501660]
mov dword [ebp + edx - 0x28], ebx
mov ebx, dword [edx + 0x501664]
mov dword [ebp + edx - 0x24], ebx
add edx, 0x10
cmp edx, 0x20
jl 0x4062cf
mov ebx, dword [0x501678]
mov dword [ebp - 0x10], ebx
mov ebx, dword [0x50167c]
mov dword [ebp - 0xc], ebx
mov ebx, dword [0x501680]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x34], 0
push 0
push 0
lea eax, [ebp - 0x34]
push eax
push 0
lea eax, [ebp - 0x30]
push eax
push 0
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
je 0x406352
cmp dword [ebp - 0x34], 0
jne 0x406363
push str.hBitmap_or_destBits_is_null_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea esp, [ebp - 4]
pop ebx
pop ebp
ret
mov ebx, dword [ebp - 0x38]
lea ebx, [ebx + ebx*2]
mov dword [ebp - 0x48], ebx
push dword [ebp - 0x44]
push dword [ebp - 0x40]
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [ebp - 0x4c], eax
push 0xcc0020
mov eax, dword [ebp + 0xc]
movsx eax, word [eax]
push eax
mov eax, dword [ebp + 0xc]
movsx eax, word [eax + 2]
push eax
push dword [ebp + 8]
push dword [ebp - 0x3c]
push dword [ebp - 0x38]
push 0
push 0
push dword [ebp - 0x40]
call dword [sym.imp.GDI32.dll_BitBlt]
mov dword [ebp - 0x50], 4
mov dword [ebp - 0x54], 4
mov eax, dword [ebp + 0xc]
movsx ebx, word [eax + 2]
mov eax, dword [ebp + 0xc]
movsx edx, word [eax + 6]
sub edx, ebx
mov dword [ebp - 0x58], edx
mov eax, dword [ebp + 0x18]
movsx ebx, word [eax + 2]
mov eax, dword [ebp + 0x18]
movsx edx, word [eax + 6]
sub edx, ebx
mov dword [ebp - 0x5c], edx
mov dword [ebp - 0x60], 0
jmp 0x406588
mov edx, dword [ebp - 0x3c]
add edx, 0xffffffff
sub edx, dword [ebp - 0x60]
imul edx, dword [ebp - 0x48]
add edx, dword [ebp - 0x34]
mov dword [ebp - 0x64], edx
mov eax, dword [ebp + 0x18]
movsx edx, word [eax]
mov eax, dword [ebp + 0x18]
movsx ebx, word [eax + 4]
sub ebx, edx
imul ebx, dword [ebp - 0x60]
mov eax, ebx
cdq
idiv dword [ebp - 0x3c]
mov ebx, eax
mov eax, dword [ebp + 0x18]
movsx edx, word [eax]
add ebx, edx
mov dword [ebp - 0x68], ebx
mov edx, dword [ebp - 0x68]
imul edx, dword [ebp + 0x14]
add edx, dword [ebp + 0x10]
mov dword [ebp - 0x6c], edx
mov edx, dword [ebp - 0x68]
imul edx, dword [ebp + 0x20]
add edx, dword [ebp + 0x1c]
mov dword [ebp - 0x70], edx
mov dword [ebp - 0x74], 0
jmp 0x406579
mov ebx, dword [ebp - 0x5c]
imul ebx, dword [ebp - 0x74]
mov eax, ebx
cdq
idiv dword [ebp - 0x58]
mov ebx, eax
mov eax, dword [ebp + 0x18]
movsx edx, word [eax + 2]
add ebx, edx
mov dword [ebp - 0x78], ebx
mov edx, dword [ebp - 0x78]
imul edx, dword [ebp - 0x50]
add edx, dword [ebp - 0x6c]
mov dword [ebp - 0x7c], edx
mov edx, dword [ebp - 0x78]
imul edx, dword [ebp - 0x54]
add edx, dword [ebp - 0x70]
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x80]
movzx edx, byte [eax + 1]
mov dword [ebp - 0x84], edx
mov edx, 0xff
sub edx, dword [ebp - 0x84]
mov dword [ebp - 0x88], edx
mov eax, dword [ebp - 0x7c]
movzx edx, byte [eax]
imul edx, dword [ebp - 0x88]
mov eax, 0x80808081
mov ebx, edx
imul edx
add edx, ebx
shr ebx, 0x1f
sar edx, 7
add ebx, edx
mov eax, dword [ebp - 0x64]
movzx edx, byte [eax]
imul edx, dword [ebp - 0x84]
mov eax, 0x80808081
mov ecx, edx
imul edx
add edx, ecx
shr ecx, 0x1f
sar edx, 7
add ecx, edx
add bl, cl
mov eax, dword [ebp - 0x64]
mov byte [eax], bl
mov eax, dword [ebp - 0x7c]
movzx edx, byte [eax + 1]
imul edx, dword [ebp - 0x88]
mov eax, 0x80808081
mov ebx, edx
imul edx
add edx, ebx
shr ebx, 0x1f
sar edx, 7
add ebx, edx
mov eax, dword [ebp - 0x64]
movzx edx, byte [eax + 1]
imul edx, dword [ebp - 0x84]
mov eax, 0x80808081
mov ecx, edx
imul edx
add edx, ecx
shr ecx, 0x1f
sar edx, 7
add ecx, edx
add bl, cl
mov eax, dword [ebp - 0x64]
mov byte [eax + 1], bl
mov eax, dword [ebp - 0x7c]
movzx edx, byte [eax + 2]
imul edx, dword [ebp - 0x88]
mov eax, 0x80808081
mov ebx, edx
imul edx
add edx, ebx
shr ebx, 0x1f
sar edx, 7
add ebx, edx
mov eax, dword [ebp - 0x64]
movzx edx, byte [eax + 2]
imul edx, dword [ebp - 0x84]
mov eax, 0x80808081
mov ecx, edx
imul edx
add edx, ecx
shr ecx, 0x1f
sar edx, 7
add ecx, edx
add bl, cl
mov eax, dword [ebp - 0x64]
mov byte [eax + 2], bl
add dword [ebp - 0x64], 3
inc dword [ebp - 0x74]
mov eax, dword [ebp - 0x58]
cmp dword [ebp - 0x74], eax
jl 0x406444
inc dword [ebp - 0x60]
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 0x60], eax
jl 0x4063e5
push 0xcc0020
push 0
push 0
push dword [ebp - 0x40]
push dword [ebp - 0x3c]
mov eax, dword [ebp + 0xc]
movsx ebx, word [eax + 2]
mov eax, dword [ebp + 0xc]
movsx edx, word [eax + 6]
sub edx, ebx
push edx
mov eax, dword [ebp + 0xc]
movsx eax, word [eax]
push eax
mov eax, dword [ebp + 0xc]
movsx eax, word [eax + 2]
push eax
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_BitBlt]
push dword [ebp - 0x4c]
push dword [ebp - 0x40]
call dword [sym.imp.GDI32.dll_SelectObject]
push dword [ebp - 0x44]
call dword [sym.imp.GDI32.dll_DeleteObject]
push dword [ebp - 0x40]
call dword [sym.imp.GDI32.dll_DeleteDC]
lea esp, [ebp - 4]
pop ebx
pop ebp
ret