Function at 0x1400be990
Capabilities:
Check if file exists
Get file attributes
Get file size
Get system information on windows

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0xe8
and qword [rbp - 0x71], 0
xor ebx, ebx
and dword [rsp + 0x48], ebx
mov r14, rcx
mov rcx, qword [rcx + 0x68]
xor r13d, r13d
and dword [rbp - 0x7d], ebx
xor r12d, r12d
and qword [rbp - 0x79], rbx
or qword [rbp + 0x6f], 0xffffffffffffffff
mov qword [rsp + 0x40], rbx
mov qword [rbp - 0x69], r13
mov qword [rbp - 0x61], r12
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
cmp eax, 0xffffffff
je 0x1400be9f5
shr edi, 4
not edi
and edi, 1
jmp 0x1400be9f7
xor edi, edi
xor ecx, ecx
call fcn.140079118
xor ecx, ecx
call fcn.140079118
xor esi, esi
mov r15d, 0x8007000d
test edi, edi
je 0x1400bea96
and qword [rsp + 0x30], rbx
lea r8d, [rsi + 1]
mov rcx, qword [r14 + 0x68]
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rcx, rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x1400bea70
lea rdx, [rbp - 0x39]
mov qword [rbp + 0x6f], rcx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1400bea70
cmp qword [rbp - 0x39], 0x200000
jle 0x1400bea96
mov esi, r15d
mov ecx, r15d
jmp 0x1400bea91
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1400bea81
mov esi, 0x80004005
jmp 0x1400bea8f
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
mov ecx, esi
call fcn.1400790f8
mov ecx, esi
call fcn.140079118
lea rcx, [rbp + 0x6f]
call fcn.140075ab4
test esi, esi
jns 0x1400beab6
mov ecx, esi
call fcn.1400790f8
jmp 0x1400bedb2
mov rcx, qword [r14 + 0x68]
lea r8, [rbp - 0x71]
lea rdx, [rbp + 0x6f]
call fcn.1400a14b4
mov esi, eax
test eax, eax
jns 0x1400bead1
mov ecx, eax
jmp 0x1400beaac
lea r8, [rsp + 0x40]
xor edx, edx
lea rcx, [0x1403b8d00]
call fcn.1400f02fc
mov esi, eax
test eax, eax
jns 0x1400beafb
mov ecx, eax
call fcn.1400790f8
mov rbx, qword [rsp + 0x40]
jmp 0x1400bedb2
mov rbx, qword [rsp + 0x40]
mov rax, qword [rbx]
mov rdi, qword [rax + 0x18]
mov rcx, rdi
call qword [0x1403af620]
mov r8d, dword [rbp + 0x6f]
xor r9d, r9d
mov rdx, qword [rbp - 0x71]
mov rcx, rbx
call rdi
mov esi, eax
test eax, eax
js 0x1400beacd
mov rax, qword [rbx]
mov rdi, qword [rax + 0x30]
mov rcx, rdi
call qword [0x1403af620]
lea rdx, [rbp - 0x59]
mov rcx, rbx
call rdi
mov esi, eax
test eax, eax
js 0x1400beacd
cmp dword [rbp - 0x51], 1
je 0x1400beb56
mov esi, r15d
mov ecx, r15d
jmp 0x1400beaac
cmp dword [rbp - 0x49], 1
jb 0x1400beb4b
mov rax, qword [rbx]
mov rdi, qword [rax + 0x30]
mov rcx, rdi
call qword [0x1403af620]
lea rdx, [rbp - 0x59]
mov rcx, rbx
call rdi
mov esi, eax
test eax, eax
js 0x1400beacd
cmp dword [rbp - 0x51], 1
jne 0x1400beb4b
mov r15d, dword [rbp - 0x49]
xor r14d, r14d
test r15d, r15d
je 0x1400bec21
test r13, r13
je 0x1400bebbb
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea r8, [r13 - 4]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor ecx, ecx
call fcn.140079118
and qword [rbp - 0x69], 0
test r12, r12
je 0x1400bebdb
mov rax, qword [r12]
mov rdi, qword [rax + 0x10]
mov rcx, rdi
call qword [0x1403af620]
mov rcx, r12
call rdi
and qword [rbp - 0x61], 0
mov rdx, rbx
lea rcx, [rbp - 0x69]
call fcn.1400c1b40
mov esi, eax
test eax, eax
js 0x1400beacd
xor r8d, r8d
lea rdx, [rbp - 0x69]
lea rcx, [rsp + 0x48]
call fcn.1400b84f0
mov esi, eax
test eax, eax
js 0x1400beacd
inc r14d
cmp r14d, r15d
jae 0x1400bec21
mov r12, qword [rbp - 0x61]
mov r13, qword [rbp - 0x69]
jmp 0x1400beb95
mov rax, qword [rbx]
mov rdi, qword [rax + 0x28]
mov rcx, rdi
call qword [0x1403af620]
lea rdx, [rbp + 0x77]
mov rcx, rbx
call rdi
mov esi, eax
test eax, eax
js 0x1400beacd
mov rax, qword [rbx]
mov rdi, qword [rax + 0x30]
mov rcx, rdi
call qword [0x1403af620]
lea rdx, [rbp - 0x59]
mov rcx, rbx
call rdi
mov esi, eax
test eax, eax
js 0x1400beacd
cmp dword [rbp - 0x51], 4
je 0x1400bec77
mov esi, 0x8007000d
jmp 0x1400beaaa
mov r13, qword [rbp + 0x67]
lea r8, [rsp + 0x40]
mov r15, qword [rbp - 0x49]
lea rdx, [rbp + 0x6f]
mov edi, dword [rbp - 0x41]
mov rcx, r13
mov r12d, dword [rbp + 0x77]
and qword [rsp + 0x40], 0
call fcn.1400c38d0
mov esi, eax
test eax, eax
jns 0x1400becac
mov ecx, eax
call fcn.1400790f8
jmp 0x1400bed12
mov r14, qword [rsp + 0x40]
lea rax, [0x1400135f8]
mov qword [rbp - 0x29], rax
lea rdx, [rbp - 0x31]
xor r9d, r9d
mov dword [rbp - 0xd], edi
mov edi, dword [rbp + 0x6f]
lea rax, [rbp + 0x7f]
mov qword [rbp - 0x21], rax
mov rax, qword [rbp - 0x71]
lea r8d, [r9 + 0x3c]
mov qword [rbp - 0x15], rax
lea ecx, [r8 + 0x7d]
mov qword [rbp - 5], r14
mov qword [rbp - 0x31], 3
mov dword [rbp - 0x19], r12d
mov dword [rbp - 9], edi
mov qword [rbp + 3], r15
call sub.ntdll.dll_NtQuerySystemInformation
mov esi, dword [rbp + 0x7f]
test esi, esi
jns 0x1400bed08
mov ecx, esi
jmp 0x1400beca5
mov rcx, rdi
xor eax, eax
mov rdi, r14
rep stosb byte [rdi], al
mov ecx, esi
call fcn.140079118
lea rcx, [rsp + 0x40]
call fcn.14005a598
cmp esi, 0x8007000d
jne 0x1400bed3d
lea rcx, [r13 + 0x98]
xor edx, edx
call fcn.1400b83b0
xor esi, esi
jmp 0x1400bedb2
test esi, esi
js 0x1400beaaa
lea rdi, [r13 + 0x98]
xor edx, edx
mov rcx, rdi
call fcn.1400b83b0
mov r13, qword [rdi + 8]
mov r15d, dword [rdi]
mov r12d, dword [rdi + 4]
and qword [rdi + 8], 0
mov eax, dword [rsp + 0x48]
mov dword [rdi], eax
mov eax, dword [rbp - 0x7d]
mov dword [rdi + 4], eax
mov r14, qword [rdi + 8]
test r14, r14
je 0x1400bed8f
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rax, qword [rbp - 0x79]
lea rcx, [rbp + 0x67]
and qword [rbp + 0x67], 0
mov qword [rdi + 8], rax
mov dword [rsp + 0x48], r15d
mov dword [rbp - 0x7d], r12d
mov qword [rbp - 0x79], r13
call fcn.1400ade88
mov ecx, esi
call fcn.140079118
xor edx, edx
lea rcx, [rsp + 0x48]
call fcn.1400b83b0
lea rcx, [rbp - 0x79]
call fcn.1400ade88
lea rcx, [rbp - 0x69]
call fcn.1400b6b24
test rbx, rbx
je 0x1400bedf1
mov rax, qword [rbx]
mov rdi, qword [rax + 0x10]
mov rcx, rdi
call qword [0x1403af620]
mov rcx, rbx
call rdi
lea rcx, [rbp - 0x71]
call fcn.14009b030
mov eax, esi
add rsp, 0xe8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret