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

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xc0
mov rbx, rcx
lea rcx, [rbp - 0x49]
call fcn.1400544e0
nop
lea r8, [rbp - 0x49]
lea rdx, str.SYSTEMCurrentControlSetServices_
lea rcx, [rbp - 9]
call fcn.140059d00
nop
mov r8, rbx
lea rdx, [0x14017d648]
lea rcx, [rbp - 0x29]
call fcn.140059d00
nop
lea rdx, [rbp - 9]
cmp qword [rbp + 0xf], 8
cmovae rdx, qword [rbp - 9]
lea r8, [rbp + 0x77]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x140059ab8
mov eax, dword [rbp - 0x19]
add eax, eax
lea rcx, [rbp - 0x29]
cmp qword [rbp - 0x11], 8
cmovae rcx, qword [rbp - 0x29]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov r9d, 2
lea r8, str.ImagePath
xor edx, edx
mov rcx, qword [rbp + 0x77]
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueW]
mov rcx, qword [rbp + 0x77]
test eax, eax
je 0x140059af5
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor bl, bl
lea rcx, [rbp - 0x29]
call fcn.140028d40
nop
lea rcx, [rbp - 9]
call fcn.140028d40
nop
lea rcx, [rbp - 0x49]
call fcn.140028d40
movzx eax, bl
mov rbx, qword [rsp + 0x100]
add rsp, 0xc0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov dword [rsp + 0x28], 4
lea rax, [0x14017d730]
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 + 0x77]
test eax, eax
jne 0x140059ab2
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [0x14017d338]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rdi, rax
test rax, rax
je 0x140059ab8
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 r12, rax
lea r9, [rbp + 0x6f]
xor r8d, r8d
mov dl, 1
mov r13d, 0xa
mov ecx, r13d
call rbx
test eax, eax
js 0x140059ab8
movabs rax, 0x7ffffffffffffffe
mov rcx, rax
mov rsi, qword [rbp - 0x39]
sub rcx, rsi
cmp rcx, 0x34
jb 0x140059cf4
lea r15, [rbp - 0x49]
cmp qword [rbp - 0x31], 8
cmovae r15, qword [rbp - 0x49]
xorps xmm0, xmm0
movups xmmword [rbp - 0x69], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x59], xmm1
lea r14, [rsi + 0x34]
mov ebx, 7
lea rdi, [rbp - 0x69]
cmp r14, rbx
jbe 0x140059bfc
mov rbx, r14
or rbx, 7
cmp rbx, rax
jbe 0x140059be5
mov rbx, rax
jmp 0x140059bec
cmp rbx, r13
cmovb rbx, r13
lea rdx, [rbx + 1]
call fcn.140029ee0
mov rdi, rax
mov qword [rbp - 0x69], rax
mov qword [rbp - 0x59], r14
mov qword [rbp - 0x51], rbx
movaps xmm0, xmmword [str.RegistryMachineSystemCurrentControlSetServices_]
movups xmmword [rdi], xmm0
movaps xmm1, xmmword [0x14017d6c0]
movups xmmword [rdi + 0x10], xmm1
movaps xmm0, xmmword [0x14017d6d0]
movups xmmword [rdi + 0x20], xmm0
movaps xmm1, xmmword [0x14017d6e0]
movups xmmword [rdi + 0x30], xmm1
movaps xmm0, xmmword [0x14017d6f0]
movups xmmword [rdi + 0x40], xmm0
movaps xmm1, xmmword [0x14017d700]
movups xmmword [rdi + 0x50], xmm1
movsd xmm0, qword [0x14017d710]
movsd qword [rdi + 0x60], xmm0
lea rcx, [rdi + 0x68]
lea r8, [rsi + rsi]
mov rdx, r15
call sub.VCRUNTIME140.dll_memcpy
xor esi, esi
mov word [rdi + r14*2], si
lea rdx, [rbp - 0x69]
cmp qword [rbp - 0x51], 8
cmovae rdx, qword [rbp - 0x69]
lea rcx, [rbp + 0x17]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea rcx, [rbp + 0x17]
call r12
mov ebx, eax
cmp eax, 0xc000010e
jne 0x140059c95
mov bl, 1
jmp 0x140059c9b
shr ebx, 0x1f
xor bl, 1
mov rdx, qword [rbp - 0x51]
cmp rdx, 8
jb 0x140059cde
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x69]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140059cd9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140059cd9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1401582b8
movdqa xmm0, xmmword [0x140181580]
movdqu xmmword [rbp - 0x59], xmm0
mov word [rbp - 0x69], si
jmp 0x140059aba
call fcn.14001fbe0
int3