Function at 0x412450
Capabilities:
Create process on windows
Create service
Persist via run registry key
Persist via windows service
Set registry value

Disassembly:
mov eax, 0x1858
call fcn.00413d10
push ebx
push ebp
push esi
push edi
mov edi, 0x415fc0
or ecx, 0xffffffff
xor eax, eax
xor ebp, ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, 0x7fe
sub eax, ecx
lea ecx, [esp + 0x68]
push eax
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4124a9
mov edx, dword [0x41ea78]
push 0x30
push edx
push str.Unable_to_install_WinVNC_service
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1858
ret
mov edi, 0x415fc0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x68]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [edx + ecx + 4]
cmp eax, 0x800
jae 0x41279f
mov ebx, dword [sym.imp.MSVCRT.dll_sprintf]
lea ecx, [esp + 0x68]
push 0x415fc0
push ecx
lea edx, [esp + 0x870]
push str.__s___s
push edx
call ebx
mov eax, dword [0x41faf0]
add esp, 0x10
dec eax
je 0x412691
dec eax
jne 0x41279f
push 0xf003f
push ebp
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
cmp esi, ebp
jne 0x41253e
mov eax, dword [0x41ea78]
push 0x30
push eax
push str.The_SCM_could_not_be_contacted___the_WinVNC_service_was_not_installed
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1858
ret
push ebp
push ebp
push 0x41f6b8
push ebp
lea ecx, [esp + 0x878]
push ebp
push ecx
push 1
push 2
push 0x110
push 0xf01ff
push str.VNC_Server
push str.winvnc
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
call esi
cmp edi, ebp
jne 0x41259f
mov edx, dword [0x41ea78]
push 0x30
push edx
push str.The_WinVNC_service_could_not_be_installed
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1858
ret
push edi
call esi
lea eax, [esp + 0x10]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x4125d5
mov ecx, dword [0x41ea78]
push 0x30
push ecx
push str.WARNING:Unable_to_install_the_ServiceHelper_hook_nGlobal_user_specific_registry_settings_will_not_be_loaded
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x41266e
mov edi, 0x415fcc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x68]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [edx + ecx + 4]
cmp eax, 0x800
jae 0x41279f
lea ecx, [esp + 0x68]
push 0x415fcc
push ecx
lea edx, [esp + 0x1070]
push str.__s___s
push edx
call ebx
lea edi, [esp + 0x1078]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x1068]
not ecx
push ecx
mov ecx, dword [0x41ea78]
push eax
push 1
push ebp
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x412663
mov eax, dword [0x41ea78]
push 0x30
push eax
push str.WARNING:Unable_to_install_the_ServiceHelper_hook_nGlobal_user_specific_registry_settings_will_not_be_loaded
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [0x41ea78]
push 0x40
push edx
push str.The_WinVNC_service_was_successfully_installed_nThe_service_may_be_started_from_the_Control_Panel__and_will_nautomatically_be_run_the_next_time_this_machine_is_reset
call fcn.00412df0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1858
ret
lea eax, [esp + 0x10]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionRunServices
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x4126cc
mov ecx, dword [0x41ea78]
push 0x30
push ecx
push str.The_SCM_could_not_be_contacted___the_WinVNC_service_was_not_installed
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1858
ret
lea edi, [esp + 0x868]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x868]
repne scasb al, byte es:[edi]
mov eax, dword [0x41ea78]
not ecx
push ecx
mov ecx, dword [esp + 0x14]
push edx
push 1
push ebp
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x412729
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x41ea78]
push 0x30
push eax
push str.The_WinVNC_service_could_not_be_installed
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1858
ret
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [0x41ea78]
push 0x40
push edx
push str.The_WinVNC_service_was_successfully_installed_nThe_service_will_start_now_and_will_automatically_nbe_run_the_next_time_this_machine_is_reset
call fcn.00412df0
add esp, 0xc
lea eax, [esp + 0x58]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x868]
push eax
push ecx
push ebp
push ebp
push 0x20
push ebp
push ebp
push ebp
push edx
push ebp
mov dword [esp + 0x3c], 0x44
mov word [esp + 0x6e], bp
mov dword [esp + 0x40], ebp
mov dword [esp + 0x70], ebp
mov dword [esp + 0x68], ebp
mov dword [esp + 0x48], ebp
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x41279f
mov eax, dword [0x41ea78]
push 0x10
push eax
push str.The_WinVNC_service_failed_to_start
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1858
ret