Function at 0x140004fe0
Capabilities:
Check if file exists
Get file attributes
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0x10]
sub rsp, 0x110
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov rax, qword [0x14007bec0]
xor rax, rsp
mov qword [rbp + 8], rax
mov rsi, r9
mov r12, r8
mov r13, rdx
mov r14, rcx
mov qword [rbp - 0x58], rdx
mov qword [rbp - 0x60], r8
mov qword [rbp - 0x50], r9
lea rcx, [rbp - 0x48]
call fcn.140020d10
nop
lea rcx, [rbp - 0x48]
cmp qword [rbp - 0x30], 8
cmovae rcx, qword [rbp - 0x48]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400050d4
shr eax, 4
not eax
and eax, 1
je 0x1400050d4
cmp qword [rbp - 0x30], 8
jb 0x140005067
mov rcx, qword [rbp - 0x48]
call fcn.140033ccc
mov qword [rbp - 0x30], 7
xor ebx, ebx
mov qword [rbp - 0x38], rbx
mov word [rbp - 0x48], bx
cmp qword [r13 + 0x18], 8
jb 0x140005089
mov rcx, qword [r13]
call fcn.140033ccc
mov qword [r13 + 0x18], 7
mov qword [r13 + 0x10], rbx
mov word [r13], bx
cmp qword [r12 + 0x18], 8
jb 0x1400050ab
mov rcx, qword [r12]
call fcn.140033ccc
mov qword [r12 + 0x18], 7
mov qword [r12 + 0x10], rbx
mov word [r12], bx
cmp qword [rsi + 0x18], 8
jb 0x1400050cd
mov rcx, qword [rsi]
call fcn.140033ccc
xor eax, eax
jmp 0x140005375
mov qword [rbp - 0x70], 7
xor ebx, ebx
mov qword [rbp - 0x78], rbx
mov word [rsp + 0x78], bx
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rsi
lea rcx, [rsp + 0x78]
call fcn.1400030d0
lea rdx, [rsp + 0x78]
lea rcx, [rbp - 0x20]
call fcn.1400208c0
nop
lea rdx, [rbp - 0x20]
cmp qword [rbp - 8], 0x10
cmovae rdx, qword [rbp - 0x20]
mov qword [rsp + 0x68], 0xf
mov qword [rsp + 0x60], rbx
mov byte [rsp + 0x50], bl
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
lea rcx, [rsp + 0x50]
call fcn.140002a30
lea rdx, [rsp + 0x50]
mov rcx, r14
call fcn.1400014c0
mov r14, rax
mov dword [rsp + 0x40], ebx
test rax, rax
jne 0x1400051ed
cmp qword [rbp - 8], 0x10
jb 0x140005173
mov rcx, qword [rbp - 0x20]
call fcn.140033ccc
mov qword [rbp - 8], 0xf
mov qword [rbp - 0x10], rbx
mov byte [rbp - 0x20], 0
cmp qword [rbp - 0x30], 8
jb 0x140005193
mov rcx, qword [rbp - 0x48]
call fcn.140033ccc
mov qword [rbp - 0x30], 7
mov qword [rbp - 0x38], rbx
mov word [rbp - 0x48], bx
cmp qword [r13 + 0x18], 8
jb 0x1400051b3
mov rcx, qword [r13]
call fcn.140033ccc
mov qword [r13 + 0x18], 7
mov qword [r13 + 0x10], rbx
mov word [r13], bx
cmp qword [r12 + 0x18], 8
jb 0x1400051d5
mov rcx, qword [r12]
call fcn.140033ccc
mov qword [r12 + 0x18], 7
mov qword [r12 + 0x10], rbx
mov word [r12], bx
jmp 0x1400050be
lea rcx, [rbp - 0x48]
cmp qword [rbp - 0x30], 8
cmovae rcx, qword [rbp - 0x48]
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400052b8
cmp qword [rbp - 8], 0x10
jb 0x14000523e
mov rcx, qword [rbp - 0x20]
call fcn.140033ccc
mov qword [rbp - 8], 0xf
mov qword [rbp - 0x10], rbx
mov byte [rbp - 0x20], 0
cmp qword [rbp - 0x30], 8
jb 0x14000525e
mov rcx, qword [rbp - 0x48]
call fcn.140033ccc
mov qword [rbp - 0x30], 7
mov qword [rbp - 0x38], rbx
mov word [rbp - 0x48], bx
cmp qword [r13 + 0x18], 8
jb 0x14000527e
mov rcx, qword [r13]
call fcn.140033ccc
mov qword [r13 + 0x18], 7
mov qword [r13 + 0x10], rbx
mov word [r13], bx
cmp qword [r12 + 0x18], 8
jb 0x1400052a0
mov rcx, qword [r12]
call fcn.140033ccc
mov qword [r12 + 0x18], 7
mov qword [r12 + 0x10], rbx
mov word [r12], bx
jmp 0x1400050be
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x40]
mov r8d, dword [r14]
mov rdx, qword [r14 + 8]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp qword [rbp - 8], 0x10
jb 0x1400052ec
mov rcx, qword [rbp - 0x20]
call fcn.140033ccc
mov qword [rbp - 8], 0xf
mov qword [rbp - 0x10], rbx
mov byte [rbp - 0x20], 0
cmp qword [rbp - 0x30], 8
jb 0x14000530c
mov rcx, qword [rbp - 0x48]
call fcn.140033ccc
mov qword [rbp - 0x30], 7
mov qword [rbp - 0x38], rbx
mov word [rbp - 0x48], bx
cmp qword [r13 + 0x18], 8
jb 0x14000532c
mov rcx, qword [r13]
call fcn.140033ccc
mov qword [r13 + 0x18], 7
mov qword [r13 + 0x10], rbx
mov word [r13], bx
cmp qword [r12 + 0x18], 8
jb 0x14000534e
mov rcx, qword [r12]
call fcn.140033ccc
mov qword [r12 + 0x18], 7
mov qword [r12 + 0x10], rbx
mov word [r12], bx
cmp qword [rsi + 0x18], 8
jb 0x140005370
mov rcx, qword [rsi]
call fcn.140033ccc
mov eax, 1
mov qword [rsi + 0x18], 7
mov qword [rsi + 0x10], rbx
mov word [rsi], bx
mov rcx, qword [rbp + 8]
xor rcx, rsp
call fcn.140033cf0
add rsp, 0x110
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret