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

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1150
call fcn.1401804d0
sub rsp, rax
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x1160], rbx
mov rax, qword [0x140248210]
xor rax, rbp
mov qword [rbp + 0x1100], rax
mov r12, rdx
mov qword [rbp + 0x30], rdx
mov r15, rcx
or r13, 0xffffffffffffffff
mov qword [rbp + 0x10], r13
or rdi, r13
mov qword [rbp], rdi
xor esi, esi
lea rax, [rbp + 0xef0]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0xce0]
lea r8, [rbp + 0xad0]
lea rdx, [rbp + 0x8c0]
mov rcx, r12
call fcn.14017d8e8
lea rdx, [rbp + 0x8c0]
lea rcx, [rbp + 0x6b0]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rdx, [rbp + 0xad0]
lea rcx, [rbp + 0x6b0]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
mov rdx, r12
lea rcx, [rbp + 0x4a0]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rdx, str..bak
lea rcx, [rbp + 0x4a0]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
lea r9, [rbp + 0x290]
xor r8d, r8d
lea rdx, [0x1401febb0]
lea rcx, [rbp + 0x6b0]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x1400077cd
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
lea rcx, [rbp + 0x290]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
mov qword [rbp + 0x10], rax
cmp rax, 0xffffffffffffffff
je 0x1400077cd
movsxd rcx, dword [r15 + 0x4c]
lea rdx, [0x14153e198]
mov rdx, qword [rdx + rcx*8]
mov qword [rbp + 0x28], rdx
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
dec rcx
mov rdi, rcx
mov qword [rbp + 0x38], rcx
mov rax, qword [r15 + 0x68]
mov qword [rbp + 0x20], rax
mov qword [rbp + 8], rax
mov ebx, esi
mov dword [rbp + 0x18], ebx
cmp ebx, eax
jge 0x140007717
movsxd rax, ebx
test ebx, ebx
js 0x140007712
cmp rax, qword [r15 + 0x68]
jge 0x140007712
lea rcx, [rax + rax*4]
mov rax, qword [r15 + 0x60]
mov r14d, dword [rax + rcx*4 + 8]
test r14d, r14d
jle 0x1400076d3
mov r12, qword [rax + rcx*4]
test r12, r12
je 0x14000769e
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea r9d, [rax + 1]
cmp r9d, 0x3fffffff
jg 0x14000769e
movsxd rax, r9d
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x140007651
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.1401804d0
sub rsp, rcx
lea rdi, [rsp + 0x40]
test rdi, rdi
je 0x14000769e
mov byte [rdi], 0
lea eax, [r9 + r9]
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rdi
or r9d, 0xffffffff
mov r8, r12
xor edx, edx
lea ecx, [rdx + 3]
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
cmove rdi, rsi
jmp 0x1400076a1
mov rdi, rsi
mov qword [rsp + 0x20], rsi
lea r9, [rbp + 8]
mov r8d, r14d
mov rdx, rdi
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400077c9
cmp r14d, dword [rbp + 8]
jne 0x1400077c9
mov rdi, qword [rbp + 0x38]
mov rdx, qword [rbp + 0x28]
mov rax, qword [rbp + 0x20]
dec eax
cmp ebx, eax
jge 0x140007703
mov qword [rsp + 0x20], rsi
lea r9, [rbp + 8]
mov r8d, edi
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400077c9
cmp edi, dword [rbp + 8]
jne 0x1400077c9
inc ebx
mov rax, qword [rbp + 0x20]
mov rdx, qword [rbp + 0x28]
jmp 0x1400075e3
call fcn.140026d70
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or r13, 0xffffffffffffffff
mov qword [rbp + 0x10], r13
mov r12, qword [rbp + 0x30]
mov rcx, r12
cmp dword [r15 + 0x50], 0
je 0x14000777f
lea rdx, [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rdi, rax
mov qword [rbp], rax
cmp rax, r13
je 0x140007789
lea rcx, [rbp + 0x4a0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rdx, [rbp + 0x4a0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x1400077cd
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
or rdi, r13
mov qword [rbp], rdi
jmp 0x140007789
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rdi, qword [rbp]
mov rdx, r12
lea rcx, [rbp + 0x290]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x1400077cd
mov r14d, 1
test r14d, r14d
je 0x1400077c4
mov rax, qword [r15]
xor edx, edx
mov rcx, r15
call qword [rax + 0xa8]
mov edx, dword [r15 + 0xa8]
mov dword [r15 + 0xac], edx
mov esi, r14d
jmp 0x1400077cd
mov rdi, qword [rbp]
cmp rdi, 0xffffffffffffffff
je 0x1400077dc
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
cmp r13, 0xffffffffffffffff
je 0x1400077eb
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp + 0x290]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, esi
mov rcx, qword [rbp + 0x1100]
xor rcx, rbp
call fcn.14017cd40
mov rbx, qword [rbp + 0x1160]
lea rsp, [rbp + 0x1110]
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret