Function at 0x14000af30
Capabilities:
Check if file exists
Delete file
Write file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x850
mov rax, qword [0x140025100]
xor rax, rsp
mov qword [rsp + 0x840], rax
mov dword [rsp + 0x5c4], 0
mov dword [rsp + 0x490], 0
mov qword [rsp + 0x830], 0xffffffffffffffff
mov r9, qword [rsp + 0x860]
lea r8, [0x140003070]
mov edx, 0x105
lea rcx, [rsp + 0x5d0]
call fcn.14001f670
mov dword [rsp + 0x6e0], eax
cmp dword [rsp + 0x6e0], 0
je 0x14000afcc
mov eax, dword [rsp + 0x6e0]
and eax, 0xffff
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x14000b606
mov edx, 1
lea rcx, [rsp + 0x5d0]
call fcn.14000b630
mov qword [rsp + 0x830], rax
cmp qword [rsp + 0x830], 0xffffffffffffffff
je 0x14000b604
cmp dword [0x140025a38], 0
jne 0x14000b00b
lea rcx, [0x140003080]
call qword [sym.imp.msvcrt.dll_printf]
lea rcx, [rsp + 0x5d0]
call fcn.140007f80
mov dword [rsp + 0x5c4], eax
cmp dword [0x140025a38], 0
je 0x14000b043
mov r8d, dword [rsp + 0x5c4]
lea rdx, [0x140003090]
lea rcx, [0x1400030a0]
call fcn.140005ae0
cmp dword [rsp + 0x5c4], 0
jne 0x14000b0c7
lea rcx, [rsp + 0x5d0]
call fcn.1400081d0
mov dword [rsp + 0x5c4], eax
cmp dword [0x140025a38], 0
je 0x14000b085
mov r8d, dword [rsp + 0x5c4]
lea rdx, [0x1400030b8]
lea rcx, [0x1400030a0]
call fcn.140005ae0
cmp dword [rsp + 0x5c4], 0
jne 0x14000b0c7
lea rcx, [rsp + 0x5d0]
call fcn.1400080a0
mov dword [rsp + 0x5c4], eax
cmp dword [0x140025a38], 0
je 0x14000b0c7
mov r8d, dword [rsp + 0x5c4]
lea rdx, [0x1400030c8]
lea rcx, [0x1400030a0]
call fcn.140005ae0
mov dword [rsp + 0x5c0], 0
cmp dword [rsp + 0x5c0], 0x3b9aca00
jae 0x14000b242
mov eax, dword [rsp + 0x5c0]
inc eax
mov dword [rsp + 0x5c0], eax
mov eax, dword [rsp + 0x5c4]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0x5d0]
lea r8, [0x1400030d8]
mov edx, 0x105
lea rcx, [rsp + 0x4a0]
call fcn.14001f670
mov dword [rsp + 0x6e0], eax
cmp dword [rsp + 0x6e0], 0
je 0x14000b132
jmp 0x14000b0d2
lea rdx, [rsp + 0x6f0]
lea rcx, [rsp + 0x4a0]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov qword [rsp + 0x5b8], rax
cmp qword [rsp + 0x5b8], 0xffffffffffffffff
je 0x14000b17e
mov rcx, qword [rsp + 0x5b8]
call qword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [rsp + 0x5c4]
inc eax
mov dword [rsp + 0x5c4], eax
jmp 0x14000b23d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x5b0], eax
cmp dword [rsp + 0x5b0], 2
jne 0x14000b23d
mov eax, dword [rsp + 0x868]
mov r9d, dword [rsp + 0x5c4]
lea r8, [0x1400030e4]
mov edx, eax
mov rcx, qword [rsp + 0x870]
call fcn.14001f670
mov dword [rsp + 0x6e0], eax
cmp dword [rsp + 0x6e0], 0
je 0x14000b206
mov rcx, qword [rsp + 0x830]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x830], 0xffffffffffffffff
mov eax, dword [rsp + 0x6e0]
and eax, 0xffff
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x14000b606
cmp dword [0x140025a38], 0
je 0x14000b21b
lea rcx, [0x1400030f0]
call fcn.140005ae0
mov rdx, qword [rsp + 0x870]
lea rcx, [0x1400030fc]
call qword [sym.imp.msvcrt.dll_printf]
mov dword [rsp + 0x490], 1
jmp 0x14000b242
jmp 0x14000b0d2
cmp dword [rsp + 0x490], 0
je 0x14000b5d6
lea r9, [rsp + 0x5d0]
lea r8, [0x140003108]
mov edx, 0x105
lea rcx, [rsp + 0x4a0]
call fcn.14001f670
mov dword [rsp + 0x6e0], eax
cmp dword [rsp + 0x6e0], 0
je 0x14000b2b7
mov rcx, qword [rsp + 0x830]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x830], 0xffffffffffffffff
mov eax, dword [rsp + 0x6e0]
and eax, 0xffff
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x14000b606
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 4
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
lea rcx, [rsp + 0x4a0]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x5b8], rax
cmp qword [rsp + 0x5b8], 0xffffffffffffffff
jne 0x14000b337
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x5b0], eax
mov rcx, qword [rsp + 0x830]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x830], 0xffffffffffffffff
mov ecx, dword [rsp + 0x5b0]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x14000b606
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x5b8]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [rsp + 0x5c4], 1
jbe 0x14000b36b
lea rax, [0x140002e20]
mov qword [rsp + 0x838], rax
jmp 0x14000b37a
lea rax, [0x140002bdd]
mov qword [rsp + 0x838], rax
mov rax, qword [rsp + 0x880]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x870]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x838]
lea r8, [0x140003118]
mov edx, 0x436
lea rcx, [rsp + 0x50]
call fcn.14001f670
mov dword [rsp + 0x6e0], eax
cmp dword [rsp + 0x6e0], 0
je 0x14000b406
mov rcx, qword [rsp + 0x5b8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x830]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x830], 0xffffffffffffffff
mov eax, dword [rsp + 0x6e0]
and eax, 0xffff
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x14000b606
xor eax, eax
mov rcx, 0xffffffffffffffff
lea rdx, [rsp + 0x50]
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
dec rcx
mov rax, rcx
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x5b0]
mov r8d, eax
lea rdx, [rsp + 0x50]
mov rcx, qword [rsp + 0x5b8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14000b46b
mov rcx, qword [rsp + 0x5b8]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov rcx, qword [rsp + 0x5b8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14000b4b4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x5b0], eax
mov rcx, qword [rsp + 0x5b8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x830]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x830], 0xffffffffffffffff
mov ecx, dword [rsp + 0x5b0]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x14000b606
lea r9, [rsp + 0x5d0]
lea r8, [0x140003120]
mov edx, 0x105
lea rcx, [rsp + 0x4a0]
call fcn.14001f670
mov dword [rsp + 0x6e0], eax
cmp dword [rsp + 0x6e0], 0
je 0x14000b51b
mov rcx, qword [rsp + 0x830]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x830], 0xffffffffffffffff
mov eax, dword [rsp + 0x6e0]
and eax, 0xffff
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x14000b606
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
lea rcx, [rsp + 0x4a0]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x5b8], rax
cmp qword [rsp + 0x5b8], 0xffffffffffffffff
je 0x14000b5d6
xor eax, eax
mov rcx, 0xffffffffffffffff
mov rdi, qword [rsp + 0x870]
repne scasb al, byte [rdi]
not rcx
dec rcx
mov rax, rcx
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x5c0]
mov r8d, eax
mov rdx, qword [rsp + 0x870]
mov rcx, qword [rsp + 0x5b8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14000b5ba
mov rcx, qword [rsp + 0x5b8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14000b5d6
mov rcx, qword [rsp + 0x5b8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x4a0]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp qword [rsp + 0x830], 0xffffffffffffffff
je 0x14000b5fb
mov rcx, qword [rsp + 0x830]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x830], 0xffffffffffffffff
mov eax, 1
jmp 0x14000b606
xor eax, eax
mov rcx, qword [rsp + 0x840]
xor rcx, rsp
call fcn.140021740
add rsp, 0x850
pop rdi
ret