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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x31c
mov eax, dword [0x485f50]
xor eax, ebp
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x31c], ecx
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x31c]
call fcn.0045f640
mov ecx, dword [ebp - 0x31c]
call fcn.00401000
test eax, eax
je 0x4607cf
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
lea eax, [ebp - 8]
push eax
mov ecx, dword [str.SoftwareMicrosoftWindowsCurrentVersionRunServices]
push ecx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x4607ca
mov edx, dword [ebp - 0x31c]
mov eax, dword [edx + 4]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 4], 1
jmp 0x46099d
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x46095f
push 0xf01ff
mov eax, dword [ebp - 0x31c]
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x46092e
mov eax, dword [ebp - 0x31c]
add eax, 0x20
push eax
push 1
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x4608cf
mov edx, dword [ebp - 0x31c]
mov eax, dword [edx + 8]
push eax
push 0x475f2c
call fcn.0043ea37
add esp, 8
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x31c]
add ecx, 0x20
push ecx
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x460893
mov eax, dword [ebp - 0x31c]
cmp dword [eax + 0x24], 3
jne 0x46088f
push 0x475f3c
call fcn.0043ea37
add esp, 4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x460891
jmp 0x460893
jmp 0x460851
mov ecx, dword [ebp - 0x31c]
cmp dword [ecx + 0x24], 1
jne 0x4608b8
mov edx, dword [ebp - 0x31c]
mov eax, dword [edx + 8]
push eax
push 0x475f40
call fcn.0043ea37
add esp, 8
jmp 0x4608cf
mov ecx, dword [ebp - 0x31c]
mov edx, dword [ecx + 8]
push edx
push 0x475f50
call fcn.0043ea37
add esp, 8
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x4608fd
mov ecx, dword [ebp - 0x31c]
mov edx, dword [ecx + 8]
push edx
push str._s_removed._n
call fcn.0043ea37
add esp, 8
mov dword [ebp - 4], 1
jmp 0x460922
push pe_nt_image_headers32
lea eax, [ebp - 0x118]
push eax
mov ecx, dword [ebp - 0x31c]
call fcn.0045fc00
push eax
push str.DeleteService_failed____s_n
call fcn.0043ea37
add esp, 8
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x460953
push pe_nt_image_headers32
lea edx, [ebp - 0x218]
push edx
mov ecx, dword [ebp - 0x31c]
call fcn.0045fc00
push eax
push 0x475f94
call fcn.0043ea37
add esp, 8
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x460984
push pe_nt_image_headers32
lea ecx, [ebp - 0x318]
push ecx
mov ecx, dword [ebp - 0x31c]
call fcn.0045fc00
push eax
push 0x475fb0
call fcn.0043ea37
add esp, 8
cmp dword [ebp - 4], 0
je 0x46099d
mov edx, dword [ebp - 0x31c]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x31c]
mov edx, dword [eax + 0x34]
call edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.0043c3a4
mov esp, ebp
pop ebp
ret