Function at 0x18013bdf0
Capabilities:
Delete file
Get common file path
Write file on windows

Disassembly:
push rbp
push r14
push r15
lea rbp, [rsp - 0x250]
sub rsp, 0x350
mov rax, qword [0x18018f008]
xor rax, rsp
mov qword [rbp + 0x240], rax
mov r14, rcx
lea rdx, [rbp + 0x30]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
xor r15d, r15d
test eax, eax
je 0x18013be4b
lea r9, [rbp + 0x30]
xor r8d, r8d
lea rdx, [0x180173260]
lea rcx, [rbp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x18013be75
lea r9, [rbp + 0x30]
mov dword [rbp + 0x30], 0x2e
xor r8d, r8d
lea rdx, [0x180173260]
lea rcx, [rbp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x18013be75
xor eax, eax
jmp 0x18013c048
mov qword [rsp + 0x378], rbx
lea rcx, [rbp + 0x30]
mov qword [rsp + 0x30], r15
xor r9d, r9d
mov qword [rsp + 0x380], rsi
xor r8d, r8d
mov dword [rsp + 0x28], 0x4000100
mov edx, 0xc0000000
mov qword [rsp + 0x388], rdi
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x18013bfd9
test r14, r14
je 0x18013bfba
lea r9, [rsp + 0x50]
mov r8d, 0xffffffff
mov rdx, r14
xor ecx, ecx
call sym.tcl86t.dll_hcl_UtfToExternalDString
mov edi, dword [rsp + 0x58]
mov rbx, rax
mov ecx, eax
test edi, edi
jle 0x18013bf53
nop
cmp byte [rbx], 0xa
jne 0x18013bf47
mov r8d, ebx
sub r8d, eax
je 0x18013bf1b
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], r15
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x18013bfd9
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], r15
mov r8d, 2
lea rdx, [0x180173268]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x18013bfd9
lea rax, [rbx + 1]
inc rbx
dec edi
mov rcx, rbx
test edi, edi
jg 0x18013bef0
sub ecx, eax
je 0x18013bf74
mov r8d, ecx
mov qword [rsp + 0x20], r15
mov rcx, rsi
lea r9, [rsp + 0x40]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x18013bfd9
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x60]
cmp rcx, rax
je 0x18013bf88
call sym.tcl86t.dll_hclpFree
lea rax, [rsp + 0x60]
mov dword [rsp + 0x58], r15d
xor r9d, r9d
mov qword [rsp + 0x50], rax
xor r8d, r8d
mov dword [rsp + 0x5c], 0xc8
xor edx, edx
mov byte [rsp + 0x60], r15b
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x18013bfd9
mov ecx, reloc.WS2_32.dll_recv
call sym.tcl86t.dll_hclpAlloc
test rax, rax
je 0x18013c064
mov dword [rax], 3
mov qword [rax + 8], rsi
jmp 0x18013c030
test r14, r14
je 0x18013c00e
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x60]
cmp rcx, rax
je 0x18013bff2
call sym.tcl86t.dll_hclpFree
lea rax, [rsp + 0x60]
mov dword [rsp + 0x58], r15d
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x5c], 0xc8
mov byte [rsp + 0x60], r15b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call sym.tcl86t.dll_hclWinConvertError
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp + 0x30]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
xor eax, eax
mov rsi, qword [rsp + 0x380]
mov rbx, qword [rsp + 0x378]
mov rdi, qword [rsp + 0x388]
mov rcx, qword [rbp + 0x240]
xor rcx, rsp
call fcn.180146240
add rsp, 0x350
pop r15
pop r14
pop rbp
ret
mov edx, reloc.WS2_32.dll_recv
lea rcx, str.unable_to_alloc__u_bytes
call sym.tcl86t.dll_hcl_Panic
int3