Function at 0x1400b48b0
Capabilities:
Enumerate services

Disassembly:
push rdi
sub rsp, 0x120
mov rax, qword [0x1403285e8]
xor rax, rsp
mov qword [rsp + 0x110], rax
mov r8d, 4
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
je 0x1400b4bb7
mov qword [rsp + 0x50], 0
mov dword [rsp + 0x60], 0
mov dword [rsp + 0xd0], 0
mov dword [rsp + 0x6c], ntohs
mov dword [rsp + 0x68], 3
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0xd8]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0xd4]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x30
lea r9, [rsp + 0xe0]
mov r8d, dword [rsp + 0x68]
mov edx, dword [rsp + 0x6c]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
mov dword [rsp + 0x60], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x60], 0
je 0x1400b4986
cmp dword [rsp + 0x70], 0xea
jne 0x1400b4a1b
mov eax, dword [rsp + 0xd4]
add rax, 0x30
mov dword [rsp + 0x64], eax
mov eax, dword [rsp + 0x64]
mov qword [rsp + 0x78], rax
mov eax, 0x30
mov rcx, qword [rsp + 0x78]
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.1400ad020
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0xd8]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0xd4]
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x64]
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x50]
mov r8d, dword [rsp + 0x68]
mov edx, dword [rsp + 0x6c]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
mov dword [rsp + 0x48], 0
jmp 0x1400b4a2f
mov eax, dword [rsp + 0x48]
inc eax
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0xd8]
cmp dword [rsp + 0x48], eax
jae 0x1400b4bb7
mov eax, dword [rsp + 0x48]
imul rax, rax, 0x30
mov rcx, qword [rsp + 0x50]
mov eax, dword [rcx + rax + 0x10]
and eax, 1
test eax, eax
jne 0x1400b4a5a
jmp 0x1400b4a25
mov eax, dword [rsp + 0x48]
imul rax, rax, 0x30
mov rcx, qword [rsp + 0x50]
cmp dword [rcx + rax + 0x14], 4
je 0x1400b4a70
jmp 0x1400b4a25
lea rax, [rsp + 0x40]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rsp + 0x41]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rsp + 0x42]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rsp + 0x40]
movzx r8d, byte [rsp + 0x41]
movzx edx, byte [rsp + 0x42]
lea rcx, [rsp + 0xa0]
call fcn.1400b4be0
mov rcx, rax
call fcn.1400bd760
mov ecx, dword [rsp + 0x48]
imul rcx, rcx, 0x30
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rdx + rcx]
sub rax, rcx
movzx edx, word [rcx]
cmp dx, word [rcx + rax]
jne 0x1400b4af3
add rcx, 2
test dx, dx
jne 0x1400b4add
xor eax, eax
jmp 0x1400b4af8
sbb eax, eax
or eax, 1
test eax, eax
jne 0x1400b4b0e
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
jmp 0x1400b4bc4
lea rax, [rsp + 0x43]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rsp + 0x44]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rsp + 0x45]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rsp + 0x43]
movzx r8d, byte [rsp + 0x44]
movzx edx, byte [rsp + 0x45]
lea rcx, [rsp + 0xb0]
call fcn.1400b4c10
mov rcx, rax
call fcn.1400bd7c0
mov qword [rsp + 0x88], rax
mov eax, dword [rsp + 0x48]
imul rax, rax, 0x30
mov rcx, qword [rsp + 0x50]
mov rax, qword [rcx + rax + 8]
mov qword [rsp + 0x90], rax
mov rdx, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x90]
call fcn.1400acb00
test rax, rax
je 0x1400b4bb2
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
jmp 0x1400b4bc4
jmp 0x1400b4a25
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
mov rcx, qword [rsp + 0x110]
xor rcx, rsp
call fcn.140239380
add rsp, 0x120
pop rdi
ret