Function at 0x140098d70
Capabilities:
Persist via windows service
Set registry value

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x3d0
mov rax, qword [0x1405d4300]
xor rax, rsp
mov qword [rsp + 0x3c0], rax
mov dword [rsp + 0x38], 0
lea rax, [rsp + 0x218]
mov rdi, rax
xor eax, eax
mov ecx, 0x18
rep stosb byte [rdi], al
lea rcx, [rsp + 0x47]
call fcn.14007b190
mov rcx, qword [rsp + 0x3f0]
mov rdx, qword [rsp + 0x3e8]
add rdx, rcx
mov rcx, rdx
mov r9, rax
mov r8, rcx
mov rdx, qword [rsp + 0x3e8]
lea rcx, [rsp + 0x218]
call fcn.140089f60
nop
mov r8d, 0x10
lea rdx, [rsp + 0x230]
lea rcx, [0x1405d50f5]
call fcn.140091430
nop
lea rcx, [rsp + 0x148]
call fcn.14009bd00
mov qword [rsp + 0x98], rax
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0xa0], rax
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0xa8], rax
lea rcx, [rsp + 0x48]
call fcn.14007b190
mov r8, rax
lea rdx, [rsp + 0xe8]
mov rcx, qword [rsp + 0xa8]
call fcn.14008e2d0
mov eax, dword [rsp + 0x38]
or eax, 0x10
mov dword [rsp + 0x38], eax
lea rax, [rsp + 0xe8]
mov qword [rsp + 0xb0], rax
lea r8, [rsp + 0x230]
mov rdx, qword [rsp + 0xb0]
lea rcx, [rsp + 0x280]
call fcn.14008a260
nop
lea rcx, [rsp + 0xe8]
call fcn.140090a30
nop
lea rax, [rsp + 0x148]
mov rcx, rax
call fcn.140090a70
lea rax, [rsp + 0x2b0]
mov rdi, rax
xor eax, eax
mov ecx, 0x108
rep stosb byte [rdi], al
lea rcx, [rsp + 0x280]
call fcn.140095da0
mov dword [rsp + 0x20], 1
mov r9d, 0x40
mov r8d, 0x20
mov rdx, rax
lea rcx, [rsp + 0x2b0]
call fcn.14008ed60
nop
lea rcx, [rsp + 0x218]
call fcn.14009b8e0
mov qword [rsp + 0xb8], rax
lea rcx, [rsp + 0x218]
call fcn.14008a4b0
mov qword [rsp + 0xc0], rax
mov r8, qword [rsp + 0xb8]
mov rdx, qword [rsp + 0xc0]
lea rcx, [rsp + 0x2b0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const____ptr64__long_long___int64_____ptr64]
lea rcx, [rsp + 0x2b0]
call fcn.1400963b0
lea rdx, str.SeLoadDriverPrivilege
lea rcx, [rsp + 0x108]
call fcn.14008f420
mov qword [rsp + 0x1d0], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x1d0]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140098f9f
mov byte [rsp + 0x31], 0
jmp 0x14009907b
lea rax, [rsp + 0x1e0]
mov rdi, rax
xor eax, eax
mov ecx, 8
rep stosb byte [rdi], al
lea rcx, [rsp + 0x108]
call fcn.140095db0
lea r8, [rsp + 0x1e0]
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x140098fe1
mov byte [rsp + 0x31], 0
jmp 0x14009907b
lea rax, [rsp + 0x1e8]
mov rdi, rax
xor eax, eax
mov ecx, 0x10
rep stosb byte [rdi], al
mov dword [rsp + 0x1e8], 1
mov eax, 0xc
imul rax, rax, 0
mov rcx, qword [rsp + 0x1e0]
mov qword [rsp + rax + 0x1ec], rcx
mov eax, 0xc
imul rax, rax, 0
mov dword [rsp + rax + 0x1f4], 2
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0x10
lea r8, [rsp + 0x1e8]
xor edx, edx
mov rcx, qword [rsp + 0x1d0]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x140099068
mov byte [rsp + 0x31], 0
jmp 0x14009907b
mov rcx, qword [rsp + 0x1d0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [rsp + 0x31], 1
movzx eax, byte [rsp + 0x31]
test eax, eax
jne 0x14009908e
mov dword [rsp + 0x50], 1
jmp 0x140099096
mov dword [rsp + 0x50], 0
movzx eax, byte [rsp + 0x50]
mov byte [rsp + 0x3c], al
lea rcx, [rsp + 0x108]
call fcn.140090a70
movzx eax, byte [rsp + 0x3c]
test eax, eax
je 0x1400990bf
mov byte [rsp + 0x32], 0
jmp 0x1400995be
xor r8d, r8d
lea rdx, [rsp + 0x280]
lea rcx, [rsp + 0x1a8]
call fcn.14008a1b0
mov qword [rsp + 0xc8], rax
mov rax, qword [rsp + 0xc8]
mov qword [rsp + 0xd0], rax
mov rdx, qword [rsp + 0xd0]
lea rcx, [rsp + 0x188]
call fcn.140095540
mov qword [rsp + 0xd8], rax
mov rax, qword [rsp + 0xd8]
mov qword [rsp + 0xe0], rax
mov rax, qword [rsp + 0xe0]
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0x49]
call fcn.14007b190
mov r8, rax
lea rdx, [rsp + 0x128]
mov rcx, qword [rsp + 0x68]
call fcn.14008e2d0
mov eax, dword [rsp + 0x38]
bts eax, 8
mov dword [rsp + 0x38], eax
lea rax, [rsp + 0x128]
mov qword [rsp + 0x70], rax
mov r8, qword [rsp + 0x70]
lea rdx, [0x1401e0ecc]
lea rcx, [rsp + 0x168]
call fcn.14008a2f0
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x60], rax
lea rdx, str.SystemCurrentControlSetServices_
lea rcx, [rsp + 0x1f8]
call fcn.14008f050
nop
lea rdx, [rsp + 0x230]
lea rcx, [rsp + 0x1f8]
call fcn.140091740
lea rcx, [rsp + 0x1f8]
call fcn.140095da0
lea r8, [rsp + 0x1c8]
mov rdx, rax
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0
je 0x140099203
mov byte [rsp + 0x3d], 0
lea rcx, [rsp + 0x1f8]
call fcn.140090a30
movzx eax, byte [rsp + 0x3d]
mov byte [rsp + 0x30], al
jmp 0x140099403
mov byte [rsp + 0x1d8], 1
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x1d8]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.Type
mov rcx, qword [rsp + 0x1c8]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0
je 0x140099269
mov byte [rsp + 0x3e], 0
lea rcx, [rsp + 0x1f8]
call fcn.140090a30
movzx eax, byte [rsp + 0x3e]
mov byte [rsp + 0x30], al
jmp 0x140099403
mov byte [rsp + 0x1da], 3
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x1da]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.ErrorControl
mov rcx, qword [rsp + 0x1c8]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0
je 0x1400992cf
mov byte [rsp + 0x40], 0
lea rcx, [rsp + 0x1f8]
call fcn.140090a30
movzx eax, byte [rsp + 0x40]
mov byte [rsp + 0x30], al
jmp 0x140099403
mov byte [rsp + 0x1d9], 3
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x1d9]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.Start
mov rcx, qword [rsp + 0x1c8]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0
je 0x140099335
mov byte [rsp + 0x41], 0
lea rcx, [rsp + 0x1f8]
call fcn.140090a30
movzx eax, byte [rsp + 0x41]
mov byte [rsp + 0x30], al
jmp 0x140099403
mov rcx, qword [rsp + 0x60]
call fcn.14006fe20
mov dword [rsp + 0x5c], eax
mov rcx, qword [rsp + 0x60]
call fcn.140095da0
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x1c8]
mov qword [rsp + 0x88], rax
mov eax, dword [rsp + 0x5c]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
lea rdx, str.ImagePath
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0
je 0x1400993c0
mov byte [rsp + 0x42], 0
lea rcx, [rsp + 0x1f8]
call fcn.140090a30
movzx eax, byte [rsp + 0x42]
mov byte [rsp + 0x30], al
jmp 0x140099403
mov rcx, qword [rsp + 0x1c8]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x1400993dc
mov dword [rsp + 0x54], 1
jmp 0x1400993e4
mov dword [rsp + 0x54], 0
movzx eax, byte [rsp + 0x54]
mov byte [rsp + 0x43], al
lea rcx, [rsp + 0x1f8]
call fcn.140090a30
movzx eax, byte [rsp + 0x43]
mov byte [rsp + 0x30], al
movzx eax, byte [rsp + 0x30]
test eax, eax
jne 0x140099416
mov dword [rsp + 0x58], 1
jmp 0x14009941e
mov dword [rsp + 0x58], 0
movzx eax, byte [rsp + 0x58]
mov byte [rsp + 0x44], al
lea rcx, [rsp + 0x168]
call fcn.140090a30
nop
lea rcx, [rsp + 0x128]
call fcn.140090a30
nop
lea rax, [rsp + 0x188]
mov rcx, rax
call fcn.140090a70
nop
lea rax, [rsp + 0x1a8]
mov rcx, rax
call fcn.140090a70
movzx eax, byte [rsp + 0x44]
test eax, eax
je 0x140099477
mov byte [rsp + 0x32], 0
jmp 0x1400995be
lea rdx, str.RegistryMachineSystemCurrentControlSetServices_
lea rcx, [rsp + 0x250]
call fcn.14008f050
nop
lea rdx, [rsp + 0x230]
lea rcx, [rsp + 0x250]
call fcn.140091740
mov eax, 4
mov eax, eax
mov ecx, dword [0x1405d5b6c]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
mov eax, dword [rax + rcx]
cmp dword [0x1405d50f0], eax
jle 0x14009950b
lea rcx, [0x1405d50f0]
call fcn.1401dd358
cmp dword [0x1405d50f0], 0xffffffff
jne 0x14009950b
lea rcx, [0x1401e0f20]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, str.NtLoadDriver
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1405d50e8], rax
lea rcx, [0x1405d50f0]
call fcn.1401dd2ec
cmp qword [0x1405d50e8], 0
je 0x1400995a3
lea rcx, [rsp + 0x250]
call fcn.140095da0
mov rdx, rax
lea rcx, [rsp + 0x2a0]
call sub.ntdll.dll_RtlInitAnsiString
mov r8b, 1
lea rdx, [rsp + 0x2a0]
lea rcx, [rsp + 0x270]
call sub.ntdll.dll_RtlAnsiStringToUnicodeString
mov rax, qword [0x1405d50e8]
mov qword [rsp + 0x90], rax
lea rcx, [rsp + 0x270]
call qword [rsp + 0x90]
test eax, eax
jne 0x14009957a
mov dword [rsp + 0x4c], 1
jmp 0x140099582
mov dword [rsp + 0x4c], 0
movzx eax, byte [rsp + 0x4c]
mov byte [rsp + 0x3f], al
lea rcx, [rsp + 0x250]
call fcn.140090a30
movzx eax, byte [rsp + 0x3f]
mov byte [rsp + 0x32], al
jmp 0x1400995be
mov byte [rsp + 0x45], 0
lea rcx, [rsp + 0x250]
call fcn.140090a30
movzx eax, byte [rsp + 0x45]
mov byte [rsp + 0x32], al
movzx eax, byte [rsp + 0x32]
mov byte [rsp + 0x46], al
lea r8, [rsp + 0x230]
lea rdx, [rsp + 0x46]
mov rcx, qword [rsp + 0x3e0]
call fcn.14008a230
mov eax, dword [rsp + 0x38]
or eax, 2
mov dword [rsp + 0x38], eax
lea rax, [rsp + 0x358]
mov rcx, rax
call fcn.1400909d0
lea rax, [rsp + 0x358]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
lea rcx, [rsp + 0x280]
call fcn.140090a30
nop
lea rcx, [rsp + 0x230]
call fcn.140090a30
mov eax, dword [rsp + 0x38]
or eax, 1
mov dword [rsp + 0x38], eax
lea rcx, [rsp + 0x218]
call fcn.140090bd0
mov rax, qword [rsp + 0x3e0]
mov rcx, qword [rsp + 0x3c0]
xor rcx, rsp
call fcn.1401dd5d0
add rsp, 0x3d0
pop rdi
ret