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

Disassembly:
mov eax, dword [0x41ebbc]
sub esp, 0x24
dec eax
push ebx
push ebp
push esi
je 0x4124d3
dec eax
jne 0x412586
lea eax, [esp + 0xc]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov ebp, dword [sym.imp.USER32.dll_MessageBoxA]
test eax, eax
jne 0x41239a
mov ecx, dword [0x41dbc0]
mov edx, dword [esp + 0xc]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
je 0x41238f
mov eax, dword [0x41dbc0]
push 0x30
push eax
push str.WARNING:The_ServiceHelper_hook_entry_could_not_be_removed_from_the_registry
push 0
call ebp
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x10], ebx
je 0x4124b9
push 0xf01ff
push str.winvnc
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
je 0x412497
lea edx, [esp + 0x14]
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x412437
lea eax, [esp + 0x14]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
push eax
push esi
call edi
test eax, eax
je 0x41241b
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [esp + 0x1c], 3
jne 0x412417
push 0x3e8
call ebx
lea ecx, [esp + 0x18]
push ecx
push esi
call edi
test eax, eax
jne 0x4123fd
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
pop edi
cmp eax, 1
je 0x412437
mov edx, dword [0x41dbc0]
push 0x30
push edx
push str.The_WinVNC_service_could_not_be_stopped
push 0
call ebp
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x41246e
mov eax, dword [0x41dbc0]
push 0x40
push eax
push str.The_WinVNC_service_has_been_removed
call fcn.00412960
add esp, 0xc
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
mov ecx, dword [0x41dbc0]
push 0x30
push ecx
push str.The_WinVNC_service_could_not_be_removed
push 0
call ebp
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
mov edx, dword [0x41dbc0]
push 0x30
push edx
push str.The_WinVNC_service_could_not_be_found
push 0
call ebp
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
mov eax, dword [0x41dbc0]
push 0x30
push eax
push str.The_SCM_could_not_be_contacted___the_WinVNC_service_was_not_removed
push 0
call ebp
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
lea ecx, [esp + 0xc]
push ecx
push str.SoftwareMicrosoftWindowsCurrentVersionRunServices
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x412546
mov edx, dword [0x41dbc0]
mov esi, dword [sym.imp.USER32.dll_MessageBoxA]
push 0x30
push edx
push str.The_SCM_could_not_be_contacted___the_WinVNC_service_was_not_removed
push 0
call esi
call fcn.00411c60
test eax, eax
jne 0x412527
mov eax, dword [0x41dbc0]
push 0x30
push eax
push str.The_WinVNC_service_could_not_be_contacted
push 0
call esi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
mov ecx, dword [0x41dbc0]
push 0x40
push ecx
push str.The_WinVNC_service_has_been_removed
call fcn.00412960
add esp, 0xc
xor eax, eax
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov edx, dword [0x41dbc0]
mov eax, dword [esp + 0xc]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x41257f
mov ecx, dword [esp + 0xc]
push ecx
call esi
mov edx, dword [0x41dbc0]
push 0x30
push edx
push str.The_WinVNC_service_could_not_be_removed
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0xc]
push eax
call esi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret