Function at 0x18005fc50
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x290
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0x2e8], rbx
mov rax, qword [0x18010f050]
xor rax, rsp
mov qword [rsp + 0x280], rax
mov r15, r8
mov rax, rdx
mov qword [rsp + 0x68], rdx
mov r12, rcx
xor esi, esi
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
mov r14d, 3
mov dword [rsp + 0x20], r14d
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rsi + 1]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
mov qword [rsp + 0x40], rax
cmp rax, 0xffffffffffffffff
jne 0x18005fcd8
call fcn.180003220
nop
jmp 0x180060379
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r13d, eax
cmp eax, 0xffffffff
jne 0x18005fcfe
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x80004005
jmp 0x180060379
cmp r13d, 0xa00000
jbe 0x18005fd1a
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe00e1001
jmp 0x180060379
lea eax, [r13 + 2]
mov ebp, eax
lea rdx, [0x1801171e8]
mov ecx, eax
call fcn.180077024
mov rbx, rax
mov qword [rsp + 0x58], rax
test rax, rax
jne 0x18005fd4e
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x8007000e
jmp 0x180060379
mov r8, rbp
xor edx, edx
mov rcx, rax
call fcn.1800795c0
xor r9d, r9d
xor r8d, r8d
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x18005fd91
call fcn.180003220
mov esi, eax
mov rcx, rbx
call fcn.18007702c
nop
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x180060379
mov dword [rsp + 0x48], esi
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x48]
mov r8d, r13d
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x18005fdd2
call fcn.180003220
mov esi, eax
mov rcx, rbx
call fcn.18007702c
nop
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x180060379
lea r8, [0x180000000]
mov rdx, qword [rbx]
cmp rdx, qword [r8 + 0xf4918]
jne 0x18005fdf6
mov rdx, qword [rbx + 8]
cmp rdx, qword [r8 + 0xf4920]
jne 0x18005fdf6
mov eax, esi
jmp 0x18005fdfb
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x18005fe1b
mov rcx, rbx
call fcn.18007702c
nop
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe00e1001
jmp 0x180060379
cmp byte [rbx + 0x10], 2
jb 0x18005ffa7
mov word [rsp + 0x70], si
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x72]
call fcn.1800795c0
mov rdx, qword [rsp + 0x68]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rcx, [rsp + 0x70]
call qword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
lea rdx, [0x1800f4628]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x18005fe93
mov rcx, rbx
call fcn.18007702c
nop
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe003200a
jmp 0x180060379
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], r14d
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbp, rax
mov qword [rsp + 0x60], rax
cmp rax, 0xffffffffffffffff
jne 0x18005fee6
call fcn.180003220
mov esi, eax
mov rcx, rbx
call fcn.18007702c
nop
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x180060379
mov rdx, rax
mov rcx, r12
call fcn.180061cb0
test eax, eax
je 0x18005ff1b
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, rbx
call fcn.18007702c
nop
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe003200a
jmp 0x180060379
test r15, r15
je 0x18005ff2e
lea rdx, [rsp + 0x70]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
mov qword [rsp + 0x68], rsi
lea rdx, [rsp + 0x68]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x18005ff6f
call fcn.180003220
mov esi, eax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, rbx
call fcn.18007702c
nop
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x180060379
mov eax, dword [r12 + 0x34]
mov rcx, qword [rsp + 0x68]
sub rcx, rax
mov qword [r12 + 0x370], rcx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, rbx
call fcn.18007702c
nop
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x180060379
mov ebp, dword [rbx + 0x50]
lea rax, [rbp + 0x18]
cmp rax, r13
ja 0x180060362
cmp word [rbx + 0x14], 0
je 0x180060362
movzx eax, word [rbx + rbp + 0xe]
lea rcx, [rax + rax*4]
shl rcx, 4
mov eax, dword [rbx + rbp + 0x14]
add rcx, rax
cmp rcx, r13
jbe 0x18005fff7
mov rcx, rbx
call fcn.18007702c
nop
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x80004005
jmp 0x180060379
mov eax, dword [rbx + rbp]
add eax, 0x96
imul eax, eax, 0x930
mov dword [r12 + 0x34], eax
mov r11d, dword [rbx + rbp + 0x14]
add r11, rbx
mov eax, esi
movzx ecx, byte [rbx + rbp + 0xa]
test ecx, ecx
jle 0x180060031
nop dword [rax]
cmp byte [r11 + 4], 1
je 0x180060031
inc eax
add r11, 0x50
cmp eax, ecx
jl 0x180060020
cmp eax, ecx
jl 0x180060051
mov rcx, rbx
call fcn.18007702c
nop
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x80004005
jmp 0x180060379
movzx eax, word [r11 + 0x10]
mov dword [r12 + 0x28], eax
mov ecx, dword [rbx + rbp + 4]
imul rcx, rax
mov qword [r12 + 0x370], rcx
movzx eax, byte [r11]
and eax, 7
cmp eax, 7
ja case.0x180060088.6
cdqe
mov ecx, dword [r8 + rax*4 + 0x603a4]
add rcx, r8
jmp rcx
mov r14d, 1
jmp case.0x180060088.0
mov r14d, 2
jmp case.0x180060088.0
mov r14d, 4
jmp case.0x180060088.0
mov r14d, 5
mov r8d, dword [r12 + 0x28]
mov edx, r14d
mov rcx, r12
call fcn.180060ee0
mov r13d, eax
test eax, eax
js 0x180060332
cmp eax, 1
je 0x180060332
mov ecx, dword [r11 + 0x34]
mov dword [rsp + 0x40], ecx
test r15, r15
je 0x180060133
cmp byte [rbx + 0x10], 1
jne 0x1800600ec
cmp byte [rbx + 0x11], 5
jb 0x1800600ec
mov eax, 1
jmp 0x1800600ee
mov eax, esi
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
mov r9, rbx
mov r8, r15
mov rdx, qword [rsp + 0x68]
mov rcx, r12
call fcn.1800603d0
mov r13d, eax
test eax, eax
js 0x180060115
cmp eax, 1
jne 0x18006012f
mov rcx, rbx
call fcn.18007702c
nop
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, r13d
jmp 0x180060379
mov ecx, dword [rsp + 0x40]
cmp dword [r12 + 0x364], 0
je 0x180060157
mov rcx, rbx
call fcn.18007702c
nop
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x180060379
cmp r14d, 1
jne 0x18006016e
mov dword [r12 + 0x3c], r14d
mov dword [r12 + 0x378], 0x930
xor eax, eax
mov qword [rsp + 0x68], rax
mov edx, dword [rbx + rbp + 0x14]
add rdx, rbx
mov r8d, esi
cmp byte [rbx + rbp + 0xa], al
jbe 0x180060313
add rdx, 4
movzx r10d, byte [rsp + 0x6f]
movzx r11d, byte [rsp + 0x6e]
movzx r13d, byte [rsp + 0x6d]
movzx r14d, byte [rsp + 0x6a]
movzx r9d, byte [rsp + 0x69]
nop dword [rax + rax]
movzx eax, byte [rdx]
cmp al, 0xa2
jne 0x1800601cf
mov r14b, 0xaa
mov r9b, byte [rdx - 2]
mov r13b, byte [rdx + 5]
mov r11b, byte [rdx + 6]
mov r10b, byte [rdx + 7]
mov esi, 1
cmp al, 0x99
ja 0x180060275
movzx eax, word [rdx + 0xc]
cmp eax, dword [r12 + 0x28]
jne 0x18006028f
cmp dword [rdx + 0x30], ecx
jne 0x18006028f
mov ecx, dword [r12 + 0x364]
movzx eax, byte [r12 + rcx*8 + 0x45]
xor al, byte [rdx - 2]
and al, 0xf
xor byte [r12 + rcx*8 + 0x45], al
mov ecx, dword [r12 + 0x364]
movzx eax, byte [rdx - 2]
xor al, byte [r12 + rcx*8 + 0x45]
and al, 0xf
xor al, byte [rdx - 2]
mov byte [r12 + rcx*8 + 0x45], al
movzx ecx, byte [r12 + 0x364]
inc cl
mov eax, dword [r12 + 0x364]
mov byte [r12 + rax*8 + 0x46], cl
mov ecx, dword [r12 + 0x364]
movzx eax, byte [rdx + 5]
mov byte [r12 + rcx*8 + 0x49], al
mov ecx, dword [r12 + 0x364]
movzx eax, byte [rdx + 6]
mov byte [r12 + rcx*8 + 0x4a], al
mov ecx, dword [r12 + 0x364]
movzx eax, byte [rdx + 7]
mov byte [r12 + rcx*8 + 0x4b], al
inc dword [r12 + 0x364]
inc r8d
add rdx, 0x50
movzx eax, byte [rbx + rbp + 0xa]
cmp r8d, eax
jge 0x1800602ab
mov ecx, dword [rsp + 0x40]
jmp 0x1800601b0
mov rcx, rbx
call fcn.18007702c
nop
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x80004005
jmp 0x180060379
test esi, esi
je 0x180060313
mov ecx, dword [r12 + 0x364]
and byte [r12 + rcx*8 + 0x45], 0xf0
movzx eax, r9b
and al, 0xf
or byte [r12 + rcx*8 + 0x45], al
mov eax, dword [r12 + 0x364]
and byte [r12 + rax*8 + 0x45], 0xf
and r9b, 0xf0
or byte [r12 + rax*8 + 0x45], r9b
mov eax, dword [r12 + 0x364]
mov byte [r12 + rax*8 + 0x46], r14b
mov eax, dword [r12 + 0x364]
mov byte [r12 + rax*8 + 0x49], r13b
mov eax, dword [r12 + 0x364]
mov byte [r12 + rax*8 + 0x4a], r11b
mov eax, dword [r12 + 0x364]
mov byte [r12 + rax*8 + 0x4b], r10b
mov rcx, r12
call fcn.180061110
nop
mov rcx, rbx
call fcn.18007702c
nop
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x180060379
mov rcx, rbx
call fcn.18007702c
nop
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, r13d
jmp 0x180060379
mov rcx, rbx
call fcn.18007702c
nop
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x80004005
jmp 0x180060379
mov rcx, rbx
call fcn.18007702c
nop
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x80004005
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.180076a70
mov rbx, qword [rsp + 0x2e8]
add rsp, 0x290
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret