Function at 0x1400020e0
Capabilities:
Acquire debug privileges
Persist via windows service
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x1c0]
sub rsp, 0x2c0
mov rax, qword [0x140040060]
xor rax, rsp
mov qword [rbp + 0x1b0], rax
mov rbx, r8
mov r14, rdx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, 1
mov rdi, 0xffffffffffffffff
cmp qword [rbx + 0x10], 0
je 0x1400022a6
mov dword [rsp + 0x60], esi
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x60]
call fcn.140008f40
cmp qword [rbx + 0x18], 8
jb 0x140002152
mov rbx, qword [rbx]
mov r9, rbx
lea r8, str.___s
mov edx, 0x104
lea rcx, [rbp - 0x60]
call fcn.140001080
lea r8, [rsp + 0x50]
lea rdx, str.systemCurrentControlSetServices
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x14000225f
mov rdx, r14
cmp qword [r14 + 0x18], 8
jb 0x140002198
mov rdx, qword [r14]
lea r8, [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
je 0x1400021bc
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14000225f
lea rcx, [rbp - 0x60]
mov rax, rdi
lea rax, [rax + 1]
cmp word [rcx + rax*2], 0
jne 0x1400021c3
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
lea rax, [rbp - 0x60]
mov qword [rsp + 0x20], rax
mov r9d, esi
xor r8d, r8d
lea rdx, str.ImagePath
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x140002216
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14000225f
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.Type
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x1400022a6
mov rax, qword [0x140240290]
test rax, rax
jne 0x140002298
lea rcx, str.ntdll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.RtlNtStatusToDosError
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140240290], rax
test rax, rax
je 0x1400024dd
mov ecx, 0xc000000d
call rax
mov esi, eax
jmp 0x1400024dd
xor ebx, ebx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], 7
mov word [rsp + 0x30], bx
lea r8d, [rbx + 0x10]
lea rdx, str.SeDebugPrivilege
lea rcx, [rsp + 0x30]
call fcn.140004970
nop
lea rdx, [rsp + 0x30]
call fcn.140001f30
nop
mov rdx, qword [rsp + 0x48]
cmp rdx, 8
jb 0x140002323
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000231e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000250c
call fcn.1400068f0
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], 7
mov word [rsp + 0x30], bx
mov r8d, 0x15
lea rdx, str.SeLoadDriverPrivilege
lea rcx, [rsp + 0x30]
call fcn.140004970
nop
lea rdx, [rsp + 0x30]
call fcn.140001f30
nop
mov rdx, qword [rsp + 0x48]
cmp rdx, 8
jb 0x1400023a0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000239b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002512
call fcn.1400068f0
mov dword [rsp + 0x6c], ebx
mov r8, r14
lea rdx, str._registrymachineSYSTEMCurrentControlSetServices_
lea rcx, [rsp + 0x78]
call fcn.140005000
nop
lea rax, [rsp + 0x78]
cmp qword [rbp - 0x70], 8
cmovae rax, qword [rsp + 0x78]
mov qword [rsp + 0x70], rax
nop
inc rdi
cmp word [rax + rdi*2], 0
jne 0x1400023d0
add rdi, rdi
mov word [rsp + 0x68], di
add di, 2
mov word [rsp + 0x6a], di
mov rax, qword [0x140240288]
test rax, rax
jne 0x14000245c
lea rcx, str.ntdll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.NtLoadDriver
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140240288], rax
test rax, rax
jne 0x14000245c
mov rax, qword [0x140240290]
test rax, rax
jne 0x140002455
lea rcx, str.ntdll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.RtlNtStatusToDosError
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140240290], rax
test rax, rax
je 0x1400024a0
mov ecx, 0xc00000bb
jmp 0x14000249c
lea rcx, [rsp + 0x68]
call rax
mov ebx, eax
mov rax, qword [0x140240290]
test rax, rax
jne 0x14000249a
lea rcx, str.ntdll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.RtlNtStatusToDosError
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140240290], rax
test rax, rax
je 0x1400024a0
mov ecx, ebx
call rax
mov esi, eax
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x1400024dd
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400024d8
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002506
call fcn.1400068f0
mov eax, esi
mov rcx, qword [rbp + 0x1b0]
xor rcx, rsp
call fcn.1400068d0
lea r11, [rsp + 0x2c0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
call fcn.140010d7c
int3
call fcn.140010d7c
int3
call fcn.140010d7c
int3