Function at 0x10042f1c0
Capabilities:
Enumerate services

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x9d8]
sub rsp, 0xab0
mov qword [rbp - 0x78], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x100499010]
xor rax, rsp
mov qword [rbp + 0x9a0], rax
mov rdi, rcx
mov qword [rsp + 0x60], rcx
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp - 0x70]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp + 0x5a0]
call sub.VCRUNTIME140.dll_memset
xor ebx, ebx
mov qword [0x1004a92a0], rbx
mov r12d, 0x200
lea r14d, [rbx + 1]
cmp dword [0x1004a9180], ebx
jne 0x10042f4ef
cmp dword [0x1004a9184], ebx
jne 0x10042f4ef
cmp word [str.MSSQLSERVER], bx
jne 0x10042f2e2
mov r9d, r12d
lea r8, [rbp + 0x5a0]
lea edx, [r12 - 0x6a]
mov rcx, qword [0x1004a90d8]
call qword [sym.imp.USER32.dll_LoadStringW]
lea r8, [rbp + 0x5a0]
mov edx, r12d
lea rcx, [rbp - 0x70]
call fcn.10040b460
mov ecx, 0x100
lea rdx, [rbp - 0x70]
sub rdx, rdi
nop
lea rax, [rcx + 0x7ffffefe]
test rax, rax
je 0x10042f2cf
movzx eax, word [rdx + rdi]
test ax, ax
je 0x10042f2cf
mov word [rdi], ax
add rdi, 2
sub rcx, r14
jne 0x10042f2a0
sub rdi, 2
mov word [rdi], bx
xor eax, eax
jmp 0x10042f79c
test rcx, rcx
jne 0x10042f2d8
sub rdi, 2
mov word [rdi], bx
xor eax, eax
jmp 0x10042f79c
mov dword [rsp + 0x4c], 0x84
lea r9, [rsp + 0x4c]
lea r8, [0x1004a8c80]
mov edx, r14d
lea rcx, str.MSSQLSERVER
call qword [sym.imp.instapi150.dll_GetSQLServiceByName]
mov r13d, ebx
mov r8d, 4
lea rdx, str.ServicesActive
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
mov qword [rsp + 0x58], rax
test rax, rax
je 0x10042f4b9
mov dword [rsp + 0x40], ebx
mov dword [rsp + 0x44], ebx
mov dword [rsp + 0x48], ebx
lea rax, [rsp + 0x48]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x44]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ebx
xor r9d, r9d
mov r8d, r14d
lea edx, [r9 + 0x30]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r15d, eax
test ebx, ebx
jne 0x10042f477
mov rdi, rsi
mov r12d, r14d
nop dword [rax]
cmp r15d, 0xea
jne 0x10042f461
lea r8d, [r15 + 0x6c]
lea rdx, str.IsServiceActive
mov ecx, dword [rsp + 0x40]
call fcn.10043acf0
mov r14, rax
mov rbx, rax
test rax, rax
je 0x10042f461
lea rax, [rsp + 0x48]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x44]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov ecx, dword [rsp + 0x40]
mov dword [rsp + 0x20], ecx
mov r9, rbx
mov r8d, r12d
mov edx, 0x30
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
mov dword [rsp + 0x50], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r15d, eax
xor esi, esi
cmp dword [rsp + 0x44], esi
jle 0x10042f435
nop
lea rdx, str.EventLog
mov rcx, qword [rbx]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x10042f432
inc esi
add rbx, 0x30
cmp esi, dword [rsp + 0x44]
jl 0x10042f410
jmp 0x10042f435
mov r13d, r12d
mov rcx, r14
call fcn.10043b3b0
test r13d, r13d
jne 0x10042f461
cmp dword [rsp + 0x50], r13d
jne 0x10042f461
cmp r15d, 0xea
jne 0x10042f461
lea ecx, [r13 + 0x64]
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x10042f390
mov rdi, qword [rsp + 0x60]
mov r12d, 0x200
mov rsi, qword [rsp + 0x58]
mov r14d, 1
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test r13d, r13d
je 0x10042f4b9
lea rdx, [0x1004a8c80]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov qword [0x1004a9368], rax
test rax, rax
jne 0x10042f4ef
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x400
lea rdx, [rbp - 0x70]
mov ecx, eax
call fcn.10044bfe0
jmp 0x10042f4ef
mov r9d, r12d
lea r8, [rbp + 0x5a0]
mov edx, 0x174
mov rcx, qword [0x1004a90d8]
call qword [sym.imp.USER32.dll_LoadStringW]
lea r9, str.EventLog
lea r8, [rbp + 0x5a0]
mov rdx, r12
lea rcx, [rbp - 0x70]
call fcn.10040b460
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x390]
call sub.VCRUNTIME140.dll_memset
lea rax, [rsp + 0x68]
mov qword [rsp + 0x60], rax
xor esi, esi
mov qword [rsp + 0x78], rsi
mov qword [rbp - 0x80], 7
mov word [rsp + 0x68], si
lea r8d, [rsi + 0xd]
lea rdx, str.UseUserLocale
lea rcx, [rsp + 0x68]
call fcn.10040da90
nop
call fcn.10044da70
mov rcx, rax
lea rdx, [rsp + 0x68]
call fcn.10040a150
test al, al
je 0x10042f555
call qword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
jmp 0x10042f55b
call qword [sym.imp.KERNEL32.dll_GetSystemDefaultLCID]
mov r9d, eax
lea r8, str.Resources_ldSQLAGENTLOG.RLL
mov edx, 0x104
lea rcx, [rbp + 0x390]
call fcn.10040b460
test eax, eax
js 0x10042f58f
lea rdx, [rbp + 0x390]
xor ecx, ecx
call fcn.10042b4a0
mov qword [0x1004a92a0], rax
cmp qword [0x1004a92a0], 0
jne 0x10042f71e
lea rbx, str.SQLAGENTLOG.DLL
mov rdx, rbx
xor ecx, ecx
call fcn.10042b4a0
mov qword [0x1004a92a0], rax
test rax, rax
jne 0x10042f71e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x400
lea rdx, [rbp - 0x70]
mov ecx, eax
call fcn.10044bfe0
mov rcx, r12
lea rax, [rbp - 0x70]
nop dword [rax]
mov r8d, 0x7ffffffe
cmp word [rax], 0
je 0x10042f5f8
add rax, 2
sub rcx, 1
jne 0x10042f5e0
jmp 0x10042f64f
test rcx, rcx
je 0x10042f64f
mov rax, r12
sub rax, rcx
lea rdx, [rbp - 0x70]
lea rdx, [rdx + rax*2]
test rcx, rcx
je 0x10042f648
mov rax, r8
lea r10, [0x100478530]
sub r10, rdx
nop dword [rax]
test rax, rax
je 0x10042f643
movzx r9d, word [rdx + r10]
test r9w, r9w
je 0x10042f643
mov word [rdx], r9w
add rdx, 2
dec rax
sub rcx, 1
jne 0x10042f620
jmp 0x10042f648
test rcx, rcx
jne 0x10042f64c
sub rdx, 2
mov word [rdx], si
mov rcx, r12
lea rax, [rbp - 0x70]
cmp word [rax], 0
je 0x10042f668
add rax, 2
sub rcx, 1
jne 0x10042f656
jmp 0x10042f6b5
test rcx, rcx
je 0x10042f6b5
mov rax, r12
sub rax, rcx
lea rdx, [rbp - 0x70]
lea rdx, [rdx + rax*2]
test rcx, rcx
je 0x10042f6ae
mov rax, r8
sub rbx, rdx
test rax, rax
je 0x10042f6a9
movzx r9d, word [rdx + rbx]
test r9w, r9w
je 0x10042f6a9
mov word [rdx], r9w
add rdx, 2
dec rax
sub rcx, 1
jne 0x10042f686
jmp 0x10042f6ae
test rcx, rcx
jne 0x10042f6b2
sub rdx, 2
mov word [rdx], si
mov rax, r12
lea rcx, [rbp - 0x70]
nop dword [rax]
cmp word [rcx], 0
je 0x10042f6d2
add rcx, 2
sub rax, 1
jne 0x10042f6c0
jmp 0x10042f71e
test rax, rax
je 0x10042f71e
sub r12, rax
lea rcx, [rbp - 0x70]
lea rcx, [rcx + r12*2]
test rax, rax
je 0x10042f717
lea r9, [0x100476510]
sub r9, rcx
test r8, r8
je 0x10042f712
movzx edx, word [rcx + r9]
test dx, dx
je 0x10042f712
mov word [rcx], dx
add rcx, 2
dec r8
sub rax, 1
jne 0x10042f6f1
jmp 0x10042f717
test rax, rax
jne 0x10042f71b
sub rcx, 2
mov word [rcx], si
test rdi, rdi
je 0x10042f770
cmp word [rbp - 0x70], 0
je 0x10042f770
mov ecx, 0x100
lea rdx, [rbp - 0x70]
sub rdx, rdi
nop word [rax + rax]
lea rax, [rcx + 0x7ffffefe]
test rax, rax
je 0x10042f764
movzx eax, word [rdx + rdi]
test ax, ax
je 0x10042f764
mov word [rdi], ax
add rdi, 2
sub rcx, 1
jne 0x10042f740
jmp 0x10042f769
test rcx, rcx
jne 0x10042f76d
sub rdi, 2
mov word [rdi], si
cmp qword [0x1004a9368], 0
jne 0x10042f78c
cmp dword [0x1004a9180], 0
jne 0x10042f78c
cmp dword [0x1004a9184], 0
je 0x10042f796
cmp qword [0x1004a92a0], 0
jne 0x10042f799
mov r14d, esi
mov eax, r14d
mov rcx, qword [rbp + 0x9a0]
xor rcx, rsp
call fcn.100469360
lea r11, [rsp + 0xab0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret