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

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
lea rbp, [rax - 0x5f]
sub rsp, 0xe0
mov rax, qword [0x140104700]
xor rax, rsp
mov qword [rbp + 0x47], rax
mov rbx, rcx
lea rcx, [rbp + 0x27]
call fcn.14006a968
nop
lea r8, [rbp + 0x27]
lea rdx, str.SYSTEMCurrentControlSetServices_
lea rcx, [rbp + 7]
call fcn.14006dc98
nop
mov r8, rbx
lea rdx, [0x1400e6078]
lea rcx, [rbp - 0x39]
call fcn.14006dc98
nop
lea rdx, [rbp + 7]
cmp qword [rbp + 0x1f], 7
cmova rdx, qword [rbp + 7]
lea r8, [rbp - 0x51]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
je 0x14006dd8f
lea rdx, str.____Cant_create_service_key
jmp 0x14006ddd9
mov eax, dword [rbp - 0x29]
add eax, eax
lea rcx, [rbp - 0x39]
cmp qword [rbp - 0x21], 7
cmova rcx, qword [rbp - 0x39]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov r9d, 2
lea r8, str.ImagePath
xor edx, edx
mov rcx, qword [rbp - 0x51]
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueW]
mov rcx, qword [rbp - 0x51]
test eax, eax
je 0x14006de3d
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rdx, str.____Cant_create_ImagePath_registry_value
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140067330
lea rdx, [0x1400692c4]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
xor dil, dil
lea rcx, [rbp - 0x39]
call fcn.140060a4c
nop
lea rcx, [rbp + 7]
call fcn.140060a4c
nop
lea rcx, [rbp + 0x27]
call fcn.140060a4c
mov al, dil
mov rcx, qword [rbp + 0x47]
xor rcx, rsp
call fcn.1400d0880
lea r11, [rsp + 0xe0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
mov r9d, 4
mov dword [rsp + 0x28], r9d
lea rax, reloc.WS2_32.dll_accept
mov qword [rsp + 0x20], rax
lea r8, str.Type
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueW]
mov rcx, qword [rbp - 0x51]
test eax, eax
je 0x14006de7d
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rdx, str.____Cant_create_Type_registry_value
jmp 0x14006ddd9
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [0x1400db490]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rdi, rax
test rax, rax
je 0x14006ddf5
lea rdx, str.RtlAdjustPrivilege
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rbx, rax
lea rdx, str.NtLoadDriver
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rsi, rax
lea r9, [rbp - 0x59]
xor r8d, r8d
mov dil, 1
mov dl, dil
lea ecx, [r8 + 0xa]
call rbx
test eax, eax
jns 0x14006dee5
lea rdx, str.Fatal_error:_failed_to_acquire_SE_LOAD_DRIVER_PRIVILEGE._Make_sure_you_are_running_as_administrator.
jmp 0x14006ddd9
lea r8, [rbp + 0x27]
lea rdx, str.RegistryMachineSystemCurrentControlSetServices_
lea rcx, [rbp - 0x19]
call fcn.14006dc98
nop
lea rdx, [rbp - 0x19]
cmp qword [rbp - 1], 7
cmova rdx, qword [rbp - 0x19]
lea rcx, [rbp - 0x49]
call sub.ntdll.dll_RtlInitUnicodeString
lea rcx, [rbp - 0x49]
call rsi
mov ebx, eax
lea rdx, str.___NtLoadDriver_Status_0x
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140067330
lea rdx, [0x140063c14]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
mov edx, ebx
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___long_int____ptr64]
lea rdx, [0x1400692c4]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
cmp ebx, 0xc000010e
je 0x14006df65
shr ebx, 0x1f
xor dil, bl
lea rcx, [rbp - 0x19]
call fcn.140060a4c
jmp 0x14006ddf8