Function at 0x4168f0
Capabilities:
Delete registry value
Delete service
Persist via run registry key
Query service status
Stop service

Disassembly:
mov eax, dword [0x457c84]
sub esp, 0x24
sub eax, 1
push ebx
push ebp
push esi
push edi
je 0x416af9
sub eax, 1
jne 0x416bc6
lea eax, [esp + 0x10]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
mov ebp, dword [sym.imp.USER32.dll_MessageBoxA]
jne 0x416968
mov ecx, dword [str.WinVNC]
mov edx, dword [esp + 0x10]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
mov ebx, dword [esp + 0x38]
je 0x41695b
test ebx, ebx
jne 0x41695b
mov eax, dword [str.WinVNC]
push 0x30
push eax
push str.WARNING:The_ServiceHelper_hook_entry_could_not_be_removed_from_the_registry
push ebx
call ebp
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x41696c
mov ebx, dword [esp + 0x38]
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
mov dword [esp + 0x14], edi
je 0x416ad6
push 0xf01ff
push str.winvnc
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
je 0x416ab1
lea edx, [esp + 0x18]
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x416a0e
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea eax, [esp + 0x18]
push eax
push esi
call edi
test eax, eax
je 0x4169ee
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, edi
cmp dword [esp + 0x1c], 3
jne 0x4169ea
push 0x3e8
call ebx
lea ecx, [esp + 0x18]
push ecx
push esi
call edi
test eax, eax
jne 0x4169d0
mov ebx, dword [esp + 0x38]
cmp dword [esp + 0x1c], 1
je 0x416a0a
test ebx, ebx
jne 0x416a0a
mov edx, dword [str.WinVNC]
push 0x30
push edx
push str.The_WinVNC_service_could_not_be_stopped
push ebx
call ebp
mov edi, dword [esp + 0x14]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x416a4a
test ebx, ebx
jne 0x416a99
mov eax, dword [str.WinVNC]
push 0x40
push eax
push str.The_WinVNC_service_has_been_unregistered
call fcn.00425600
add esp, 0xc
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x430
jne 0x416a84
test ebx, ebx
jne 0x416a99
mov ecx, dword [str.WinVNC]
push 0x30
push ecx
push str.The_WinVNC_service_is_already_marked_to_be_unregistered
push ebx
call ebp
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
test ebx, ebx
jne 0x416a99
mov edx, dword [str.WinVNC]
push 0x30
push edx
push str.The_WinVNC_service_could_not_be_unregistered
push ebx
call ebp
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
test ebx, ebx
jne 0x416ac5
mov eax, dword [str.WinVNC]
push 0x30
push eax
push str.The_WinVNC_service_could_not_be_found
push ebx
call ebp
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
test ebx, ebx
jne 0x416bc6
mov ecx, dword [str.WinVNC]
push 0x30
push ecx
push str.The_Service_Control_Manager_could_not_be_contacted___the_WinVNC_service_was_not_unregistered
push ebx
call ebp
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
lea edx, [esp + 0x10]
push edx
push str.SoftwareMicrosoftWindowsCurrentVersionRunServices
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x416b81
mov esi, dword [esp + 0x38]
test esi, esi
mov edi, dword [sym.imp.USER32.dll_MessageBoxA]
jne 0x416b31
mov eax, dword [str.WinVNC]
push 0x30
push eax
push str.The_Service_Control_Manager_could_not_be_contacted___the_WinVNC_service_was_not_unregistered
push 0
call edi
call fcn.004161a0
test eax, eax
jne 0x416b5d
test esi, esi
jne 0x416bc6
mov ecx, dword [str.WinVNC]
push 0x30
push ecx
push str.The_WinVNC_service_could_not_be_contacted
push esi
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
test esi, esi
jne 0x416bc6
mov edx, dword [str.WinVNC]
push 0x40
push edx
push str.The_WinVNC_service_has_been_unregistered
call fcn.00425600
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
mov eax, dword [str.WinVNC]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x416bbf
mov edx, dword [esp + 0x10]
push edx
call esi
cmp dword [esp + 0x38], 0
jne 0x416bbf
mov eax, dword [str.WinVNC]
push 0x30
push eax
push str.The_WinVNC_service_could_not_be_unregistered
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [esp + 0x10]
push ecx
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret