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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x47]
sub rsp, 0xd0
mov rbx, rcx
lea rcx, [rbp - 0x49]
call fcn.140038470
nop
movabs rdi, 0x7ffffffffffffffe
mov rax, rdi
mov rcx, qword [rbp - 0x39]
sub rax, rcx
cmp rax, 0x22
jb 0x14004057c
lea rax, [rbp - 0x49]
cmp qword [rbp - 0x31], 8
cmovae rax, qword [rbp - 0x49]
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x22
lea r9, [0x1400cac30]
lea rcx, [rbp + 0x17]
call fcn.14003e000
nop
mov rcx, qword [rbx + 0x10]
mov rax, rdi
sub rax, rcx
cmp rax, 4
jb 0x140040582
cmp qword [rbx + 0x18], 8
jb 0x140040285
mov rbx, qword [rbx]
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], 4
lea r9, [0x1400cac78]
lea rcx, [rbp - 0x29]
call fcn.14003e000
nop
lea rdx, [rbp + 0x17]
cmp qword [rbp + 0x2f], 8
cmovae rdx, qword [rbp + 0x17]
lea r8, [rbp + 0x77]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
xor r14d, r14d
test eax, eax
jne 0x14004046e
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
lea r9d, [r14 + 2]
lea r8, [0x1400cac88]
xor edx, edx
mov rcx, qword [rbp + 0x77]
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueW]
mov rcx, qword [rbp + 0x77]
test eax, eax
jne 0x140040468
mov dword [rsp + 0x28], 4
lea rax, [0x1400cac28]
mov qword [rsp + 0x20], rax
lea r9d, [r14 + 4]
lea r8, [0x1400caca0]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueW]
mov rcx, qword [rbp + 0x77]
test eax, eax
jne 0x140040468
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [0x1400caac8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rsi, rax
test rax, rax
je 0x14004046e
lea rdx, [0x1400cacb0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rbx, rax
lea rdx, [0x1400cacc8]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rsi, rax
lea r9, [rbp + 0x6f]
xor r8d, r8d
mov dl, 1
lea ecx, [r14 + 0xa]
call rbx
test eax, eax
js 0x14004046e
mov rcx, qword [rbp - 0x39]
sub rdi, rcx
cmp rdi, 0x34
jb 0x140040576
lea rax, [rbp - 0x49]
cmp qword [rbp - 0x31], 8
cmovae rax, qword [rbp - 0x49]
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x34
lea r9, [0x1400cace0]
lea rcx, [rbp - 9]
call fcn.14003e000
nop
lea rdx, [rbp - 9]
cmp qword [rbp + 0xf], 8
cmovae rdx, qword [rbp - 9]
lea rcx, [rbp + 0x37]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea rcx, [rbp + 0x37]
call rsi
cmp eax, 0xc000010e
jne 0x14004040d
mov bl, 1
jmp 0x140040412
test eax, eax
setns bl
mov rdx, qword [rbp + 0xf]
cmp rdx, 8
jb 0x140040455
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140040450
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140040450
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400539ec
mov qword [rbp + 7], r14
mov qword [rbp + 0xf], 7
mov word [rbp - 9], r14w
jmp 0x140040470
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor bl, bl
mov rdx, qword [rbp - 0x11]
cmp rdx, 8
jb 0x1400404b3
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x29]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400404ae
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400404ae
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400539ec
mov qword [rbp - 0x19], r14
mov qword [rbp - 0x11], 7
mov word [rbp - 0x29], r14w
mov rdx, qword [rbp + 0x2f]
cmp rdx, 8
jb 0x140040507
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x17]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140040502
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140040502
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400539ec
mov qword [rbp + 0x27], r14
mov qword [rbp + 0x2f], 7
mov word [rbp + 0x17], r14w
mov rdx, qword [rbp - 0x31]
cmp rdx, 8
jb 0x14004055b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x49]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140040556
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140040556
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400539ec
movzx eax, bl
lea r11, [rsp + 0xd0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
call fcn.140003950
nop
call fcn.140003950
nop
call fcn.140003950
int3