Function at 0x40ab80
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x60
push esi
mov esi, ecx
call fcn.0040a790
test eax, eax
jne 0x40ad95
push ebx
push 0x9c
xor ebx, ebx
call fcn.00431802
add esp, 4
cmp eax, ebx
mov dword [esi + 0x4ec], eax
jne 0x40abc7
push str.._vncDesktop.cpp:_tSCR_WBB:_failed_to_allocate_memory_for_alternate_DEVMODE_representation__n
push 9
push 0x457788
call fcn.00401860
add esp, 0xc
pop ebx
pop esi
add esp, 0x60
ret
push eax
push 0xffffffffffffffff
push ebx
call dword [sym.imp.USER32.dll_EnumDisplaySettingsA]
test eax, eax
jne 0x40ac01
push str.._vncDesktop.cpp:_tSCR_WBB:_could_not_get_current_display_settings__n
push 9
push 0x457788
call fcn.00401860
mov eax, dword [esi + 0x4ec]
push eax
call fcn.004317e4
add esp, 0x10
mov dword [esi + 0x4ec], ebx
pop ebx
pop esi
add esp, 0x60
ret
mov eax, dword [esi + 0x4ec]
mov ecx, dword [eax + 0x78]
mov edx, dword [eax + 0x68]
push edi
push ecx
mov ecx, dword [eax + 0x70]
push edx
mov edx, dword [eax + 0x6c]
push ecx
push edx
push str.._vncDesktop.cpp:_tSCR_WBB:_current_display:_w_d_h_d_bpp_d_vRfrsh_d._n
push 9
push 0x457788
call fcn.00401860
mov eax, dword [esi + 0x4ec]
mov ecx, dword [eax + 0x6c]
add esp, 0x1c
mov dword [esi + 0x4f0], ecx
mov edx, dword [eax + 0x70]
lea eax, [esp + 0xc]
push eax
push 0x20019
push ebx
push str.SoftwareORLWinVNC3
push reloc.WSOCK32.dll_bind
mov dword [esi + 0x4f4], edx
mov dword [esp + 0x20], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edi, dword [esp + 0xc]
cmp edi, ebx
je 0x40ad7e
push ebp
push 0x50
lea ecx, [esp + 0x24]
push ebx
push ecx
mov dword [esp + 0x24], 0x50
call fcn.004326b0
add esp, 0xc
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x1c]
push ecx
push ebx
push str.ResWidth
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
call edi
mov ebp, 1
cmp dword [esp + 0x14], ebp
jne 0x40ad6c
lea edx, [esp + 0x20]
push edx
call fcn.0043211e
add esp, 4
test eax, eax
je 0x40ad6c
lea eax, [esp + 0x20]
push eax
call fcn.0043211e
mov ecx, dword [esi + 0x4ec]
push 0x50
lea edx, [esp + 0x28]
push ebx
push edx
mov dword [ecx + 0x6c], eax
call fcn.004326b0
add esp, 0x10
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x1c]
push edx
push ebx
push str.ResHeight
push eax
call edi
lea ecx, [esp + 0x20]
push ecx
call fcn.0043211e
mov edx, dword [esi + 0x4ec]
add esp, 4
mov dword [edx + 0x70], eax
cmp dword [esp + 0x14], ebp
jne 0x40ad6c
mov eax, dword [esi + 0x4ec]
mov ecx, dword [eax + 0x70]
cmp ecx, ebx
jbe 0x40ad6c
mov eax, dword [eax + 0x6c]
push ecx
push eax
push str.._vncDesktop.cpp:_tSCR_WBB:_attempting_to_change_resolution_w_d_h_d_n
push 9
push 0x457788
call fcn.00401860
mov ecx, dword [esi + 0x4ec]
mov edi, dword [sym.imp.USER32.dll_ChangeDisplaySettingsA]
add esp, 0x14
push 2
push ecx
call edi
test eax, eax
jne 0x40ad6c
mov edx, dword [esi + 0x4ec]
push ebp
push edx
call edi
jmp 0x40ad6e
mov ebp, ebx
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp ebp, ebx
pop ebp
jne 0x40ad93
mov ecx, dword [esi + 0x4ec]
push ecx
call fcn.004317e4
add esp, 4
mov dword [esi + 0x4ec], ebx
pop edi
pop ebx
pop esi
add esp, 0x60
ret