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

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x2a0
mov rax, qword [0x180185680]
xor rax, rsp
mov qword [rsp + 0x280], rax
xor edi, edi
mov r14d, r9d
mov esi, edi
mov dword [rsp + 0x44], edi
mov qword [rsp + 0x50], r8
mov r12, rcx
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x68], rcx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
mov r13d, eax
mov ebx, 0x80
cmove r13d, ebx
mov dword [rsp + 0x58], r13d
test r13b, 1
je 0x18000c06a
mov edx, r13d
mov rcx, r12
and edx, 0xfffffffe
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov esi, 1
mov dword [rsp + 0x44], esi
xor r9d, r9d
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], ebx
mov edx, 0xc0000000
mov rcx, r12
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
jne 0x18000c0d1
lea ecx, [rax + 0x15]
call qword [sym.imp.KERNEL32.dll_Sleep]
mov qword [rsp + 0x30], rdi
lea r8d, [r15 + 4]
mov dword [rsp + 0x28], ebx
xor r9d, r9d
mov edx, 0x40000000
mov dword [rsp + 0x20], 3
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x18000c0f9
mov rbx, qword [rsp + 0x300]
xor r9d, r9d
mov rdx, rbx
xor r8d, r8d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
cmp eax, 0xffffffff
jne 0x18000c12e
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x18000c109
mov edx, r13d
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor eax, eax
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.18010faf0
add rsp, 0x2a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov rcx, r14
mov qword [rsp + 0x298], rbp
call fcn.1800f30bc
mov qword [rsp + 0x60], rax
mov rbp, rax
test rax, rax
je 0x18000c29e
mov rdx, qword [rsp + 0x50]
mov r8, r14
mov rcx, rax
call fcn.180112cb0
mov rcx, qword [rsp + 0x48]
mov edi, r14d
mov rsi, rbp
movzx eax, word [rcx + 0xca]
mov dword [rsp + 0x48], eax
lea rax, [rcx + 0xa0]
mov qword [rsp + 0x50], rax
test rbx, rbx
jne 0x18000c1a2
cmp dword [rbp], 0x4d524418
jne 0x18000c1a2
cmp dword [rbp + 4], 0xc4cedcc3
jne 0x18000c1a2
cmp word [rbp + 0xc], bx
jne 0x18000c277
and ebx, 0x1ff
je 0x18000c224
lea eax, [r14 + rbx]
mov ecx, r14d
cmp eax, 0x200
jb 0x18000c1c5
mov eax, 0x200
sub eax, ebx
cmp eax, r14d
cmovbe ecx, eax
mov eax, ebx
mov rdx, rbp
mov dword [rsp + 0x40], ecx
lea rbx, [rsp + 0x80]
add rbx, rax
mov edi, ecx
mov r8d, ecx
mov rcx, rbx
call fcn.180112cb0
mov eax, dword [rsp + 0x48]
lea rcx, [rsp + 0x80]
mov r8, qword [rsp + 0x50]
mov r9d, 0x20
mov edx, 0x200
mov dword [rsp + 0x20], eax
call sym.SafeBase64.dll_Ordinal_23
mov r8d, edi
mov rdx, rbx
mov rcx, rbp
call fcn.180112cb0
lea rsi, [rdi + rbp]
mov edi, r14d
sub edi, dword [rsp + 0x40]
test edi, edi
je 0x18000c277
mov r12d, dword [rsp + 0x48]
mov ebp, 0x200
mov r13, qword [rsp + 0x50]
nop word [rax + rax]
cmp edi, ebp
mov dword [rsp + 0x20], r12d
mov ebx, edi
mov r9d, 0x20
cmova ebx, ebp
mov r8, r13
mov edx, ebx
mov rcx, rsi
call sym.SafeBase64.dll_Ordinal_23
mov eax, ebx
add rsi, rax
sub edi, ebx
jne 0x18000c240
mov rbp, qword [rsp + 0x60]
mov r12, qword [rsp + 0x68]
mov r13d, dword [rsp + 0x58]
lea r9, [rsp + 0x70]
mov qword [rsp + 0x20], 0
mov r8d, r14d
mov rdx, rbp
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbp
mov edi, eax
call sym.SafeBase64.dll_SafeBase_free
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x44], 0
mov rbp, qword [rsp + 0x298]
je 0x18000c2c2
mov edx, r13d
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test edi, edi
je 0x18000c109
cmp dword [rsp + 0x70], r14d
jb 0x18000c109
mov eax, 1
jmp 0x18000c10b