Function at 0x140158a40
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 [0x14074a3c0]
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, Ordinal_26
rep stosb byte [rdi], al
lea rcx, [rsp + 0x47]
call fcn.14014d300
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.140148320
nop
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x230]
lea rcx, [0x14074b99d]
call fcn.1401501b0
nop
lea rcx, [rsp + 0x148]
call fcn.14015ba40
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.14014d300
mov r8, rax
lea rdx, [rsp + 0xe8]
mov rcx, qword [rsp + 0xa8]
call fcn.14014c870
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.140148620
nop
lea rcx, [rsp + 0xe8]
call fcn.14014f220
nop
lea rax, [rsp + 0x148]
mov rcx, rax
call fcn.14014f260
lea rax, [rsp + 0x2b0]
mov rdi, rax
xor eax, eax
mov ecx, 0x108
rep stosb byte [rdi], al
lea rcx, [rsp + 0x280]
call fcn.140154de0
mov dword [rsp + 0x20], 1
mov r9d, 0x40
mov r8d, reloc.WLDAP32.dll_Ordinal_32
mov rdx, rax
lea rcx, [rsp + 0x2b0]
call fcn.14014d310
nop
lea rcx, [rsp + 0x218]
call fcn.14015b610
mov qword [rsp + 0xb8], rax
lea rcx, [rsp + 0x218]
call fcn.1401488b0
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.1401553f0
lea rdx, str.SeLoadDriverPrivilege
lea rcx, [rsp + 0x108]
call fcn.14014d9d0
mov qword [rsp + 0x1d0], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x1d0]
mov edx, Ordinal_41
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140158c6f
mov byte [rsp + 0x31], 0
jmp 0x140158d4b
lea rax, [rsp + 0x1e0]
mov rdi, rax
xor eax, eax
mov ecx, 8
rep stosb byte [rdi], al
lea rcx, [rsp + 0x108]
call fcn.140154df0
lea r8, [rsp + 0x1e0]
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x140158cb1
mov byte [rsp + 0x31], 0
jmp 0x140158d4b
lea rax, [rsp + 0x1e8]
mov rdi, rax
xor eax, eax
mov ecx, reloc.WS2_32.dll_recv
rep stosb byte [rdi], al
mov dword [rsp + 0x1e8], 1
mov eax, recv
imul rax, rax, 0
mov rcx, qword [rsp + 0x1e0]
mov qword [rsp + rax + 0x1ec], rcx
mov eax, recv
imul rax, rax, 0
mov dword [rsp + rax + 0x1f4], 2
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, reloc.WS2_32.dll_recv
lea r8, [rsp + 0x1e8]
xor edx, edx
mov rcx, qword [rsp + 0x1d0]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x140158d38
mov byte [rsp + 0x31], 0
jmp 0x140158d4b
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 0x140158d5e
mov dword [rsp + 0x50], 1
jmp 0x140158d66
mov dword [rsp + 0x50], 0
movzx eax, byte [rsp + 0x50]
mov byte [rsp + 0x3c], al
lea rcx, [rsp + 0x108]
call fcn.14014f260
movzx eax, byte [rsp + 0x3c]
test eax, eax
je 0x140158d8f
mov byte [rsp + 0x32], 0
jmp 0x14015928e
xor r8d, r8d
lea rdx, [rsp + 0x280]
lea rcx, [rsp + 0x1a8]
call fcn.140148570
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.140154580
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.14014d300
mov r8, rax
lea rdx, [rsp + 0x128]
mov rcx, qword [rsp + 0x68]
call fcn.14014c870
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, [0x14033a54c]
lea rcx, [rsp + 0x168]
call fcn.1401486b0
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.14014d600
nop
lea rdx, [rsp + 0x230]
lea rcx, [rsp + 0x1f8]
call fcn.1401504c0
lea rcx, [rsp + 0x1f8]
call fcn.140154de0
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 0x140158ed3
mov byte [rsp + 0x3d], 0
lea rcx, [rsp + 0x1f8]
call fcn.14014f220
movzx eax, byte [rsp + 0x3d]
mov byte [rsp + 0x30], al
jmp 0x1401590d3
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 0x140158f39
mov byte [rsp + 0x3e], 0
lea rcx, [rsp + 0x1f8]
call fcn.14014f220
movzx eax, byte [rsp + 0x3e]
mov byte [rsp + 0x30], al
jmp 0x1401590d3
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 0x140158f9f
mov byte [rsp + 0x40], 0
lea rcx, [rsp + 0x1f8]
call fcn.14014f220
movzx eax, byte [rsp + 0x40]
mov byte [rsp + 0x30], al
jmp 0x1401590d3
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 0x140159005
mov byte [rsp + 0x41], 0
lea rcx, [rsp + 0x1f8]
call fcn.14014f220
movzx eax, byte [rsp + 0x41]
mov byte [rsp + 0x30], al
jmp 0x1401590d3
mov rcx, qword [rsp + 0x60]
call fcn.14015b600
mov dword [rsp + 0x5c], eax
mov rcx, qword [rsp + 0x60]
call fcn.140154de0
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 0x140159090
mov byte [rsp + 0x42], 0
lea rcx, [rsp + 0x1f8]
call fcn.14014f220
movzx eax, byte [rsp + 0x42]
mov byte [rsp + 0x30], al
jmp 0x1401590d3
mov rcx, qword [rsp + 0x1c8]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x1401590ac
mov dword [rsp + 0x54], 1
jmp 0x1401590b4
mov dword [rsp + 0x54], 0
movzx eax, byte [rsp + 0x54]
mov byte [rsp + 0x43], al
lea rcx, [rsp + 0x1f8]
call fcn.14014f220
movzx eax, byte [rsp + 0x43]
mov byte [rsp + 0x30], al
movzx eax, byte [rsp + 0x30]
test eax, eax
jne 0x1401590e6
mov dword [rsp + 0x58], 1
jmp 0x1401590ee
mov dword [rsp + 0x58], 0
movzx eax, byte [rsp + 0x58]
mov byte [rsp + 0x44], al
lea rcx, [rsp + 0x168]
call fcn.14014f220
nop
lea rcx, [rsp + 0x128]
call fcn.14014f220
nop
lea rax, [rsp + 0x188]
mov rcx, rax
call fcn.14014f260
nop
lea rax, [rsp + 0x1a8]
mov rcx, rax
call fcn.14014f260
movzx eax, byte [rsp + 0x44]
test eax, eax
je 0x140159147
mov byte [rsp + 0x32], 0
jmp 0x14015928e
lea rdx, str.RegistryMachineSystemCurrentControlSetServices_
lea rcx, [rsp + 0x250]
call fcn.14014d600
nop
lea rdx, [rsp + 0x230]
lea rcx, [rsp + 0x250]
call fcn.1401504c0
mov eax, 4
mov eax, eax
mov ecx, dword [0x14074d7bc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
mov eax, dword [rax + rcx]
cmp dword [0x14074b998], eax
jle 0x1401591db
lea rcx, [0x14074b998]
call fcn.140334f94
cmp dword [0x14074b998], 0xffffffff
jne 0x1401591db
lea rcx, [0x14033a5a0]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, str.NtLoadDriver
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14074b990], rax
lea rcx, [0x14074b998]
call fcn.140334f28
cmp qword [0x14074b990], 0
je 0x140159273
lea rcx, [rsp + 0x250]
call fcn.140154de0
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 [0x14074b990]
mov qword [rsp + 0x90], rax
lea rcx, [rsp + 0x270]
call qword [rsp + 0x90]
test eax, eax
jne 0x14015924a
mov dword [rsp + 0x4c], 1
jmp 0x140159252
mov dword [rsp + 0x4c], 0
movzx eax, byte [rsp + 0x4c]
mov byte [rsp + 0x3f], al
lea rcx, [rsp + 0x250]
call fcn.14014f220
movzx eax, byte [rsp + 0x3f]
mov byte [rsp + 0x32], al
jmp 0x14015928e
mov byte [rsp + 0x45], 0
lea rcx, [rsp + 0x250]
call fcn.14014f220
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.1401485f0
mov eax, dword [rsp + 0x38]
or eax, 2
mov dword [rsp + 0x38], eax
lea rax, [rsp + 0x358]
mov rcx, rax
call fcn.14014f1c0
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.14014f220
nop
lea rcx, [rsp + 0x230]
call fcn.14014f220
mov eax, dword [rsp + 0x38]
or eax, 1
mov dword [rsp + 0x38], eax
lea rcx, [rsp + 0x218]
call fcn.14014f3c0
mov rax, qword [rsp + 0x3e0]
mov rcx, qword [rsp + 0x3c0]
xor rcx, rsp
call fcn.140335200
add rsp, 0x3d0
pop rdi
ret