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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x950
mov rax, qword [0x1400b2ac0]
xor rax, rsp
mov qword [rsp + 0x940], rax
mov r13, rdx
mov qword [rsp + 0x68], rdx
mov rsi, rcx
mov qword [rsp + 0x70], rcx
or rbx, 0xffffffffffffffff
mov qword [rsp + 0x50], rbx
or r12, rbx
mov qword [rsp + 0x48], r12
xor r15d, r15d
lea rax, [rsp + 0x720]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x830]
lea r8, [rsp + 0x500]
lea rdx, [rsp + 0x610]
mov rcx, r13
call fcn.1400619bc
lea rdx, [rsp + 0x610]
lea rcx, [rsp + 0x3f0]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
lea rdx, [rsp + 0x500]
lea rcx, [rsp + 0x3f0]
call qword [sym.imp.KERNEL32.dll_lstrcatA]
mov rdx, r13
lea rcx, [rsp + 0x2e0]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
lea rdx, str..bak
lea rcx, [rsp + 0x2e0]
call qword [sym.imp.KERNEL32.dll_lstrcatA]
lea r9, [rsp + 0x1d0]
xor r8d, r8d
lea rdx, [0x1400938d0]
lea rcx, [rsp + 0x3f0]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x140005b9a
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
lea rcx, [rsp + 0x1d0]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
mov qword [rsp + 0x50], rax
cmp rax, 0xffffffffffffffff
je 0x140005b9a
movsxd rcx, dword [rsi + 0x4c]
lea rdx, [0x141a1bde8]
mov rdx, qword [rdx + rcx*8]
mov qword [rsp + 0x78], rdx
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
dec rcx
mov qword [rsp + 0x80], rcx
add rsi, 0x58
mov qword [rsp + 0x60], rsi
mov rcx, rsi
call fcn.140007770
mov r14, rax
mov edi, r15d
mov dword [rsp + 0x58], r15d
cmp edi, r14d
jge 0x140005adb
movsxd r13, edi
mov rdx, r13
mov rcx, rsi
call fcn.140007500
mov esi, dword [rax + 8]
test esi, esi
jle 0x140005a8e
mov rdx, r13
mov rcx, qword [rsp + 0x60]
call fcn.140007500
mov rcx, qword [rax]
call fcn.140004ef0
mov rdx, rax
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x40]
mov r8d, esi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140005b9a
cmp esi, dword [rsp + 0x40]
jne 0x140005b9a
lea eax, [r14 - 1]
cmp edi, eax
jge 0x140005acb
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x40]
mov rsi, qword [rsp + 0x80]
mov r8d, esi
mov rdx, qword [rsp + 0x78]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140005b9a
cmp esi, dword [rsp + 0x40]
jne 0x140005b9a
inc edi
mov dword [rsp + 0x58], edi
mov rsi, qword [rsp + 0x60]
jmp 0x140005a30
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or rbx, 0xffffffffffffffff
mov qword [rsp + 0x50], rbx
mov rsi, qword [rsp + 0x70]
cmp dword [rsi + 0x50], 0
je 0x140005b51
lea rdx, [rsp + 0x90]
mov r13, qword [rsp + 0x68]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov r12, rax
mov qword [rsp + 0x48], rax
cmp rax, rbx
je 0x140005b5f
lea rcx, [rsp + 0x2e0]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
lea rdx, [rsp + 0x2e0]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x140005b9a
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FindClose]
or r12, rbx
mov qword [rsp + 0x48], r12
jmp 0x140005b5f
mov r13, qword [rsp + 0x68]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
mov rdx, r13
lea rcx, [rsp + 0x1d0]
call qword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x140005b9a
mov edi, 1
test edi, edi
je 0x140005b97
mov rax, qword [rsi]
xor edx, edx
mov rcx, rsi
call qword [rax + 0xa8]
mov edx, dword [rsi + 0xa8]
mov dword [rsi + 0xac], edx
mov r15d, edi
cmp r12, 0xffffffffffffffff
je 0x140005ba9
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FindClose]
cmp rbx, 0xffffffffffffffff
je 0x140005bb8
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x1d0]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, r15d
mov rcx, qword [rsp + 0x940]
xor rcx, rsp
call fcn.140060cc0
lea r11, [rsp + 0x950]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret