Function at 0x51f940
Capabilities:
Capture screenshot

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff68
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x18], 0
je 0x51f97d
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x1c], 0
je 0x51ff95
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x20], 0
je 0x51ff95
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x18], 0
jne 0x51f9a0
mov eax, dword [ebp + 0xc]
cmp dword [eax + 4], 0
je 0x51ff95
mov eax, dword [ebp + 0xc]
cmp dword [eax + 8], 0
je 0x51ff95
mov eax, dword [ebp - 4]
call fcn.0051f4c0
xor eax, eax
mov dword [ebp - 0x70], eax
cmp dword [ebp - 4], 0
je 0x51f9cf
lea eax, [ebp - 0x88]
push eax
push 0x54
mov eax, dword [ebp - 4]
push eax
call sub.gdi32.dll_GetObjectW
cmp eax, 0x18
jge 0x51f9cf
call fcn.0051b4c0
push 0
call sub.user32.dll_GetDC
call fcn.0051b5e0
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
push eax
call sub.gdi32.dll_CreateCompatibleDC
call fcn.0051b5e0
mov dword [ebp - 0x1c], eax
xor edx, edx
push ebp
push 0x51ff8e
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x18], 0x28
jae 0x51fa64
mov eax, dword [ebp + 0xc]
movzx eax, word [eax + 0x10]
mov edx, dword [ebp + 0xc]
or ax, word [edx + 0x12]
cmp ax, 1
jne 0x51fa40
push 0
push 1
push 1
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 4]
push eax
call sub.gdi32.dll_CreateBitmap
call fcn.0051b5e0
mov dword [ebp - 0x10], eax
jmp 0x51fc9c
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 4]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.gdi32.dll_CreateCompatibleBitmap
call fcn.0051b5e0
mov dword [ebp - 0x10], eax
jmp 0x51fc9c
mov eax, 0x42c
call fcn.004067ec
mov dword [ebp - 0x28], eax
xor edx, edx
push ebp
push 0x51fc95
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x18], 0x28
mov eax, dword [ebp + 0xc]
mov word [eax + 0x24], 1
mov eax, dword [ebp + 0xc]
cmp word [eax + 0x26], 0
jne 0x51fabf
push 0xc
mov eax, dword [ebp - 0x18]
push eax
call sub.gdi32.dll_GetDeviceCaps
mov ebx, eax
push 0xe
mov eax, dword [ebp - 0x18]
push eax
call sub.gdi32.dll_GetDeviceCaps
imul bx, ax
mov eax, dword [ebp + 0xc]
mov word [eax + 0x26], bx
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x28]
lea esi, [eax + 0x18]
mov edi, edx
mov ecx, 0xa
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x1c]
mov edx, dword [ebp + 0xc]
mov dword [edx + 4], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x20]
mov edx, dword [ebp + 0xc]
mov dword [edx + 8], eax
mov eax, dword [ebp + 0xc]
cmp word [eax + 0x26], 8
ja 0x51fbbe
mov eax, dword [ebp + 0xc]
cmp word [eax + 0x26], 1
jne 0x51fb29
cmp dword [ebp - 4], 0
je 0x51fb0d
cmp dword [ebp - 0x74], 0
jne 0x51fb29
mov eax, dword [ebp - 0x28]
xor edx, edx
mov dword [eax + 0x28], edx
mov eax, dword [ebp - 0x28]
add eax, 0x28
add eax, 4
mov dword [eax], 0xffffff
jmp 0x51fbf8
cmp dword [ebp - 0xc], 0
je 0x51fb47
mov eax, dword [ebp - 0x28]
lea edx, [eax + 0x28]
mov ecx, 0xff
mov eax, dword [ebp - 0xc]
call fcn.0051bd88
jmp 0x51fbf8
cmp dword [ebp - 4], 0
je 0x51fbf8
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.gdi32.dll_SelectObject
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x70], 0
jbe 0x51fb8c
cmp dword [ebp - 0x74], 0
je 0x51fb8c
mov eax, dword [ebp - 0x28]
add eax, 0x28
push eax
push pe_nt_image_headers32
push 0
mov eax, dword [ebp - 0x1c]
push eax
call sub.gdi32.dll_GetDIBColorTable
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x38], eax
jmp 0x51fbaf
push 0
mov eax, dword [ebp - 0x28]
push eax
push 0
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x20]
cdq
xor eax, edx
sub eax, edx
push eax
push 0
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.gdi32.dll_GetDIBits
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.gdi32.dll_SelectObject
jmp 0x51fbf8
mov eax, dword [ebp + 0xc]
movzx eax, word [eax + 0x26]
cmp ax, 0x10
je 0x51fbd1
cmp ax, 0x20
jne 0x51fbf8
mov eax, dword [ebp + 0xc]
test byte [eax + 0x28], 3
je 0x51fbf8
mov eax, dword [ebp + 0xc]
call fcn.0051f8f4
mov eax, dword [ebp - 0x28]
lea edx, [eax + 0x28]
mov eax, dword [ebp + 0xc]
add eax, 0x40
mov ecx, 0xc
call fcn.004069e8
push 0
push 0
lea eax, [ebp - 0x2c]
push eax
push 0
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.gdi32.dll_CreateDIBSection
call fcn.0051b5e0
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x2c], 0
jne 0x51fc22
call fcn.0051b538
cmp dword [ebp - 4], 0
je 0x51fc7f
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x1c]
cmp eax, dword [ebp - 0x84]
jne 0x51fc7f
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x20]
cmp eax, dword [ebp - 0x80]
jne 0x51fc7f
mov eax, dword [ebp + 0xc]
cmp word [eax + 0x26], 8
jbe 0x51fc7f
push 0
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x20]
cdq
xor eax, edx
sub eax, edx
push eax
push 0
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.gdi32.dll_GetDIBits
call fcn.00408d5c
call fcn.00408d5c
jmp 0x51ff95
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51fc9c
mov eax, dword [ebp - 0x28]
call fcn.00406808
ret
mov eax, dword [ebp - 0x10]
call fcn.0051b5e0
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.gdi32.dll_SelectObject
call fcn.0051b5e0
mov dword [ebp - 0x14], eax
xor eax, eax
push ebp
push 0x51ff3f
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x51ff2e
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x24], eax
xor ebx, ebx
cmp dword [ebp - 0xc], 0
je 0x51fcfd
push 0
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.gdi32.dll_SelectPalette
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.gdi32.dll_RealizePalette
xor eax, eax
push ebp
push 0x51ff0c
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp + 8], 0
je 0x51fdcc
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x48]
call fcn.0051a054
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
push eax
lea eax, [ebp - 0x98]
push eax
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx + 4]
xor edx, edx
xor eax, eax
call fcn.0040ff8c
lea eax, [ebp - 0x98]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.user32.dll_FillRect
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x40]
mov eax, dword [eax + 0x18]
call fcn.00518dcc
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.gdi32.dll_SetTextColor
mov eax, dword [ebp + 8]
mov esi, dword [eax + 0x48]
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 0x18]
call fcn.00518dcc
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.gdi32.dll_SetBkColor
mov eax, dword [ebp + 0xc]
cmp word [eax + 0x26], 1
jne 0x51fdec
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x14], 0
je 0x51fdec
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x40]
mov eax, dword [eax + 0x18]
call fcn.00518dcc
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 8]
mov esi, dword [eax + 0x48]
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 0x18]
call fcn.00518dcc
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x34]
push eax
push 2
push 0
mov eax, dword [ebp - 0x1c]
push eax
call sub.gdi32.dll_SetDIBColorTable
jmp 0x51fdec
push 0xff0062
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 4]
push eax
push 0
push 0
mov eax, dword [ebp - 0x1c]
push eax
call sub.gdi32.dll_PatBlt
cmp dword [ebp - 4], 0
je 0x51fee9
mov eax, dword [ebp - 0x18]
push eax
call sub.gdi32.dll_CreateCompatibleDC
call fcn.0051b5e0
mov dword [ebp - 0x20], eax
xor eax, eax
push ebp
push 0x51fee2
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.gdi32.dll_SelectObject
call fcn.0051b5e0
mov esi, eax
cmp dword [ebp - 8], 0
je 0x51fe49
push 0
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.gdi32.dll_SelectPalette
mov ebx, eax
mov eax, dword [ebp - 0x20]
push eax
call sub.gdi32.dll_RealizePalette
cmp dword [ebp + 8], 0
je 0x51fe82
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x40]
mov eax, dword [eax + 0x18]
call fcn.00518dcc
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.gdi32.dll_SetTextColor
mov eax, dword [ebp + 8]
mov edi, dword [eax + 0x48]
mov eax, dword [edi + 0x10]
mov eax, dword [eax + 0x18]
call fcn.00518dcc
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.gdi32.dll_SetBkColor
push 0xcc0020
push 0
push 0
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 4]
push eax
push 0
push 0
mov eax, dword [ebp - 0x1c]
push eax
call sub.gdi32.dll_BitBlt
cmp dword [ebp - 8], 0
je 0x51febc
push 0xffffffffffffffff
push ebx
mov eax, dword [ebp - 0x20]
push eax
call sub.gdi32.dll_SelectPalette
push esi
mov eax, dword [ebp - 0x20]
push eax
call sub.gdi32.dll_SelectObject
call fcn.0051b5e0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51fee9
mov eax, dword [ebp - 0x20]
push eax
call sub.gdi32.dll_DeleteDC
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51ff13
cmp dword [ebp - 0xc], 0
je 0x51ff0b
push 0xffffffffffffffff
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.gdi32.dll_SelectPalette
ret
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8