Function at 0x4069bc
Capabilities:
Create process on windows
Get common file path
Write and execute a file
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r13
sub rsp, 0x8c0
lea rbp, [rsp + 0x40]
mov rax, qword [0x0040f278]
mov qword [rbp + 0x870], rax
lea rdx, str.:RepeatDEL___s_if_exist___s__goto_RepeatDEL___s_DEL___s_
lea rcx, [rbp + 0x20]
call fcn.00402658
lea rcx, [rbp + 0x664]
xor edx, edx
mov r8d, 0x206
mov dword [rbp + 0x660], 0
call sub.msvcrt.dll_memset
mov edi, 0x104
lea rdx, [rbp + 0x660]
mov r8d, edi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov r11, qword [section..data]
lea rcx, [rbp]
mov edx, 0x8ae
mov qword [rbp], r11
call fcn.004017ec
lea rcx, [rbp + 0x660]
mov rdx, rax
call fcn.004046c0
lea rcx, [rbp]
call fcn.00401328
mov rbx, qword [rbp]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea rdx, [rbp]
lea rcx, [rbp + 8]
mov dword [rbx - 8], eax
cdqe
mov word [rbx + rax*2], 0
call fcn.004025d8
lea rcx, str._selfdestruct.bat
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea r8, str._selfdestruct.bat
lea rcx, [rbp + 8]
mov edx, eax
call fcn.00401730
mov ebx, 0x204
lea rcx, [rbp + 0x454]
mov r8, rbx
xor edx, edx
mov dword [rbp + 0x450], 0
call sub.msvcrt.dll_memset
lea rcx, [rbp + 0x34]
mov r8, rbx
xor edx, edx
mov dword [rbp + 0x30], 0
call sub.msvcrt.dll_memset
lea rcx, [rbp + 0x244]
mov r8, rbx
xor edx, edx
mov dword [rbp + 0x240], 0
call sub.msvcrt.dll_memset
lea rdx, [rbp + 0x30]
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea rdx, [rbp + 0x240]
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov rbx, qword [rbp + 8]
lea rcx, [rbp + 0x30]
mov rdx, rbx
call sub.msvcrt.dll_wcscat
lea rcx, [rbp + 0x240]
mov rdx, rbx
call sub.msvcrt.dll_wcscat
lea rdx, [rbp + 0x450]
mov r8d, edi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rdx, [rbp + 0x450]
lea rcx, [rbp + 0x18]
call fcn.00402658
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
mov dword [rsp + 0x20], 2
mov edx, 0x40000000
xor r8d, r8d
lea rcx, [rbp + 0x30]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, 0xffffffffffffffff
cmp rax, r13
mov rsi, rax
je 0x406ca5
mov rcx, qword [section..data]
mov r8, qword [rbp + 0x18]
mov rdx, qword [rbp + 0x20]
lea rax, [0x005b3cd0]
mov qword [rbp + 0x10], rcx
lea rcx, [rbp + 0x10]
mov qword [rsp + 0x28], rax
mov r9, r8
mov qword [rsp + 0x20], rbx
call fcn.00401d24
lea r8, [0x0040c748]
lea rdx, [0x0040ca40]
lea rcx, [rbp + 0x10]
call fcn.00401d48
mov rbx, qword [rbp + 0x10]
test rbx, rbx
je 0x406c36
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [rax + rax + 2]
movsxd rax, ecx
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.0040b1c0
sub rsp, rax
lea rdi, [rsp + 0x40]
test rdi, rdi
je 0x406c36
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], ecx
xor ecx, ecx
mov r9d, r13d
mov r8, rbx
xor edx, edx
mov byte [rdi], 0
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb rdx, rdx
and rdx, rdi
jmp 0x406c38
xor edx, edx
mov r8d, dword [rbx - 8]
lea r9, [rbp + 0x28]
mov rcx, rsi
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rax, [rbp + 0x240]
lea r8, [rbp + 0x30]
lea rdx, str.open
xor r9d, r9d
xor ecx, ecx
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], rax
call qword [sym.imp.SHELL32.dll_ShellExecuteW]
lea rcx, [rbx - 0xc]
cmp rcx, qword [0x0040f008]
je 0x406ca5
mov eax, r13d
lock xadd dword [rcx], eax
add eax, r13d
test eax, eax
jg 0x406ca5
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
mov rcx, qword [rbp + 0x18]
add rcx, 0xfffffffffffffff4
cmp rcx, qword [0x0040f008]
je 0x406cc9
mov eax, r13d
lock xadd dword [rcx], eax
add eax, r13d
test eax, eax
jg 0x406cc9
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
mov rcx, qword [rbp + 8]
add rcx, 0xfffffffffffffff4
cmp rcx, qword [0x0040f008]
je 0x406ced
mov eax, r13d
lock xadd dword [rcx], eax
add eax, r13d
test eax, eax
jg 0x406ced
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
mov rcx, qword [rbp]
add rcx, 0xfffffffffffffff4
cmp rcx, qword [0x0040f008]
je 0x406d11
mov eax, r13d
lock xadd dword [rcx], eax
add eax, r13d
test eax, eax
jg 0x406d11
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
mov rcx, qword [rbp + 0x20]
add rcx, 0xfffffffffffffff4
cmp rcx, qword [0x0040f008]
je 0x406d35
mov eax, r13d
lock xadd dword [rcx], eax
add eax, r13d
test eax, eax
jg 0x406d35
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
mov rcx, qword [rbp + 0x870]
call fcn.0040b190
lea rsp, [rbp + 0x880]
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret