Function at 0x40140d
Capabilities:
Capture screenshot

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.004013bf
mov edi, dword [ebp + 0x14]
xor ebx, ebx
pop ecx
mov esi, eax
cmp edi, ebx
pop ecx
mov dword [ebp - 0xc], esi
je 0x401753
cmp esi, ebx
je 0x401753
cmp dword [esi + 0x10], ebx
je 0x401753
mov eax, dword [edi + 0x18]
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x401753
lea eax, [ebp - 0x38]
push eax
push 0x18
push dword [esi + 0x10]
call dword [sym.imp.GDI32.dll_GetObjectA]
cmp eax, 0x18
jne 0x401746
push dword [esi + 0x10]
push dword [ebp - 8]
call dword [sym.imp.GDI32.dll_SelectObject]
cmp eax, ebx
mov dword [ebp - 0x20], eax
je 0x401746
mov eax, dword [0x408aac]
mov dword [ebp - 0x10], ebx
cmp eax, ebx
je 0x4014b0
push ebx
push eax
push dword [ebp - 4]
call dword [sym.imp.GDI32.dll_SelectPalette]
push dword [ebp - 4]
mov dword [ebp - 0x10], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov ecx, dword [esi + 8]
mov dword [ebp + 0x10], ebx
mov eax, ecx
mov dword [ebp + 0xc], ebx
dec eax
dec eax
je 0x4014cf
dec eax
jne 0x4014d8
mov eax, dword [edi + 0x24]
sub eax, dword [ebp - 0x34]
cdq
sub eax, edx
sar eax, 1
jmp 0x4014d5
mov eax, dword [edi + 0x24]
sub eax, dword [ebp - 0x34]
mov dword [ebp + 0x10], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x1c], eax
sub eax, 7
je 0x4014f3
dec eax
jne 0x4014fc
mov eax, dword [edi + 0x28]
sub eax, dword [ebp - 0x30]
cdq
sub eax, edx
sar eax, 1
jmp 0x4014f9
mov eax, dword [edi + 0x28]
sub eax, dword [ebp - 0x30]
mov dword [ebp + 0xc], eax
mov esi, dword [sym.imp.GDI32.dll_BitBlt]
cmp ecx, 4
mov edi, 0xcc0020
je 0x401529
cmp dword [ebp - 0x1c], 9
je 0x401529
push edi
push ebx
push ebx
push dword [ebp - 8]
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push dword [ebp + 0xc]
push dword [ebp + 0x10]
push dword [ebp - 4]
call esi
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 8], 4
jne 0x401599
cmp dword [ecx + 0xc], 9
je 0x4015a3
cmp dword [ebp - 0x34], ebx
jle 0x401599
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x24]
cdq
idiv dword [ebp - 0x34]
cmp eax, ebx
jle 0x401573
mov dword [ebp - 0x14], eax
push edi
push ebx
push ebx
push dword [ebp - 8]
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push dword [ebp + 0xc]
push dword [ebp + 0x10]
push dword [ebp - 4]
call esi
mov eax, dword [ebp - 0x34]
add dword [ebp + 0x10], eax
dec dword [ebp - 0x14]
jne 0x40154e
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x24]
cmp dword [ebp + 0x10], eax
jge 0x401599
sub eax, dword [ebp + 0x10]
push edi
push ebx
push ebx
push dword [ebp - 8]
push dword [ebp - 0x30]
push eax
push dword [ebp + 0xc]
push dword [ebp + 0x10]
push dword [ebp - 4]
call esi
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0xc], 9
jne 0x401728
cmp dword [ecx + 8], 4
je 0x40160a
cmp dword [ebp - 0x30], ebx
jle 0x40160a
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x28]
cdq
idiv dword [ebp - 0x30]
cmp eax, ebx
jle 0x4015e4
mov dword [ebp - 0x14], eax
push edi
push ebx
push ebx
push dword [ebp - 8]
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push dword [ebp + 0xc]
push dword [ebp + 0x10]
push dword [ebp - 4]
call esi
mov eax, dword [ebp - 0x30]
add dword [ebp + 0xc], eax
dec dword [ebp - 0x14]
jne 0x4015bf
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x28]
cmp dword [ebp + 0xc], eax
jge 0x40160a
sub eax, dword [ebp + 0xc]
push edi
push ebx
push ebx
push dword [ebp - 8]
push eax
push dword [ebp - 0x34]
push dword [ebp + 0xc]
push dword [ebp + 0x10]
push dword [ebp - 4]
call esi
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0xc], 9
jne 0x401728
cmp dword [ecx + 8], 4
jne 0x401728
cmp dword [ebp - 0x34], ebx
jle 0x401728
cmp dword [ebp - 0x30], ebx
jle 0x401728
mov ecx, dword [ebp + 0x14]
mov dword [ebp + 0xc], ebx
mov eax, dword [ecx + 0x24]
cdq
idiv dword [ebp - 0x34]
mov dword [ebp - 0x18], eax
mov eax, dword [ecx + 0x28]
cdq
idiv dword [ebp - 0x30]
mov edx, eax
cmp edx, ebx
mov dword [ebp - 0x1c], edx
jle 0x4016b6
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x18]
mov dword [ebp + 0x10], ebx
cmp eax, ebx
jle 0x401682
mov dword [ebp - 0x14], eax
push edi
push ebx
push ebx
push dword [ebp - 8]
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push dword [ebp + 0xc]
push dword [ebp + 0x10]
push dword [ebp - 4]
call esi
mov eax, dword [ebp - 0x34]
add dword [ebp + 0x10], eax
dec dword [ebp - 0x14]
jne 0x401660
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x24]
cmp dword [ebp + 0x10], eax
jge 0x4016a5
sub eax, dword [ebp + 0x10]
push edi
push ebx
push ebx
push dword [ebp - 8]
push dword [ebp - 0x30]
push eax
push dword [ebp + 0xc]
push dword [ebp + 0x10]
push dword [ebp - 4]
call esi
mov eax, dword [ebp - 0x30]
add dword [ebp + 0xc], eax
dec dword [ebp - 0xc]
jne 0x401653
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + 0x28]
cmp dword [ebp + 0xc], eax
jge 0x401728
sub eax, dword [ebp + 0xc]
cmp edx, ebx
mov dword [ebp - 0xc], eax
jle 0x401728
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x18]
mov dword [ebp + 0x10], ebx
cmp eax, ebx
jle 0x4016fa
mov dword [ebp - 0x14], eax
push edi
push ebx
push ebx
push dword [ebp - 8]
push dword [ebp - 0xc]
push dword [ebp - 0x34]
push dword [ebp + 0xc]
push dword [ebp + 0x10]
push dword [ebp - 4]
call esi
mov eax, dword [ebp - 0x34]
add dword [ebp + 0x10], eax
dec dword [ebp - 0x14]
jne 0x4016d8
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x24]
cmp dword [ebp + 0x10], eax
jge 0x40171d
sub eax, dword [ebp + 0x10]
push edi
push ebx
push ebx
push dword [ebp - 8]
push dword [ebp - 0xc]
push eax
push dword [ebp + 0xc]
push dword [ebp + 0x10]
push dword [ebp - 4]
call esi
mov eax, dword [ebp - 0x30]
add dword [ebp + 0xc], eax
dec dword [ebp - 0x1c]
jne 0x4016cb
cmp dword [ebp - 0x10], ebx
je 0x40173a
push ebx
push dword [ebp - 0x10]
push dword [ebp - 4]
call dword [sym.imp.GDI32.dll_SelectPalette]
push dword [ebp - 0x20]
push dword [ebp - 8]
call dword [sym.imp.GDI32.dll_SelectObject]
push dword [ebp - 8]
call dword [sym.imp.GDI32.dll_DeleteDC]
mov al, 1
jmp 0x401755
xor al, al
pop edi
pop esi
pop ebx
leave
ret