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

Disassembly:
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x7f0]
sub rsp, 0x8f0
mov rax, qword [0x180021050]
xor rax, rsp
mov qword [rbp + 0x7e0], rax
mov r13, rcx
lea rcx, [rsp + 0x54]
xor r15d, r15d
xor edx, edx
mov r8d, 0x22c
mov dword [rsp + 0x50], r15d
call fcn.18000b070
lea rcx, [rbp + 0x5d2]
xor edx, edx
mov r8d, 0x206
mov esi, r15d
mov dword [rsp + 0x40], r15d
mov r12d, r15d
mov word [rbp + 0x5d0], r15w
call fcn.18000b070
lea rcx, [rbp + 0x3c2]
xor edx, edx
mov r8d, 0x206
mov word [rbp + 0x3c0], r15w
call fcn.18000b070
lea rcx, [rbp + 0x1b2]
xor edx, edx
mov r8d, 0x206
mov word [rbp + 0x1b0], r15w
call fcn.18000b070
xor eax, eax
mov dword [rsp + 0x44], r15d
mov qword [rbp + 0x181], rax
mov qword [rbp + 0x189], rax
mov qword [rbp + 0x191], rax
mov qword [rbp + 0x199], rax
mov byte [rbp + 0x180], sil
mov ecx, r15d
lea r14, [0x180000000]
movzx eax, byte [rcx + r14 + 0x53088]
inc rcx
mov byte [rbp + rcx + 0x17f], al
test al, al
jne 0x180004403
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rbp + 0x180]
repne scasb al, byte [rdi]
mov rax, qword [str.KLzOZ_j6QbtDP_j6_F]
lea rdx, [rbp + 0x180]
mov qword [rdi - 1], rax
mov rax, qword [0x18001bf88]
lea rcx, [rbp + 0x180]
mov qword [rdi + 7], rax
mov eax, dword [0x18001bf90]
mov dword [rdi + 0xf], eax
call fcn.180003430
mov ecx, 0x348
call fcn.18000960c
mov rdi, rax
test rax, rax
je 0x180004483
mov qword [rax], r15
mov dword [rax + 8], 0xffffffff
mov dword [rax + 0x138], 0xffffffff
jmp 0x180004486
mov rdi, r15
mov rcx, rdi
call fcn.180008510
mov dword [0x18005424c], eax
test eax, eax
je 0x1800044a7
mov rcx, rdi
call fcn.180009414
xor eax, eax
jmp 0x18000463d
mov ecx, 0x10
mov qword [rsp + 0x928], rbx
call fcn.18000960c
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0x40]
mov rcx, rax
mov rbx, rax
mov dword [rax], 1
mov qword [rax + 8], rdi
call fcn.180008ba0
test eax, eax
jne 0x180004602
movsxd rdx, dword [rbp + 0x17c]
lea ecx, [rax + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x180004602
cmp dword [rbx], 1
je 0x18000450d
mov dword [0x18005424c], 0x80000
jmp 0x18000452a
mov r9d, dword [rbp + 0x17c]
mov edx, dword [rsp + 0x40]
mov rcx, qword [rbx + 8]
mov r8, rax
call fcn.1800089f0
mov dword [0x18005424c], eax
mov rcx, rbx
call fcn.180008d30
mov r9d, 1
lea rdx, [rbp + 0x5d0]
lea r8d, [r9 + 0x19]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov rdx, r15
nop
movzx eax, word [rdx + r14 + 0x1bfa0]
add rdx, 2
mov word [rbp + rdx + 0x1ae], ax
test ax, ax
jne 0x180004550
lea rcx, [rbp + 0x1b0]
call fcn.1800041a0
lea rcx, [rbp + 0x1b0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov qword [rsp + 0x30], r15
lea rcx, [rbp + 0x1b0]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x18000460a
mov r8d, dword [rbp + 0x17c]
lea r9, [rsp + 0x44]
mov rdx, rsi
mov rcx, rax
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x18000460a
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp + 0x1b0]
mov rdx, r13
call fcn.180004670
mov eax, 1
jmp 0x180004635
mov rcx, rbx
call fcn.180008d30
test rsi, rsi
je 0x180004618
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
test r12, r12
je 0x180004626
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp + 0x3c0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
xor eax, eax
mov rbx, qword [rsp + 0x928]
mov rcx, qword [rbp + 0x7e0]
xor rcx, rsp
call fcn.180008dc0
lea r11, [rsp + 0x8f0]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret