Function at 0x140030400
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, 0xf0
movaps xmmword [rax - 0x18], xmm6
mov rax, qword [0x140113f00]
xor rax, rsp
mov qword [rbp + 0x37], rax
mov rbx, rcx
lea rcx, [rbp + 7]
call fcn.140028d10
nop
lea r8, [rbp + 7]
lea rdx, str.SYSTEMCurrentControlSetServices_
lea rcx, [rbp - 0x19]
call fcn.140030280
nop
mov r8, rbx
lea rdx, [0x1400e2478]
lea rcx, [rbp - 0x59]
call fcn.140030280
nop
lea rdx, [rbp - 0x19]
cmp qword [rbp - 1], 7
cmova rdx, qword [rbp - 0x19]
lea r8, [rbp - 0x69]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
xor esi, esi
movdqa xmm6, xmmword [0x1400de450]
test eax, eax
jne 0x140030600
mov eax, dword [rbp - 0x49]
add eax, eax
lea rcx, [rbp - 0x59]
cmp qword [rbp - 0x41], 7
cmova rcx, qword [rbp - 0x59]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov r9d, 2
lea r8, str.ImagePath
xor edx, edx
mov rcx, qword [rbp - 0x69]
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueW]
mov rcx, qword [rbp - 0x69]
test eax, eax
jne 0x1400305fa
mov dword [rsp + 0x28], 4
lea rax, reloc.WS2_32.dll_accept
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, str.Type
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueW]
mov rcx, qword [rbp - 0x69]
test eax, eax
jne 0x1400305fa
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [0x1400e24b0]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rdi, rax
test rax, rax
je 0x140030600
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 rdi, rax
lea r9, [rbp - 0x61]
xor r8d, r8d
mov dl, 1
mov ecx, 0xa
call rbx
test eax, eax
js 0x140030600
lea r8, [rbp + 7]
lea rdx, str.RegistryMachineSystemCurrentControlSetServices_
lea rcx, [rbp - 0x39]
call fcn.140030280
nop
lea rdx, [rbp - 0x39]
cmp qword [rbp - 0x21], 7
cmova rdx, qword [rbp - 0x39]
lea rcx, [rbp + 0x27]
call sub.ntdll.dll_RtlInitUnicodeString
lea rcx, [rbp + 0x27]
call rdi
mov ebx, eax
cmp eax, 0xc000010e
jne 0x1400305a6
mov bl, 1
jmp 0x1400305ac
shr ebx, 0x1f
xor bl, 1
mov rdx, qword [rbp - 0x21]
cmp rdx, 7
jbe 0x1400305ef
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x39]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400305ea
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400305ea
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400d8ba8
movdqu xmmword [rbp - 0x29], xmm6
mov word [rbp - 0x39], si
jmp 0x140030602
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor bl, bl
mov rdx, qword [rbp - 0x41]
cmp rdx, 7
jbe 0x14003064d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x59]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140030640
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140030640
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400d8ba8
movdqa xmm6, xmmword [0x1400de450]
movdqu xmmword [rbp - 0x49], xmm6
mov word [rbp - 0x59], si
mov rdx, qword [rbp - 1]
cmp rdx, 7
jbe 0x1400306a1
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x19]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140030694
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140030694
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400d8ba8
movdqa xmm6, xmmword [0x1400de450]
movdqu xmmword [rbp - 9], xmm6
mov word [rbp - 0x19], si
mov rdx, qword [rbp + 0x1f]
cmp rdx, 7
jbe 0x1400306ed
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 7]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400306e8
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400306e8
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400d8ba8
movzx eax, bl
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.1400d8ff0
lea r11, [rsp + 0xf0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
movaps xmm6, xmmword [r11 - 0x10]
mov rsp, r11
pop rbp
ret