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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdi
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0xa0
mov rbx, r8
mov rdi, rcx
lea rcx, [rbp - 0x11]
call fcn.1401751f0
nop
mov r8d, 0x4000
lea rdx, [rbp - 0x11]
lea rcx, [rbp + 7]
call fcn.140175b80
nop
mov rax, qword [rbp + 0x27]
cmp byte [rax], 0
jne 0x140156dd7
mov r8, rbx
lea rdx, [rbp + 7]
mov rcx, rdi
call fcn.140156e10
xor edi, edi
mov ebx, 0xffffffff
mov r8, qword [rbp + 0x3f]
test r8, r8
je 0x140156c2b
mov dword [rbp + 0x7f], edi
mov rcx, qword [rbp + 0x1f]
test rcx, rcx
je 0x140156c24
mov qword [rsp + 0x20], rdi
lea r9, [rbp + 0x7f]
mov rdx, qword [rbp + 0x47]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140156c24
lea rcx, [rbp - 0x19]
call fcn.14014d930
mov rcx, qword [rbp + 0x27]
mov rdx, qword [rax]
mov qword [rbp + 0x27], rdx
mov qword [rax], rcx
mov rcx, qword [rbp - 0x19]
add rcx, 0xfffffffffffffff0
mov eax, dword [rcx]
nop
test eax, 0x30000000
jne 0x140156c24
mov eax, ebx
lock xadd dword [rcx], eax
dec eax
cmp eax, ebx
jne 0x140156c24
call fcn.1400da0f0
mov r8, rdi
mov qword [rbp + 0x3f], rdi
mov rcx, qword [rbp + 0x1f]
test rcx, rcx
je 0x140156c7c
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x140156c78
lea rcx, [rbp + 0x7f]
call fcn.14014d930
mov rcx, qword [rbp + 0x27]
mov rdx, qword [rax]
mov qword [rbp + 0x27], rdx
mov qword [rax], rcx
mov rcx, qword [rbp + 0x7f]
add rcx, 0xfffffffffffffff0
mov eax, dword [rcx]
nop
test eax, 0x30000000
jne 0x140156c78
mov eax, ebx
lock xadd dword [rcx], eax
dec eax
cmp eax, ebx
jne 0x140156c78
call fcn.1400da0f0
mov r8, qword [rbp + 0x3f]
mov rax, qword [rbp + 0x27]
cmp byte [rax], dil
jne 0x140156dd7
lea rax, vtable.juce::FileOutputStream.0
mov qword [rbp + 7], rax
test r8, r8
je 0x140156cfb
mov dword [rbp + 0x7f], edi
mov rcx, qword [rbp + 0x1f]
test rcx, rcx
je 0x140156cf7
mov qword [rsp + 0x20], rdi
lea r9, [rbp + 0x7f]
mov rdx, qword [rbp + 0x47]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140156cf7
lea rcx, [rbp - 0x19]
call fcn.14014d930
mov rcx, qword [rbp + 0x27]
mov rdx, qword [rax]
mov qword [rbp + 0x27], rdx
mov qword [rax], rcx
mov rcx, qword [rbp - 0x19]
add rcx, 0xfffffffffffffff0
mov eax, dword [rcx]
nop
test eax, 0x30000000
jne 0x140156cf7
mov eax, ebx
lock xadd dword [rcx], eax
dec eax
cmp eax, 0xffffffff
jne 0x140156cf7
call fcn.1400da0f0
mov qword [rbp + 0x3f], rdi
mov rcx, qword [rbp + 0x1f]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x47]
call fcn.1400e0818
mov rcx, qword [rbp + 0x27]
add rcx, 0xfffffffffffffff0
mov eax, dword [rcx]
nop
test eax, 0x30000000
jne 0x140156d32
mov eax, ebx
lock xadd dword [rcx], eax
dec eax
cmp eax, 0xffffffff
jne 0x140156d32
call fcn.1400da0f0
mov rcx, qword [rbp + 0x17]
add rcx, 0xfffffffffffffff0
mov eax, dword [rcx]
nop
test eax, 0x30000000
jne 0x140156d56
mov eax, ebx
lock xadd dword [rcx], eax
dec eax
cmp eax, 0xffffffff
jne 0x140156d56
call fcn.1400da0f0
lea rax, vtable.juce::OutputStream.0
mov qword [rbp + 7], rax
mov rcx, qword [rbp + 0xf]
add rcx, 0xfffffffffffffff0
mov eax, dword [rcx]
nop
test eax, 0x30000000
jne 0x140156d84
lock xadd dword [rcx], ebx
dec ebx
cmp ebx, 0xffffffff
jne 0x140156d84
call fcn.1400da0f0
nop
mov rax, qword [rbp - 0x11]
cmp byte [rax], 0
je 0x140156de0
lea rdx, [rbp - 0x11]
lea rcx, [rbp + 0x7f]
call fcn.140015780
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop
cmp eax, 0xffffffff
je 0x140156de0
mov ebx, 4
nop
lea rdx, [rbp - 9]
lea rcx, [rbp - 0x11]
call fcn.140178870
test al, al
jne 0x140156dd3
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
sub ebx, 1
jns 0x140156db0
jmp 0x140156de0
mov bl, 1
jmp 0x140156de2
lea rcx, [rbp + 7]
call fcn.140175ab0
xor bl, bl
lea rcx, [rbp - 0x11]
call fcn.140175130
movzx eax, bl
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x18]
mov rsp, r11
pop rbp
ret