Function at 0x180058f00
Capabilities:
Delete file
Move file
Write file on windows

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x280
mov rcx, qword [rsp + 0x298]
call fcn.180020d70
inc rax
mov rcx, rax
call fcn.180015d34
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x40], rax
mov rdx, qword [rsp + 0x298]
mov rcx, qword [rsp + 0x40]
call fcn.18001cd30
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathRemoveExtensionA]
lea rax, [rsp + 0x4d]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rcx, [rsp + 0x4d]
call fcn.180058df0
mov rcx, rax
call fcn.1800083e0
mov rdx, rax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathAddExtensionA]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, qword [rsp + 0x298]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0xffffffffffffffff
je 0x180059698
lea rax, [rsp + 0x48]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rcx, [rsp + 0x48]
call fcn.180058cd0
mov rcx, rax
call fcn.1800083c0
mov rdx, rax
mov rcx, qword [rsp + 0x290]
call fcn.1800206c0
test eax, eax
jne 0x180059116
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, dword [0x180081cd4]
lea rdx, str.MSCF
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x2a0], 0
je 0x180059107
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x298]
call qword [sym.imp.KERNEL32.dll_MoveFileA]
lea rax, [rsp + 0x138]
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x158]
mov qword [rsp + 0x78], rax
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x68]
call fcn.180009020
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x80], rax
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x78]
call fcn.180009020
mov qword [rsp + 0x88], rax
mov r8d, 0x8000000
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x88]
call fcn.1800598f0
lea rax, [rsp + 0x49]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rcx, [rsp + 0x49]
call fcn.180058bb0
mov rcx, rax
call fcn.1800083a0
mov rdx, qword [rsp + 0x298]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MoveFileA]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x54], eax
jmp 0x180059698
lea rax, [rsp + 0x4a]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rcx, [rsp + 0x4a]
call fcn.180058a90
mov rcx, rax
call fcn.180008380
mov rdx, rax
mov rcx, qword [rsp + 0x290]
call fcn.1800206c0
test eax, eax
jne 0x18005926f
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, dword [0x180276394]
lea rdx, [0x1802763a0]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x2a0], 0
je 0x180059260
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x298]
call qword [sym.imp.KERNEL32.dll_MoveFileA]
lea rax, [rsp + 0x178]
mov qword [rsp + 0x90], rax
lea rax, [rsp + 0x198]
mov qword [rsp + 0xa0], rax
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x90]
call fcn.180009020
mov qword [rsp + 0x98], rax
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0xa8], rax
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0xa0]
call fcn.180009020
mov qword [rsp + 0xb0], rax
mov r8d, 0x8000000
mov rdx, qword [rsp + 0xa8]
mov rcx, qword [rsp + 0xb0]
call fcn.1800598f0
lea rax, [rsp + 0x4b]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rcx, [rsp + 0x4b]
call fcn.180058970
mov rcx, rax
call fcn.180008360
mov rdx, qword [rsp + 0x298]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MoveFileA]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x54], eax
jmp 0x180059698
lea rax, [rsp + 0x4c]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rcx, [rsp + 0x4c]
call fcn.180058850
mov rcx, rax
call fcn.180008340
mov rdx, rax
mov rcx, qword [rsp + 0x290]
call fcn.1800206c0
test eax, eax
jne 0x1800593c8
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, dword [0x180081cdc]
lea rdx, [0x180081ce0]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x2a0], 0
je 0x1800593b9
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x298]
call qword [sym.imp.KERNEL32.dll_MoveFileA]
lea rax, [rsp + 0x1b8]
mov qword [rsp + 0xb8], rax
lea rax, [rsp + 0x1d8]
mov qword [rsp + 0xc8], rax
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0xb8]
call fcn.180009020
mov qword [rsp + 0xc0], rax
mov rax, qword [rsp + 0xc0]
mov qword [rsp + 0xd0], rax
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0xc8]
call fcn.180009020
mov qword [rsp + 0xd8], rax
mov r8d, 0x8000000
mov rdx, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0xd8]
call fcn.1800598f0
lea rax, [rsp + 0x52]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rcx, [rsp + 0x52]
call fcn.180058730
mov rcx, rax
call fcn.180008320
mov rdx, qword [rsp + 0x298]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MoveFileA]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x54], eax
jmp 0x180059698
lea rax, [rsp + 0x4e]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rcx, [rsp + 0x4e]
call fcn.180058600
mov rcx, rax
call fcn.180008300
mov rdx, rax
mov rcx, qword [rsp + 0x290]
call fcn.1800206c0
test eax, eax
jne 0x180059521
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, dword [0x180081cd0]
lea rdx, [0x180276120]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x2a0], 0
je 0x180059512
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x298]
call qword [sym.imp.KERNEL32.dll_MoveFileA]
lea rax, [rsp + 0x1f8]
mov qword [rsp + 0xe0], rax
lea rax, [rsp + 0x218]
mov qword [rsp + 0xf0], rax
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0xe0]
call fcn.180009020
mov qword [rsp + 0xe8], rax
mov rax, qword [rsp + 0xe8]
mov qword [rsp + 0xf8], rax
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0xf0]
call fcn.180009020
mov qword [rsp + 0x100], rax
mov r8d, 0x8000000
mov rdx, qword [rsp + 0xf8]
mov rcx, qword [rsp + 0x100]
call fcn.1800598f0
lea rax, [rsp + 0x4f]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rcx, [rsp + 0x4f]
call fcn.1800584d0
mov rcx, rax
call fcn.1800082e0
mov rdx, qword [rsp + 0x298]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MoveFileA]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x54], eax
jmp 0x180059698
lea rax, [rsp + 0x50]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rcx, [rsp + 0x50]
call fcn.1800583a0
mov rcx, rax
call fcn.1800082c0
mov rdx, rax
mov rcx, qword [rsp + 0x290]
call fcn.1800206c0
test eax, eax
jne 0x180059677
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, dword [0x180081cd8]
lea rdx, [0x180258950]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x2a0], 0
je 0x18005966b
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x298]
call qword [sym.imp.KERNEL32.dll_MoveFileA]
lea rax, [rsp + 0x238]
mov qword [rsp + 0x108], rax
lea rax, [rsp + 0x258]
mov qword [rsp + 0x118], rax
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x108]
call fcn.180009020
mov qword [rsp + 0x110], rax
mov rax, qword [rsp + 0x110]
mov qword [rsp + 0x120], rax
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x118]
call fcn.180009020
mov qword [rsp + 0x128], rax
mov r8d, 0x8000000
mov rdx, qword [rsp + 0x120]
mov rcx, qword [rsp + 0x128]
call fcn.1800598f0
lea rax, [rsp + 0x51]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rcx, [rsp + 0x51]
call fcn.180058270
mov rcx, rax
call fcn.1800082a0
mov rdx, qword [rsp + 0x298]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MoveFileA]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x54], eax
jmp 0x180059698
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x298]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
mov dword [rsp + 0x54], 1
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x130], rax
mov rcx, qword [rsp + 0x130]
call fcn.180015cf0
mov eax, dword [rsp + 0x54]
add rsp, 0x280
pop rdi
ret