Function at 0x180059a4c
Capabilities:
Delete service
Enumerate services
Start service
Stop service

Disassembly:
push rbp
sub rsp, 0x290
lea rbp, [rsp + 0x40]
mov qword [rsp], rax
mov rax, 0x28c
mov dword [rsp + rax], 0xcccccccc
sub rax, 4
cmp rax, 4
jg 0x180059a64
mov rax, qword [rsp]
mov dword [rsp], 0xcccccccc
mov dword [rsp + 4], 0xcccccccc
mov qword [rbp + 0x210], rsi
mov qword [rbp + 0x208], rbx
mov qword [rbp + 0x260], rcx
mov qword [rbp + 0x268], rdx
mov rax, qword [0x1800f4ae8]
xor rax, rbp
mov qword [rbp + 0x248], rax
mov qword [rbp + 0x98], 0
mov dword [rbp + 0x20], 0
mov rax, qword [rbp + 0x268]
mov eax, dword [rax + 8]
mov dword [rbp + 0x24], eax
mov eax, dword [rbp + 0x24]
cmp eax, 4
je 0x180059b05
mov eax, dword [rbp + 0x24]
cmp eax, 8
je 0x18005a013
mov eax, dword [rbp + 0x24]
cmp eax, 0xc
je 0x18005a1ca
mov eax, dword [rbp + 0x24]
cmp eax, 0x10
je 0x18005a386
jmp 0x18005a529
mov eax, 0
mov edx, 0
mov ecx, 0x80000000
mov rbx, qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [rbp + 0x180], ecx
mov rcx, rax
mov eax, dword [rbp + 0x180]
mov r8d, eax
call rbx
mov qword [rbp + 0xa0], rax
mov rax, qword [rbp + 0xa0]
mov qword [rbp + 0xa8], rax
mov rax, qword [rbp + 0xa8]
test rax, rax
je 0x180059fa3
mov qword [rbp + 0xb8], 0
mov dword [rbp + 8], 0
mov dword [rbp + 0x14], 0
mov rax, qword [rbp + 0xa8]
mov edx, gethostbyname
mov ecx, 3
mov ebx, 0
mov dword [rsp + 0x20], 0
lea rsi, [rbp + 8]
mov qword [rsp + 0x28], rsi
lea rsi, [rbp + 0x14]
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x38], 0
mov rsi, qword [sym.imp.ADVAPI32.dll_EnumServicesStatusA]
mov dword [rbp + 0x188], ecx
mov rcx, rax
mov eax, dword [rbp + 0x188]
mov r8d, eax
mov r9, rbx
call rsi
mov dword [rbp + 0x28], eax
mov eax, dword [rbp + 0x28]
test eax, eax
jne 0x180059f79
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp + 0x30], eax
mov eax, dword [rbp + 0x30]
cmp eax, 0xea
jne 0x180059f79
mov eax, dword [rbp + 8]
mov ecx, eax
call fcn.1800106cc
mov qword [rbp + 0x118], rax
mov rax, qword [rbp + 0x118]
mov qword [rbp + 0xb8], rax
mov rax, qword [rbp + 0xb8]
test rax, rax
je 0x180059f70
mov rax, qword [rbp + 0xa8]
mov edx, gethostbyname
mov ecx, 3
mov rbx, qword [rbp + 0xb8]
mov esi, dword [rbp + 8]
mov dword [rsp + 0x20], esi
lea rsi, [rbp + 8]
mov qword [rsp + 0x28], rsi
lea rsi, [rbp + 0x14]
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x38], 0
mov rsi, qword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
mov dword [rbp + 0x190], ecx
mov rcx, rax
mov eax, dword [rbp + 0x190]
mov r8d, eax
mov r9, rbx
call rsi
mov dword [rbp + 0x6c], eax
mov eax, dword [rbp + 0x6c]
test eax, eax
je 0x180059f27
mov eax, dword [rbp + 0x14]
imul rax, rax, 0x21c
add rax, 0x60c
mov ecx, eax
call fcn.1800106cc
mov qword [rbp + 0x140], rax
mov rax, qword [rbp + 0x140]
mov qword [rbp + 0x98], rax
mov rax, qword [rbp + 0x98]
test rax, rax
je 0x180059f1e
mov eax, dword [rbp + 0x14]
imul rax, rax, 0x21c
add rax, 0x60c
mov rdx, qword [rbp + 0x98]
mov dword [rdx], eax
mov rax, qword [rbp + 0x98]
mov dword [rax + 4], reloc.WS2_32.dll_inet_ntoa
mov rax, qword [rbp + 0x98]
mov dword [rax + 8], 4
mov rax, qword [rbp + 0x98]
mov edx, dword [rbp + 0x14]
mov dword [rax + 0xc], edx
mov dword [rbp + 0x94], 0
mov eax, dword [rbp + 0x94]
mov edx, dword [rbp + 0x14]
cmp eax, edx
jae 0x180059f15
mov eax, dword [rbp + 0x94]
movsxd rax, eax
imul rax, rax, 0x21c
add rax, qword [rbp + 0x98]
add rax, 0x10
mov edx, dword [rbp + 0x94]
movsxd rdx, edx
imul rdx, rdx, 0x30
add rdx, qword [rbp + 0xb8]
mov rdx, qword [rdx]
mov ecx, 0x80
mov qword [rbp + 0x198], rcx
mov rcx, rax
mov rax, qword [rbp + 0x198]
mov r8, rax
call fcn.180063c00
mov qword [rbp + 0x148], rax
mov eax, dword [rbp + 0x94]
movsxd rax, eax
imul rax, rax, 0x21c
add rax, qword [rbp + 0x98]
add rax, 0x10
add rax, 0xfe
mov word [rax], 0
mov eax, dword [rbp + 0x94]
movsxd rax, eax
imul rax, rax, 0x21c
add rax, qword [rbp + 0x98]
add rax, 0x110
mov edx, dword [rbp + 0x94]
movsxd rdx, edx
imul rdx, rdx, 0x30
add rdx, qword [rbp + 0xb8]
mov rdx, qword [rdx + 8]
mov ecx, 0x80
mov qword [rbp + 0x1a0], rcx
mov rcx, rax
mov rax, qword [rbp + 0x1a0]
mov r8, rax
call fcn.180063c00
mov qword [rbp + 0x150], rax
mov eax, dword [rbp + 0x94]
movsxd rax, eax
imul rax, rax, 0x21c
add rax, qword [rbp + 0x98]
add rax, 0x110
add rax, 0xfe
mov word [rax], 0
mov eax, dword [rbp + 0x94]
movsxd rax, eax
imul rax, rax, 0x21c
add rax, qword [rbp + 0x98]
add rax, 0x210
mov qword [rbp + 0x158], rax
mov eax, dword [rbp + 0x94]
movsxd rax, eax
imul rax, rax, 0x30
add rax, qword [rbp + 0xb8]
mov qword [rbp + 0x160], rax
mov rax, qword [rbp + 0x158]
mov qword [rbp + 0x168], rax
mov rax, qword [rbp + 0x160]
mov qword [rbp + 0x170], rax
mov rax, qword [rbp + 0x170]
mov rdx, qword [rbp + 0x168]
mov eax, dword [rax + 0x10]
mov dword [rdx], eax
mov rax, qword [rbp + 0x170]
mov rdx, qword [rbp + 0x168]
mov eax, dword [rax + 0x14]
mov dword [rdx + 4], eax
mov rax, qword [rbp + 0x170]
mov rdx, qword [rbp + 0x168]
mov eax, dword [rax + 0x18]
mov dword [rdx + 8], eax
mov rax, qword [rbp + 0x170]
mov rdx, qword [rbp + 0x168]
mov eax, dword [rax + 0x1c]
mov dword [rdx + 0xc], eax
mov rax, qword [rbp + 0x170]
mov rdx, qword [rbp + 0x168]
mov eax, dword [rax + 0x20]
mov dword [rdx + 0x10], eax
mov rax, qword [rbp + 0x170]
mov rdx, qword [rbp + 0x168]
mov eax, dword [rax + 0x24]
mov dword [rdx + 0x14], eax
mov rax, qword [rbp + 0x170]
mov rdx, qword [rbp + 0x168]
mov eax, dword [rax + 0x28]
mov dword [rdx + 0x18], eax
mov eax, 1
add eax, dword [rbp + 0x94]
mov dword [rbp + 0x94], eax
jmp 0x180059d09
mov dword [rbp + 0x20], 0
jmp 0x180059f3f
mov dword [rbp + 0x20], 8
jmp 0x180059f3f
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp + 0x8c], eax
mov eax, dword [rbp + 0x8c]
mov dword [rbp + 0x20], eax
mov rax, qword [rbp + 0xb8]
test rax, rax
jne 0x180059f54
mov rax, qword [sym.imp.KERNEL32.dll_DebugBreak]
call rax
mov rax, qword [rbp + 0xb8]
mov rcx, rax
call fcn.1800622b0
mov qword [rbp + 0xb8], 0
jmp 0x180059f8b
mov dword [rbp + 0x20], 8
jmp 0x180059f8b
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp + 0x34], eax
mov eax, dword [rbp + 0x34]
mov dword [rbp + 0x20], eax
mov rax, qword [rbp + 0xa8]
mov rdx, qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rax
call rdx
mov dword [rbp + 0x48], eax
jmp 0x180059faa
mov dword [rbp + 0x20], 8
mov rax, qword [rbp + 0x98]
test rax, rax
jne 0x18005a529
mov rax, qword [rbp + 0x260]
mov edx, 0
mov rcx, qword [rbp + 0x268]
mov ecx, dword [rcx + 4]
mov ebx, dword [rbp + 0x20]
mov rsi, qword [rbp + 0x268]
mov qword [rsp + 0x20], rsi
mov dword [rbp + 0x1a8], ecx
mov rcx, rax
mov eax, dword [rbp + 0x1a8]
mov r8d, eax
mov r9d, ebx
call fcn.180058fe6
mov qword [rbp + 0xe8], rax
mov rax, qword [rbp + 0xe8]
mov qword [rbp + 0x98], rax
jmp 0x18005a529
mov eax, 0
mov edx, 0
mov ecx, 0x20000000
mov rbx, qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [rbp + 0x1b0], ecx
mov rcx, rax
mov eax, dword [rbp + 0x1b0]
mov r8d, eax
call rbx
mov qword [rbp + 0xb0], rax
mov rax, qword [rbp + 0xb0]
mov qword [rbp + 0xc0], rax
mov rax, qword [rbp + 0xc0]
test rax, rax
je 0x18005a14a
mov rax, qword [rbp + 0xc0]
mov rdx, qword [rbp + 0x268]
lea rdx, [rdx + 0xc]
mov ecx, reloc.WS2_32.dll_recv
mov rbx, qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [rbp + 0x1b8], ecx
mov rcx, rax
mov eax, dword [rbp + 0x1b8]
mov r8d, eax
call rbx
mov qword [rbp + 0xd0], rax
mov rax, qword [rbp + 0xd0]
mov qword [rbp + 0xf0], rax
mov rax, qword [rbp + 0xf0]
test rax, rax
je 0x18005a120
mov rax, qword [rbp + 0xf0]
mov edx, 0
mov ecx, 0
mov rbx, qword [sym.imp.ADVAPI32.dll_StartServiceW]
mov qword [rbp + 0x1c0], rcx
mov rcx, rax
mov rax, qword [rbp + 0x1c0]
mov r8, rax
call rbx
mov dword [rbp + 0x3c], eax
mov eax, dword [rbp + 0x3c]
test eax, eax
je 0x18005a0f6
mov dword [rbp + 0x20], 0
jmp 0x18005a108
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp + 0x58], eax
mov eax, dword [rbp + 0x58]
mov dword [rbp + 0x20], eax
mov rax, qword [rbp + 0xf0]
mov rdx, qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rax
call rdx
mov dword [rbp + 0x70], eax
jmp 0x18005a132
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp + 0x40], eax
mov eax, dword [rbp + 0x40]
mov dword [rbp + 0x20], eax
mov rax, qword [rbp + 0xc0]
mov rdx, qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rax
call rdx
mov dword [rbp + 0x5c], eax
jmp 0x18005a15c
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp + 0x2c], eax
mov eax, dword [rbp + 0x2c]
mov dword [rbp + 0x20], eax
mov eax, dword [rbp + 0x20]
test eax, eax
jne 0x18005a16c
mov dword [rbp + 0x4c], 1
jmp 0x18005a173
mov dword [rbp + 0x4c], 0
mov rax, qword [rbp + 0x260]
mov edx, dword [rbp + 0x4c]
mov rcx, qword [rbp + 0x268]
mov ecx, dword [rcx + 4]
mov ebx, dword [rbp + 0x20]
mov rsi, qword [rbp + 0x268]
mov qword [rsp + 0x20], rsi
mov dword [rbp + 0x1c8], ecx
mov rcx, rax
mov eax, dword [rbp + 0x1c8]
mov r8d, eax
mov r9d, ebx
call fcn.180058fe6
mov qword [rbp + 0x128], rax
mov rax, qword [rbp + 0x128]
mov qword [rbp + 0x98], rax
jmp 0x18005a529
mov eax, 0
mov edx, 0
mov ecx, 0x20000000
mov rbx, qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [rbp + 0x1d0], ecx
mov rcx, rax
mov eax, dword [rbp + 0x1d0]
mov r8d, eax
call rbx
mov qword [rbp + 0xc8], rax
mov rax, qword [rbp + 0xc8]
mov qword [rbp + 0xd8], rax
mov rax, qword [rbp + 0xd8]
test rax, rax
je 0x18005a306
mov rax, qword [rbp + 0xd8]
mov rdx, qword [rbp + 0x268]
lea rdx, [rdx + 0xc]
mov ecx, 0x20
mov rbx, qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [rbp + 0x1d8], ecx
mov rcx, rax
mov eax, dword [rbp + 0x1d8]
mov r8d, eax
call rbx
mov qword [rbp + 0xf8], rax
mov rax, qword [rbp + 0xf8]
mov qword [rbp + 0x108], rax
mov rax, qword [rbp + 0x108]
test rax, rax
je 0x18005a2dc
mov rax, qword [rbp + 0x108]
mov edx, 1
lea rcx, [rbp + 0x220]
mov rbx, qword [sym.imp.ADVAPI32.dll_ControlService]
mov qword [rbp + 0x1e0], rcx
mov rcx, rax
mov rax, qword [rbp + 0x1e0]
mov r8, rax
call rbx
mov dword [rbp + 0x50], eax
mov eax, dword [rbp + 0x50]
test eax, eax
je 0x18005a2af
mov dword [rbp + 0x20], 0
jmp 0x18005a2c1
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp + 0x74], eax
mov eax, dword [rbp + 0x74]
mov dword [rbp + 0x20], eax
mov rax, qword [rbp + 0x108]
mov rdx, qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rax
call rdx
mov dword [rbp + 0x80], eax
jmp 0x18005a2ee
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp + 0x54], eax
mov eax, dword [rbp + 0x54]
mov dword [rbp + 0x20], eax
mov rax, qword [rbp + 0xd8]
mov rdx, qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rax
call rdx
mov dword [rbp + 0x78], eax
jmp 0x18005a318
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp + 0x38], eax
mov eax, dword [rbp + 0x38]
mov dword [rbp + 0x20], eax
mov eax, dword [rbp + 0x20]
test eax, eax
jne 0x18005a328
mov dword [rbp + 0x60], 1
jmp 0x18005a32f
mov dword [rbp + 0x60], 0
mov rax, qword [rbp + 0x260]
mov edx, dword [rbp + 0x60]
mov rcx, qword [rbp + 0x268]
mov ecx, dword [rcx + 4]
mov ebx, dword [rbp + 0x20]
mov rsi, qword [rbp + 0x268]
mov qword [rsp + 0x20], rsi
mov dword [rbp + 0x1e8], ecx
mov rcx, rax
mov eax, dword [rbp + 0x1e8]
mov r8d, eax
mov r9d, ebx
call fcn.180058fe6
mov qword [rbp + 0x130], rax
mov rax, qword [rbp + 0x130]
mov qword [rbp + 0x98], rax
jmp 0x18005a529
mov eax, 0
mov edx, 0
mov ecx, 0xf003f
mov rbx, qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [rbp + 0x1f0], ecx
mov rcx, rax
mov eax, dword [rbp + 0x1f0]
mov r8d, eax
call rbx
mov qword [rbp + 0xe0], rax
mov rax, qword [rbp + 0xe0]
mov qword [rbp + 0x100], rax
mov rax, qword [rbp + 0x100]
test rax, rax
je 0x18005a4ae
mov rax, qword [rbp + 0x100]
mov rdx, qword [rbp + 0x268]
lea rdx, [rdx + 0xc]
mov ecx, 0x10000
mov rbx, qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [rbp + 0x1f8], ecx
mov rcx, rax
mov eax, dword [rbp + 0x1f8]
mov r8d, eax
call rbx
mov qword [rbp + 0x110], rax
mov rax, qword [rbp + 0x110]
mov qword [rbp + 0x120], rax
mov rax, qword [rbp + 0x120]
test rax, rax
je 0x18005a481
mov rax, qword [rbp + 0x120]
mov rdx, qword [sym.imp.ADVAPI32.dll_DeleteService]
mov rcx, rax
call rdx
mov dword [rbp + 0x64], eax
mov eax, dword [rbp + 0x64]
test eax, eax
je 0x18005a44e
mov dword [rbp + 0x20], 0
jmp 0x18005a466
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp + 0x84], eax
mov eax, dword [rbp + 0x84]
mov dword [rbp + 0x20], eax
mov rax, qword [rbp + 0x120]
mov rdx, qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rax
call rdx
mov dword [rbp + 0x90], eax
jmp 0x18005a493
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp + 0x68], eax
mov eax, dword [rbp + 0x68]
mov dword [rbp + 0x20], eax
mov rax, qword [rbp + 0x100]
mov rdx, qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rax
call rdx
mov dword [rbp + 0x88], eax
jmp 0x18005a4c0
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp + 0x44], eax
mov eax, dword [rbp + 0x44]
mov dword [rbp + 0x20], eax
mov eax, dword [rbp + 0x20]
test eax, eax
jne 0x18005a4d0
mov dword [rbp + 0x7c], 1
jmp 0x18005a4d7
mov dword [rbp + 0x7c], 0
mov rax, qword [rbp + 0x260]
mov edx, dword [rbp + 0x7c]
mov rcx, qword [rbp + 0x268]
mov ecx, dword [rcx + 4]
mov ebx, dword [rbp + 0x20]
mov rsi, qword [rbp + 0x268]
mov qword [rsp + 0x20], rsi
mov dword [rbp + 0x200], ecx
mov rcx, rax
mov eax, dword [rbp + 0x200]
mov r8d, eax
mov r9d, ebx
call fcn.180058fe6
mov qword [rbp + 0x138], rax
mov rax, qword [rbp + 0x138]
mov qword [rbp + 0x98], rax
mov rax, qword [rbp + 0x98]
mov qword [rbp + 0x178], rax
lea rax, reloc.WS2_32.dll_closesocket
mov rdx, rax
mov rcx, rbp
call fcn.180061140
mov rax, qword [rbp + 0x248]
xor rax, rbp
mov rcx, rax
call fcn.1800612f0
mov rax, qword [rbp + 0x178]
mov rbx, qword [rbp + 0x208]
mov rsi, qword [rbp + 0x210]
lea rsp, [rbp + 0x250]
pop rbp
ret