Function at 0x409a50
Capabilities:
Capture screenshot

Disassembly:
push ebx
push ebp
push esi
push edi
mov esi, ecx
push 0
call dword [sym.imp.USER32.dll_GetDC]
test eax, eax
mov dword [esi + 0x50], eax
jne 0x409a6f
push str.F:_scratchjnw22_realvnc.com_vncwinwinvncwinvnc_vncdesktop.cpp_:_failed_to_get_display_context_n
jmp 0x409be9
mov ebx, dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 0xa
push eax
call ebx
mov edi, eax
mov eax, dword [esi + 0x50]
push 8
push eax
xor ebp, ebp
call ebx
lea ecx, [esi + 0x70]
mov edx, ecx
xor ecx, ecx
mov dword [edx], ebp
mov dword [edx + 4], ecx
mov dword [edx + 8], eax
mov dword [edx + 0xc], edi
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 0x78]
push eax
push ecx
push str.F:_scratchjnw22_realvnc.com_vncwinwinvncwinvnc_vncdesktop.cpp_:_bitmap_dimensions_are__d_x__d_n
push 9
push 0x43b3b0
call fcn.00402c70
mov edx, dword [esi + 0x50]
add esp, 0x14
push edx
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
test eax, eax
mov dword [esi + 0x4c], eax
jne 0x409ae6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.F:_scratchjnw22_realvnc.com_vncwinwinvncwinvnc_vncdesktop.cpp_:_failed_to_create_compatibleDC__d__n
push ebp
push 0x43b3b0
call fcn.00402c70
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, dword [esi + 0x50]
push 0x26
push eax
call ebx
test al, 1
jne 0x409b0f
mov ecx, dword [str.WinVNC]
push 0x10
push ecx
push str.vncDesktop_:_root_device_doesnt_support_BitBlt_nWinVNC_cannot_be_used_with_this_graphic_device_driver
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov edx, dword [esi + 0x4c]
push 0x26
push edx
call ebx
test al, 0x80
jne 0x409b37
mov eax, dword [str.WinVNC]
push 0x10
push eax
push str.vncDesktop_:_memory_device_doesnt_support_GetDIBits_nWinVNC_cannot_be_used_with_this_graphics_device_driver
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov ecx, dword [esi + 0x7c]
mov edx, dword [esi + 0x78]
mov eax, dword [esi + 0x50]
push ecx
push edx
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
test eax, eax
mov dword [esi + 0x54], eax
jne 0x409b72
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.F:_scratchjnw22_realvnc.com_vncwinwinvncwinvnc_vncdesktop.cpp_:_failed_to_create_memory_bitmap__d__n
push 0
push 0x43b3b0
call fcn.00402c70
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push str.F:_scratchjnw22_realvnc.com_vncwinwinvncwinvnc_vncdesktop.cpp_:_created_memory_bitmap_n
push 9
push 0x43b3b0
call fcn.00402c70
lea ebp, [esi + 0x80]
mov ecx, 0x10c
xor eax, eax
mov edi, ebp
add esp, 0xc
rep stosd dword es:[edi], eax
mov ecx, dword [esi + 0x54]
mov edx, dword [esi + 0x4c]
lea edi, [esi + 0x84]
push eax
push edi
push eax
push 1
push eax
push ecx
push edx
mov dword [edi], 0x28
mov word [esi + 0x92], ax
call dword [sym.imp.GDI32.dll_GetDIBits]
test eax, eax
jne 0x409bc9
push str.F:_scratchjnw22_realvnc.com_vncwinwinvncwinvnc_vncdesktop.cpp_:_unable_to_get_display_format_n
jmp 0x409be9
mov eax, dword [esi + 0x54]
mov ecx, dword [esi + 0x4c]
push 0
push edi
push 0
push 1
push 0
push eax
push ecx
call dword [sym.imp.GDI32.dll_GetDIBits]
test eax, eax
jne 0x409bff
push str.F:_scratchjnw22_realvnc.com_vncwinwinvncwinvnc_vncdesktop.cpp_:_unable_to_get_display_colour_info_n
push 0
push 0x43b3b0
call fcn.00402c70
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push str.F:_scratchjnw22_realvnc.com_vncwinwinvncwinvnc_vncdesktop.cpp_:_got_bitmap_format_n
push 9
push 0x43b3b0
call fcn.00402c70
mov eax, dword [esi + 0x8c]
add esp, 0xc
cdq
xor eax, edx
push 0x26
sub eax, edx
mov edx, dword [esi + 0x4c]
neg eax
push edx
mov dword [esi + 0x8c], eax
call ebx
not eax
shr eax, 8
and eax, 1
pop edi
mov dword [ebp], eax
pop esi
pop ebp
mov eax, 1
pop ebx
ret