Function at 0x408bc0
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x364
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push str.C:c_sourceforgeultravncwinvncwinvnc_videodriver.cpp_:_DesActivate_video_driver____n
push ebx
push 0x4721bc
mov dword [esp + 0x2c], ecx
mov dword [ecx + 0x24], 1
call fcn.004070e0
mov ecx, 0x27
xor eax, eax
lea edi, [esp + 0x38]
add esp, 0xc
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
mov word [esp + 0x50], 0x9c
push eax
push 0xffffffffffffffff
push ebx
mov word [esp + 0x5e], bx
call dword [sym.imp.USER32.dll_EnumDisplaySettingsA]
push str.USER32
mov dword [esp + 0x58], 0x1c0000
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push str.EnumDisplayDevicesA
push esi
mov dword [esp + 0x2c], esi
call edi
push str.ChangeDisplaySettingsExA
push esi
mov ebp, eax
call edi
cmp eax, ebx
mov dword [esp + 0x1c], eax
je 0x408e1d
cmp ebp, ebx
je 0x408e1d
mov ecx, 0x6a
xor eax, eax
lea edi, [esp + 0xc8]
push ebx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xcc]
mov dword [esp + 0xcc], 0x1a8
push ecx
push ebx
push ebx
mov byte [esp + 0x3c], al
call ebp
cmp eax, ebx
je 0x408e1d
mov edi, str.Winvnc_video_hook_driver
lea esi, [esp + 0xec]
mov ecx, 0x19
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x408cbe
lea eax, [esp + 0xc8]
inc ebx
push edx
push eax
push ebx
push edx
call ebp
test eax, eax
jne 0x408c8a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x364
ret
xor edi, edi
cmp eax, edi
je 0x408e1d
xor eax, eax
mov cl, byte [eax + str.DEVICE0]
mov byte [esp + eax + 0x270], cl
inc eax
test cl, cl
jne 0x408cca
mov esi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
lea ecx, [esp + 0x14]
push ecx
push str.SYSTEMCurrentControlSetHardware_ProfilesCurrentSystemCurrentControlSetServices_vncdrv
push reloc.WSOCK32.dll_bind
mov dword [esp + 0x20], edi
call esi
test eax, eax
jne 0x408e1d
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x10]
lea eax, [esp + 0x270]
push edx
push eax
push ecx
mov dword [esp + 0x1c], edi
call esi
test eax, eax
jne 0x408e1d
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x28]
push 4
push edx
push 4
push edi
push str.Attach.ToDesktop
push eax
mov dword [esp + 0x40], edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x408e1d
mov cl, byte [eax + str.vncdrv]
mov byte [esp + eax + 0x2c], cl
inc eax
test cl, cl
jne 0x408d45
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_GetThreadDesktop]
mov ebx, eax
cmp ebx, edi
je 0x408d83
push 0x2000000
push edi
push edi
call dword [sym.imp.USER32.dll_OpenInputDesktop]
mov esi, eax
cmp esi, edi
je 0x408d87
push esi
call dword [sym.imp.USER32.dll_SetThreadDesktop]
jmp 0x408d87
mov esi, dword [esp + 0x18]
mov ebp, dword [esp + 0x20]
mov al, byte [ebp + 0x10]
mov dword [ebp + 0xc], 1
test al, al
jne 0x408dc7
push edi
push 1
lea ecx, [esp + 0x34]
push edi
mov edi, dword [esp + 0x28]
lea edx, [esp + 0xd8]
push ecx
push edx
call edi
push 0
push 0
lea eax, [esp + 0x34]
push 0
lea ecx, [esp + 0xd8]
push eax
push ecx
call edi
xor edi, edi
mov eax, dword [esp + 0x24]
mov dword [ebp + 0xc], edi
cmp eax, edi
je 0x408dd9
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebx
call dword [sym.imp.USER32.dll_SetThreadDesktop]
push esi
call dword [sym.imp.USER32.dll_CloseDesktop]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
push 4
push edx
push 4
push edi
push str.Attach.ToDesktop
push eax
mov dword [esp + 0x30], edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x408e1d
mov ecx, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call esi
mov edx, dword [esp + 0x10]
push edx
call esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x364
ret