Function at 0x40e866
Capabilities:
Capture screenshot
Enumerate gui resources

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov ebx, ecx
xor edi, edi
mov dword [ebx + 0x74], edi
call fcn.00419b43
mov ecx, dword [ebx + 0xe8]
mov eax, dword [ecx]
call dword [eax + 0x68]
test eax, eax
je 0x40e89b
cmp dword [ebx + 0x64], edi
jne 0x40e89b
push ebx
push 0x40e7f2
call dword [sym.imp.USER32.dll_EnumWindows]
cmp dword [ebx + 0x104], edi
jne 0x40e9be
push str.C:DATASCZ_SCwinvncwinvnc_vncdesktop.cpp_:_No_driver_used__n
push edi
push 0x4378c8
call fcn.004053a7
add esp, 0xc
mov ecx, ebx
call fcn.004197f6
lea ecx, [ebx + 4]
call fcn.00407cc9
push 2
xor ecx, ecx
pop edx
inc ecx
cmp eax, edx
mov dword [ebx + 0x6fc], eax
mov dword [ebx + 0x6f8], ecx
jne 0x40e8ed
cmp dword [ebx + 0x6f4], ecx
jle 0x40e902
mov dword [ebx + 0x6f8], edx
push 3
pop edx
cmp eax, edx
jne 0x40e902
cmp dword [ebx + 0x6f4], ecx
jle 0x40e902
mov dword [ebx + 0x6f8], edx
cmp dword [ebx + 0x6f8], 3
jne 0x40e911
mov dword [ebx + 0x6f8], ecx
cmp dword [ebx + 0x6f8], ecx
mov esi, dword [sym.imp.GDI32.dll_CreateDCA]
mov edi, str.DISPLAY
jne 0x40e94a
push 0
lea eax, [ebx + 0x664]
push 0
push eax
push edi
call esi
mov dword [ebx + 0x104], eax
mov eax, dword [ebx + 0x684]
mov dword [ebx + 0x6c], eax
mov eax, dword [ebx + 0x688]
mov dword [ebx + 0x70], eax
cmp dword [ebx + 0x6f8], 2
jne 0x40e979
push 0
lea eax, [ebx + 0x698]
push 0
push eax
push edi
call esi
mov dword [ebx + 0x104], eax
mov eax, dword [ebx + 0x6b8]
mov dword [ebx + 0x6c], eax
mov eax, dword [ebx + 0x6bc]
mov dword [ebx + 0x70], eax
cmp dword [ebx + 0x6f8], 3
jne 0x40e9a2
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebx + 0x104], eax
mov eax, dword [ebx + 0x6ec]
mov dword [ebx + 0x6c], eax
mov eax, dword [ebx + 0x6f0]
mov dword [ebx + 0x70], eax
cmp dword [ebx + 0x104], 0
jne 0x40e9bc
push str.C:DATASCZ_SCwinvncwinvnc_vncdesktop.cpp_:_Failed_m_rootdc__n
push 0
push 0x4378c8
jmp 0x40ebed
xor edi, edi
cmp dword [ebx + 0x6f8], 3
jne 0x40e9f9
mov ecx, ebx
call fcn.00410207
test eax, eax
jne 0x40e9f9
mov eax, dword [ebx + 0x6c0]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], eax
mov eax, dword [ebx + 0x6c4]
mov dword [ebp - 0x10], edi
lea edi, [ebx + 0x124]
lea esi, [ebp - 0x14]
mov dword [ebp - 8], eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor edi, edi
cmp dword [ebx + 0x6f8], 2
jne 0x40ea34
mov ecx, ebx
call fcn.00410207
test eax, eax
jne 0x40ea34
mov eax, dword [ebx + 0x68c]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], eax
mov eax, dword [ebx + 0x690]
mov dword [ebp - 0x10], edi
lea edi, [ebx + 0x124]
lea esi, [ebp - 0x14]
mov dword [ebp - 8], eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor edi, edi
cmp dword [ebx + 0x6f8], 1
jne 0x40ea5f
mov ecx, ebx
call fcn.00410207
test eax, eax
jne 0x40ea5f
mov eax, dword [ebx + 0x658]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], eax
mov eax, dword [ebx + 0x65c]
mov dword [ebp - 0x10], edi
jmp 0x40ea88
mov esi, dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 0xa
push dword [ebx + 0x104]
call esi
push 8
mov dword [ebp - 4], eax
push dword [ebx + 0x104]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
call esi
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
lea esi, [ebp - 0x14]
lea edi, [ebx + 0x124]
mov dword [ebp - 8], eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push dword [ebx + 0x130]
mov esi, 0x4378c8
push dword [ebx + 0x12c]
push str.C:DATASCZ_SCwinvncwinvnc_vncdesktop.cpp_:_bitmap_dimensions_are__d_x__d_n
push 9
push esi
call fcn.004053a7
add esp, 0x14
push dword [ebx + 0x104]
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
test eax, eax
mov dword [ebx + 0x100], eax
jne 0x40eaeb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.C:DATASCZ_SCwinvncwinvnc_vncdesktop.cpp_:_failed_to_create_compatibleDC__d__n
push 0
push esi
call fcn.004053a7
add esp, 0x10
jmp 0x40ebf5
mov edi, dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 0x26
push dword [ebx + 0x104]
call edi
test al, 1
jne 0x40eb19
push 0x10
push dword [0x4370b0]
push 0x432cb0
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x40ebf5
push 0x26
push dword [ebx + 0x100]
call edi
test al, al
js 0x40eb36
push 0x10
push dword [0x4370b0]
push 0x432c40
jmp 0x40eb0c
push dword [ebx + 0x130]
push dword [ebx + 0x12c]
push dword [ebx + 0x104]
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
test eax, eax
mov dword [ebx + 0x108], eax
jne 0x40eb69
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.C:DATASCZ_SCwinvncwinvnc_vncdesktop.cpp_:_failed_to_create_memory_bitmap__d__n
jmp 0x40eadb
push str.C:DATASCZ_SCwinvncwinvnc_vncdesktop.cpp_:_created_memory_bitmap_n
push 9
push esi
call fcn.004053a7
lea eax, [ebx + 0x134]
push 0x430
push 0
push eax
mov dword [ebp - 4], eax
call sub.MSVCRT.dll_memset
add esp, 0x18
xor eax, eax
lea edi, [ebx + 0x138]
mov word [ebx + 0x146], ax
push eax
push edi
push eax
push 1
push eax
mov dword [edi], 0x28
push dword [ebx + 0x108]
push dword [ebx + 0x100]
call dword [sym.imp.GDI32.dll_GetDIBits]
test eax, eax
jne 0x40ebc7
push str.C:DATASCZ_SCwinvncwinvnc_vncdesktop.cpp_:_unable_to_get_display_format_n
jmp 0x40ebea
xor eax, eax
push eax
push edi
push eax
push 1
push eax
push dword [ebx + 0x108]
push dword [ebx + 0x100]
call dword [sym.imp.GDI32.dll_GetDIBits]
test eax, eax
jne 0x40ebf9
push str.C:DATASCZ_SCwinvncwinvnc_vncdesktop.cpp_:_unable_to_get_display_colour_info_n
push 0
push esi
call fcn.004053a7
add esp, 0xc
xor eax, eax
jmp 0x40ec38
push str.C:DATASCZ_SCwinvncwinvnc_vncdesktop.cpp_:_got_bitmap_format_n
push 9
push esi
call fcn.004053a7
lea esi, [ebx + 0x140]
push dword [esi]
call sub.MSVCRT.dll_abs
add esp, 0x10
neg eax
push 0x26
mov dword [esi], eax
push dword [ebx + 0x100]
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ecx, dword [ebp - 4]
not eax
shr eax, 8
and eax, 1
mov dword [ecx], eax
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret