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

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x10]
sub rsp, 0x110
mov rsi, rcx
mov rdi, qword [rcx + 0x10]
mov rbx, rcx
cmp qword [rcx + 0x18], 0x10
jb 0x140010050
mov rbx, qword [rcx]
call fcn.140014088
mov qword [rbp - 0x10], rbx
mov qword [rbp - 8], rdi
lea r8, [rbp - 0x10]
mov edx, eax
lea rcx, [rbp - 0x70]
call fcn.140009ec0
nop
lea rcx, [rbp - 0x70]
cmp qword [rbp - 0x58], 8
cmovae rcx, qword [rbp - 0x70]
mov rax, qword [rbp - 0x60]
lea rbx, [rcx + rax*2]
mov r11, rbx
mov rdx, rbx
call fcn.14000a020
cmp rax, rbx
je 0x1400100ae
lea rcx, [r11 - 2]
movzx edx, word [rcx]
cmp dx, 0x5c
je 0x1400100ae
cmp dx, 0x2f
je 0x1400100ae
mov r11, rcx
cmp rax, rcx
jne 0x140010093
sub rbx, r11
sar rbx, 1
xor edi, edi
mov qword [rbp - 0x20], rdi
mov qword [rbp - 0x18], 7
mov word [rbp - 0x30], di
mov r8, rbx
mov rdx, r11
lea rcx, [rbp - 0x30]
call fcn.140007690
nop
lea rdx, [rbp - 0x50]
lea rcx, [rbp - 0x30]
call fcn.14000a130
nop
mov rdx, qword [rbp - 0x18]
cmp rdx, 8
jb 0x140010124
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001011f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400107af
call fcn.140014b18
movdqa xmm0, xmmword [0x1400522d0]
movdqu xmmword [rbp - 0x20], xmm0
mov word [rbp - 0x30], di
mov rdx, qword [rbp - 0x58]
cmp rdx, 8
jb 0x140010175
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140010170
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400107b5
call fcn.140014b18
movdqa xmm0, xmmword [0x1400522d0]
movdqu xmmword [rbp - 0x60], xmm0
mov word [rbp - 0x70], di
mov r14, qword [rbp - 0x40]
movabs rcx, 0x7fffffffffffffff
mov rax, rcx
sub rax, r14
cmp rax, 0x22
jb 0x1400107bb
lea r13, [rbp - 0x50]
cmp qword [rbp - 0x38], 0x10
cmovae r13, qword [rbp - 0x50]
mov qword [rbp - 0x80], rdi
mov qword [rbp - 0x78], rdi
lea r12, [r14 + 0x22]
mov ebx, 0xf
lea rdi, [rsp + 0x70]
lea eax, [rbx + 7]
movabs r15, 0x8000000000000027
cmp r12, rbx
jbe 0x140010244
mov rbx, r12
or rbx, 0xf
cmp rbx, rcx
jbe 0x14001020b
mov rbx, rcx
mov rax, r15
mov rcx, rax
call fcn.140014db8
test rax, rax
je 0x1400107d9
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x14001023f
cmp rbx, rax
cmovb rbx, rax
lea rcx, [rbx + 1]
cmp rcx, 0x1000
jb 0x14001022e
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x1400107a3
jmp 0x1400101ec
test rcx, rcx
je 0x14001023d
call fcn.140014db8
mov rdi, rax
jmp 0x14001023f
xor edi, edi
mov qword [rsp + 0x70], rdi
mov qword [rbp - 0x80], r12
mov qword [rbp - 0x78], rbx
movups xmm0, xmmword [str.SYSTEMCurrentControlSetServices_]
movups xmmword [rdi], xmm0
movups xmm1, xmmword [0x140052018]
movups xmmword [rdi + 0x10], xmm1
movzx eax, word [0x140052028]
mov word [rdi + 0x20], ax
lea rcx, [rdi + 0x22]
mov r8, r14
mov rdx, r13
call fcn.140016c30
mov byte [rdi + r12], 0
mov r13, qword [rsi + 0x10]
movabs rcx, 0x7fffffffffffffff
mov rax, rcx
sub rax, r13
cmp rax, 4
jb 0x1400107c1
cmp qword [rsi + 0x18], 0x10
jb 0x1400102a8
mov rsi, qword [rsi]
xor r12d, r12d
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], r12
lea r14, [r13 + 4]
mov ebx, 0xf
lea rdi, [rsp + 0x50]
cmp r14, rbx
jbe 0x140010336
mov rbx, r14
or rbx, 0xf
cmp rbx, rcx
jbe 0x1400102f6
mov rbx, rcx
mov rcx, r15
call fcn.140014db8
test rax, rax
je 0x1400107c7
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x140010331
cmp rbx, 0x16
mov eax, 0x16
cmovb rbx, rax
lea rcx, [rbx + 1]
cmp rcx, 0x1000
jb 0x14001031f
lea r15, [rcx + 0x27]
cmp r15, rcx
jbe 0x1400107a9
jmp 0x1400102d7
test rcx, rcx
je 0x14001032e
call fcn.140014db8
mov rdi, rax
jmp 0x140010331
mov rdi, r12
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x68], rbx
mov dword [rdi], 0x5c3f3f5c
lea rcx, [rdi + 4]
mov r8, r13
mov rdx, rsi
call fcn.140016c30
mov byte [rdi + r14], r12b
lea rdx, [rsp + 0x70]
cmp qword [rbp - 0x78], 0x10
cmovae rdx, qword [rsp + 0x70]
lea r8, [rbp + 0x58]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x140010486
lea rcx, str.____Cant_create_service_key_n
call fcn.1400011d0
xor bl, bl
mov rdx, qword [rsp + 0x68]
cmp rdx, 0x10
jb 0x1400103cd
inc rdx
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400103c8
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400107c7
call fcn.140014b18
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], 0xf
mov byte [rsp + 0x50], 0
mov rdx, qword [rbp - 0x78]
cmp rdx, 0x10
jb 0x14001041c
inc rdx
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140010417
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400107d9
call fcn.140014b18
mov qword [rbp - 0x80], r12
mov qword [rbp - 0x78], 0xf
mov byte [rsp + 0x70], 0
mov rdx, qword [rbp - 0x38]
cmp rdx, 0x10
jb 0x140010468
inc rdx
mov rcx, qword [rbp - 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140010463
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001079d
call fcn.140014b18
movzx eax, bl
mov rbx, qword [rsp + 0x168]
add rsp, 0x110
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rcx, [rsp + 0x50]
cmp qword [rsp + 0x68], 0x10
cmovae rcx, qword [rsp + 0x50]
mov eax, dword [rsp + 0x60]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov r9d, 2
lea r8, str.ImagePath
xor edx, edx
mov rcx, qword [rbp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueA]
mov rcx, qword [rbp + 0x58]
test eax, eax
je 0x1400104d7
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, str.____Cant_create_ImagePath_registry_value_n
jmp 0x140010389
mov dword [rsp + 0x28], 4
lea rax, [0x140052264]
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 + 0x58]
test eax, eax
je 0x14001051a
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, str.____Cant_create_Type_registry_value_n
jmp 0x140010389
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rdi, rax
test rax, rax
je 0x14001038e
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 rdx, str.RtlInitUnicodeString
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r14, rax
lea r9, [rbp + 0x50]
xor r8d, r8d
mov dl, 1
lea ecx, [r8 + 0xa]
call rbx
test eax, eax
jns 0x140010591
lea rcx, str.Fatal_error:_failed_to_acquire_SE_LOAD_DRIVER_PRIVILEGE._Make_sure_you_are_running_as_administrator._n
jmp 0x140010389
lea rdi, [rbp - 0x50]
cmp qword [rbp - 0x38], 0x10
cmovae rdi, qword [rbp - 0x50]
add rdi, qword [rbp - 0x40]
lea rbx, [rbp - 0x50]
cmp qword [rbp - 0x38], 0x10
cmovae rbx, qword [rbp - 0x50]
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x48], 7
mov word [rsp + 0x30], r12w
mov rdx, rdi
sub rdx, rbx
lea rcx, [rsp + 0x30]
call fcn.140006c00
lea rax, [rsp + 0x30]
mov qword [rbp + 0x60], rax
cmp rbx, rdi
je 0x14001063a
nop dword [rax]
nop word [rax + rax]
movsx r9d, byte [rbx]
mov rcx, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x48]
cmp rcx, rdx
jae 0x140010628
lea rax, [rcx + 1]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x30]
cmp rdx, 8
cmovae rax, qword [rsp + 0x30]
mov word [rax + rcx*2], r9w
mov word [rax + rcx*2 + 2], r12w
jmp 0x140010632
lea rcx, [rsp + 0x30]
call fcn.1400091a0
inc rbx
cmp rbx, rdi
jne 0x1400105f0
lea r8, [rsp + 0x30]
lea rdx, str.RegistryMachineSystemCurrentControlSetServices_
lea rcx, [rbp - 0x70]
call fcn.1400089c0
mov rbx, rax
lea rax, [rsp + 0x30]
cmp rax, rbx
je 0x1400106d3
mov rdx, qword [rsp + 0x48]
cmp rdx, 8
jb 0x14001069e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140010699
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400107cd
call fcn.140014b18
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x48], 7
mov word [rsp + 0x30], r12w
movups xmm0, xmmword [rbx]
movups xmmword [rsp + 0x30], xmm0
movups xmm1, xmmword [rbx + 0x10]
movups xmmword [rsp + 0x40], xmm1
mov qword [rbx + 0x10], r12
mov qword [rbx + 0x18], 7
mov word [rbx], r12w
mov rdx, qword [rbp - 0x58]
cmp rdx, 8
jb 0x140010713
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001070e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400107cd
call fcn.140014b18
lea rdx, [rsp + 0x30]
cmp qword [rsp + 0x48], 8
cmovae rdx, qword [rsp + 0x30]
lea rcx, [rbp]
call r14
lea rcx, [rbp]
call rsi
mov ebx, eax
mov edx, eax
lea rcx, str.___NtLoadDriver_Status_0x_lx_n
call fcn.1400011d0
test ebx, ebx
setns bl
mov rdx, qword [rsp + 0x48]
cmp rdx, 8
jb 0x140010784
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001077f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400107d3
call fcn.140014b18
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x48], 7
mov word [rsp + 0x30], r12w
jmp 0x140010390
call fcn.14001eb84
nop
call fcn.140001320
nop
call fcn.140001320
nop
call fcn.14001eb84
nop
call fcn.14001eb84
int3
call fcn.1400013c0
nop
call fcn.1400013c0
int3
call fcn.14001eb84
nop
call fcn.14001eb84
nop
call fcn.14001eb84
nop
call fcn.14001eb84
int3