Function at 0x140006bf0
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.140080f60
sub rsp, rax
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x1168], rbx
mov rax, qword [0x1419d0c58]
xor rax, rbp
mov qword [rbp + 0x1100], rax
mov dword [rbp + 0x18], r9d
mov edi, r8d
mov r13, rdx
mov qword [rbp + 0x30], rdx
mov r12, rcx
or r14, 0xffffffffffffffff
mov qword [rbp + 0x10], r14
or rbx, r14
mov qword [rbp], rbx
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, r13
call fcn.140068edc
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, r13
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, [0x14008a9d0]
lea rcx, [rbp + 0x6b0]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x140006f98
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 r14, rax
mov qword [rbp + 0x10], rax
cmp rax, 0xffffffffffffffff
je 0x140006f98
cmp edi, 0xffffffff
jne 0x140006d2b
mov edi, dword [r12 + 0x4c]
movsxd rcx, edi
lea r10, [0x1400ba1c8]
mov r10, qword [r10 + rcx*8]
mov qword [rbp + 0x28], r10
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, r10
repne scasb al, byte [rdi]
not rcx
dec rcx
mov rdi, rcx
mov qword [rbp + 0x38], rcx
mov rax, qword [r12 + 0x68]
mov qword [rbp + 0x20], rax
mov qword [rbp + 8], rax
mov ebx, esi
mov dword [rbp + 0x1c], ebx
cmp ebx, eax
jge 0x140006ece
movsxd rdx, ebx
test ebx, ebx
js 0x140006ec9
cmp rdx, qword [r12 + 0x68]
jge 0x140006ec9
lea rcx, [rdx + rdx*4]
mov rax, qword [r12 + 0x60]
mov r15d, dword [rax + rcx*4 + 8]
test r15d, r15d
jle 0x140006e84
test ebx, ebx
js 0x140006e77
cmp rdx, qword [r12 + 0x68]
jge 0x140006e77
lea rcx, [rdx + rdx*4]
mov r13, qword [rax + rcx*4]
test r13, r13
jne 0x140006dc4
mov rdi, rsi
jmp 0x140006e48
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea r9d, [rax + 1]
cmp r9d, 0x3fffffff
jle 0x140006ddf
mov rdi, rsi
jmp 0x140006e48
movsxd rax, r9d
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x140006df8
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.140080f60
sub rsp, rcx
lea rdi, [rsp + 0x40]
test rdi, rdi
je 0x140006e45
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, r13
xor edx, edx
lea ecx, [rdx + 3]
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
cmove rdi, rsi
jmp 0x140006e48
mov rdi, rsi
mov qword [rsp + 0x20], rsi
lea r9, [rbp + 8]
mov r8d, r15d
mov rdx, rdi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140006f94
cmp r15d, dword [rbp + 8]
je 0x140006e7c
mov rbx, qword [rbp]
jmp 0x140006f98
call fcn.140024974
mov rdi, qword [rbp + 0x38]
mov r10, qword [rbp + 0x28]
mov rax, qword [rbp + 0x20]
dec eax
cmp ebx, eax
jge 0x140006eb7
mov qword [rsp + 0x20], rsi
lea r9, [rbp + 8]
mov r8d, edi
mov rdx, r10
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140006f8e
cmp edi, dword [rbp + 8]
jne 0x140006f88
inc ebx
mov dword [rbp + 0x1c], ebx
mov rax, qword [rbp + 0x20]
mov r10, qword [rbp + 0x28]
jmp 0x140006d67
call fcn.140024974
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or r14, 0xffffffffffffffff
mov qword [rbp + 0x10], r14
cmp dword [r12 + 0x50], 0
je 0x140006f37
lea rdx, [rbp + 0x40]
mov r13, qword [rbp + 0x30]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rbx, rax
mov qword [rbp], rax
cmp rax, r14
je 0x140006f48
lea rcx, [rbp + 0x4a0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rdx, [rbp + 0x4a0]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x140006f98
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
or rbx, r14
mov qword [rbp], rbx
jmp 0x140006f48
mov r13, qword [rbp + 0x30]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rbx, qword [rbp]
mov rdx, r13
lea rcx, [rbp + 0x290]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x140006f98
cmp dword [rbp + 0x18], 0
je 0x140006f81
mov rax, qword [r12]
xor edx, edx
mov rcx, r12
call qword [rax + 0xa8]
mov edx, dword [r12 + 0xa8]
mov dword [r12 + 0xac], edx
mov esi, 1
jmp 0x140006f98
mov rbx, qword [rbp]
jmp 0x140006f98
mov rbx, qword [rbp]
jmp 0x140006f98
mov rbx, qword [rbp]
cmp rbx, 0xffffffffffffffff
je 0x140006fa7
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
cmp r14, 0xffffffffffffffff
je 0x140006fb6
mov rcx, r14
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.140068690
mov rbx, qword [rbp + 0x1168]
lea rsp, [rbp + 0x1110]
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret