Function at 0x140006070
Capabilities:
Check if file exists
Copy file
Create service
Delete file
Persist via windows service
Start service
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r14
push rbp
lea rbp, [rsp - 0x210]
sub rsp, 0x310
mov rax, qword [0x140014040]
xor rax, rsp
mov qword [rbp + 0x200], rax
xor r14d, r14d
mov r8d, 0x104
lea rdx, [rbp - 0x10]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rbx, [0x140014a30]
mov r8, rbx
cmp qword [0x140014a48], 7
cmova r8, qword [0x140014a30]
lea rax, [rbp - 0x10]
sub r8, rax
nop dword [rax + rax]
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x1400060f4
add rax, 2
test ecx, ecx
jne 0x1400060e0
test edx, edx
je 0x1400062ab
call fcn.140004990
mov rcx, rbx
cmp qword [0x140014a48], 7
cmova rcx, qword [0x140014a30]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x14000639b
lea rdx, str.Executable_already_exists_at_system_path._Replacing_it...
lea rcx, [rsp + 0x70]
call fcn.140008400
nop
lea rcx, [rsp + 0x70]
call fcn.140001860
nop
mov rdx, qword [rbp - 0x78]
cmp rdx, 7
jbe 0x140006183
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000617e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000617e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000bd2c
mov rcx, rbx
cmp qword [0x140014a48], 7
cmova rcx, qword [0x140014a30]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1400062d7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea r9, [rbp - 0x1e]
sub r9, 2
mov eax, 0xcccccccd
mul r8d
shr edx, 3
movzx eax, dx
shl ax, 2
lea ecx, [rax + rdx]
add cx, cx
sub r8w, cx
add r8w, 0x30
mov word [r9], r8w
mov r8d, edx
test edx, edx
jne 0x1400061b1
lea r8, [rbp - 0x1e]
mov rdx, r9
lea rcx, [rbp - 0x70]
call fcn.14000a6c0
nop
lea r8, [rbp - 0x70]
lea rdx, str.Failed_to_delete_existing_executable_at_system_path._Error_code:
lea rcx, [rsp + 0x70]
call fcn.140008f10
nop
mov rcx, rax
call fcn.140001860
nop
mov rdx, qword [rbp - 0x78]
cmp rdx, 7
jbe 0x140006255
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140006250
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140006250
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000bd2c
movdqa xmm0, xmmword [0x140010180]
movdqu xmmword [rbp - 0x80], xmm0
mov word [rsp + 0x70], r14w
mov rdx, qword [rbp - 0x58]
cmp rdx, 7
jbe 0x1400062ab
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400062a6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400062a6
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000bd2c
mov rcx, qword [rbp + 0x200]
xor rcx, rsp
call fcn.14000b8a0
lea r11, [rsp + 0x310]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x80], xmm1
mov ecx, 0x60
call fcn.14000b9e0
mov rcx, rax
mov qword [rsp + 0x70], rax
movdqa xmm0, xmmword [0x1400101f0]
movdqu xmmword [rbp - 0x80], xmm0
movaps xmm0, xmmword [str.Existing_executable_deleted_successfully.]
movups xmmword [rax], xmm0
movaps xmm1, xmmword [0x14000f940]
movups xmmword [rax + 0x10], xmm1
movaps xmm0, xmmword [0x14000f950]
movups xmmword [rax + 0x20], xmm0
movaps xmm1, xmmword [0x14000f960]
movups xmmword [rax + 0x30], xmm1
movaps xmm0, xmmword [0x14000f970]
movups xmmword [rax + 0x40], xmm0
movzx eax, word [0x14000f980]
mov word [rcx + 0x50], ax
mov word [rcx + 0x52], r14w
lea rcx, [rsp + 0x70]
call fcn.140001860
nop
mov rdx, qword [rbp - 0x78]
cmp rdx, 7
jbe 0x14000639b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140006396
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140006396
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000bd2c
mov rdx, rbx
cmp qword [0x140014a48], 7
cmova rdx, qword [0x140014a30]
xor r8d, r8d
lea rcx, [rbp - 0x10]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x1400064d1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea r9, [rbp - 0x1e]
sub r9, 2
mov eax, 0xcccccccd
mul r8d
shr edx, 3
movzx eax, dx
shl ax, 2
lea ecx, [rax + rdx]
add cx, cx
sub r8w, cx
add r8w, 0x30
mov word [r9], r8w
mov r8d, edx
test edx, edx
jne 0x1400063d0
lea r8, [rbp - 0x1e]
mov rdx, r9
lea rcx, [rbp - 0x70]
call fcn.14000a6c0
nop
lea r8, [rbp - 0x70]
lea rdx, str.Failed_to_copy_executable_to_system_path._Error_code:
lea rcx, [rsp + 0x70]
call fcn.140008f10
nop
mov rcx, rax
call fcn.140001860
nop
mov rdx, qword [rbp - 0x78]
cmp rdx, 7
jbe 0x140006474
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000646f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000646f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000bd2c
movdqa xmm0, xmmword [0x140010180]
movdqu xmmword [rbp - 0x80], xmm0
mov word [rsp + 0x70], r14w
mov rdx, qword [rbp - 0x58]
cmp rdx, 7
jbe 0x1400062ab
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400062a6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400062a6
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x80], xmm1
mov ecx, 0x50
call fcn.14000b9e0
mov rcx, rax
mov qword [rsp + 0x70], rax
movdqa xmm0, xmmword [0x1400101d0]
movdqu xmmword [rbp - 0x80], xmm0
movaps xmm0, xmmword [str.Executable_copied_to_system_path.]
movups xmmword [rax], xmm0
movaps xmm1, xmmword [0x14000fa10]
movups xmmword [rax + 0x10], xmm1
movaps xmm0, xmmword [0x14000fa20]
movups xmmword [rax + 0x20], xmm0
movaps xmm1, xmmword [0x14000fa30]
movups xmmword [rax + 0x30], xmm1
movzx eax, word [0x14000fa40]
mov word [rcx + 0x40], ax
mov word [rcx + 0x42], r14w
lea rcx, [rsp + 0x70]
call fcn.140001860
nop
mov rdx, qword [rbp - 0x78]
cmp rdx, 7
jbe 0x14000658a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140006585
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140006585
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000bd2c
xor edx, edx
xor ecx, ecx
mov r8d, 2
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
je 0x140006a67
lea rdx, str.Creating_the_service...
lea rcx, [rbp - 0x70]
call fcn.140008400
nop
lea rcx, [rbp - 0x70]
call fcn.140001860
nop
mov rdx, qword [rbp - 0x58]
cmp rdx, 7
jbe 0x140006604
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400065ff
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400065ff
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000bd2c
cmp qword [0x140014a48], 7
cmova rbx, qword [0x140014a30]
lea r8, [0x140014990]
cmp qword [0x1400149a8], 7
cmova r8, qword [0x140014990]
lea rsi, [0x140014a10]
mov rdx, rsi
cmp qword [0x140014a28], 7
cmova rdx, qword [0x140014a10]
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
mov r9d, 0xf01ff
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rbx, rax
test rax, rax
jne 0x1400069b8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
cmp eax, 0x431
jne 0x1400068a1
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x80], xmm1
mov ecx, 0x30
call fcn.14000b9e0
mov rcx, rax
mov qword [rsp + 0x70], rax
movdqa xmm0, xmmword [0x1400101a0]
movdqu xmmword [rbp - 0x80], xmm0
movups xmm0, xmmword [str.Service_already_exists.]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x14000fa88]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x14000fa98]
movsd qword [rax + 0x20], xmm0
mov eax, dword [0x14000faa0]
mov dword [rcx + 0x28], eax
movzx eax, word [0x14000faa4]
mov word [rcx + 0x2c], ax
mov word [rcx + 0x2e], r14w
lea rcx, [rsp + 0x70]
call fcn.140001860
nop
mov rdx, qword [rbp - 0x78]
cmp rdx, 7
jbe 0x140006763
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000675e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000675e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000bd2c
cmp qword [0x140014a28], 7
cmova rsi, qword [0x140014a10]
mov r8d, 0x10
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x1400069b8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea r9, [rbp - 0x1e]
nop
sub r9, 2
mov eax, 0xcccccccd
mul r8d
shr edx, 3
movzx ecx, dx
shl cx, 2
lea eax, [rcx + rdx]
add ax, ax
sub r8w, ax
add r8w, 0x30
mov word [r9], r8w
mov r8d, edx
test edx, edx
jne 0x1400067a0
lea r8, [rbp - 0x1e]
mov rdx, r9
lea rcx, [rbp - 0x70]
call fcn.14000a6c0
nop
lea r8, [rbp - 0x70]
lea rdx, str.Failed_to_open_existing_service._Error_code:
lea rcx, [rsp + 0x70]
call fcn.140008f10
nop
mov rcx, rax
call fcn.140001860
nop
mov rdx, qword [rbp - 0x78]
cmp rdx, 7
jbe 0x140006844
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000683f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000683f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000bd2c
movdqa xmm0, xmmword [0x140010180]
movdqu xmmword [rbp - 0x80], xmm0
mov word [rsp + 0x70], r14w
mov rdx, qword [rbp - 0x58]
cmp rdx, 7
jbe 0x1400069aa
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400069a5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400069a5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
lea r9, [rbp - 0x1e]
nop word [rax + rax]
sub r9, 2
mov eax, 0xcccccccd
mul r8d
shr edx, 3
movzx eax, dx
shl ax, 2
lea ecx, [rax + rdx]
add cx, cx
sub r8w, cx
add r8w, 0x30
mov word [r9], r8w
mov r8d, edx
test edx, edx
jne 0x1400068b0
lea r8, [rbp - 0x1e]
mov rdx, r9
lea rcx, [rbp - 0x70]
call fcn.14000a6c0
nop
lea r8, [rbp - 0x70]
lea rdx, str.Failed_to_create_service._Error_code:
lea rcx, [rsp + 0x70]
call fcn.140008f10
nop
mov rcx, rax
call fcn.140001860
nop
mov rdx, qword [rbp - 0x78]
cmp rdx, 7
jbe 0x140006954
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000694f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000694f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000bd2c
movdqa xmm0, xmmword [0x140010180]
movdqu xmmword [rbp - 0x80], xmm0
mov word [rsp + 0x70], r14w
mov rdx, qword [rbp - 0x58]
cmp rdx, 7
jbe 0x1400069aa
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400069a5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400069a5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000bd2c
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400062ab
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x140006a2f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
jne 0x1400069f4
lea rdx, str.Service_is_already_running.
lea rcx, [rbp - 0x70]
call fcn.140008400
nop
lea rcx, [rbp - 0x70]
call fcn.140001860
nop
jmp 0x140006a4a
mov edx, eax
lea rcx, [rsp + 0x70]
call fcn.1400017d0
nop
mov r8, rax
lea rdx, str.Failed_to_start_service._Error_code:
lea rcx, [rbp - 0x70]
call fcn.140008f10
nop
mov rcx, rax
call fcn.140001860
nop
lea rcx, [rbp - 0x70]
call fcn.140008390
nop
lea rcx, [rsp + 0x70]
jmp 0x140006a4e
lea rdx, str.Service_started_successfully.
lea rcx, [rbp - 0x70]
call fcn.140008400
nop
lea rcx, [rbp - 0x70]
call fcn.140001860
nop
lea rcx, [rbp - 0x70]
call fcn.140008390
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140006aab
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rsp + 0x70]
call fcn.1400017d0
nop
mov r8, rax
lea rdx, str.Failed_to_open_SC_Manager._Error_code:
lea rcx, [rbp - 0x70]
call fcn.140008f10
nop
mov rcx, rax
call fcn.140001860
nop
lea rcx, [rbp - 0x70]
call fcn.140008390
nop
lea rcx, [rsp + 0x70]
call fcn.140008390
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]