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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x30]
sub rsp, 0x130
mov rax, qword [0x14005a080]
xor rax, rsp
mov qword [rbp + 0x20], rax
mov r14, rcx
xor esi, esi
mov rdi, qword [rcx + 0x10]
mov rbx, rcx
cmp qword [rcx + 0x18], 0xf
jbe 0x140012688
mov rbx, qword [rcx]
call fcn.140015e68
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rdi
lea r8, [rsp + 0x70]
mov edx, eax
lea rcx, [rsp + 0x50]
call fcn.1400123b0
nop
lea rcx, [rsp + 0x50]
cmp qword [rsp + 0x68], 7
cmova rcx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x60]
lea r11, [rcx + rax*2]
mov r10, r11
mov rdx, r11
call fcn.140012520
cmp rax, r11
je 0x1400126ee
lea rdx, [r10 - 2]
movzx ecx, word [rdx]
cmp cx, 0x5c
je 0x1400126ee
cmp cx, 0x2f
je 0x1400126ee
mov r10, rdx
cmp rax, rdx
jne 0x1400126d3
sub r11, r10
sar r11, 1
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x48], rsi
mov r8, r11
mov rdx, r10
lea rcx, [rsp + 0x30]
call fcn.14000aa30
nop
lea rdx, [rbp - 0x10]
lea rcx, [rsp + 0x30]
call fcn.14000db00
nop
mov rdx, qword [rsp + 0x48]
cmp rdx, 7
jbe 0x140012768
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140012763
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140012d7a
call fcn.1400164f0
movdqa xmm0, xmmword [0x140052220]
movdqu xmmword [rsp + 0x40], xmm0
mov word [rsp + 0x30], si
mov rdx, qword [rsp + 0x68]
cmp rdx, 7
jbe 0x1400127bd
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400127b8
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140012d80
call fcn.1400164f0
movdqa xmm0, xmmword [0x140052220]
movdqu xmmword [rsp + 0x60], xmm0
mov word [rsp + 0x50], si
mov r15, qword [rbp]
movabs rcx, 0x7fffffffffffffff
mov rax, rcx
sub rax, r15
cmp rax, 0x22
jb 0x140012d86
lea r13, [rbp - 0x10]
cmp qword [rbp + 8], 0xf
cmova r13, qword [rbp - 0x10]
xorps xmm0, xmm0
movups xmmword [rbp - 0x30], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x20], xmm1
lea r12, [r15 + 0x22]
mov ebx, 0xf
mov edi, ebx
lea rsi, [rbp - 0x30]
movabs rax, 0x8000000000000000
lea edx, [rbx + 7]
cmp r12, rbx
jbe 0x140012895
mov rdi, r12
or rdi, rbx
cmp rdi, rcx
jbe 0x14001285d
mov rdi, rcx
add rax, 0x27
mov rcx, rax
call fcn.1400168bc
test rax, rax
je 0x140012da4
lea rsi, [rax + 0x27]
and rsi, 0xffffffffffffffe0
mov qword [rsi - 8], rax
jmp 0x140012891
cmp rdi, rdx
cmovb rdi, rdx
lea rcx, [rdi + 1]
cmp rcx, 0x1000
jb 0x140012880
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140012d6e
jmp 0x14001283e
test rcx, rcx
je 0x14001288f
call fcn.1400168bc
mov rsi, rax
jmp 0x140012891
xor esi, esi
mov qword [rbp - 0x30], rsi
mov qword [rbp - 0x20], r12
mov qword [rbp - 0x18], rdi
movups xmm0, xmmword [str.SYSTEMCurrentControlSetServices_]
movups xmmword [rsi], xmm0
movups xmm1, xmmword [0x140051ff0]
movups xmmword [rsi + 0x10], xmm1
movzx eax, word [0x140052000]
mov word [rsi + 0x20], ax
lea rcx, [rsi + 0x22]
mov r8, r15
mov rdx, r13
call fcn.14003a3d0
mov byte [rsi + r12], 0
mov r15, qword [r14 + 0x10]
movabs rcx, 0x7fffffffffffffff
mov rax, rcx
sub rax, r15
cmp rax, 4
jb 0x140012d8c
cmp qword [r14 + 0x18], 0xf
jbe 0x1400128f9
mov r14, qword [r14]
xorps xmm0, xmm0
movups xmmword [rbp - 0x50], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x40], xmm1
lea rsi, [r15 + 4]
lea rdi, [rbp - 0x50]
cmp rsi, 0xf
jbe 0x140012990
mov rbx, rsi
or rbx, 0xf
cmp rbx, rcx
jbe 0x140012952
mov rbx, rcx
movabs rax, 0x8000000000000000
add rax, 0x27
mov rcx, rax
call fcn.1400168bc
test rax, rax
je 0x140012d92
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x14001298c
cmp rbx, 0x16
mov eax, 0x16
cmovb rbx, rax
lea rcx, [rbx + 1]
cmp rcx, 0x1000
jb 0x14001297b
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140012d74
jmp 0x140012933
test rcx, rcx
je 0x14001298a
call fcn.1400168bc
mov rdi, rax
jmp 0x14001298c
xor edi, edi
mov qword [rbp - 0x50], rdi
mov qword [rbp - 0x40], rsi
mov qword [rbp - 0x38], rbx
mov dword [rdi], 0x5c3f3f5c
lea rcx, [rdi + 4]
mov r8, r15
mov rdx, r14
call fcn.14003a3d0
mov byte [rdi + rsi], 0
lea rdx, [rbp - 0x30]
cmp qword [rbp - 0x18], 0xf
cmova rdx, qword [rbp - 0x30]
lea r8, [rbp - 0x80]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x140012ae9
lea rcx, str.____Cant_create_service_key_n
call fcn.140001280
xor bl, bl
mov rdx, qword [rbp - 0x38]
cmp rdx, 0xf
jbe 0x140012a21
inc rdx
mov rcx, qword [rbp - 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140012a1c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140012d92
call fcn.1400164f0
movdqa xmm0, xmmword [0x140052230]
movdqu xmmword [rbp - 0x40], xmm0
mov byte [rbp - 0x50], 0
mov rdx, qword [rbp - 0x18]
cmp rdx, 0xf
jbe 0x140012a6d
inc rdx
mov rcx, qword [rbp - 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140012a68
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140012da4
call fcn.1400164f0
movdqa xmm0, xmmword [0x140052230]
movdqu xmmword [rbp - 0x20], xmm0
mov byte [rbp - 0x30], 0
mov rdx, qword [rbp + 8]
cmp rdx, 0xf
jbe 0x140012ab9
inc rdx
mov rcx, qword [rbp - 0x10]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140012ab4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140012d68
call fcn.1400164f0
movzx eax, bl
mov rcx, qword [rbp + 0x20]
xor rcx, rsp
call fcn.1400164d0
lea r11, [rsp + 0x130]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
lea rcx, [rbp - 0x50]
cmp qword [rbp - 0x38], 0xf
cmova rcx, qword [rbp - 0x50]
mov eax, dword [rbp - 0x40]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov r9d, 2
lea r8, str.ImagePath
xor edx, edx
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueA]
mov rcx, qword [rbp - 0x80]
test eax, eax
je 0x140012b36
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, str.____Cant_create_ImagePath_registry_value_n
jmp 0x1400129df
mov dword [rsp + 0x28], 4
lea rax, [0x140052214]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, str.Type
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueA]
mov rcx, qword [rbp - 0x80]
test eax, eax
je 0x140012b79
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, str.____Cant_create_Type_registry_value_n
jmp 0x1400129df
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [0x140049008]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rdi, rax
test rax, rax
je 0x1400129e4
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 - 0x78]
xor r8d, r8d
mov dl, 1
lea ecx, [r8 + 0xa]
call rbx
test eax, eax
jns 0x140012bdd
lea rcx, str.Fatal_error:_failed_to_acquire_SE_LOAD_DRIVER_PRIVILEGE._Make_sure_you_are_running_as_administrator._n
jmp 0x1400129df
lea rdx, [rbp - 0x10]
cmp qword [rbp + 8], 0xf
cmova rdx, qword [rbp - 0x10]
mov r8, qword [rbp]
add r8, rdx
lea rdx, [rbp - 0x10]
cmp qword [rbp + 8], 0xf
cmova rdx, qword [rbp - 0x10]
lea rcx, [rbp - 0x70]
call fcn.140013180
nop
lea r8, [rbp - 0x70]
lea rdx, str.RegistryMachineSystemCurrentControlSetServices_
lea rcx, [rsp + 0x30]
call fcn.14000a350
mov rbx, rax
lea rax, [rbp - 0x70]
cmp rax, rbx
je 0x140012c9e
mov rdx, qword [rbp - 0x58]
cmp rdx, 7
jbe 0x140012c6b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140012c66
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140012d98
call fcn.1400164f0
movdqa xmm0, xmmword [0x140052220]
movdqu xmmword [rbp - 0x60], xmm0
xor esi, esi
mov word [rbp - 0x70], si
movups xmm0, xmmword [rbx]
movups xmmword [rbp - 0x70], xmm0
movups xmm1, xmmword [rbx + 0x10]
movups xmmword [rbp - 0x60], xmm1
mov qword [rbx + 0x10], rsi
mov qword [rbx + 0x18], 7
mov word [rbx], si
jmp 0x140012ca0
xor esi, esi
mov rdx, qword [rsp + 0x48]
cmp rdx, 7
jbe 0x140012ce2
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140012cdd
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140012d98
call fcn.1400164f0
lea rdx, [rbp - 0x70]
cmp qword [rbp - 0x58], 7
cmova rdx, qword [rbp - 0x70]
lea rcx, [rbp + 0x10]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea rcx, [rbp + 0x10]
call rdi
mov ebx, eax
mov edx, eax
lea rcx, str.___NtLoadDriver_Status_0x_lx_n
call fcn.140001280
shr ebx, 0x1f
xor bl, 1
mov rdx, qword [rbp - 0x58]
cmp rdx, 7
jbe 0x140012d52
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140012d4d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140012d9e
call fcn.1400164f0
movdqa xmm0, xmmword [0x140052220]
movdqu xmmword [rbp - 0x60], xmm0
mov word [rbp - 0x70], si
jmp 0x1400129e6
call fcn.1400202a0
nop
call fcn.1400019d0
nop
call fcn.1400019d0
nop
call fcn.1400202a0
nop
call fcn.1400202a0
int3
call fcn.140001a70
nop
call fcn.140001a70
int3
call fcn.1400202a0
nop
call fcn.1400202a0
nop
call fcn.1400202a0
nop
call fcn.1400202a0
int3