Function at 0x40cdb0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x60
push ebx
push ebp
push esi
push edi
mov esi, ecx
call fcn.004227d0
xor ebp, ebp
cmp eax, 4
ja 0x40cddf
call fcn.004227d0
cmp eax, 4
jne 0x40cdf9
call fcn.004227e0
cmp eax, 0xa
jb 0x40cdf9
push 0x50
call dword [sym.imp.USER32.dll_GetSystemMetrics]
xor ecx, ecx
cmp eax, 1
setg cl
mov eax, ecx
cmp eax, ebp
jne 0x40cfff
push 0x9c
mov dword [esp + 0x20], ebp
call fcn.00433248
add esp, 4
cmp eax, ebp
mov dword [esi + 0x4ec], eax
jne 0x40ce30
push str.._vncDesktop.cpp:_tSCR_WBB:_failed_to_allocate_memory_for_alternate_DEVMODE_representation__n
push 9
push 0x44ff14
call fcn.00401e70
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
push eax
push 0xffffffffffffffff
push ebp
call dword [sym.imp.USER32.dll_EnumDisplaySettingsA]
test eax, eax
jne 0x40ce6c
push str.._vncDesktop.cpp:_tSCR_WBB:_could_not_get_current_display_settings__n
push 9
push 0x44ff14
call fcn.00401e70
mov edx, dword [esi + 0x4ec]
push edx
call fcn.00433391
add esp, 0x10
mov dword [esi + 0x4ec], ebp
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x4ec]
mov ecx, dword [eax + 0x78]
mov edx, dword [eax + 0x68]
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 0x44ff14
call fcn.00401e70
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 + 0x10]
push eax
push 0x20019
push ebp
push str.SoftwareORLWinVNC3
push reloc.WSOCK32.dll_bind
mov dword [esi + 0x4f4], edx
mov dword [esp + 0x24], ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edx, dword [esp + 0x10]
cmp edx, ebp
je 0x40cfea
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
xor eax, eax
mov ecx, 0x14
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
push ecx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x1c]
push ecx
push ebp
push str.ResWidth
push edx
mov dword [esp + 0x30], 0x50
call ebx
cmp dword [esp + 0x14], 1
jne 0x40cfd7
lea edx, [esp + 0x20]
push edx
call fcn.004337c7
add esp, 4
test eax, eax
je 0x40cfd7
lea eax, [esp + 0x20]
push eax
call fcn.004337c7
mov ecx, dword [esi + 0x4ec]
mov dword [ecx + 0x6c], eax
add esp, 4
xor eax, eax
mov ecx, 0x14
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x1c]
push ecx
push ebp
push str.ResHeight
push edx
call ebx
lea eax, [esp + 0x20]
push eax
call fcn.004337c7
mov ecx, dword [esi + 0x4ec]
mov dword [ecx + 0x70], eax
mov eax, dword [esp + 0x18]
add esp, 4
cmp eax, 1
jne 0x40cfd7
mov eax, dword [esi + 0x4ec]
mov ecx, dword [eax + 0x70]
cmp ecx, ebp
jbe 0x40cfd7
mov edx, dword [eax + 0x6c]
push ecx
push edx
push str.._vncDesktop.cpp:_tSCR_WBB:_attempting_to_change_resolution_w_d_h_d_n
push 9
push 0x44ff14
call fcn.00401e70
mov eax, dword [esi + 0x4ec]
mov edi, dword [sym.imp.USER32.dll_ChangeDisplaySettingsA]
add esp, 0x14
push 2
push eax
call edi
test eax, eax
jne 0x40cfd7
mov ecx, dword [esi + 0x4ec]
push 1
push ecx
call edi
mov edi, 1
jmp 0x40cfdb
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, ebp
jne 0x40cfff
mov eax, dword [esi + 0x4ec]
push eax
call fcn.00433391
add esp, 4
mov dword [esi + 0x4ec], ebp
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret