Function at 0x10007f254
Capabilities:
Get file size
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
xor r12d, r12d
mov r14, r8
mov rbp, rdx
mov qword [rax - 0x48], r12
mov qword [rdx], r12
mov dword [rax - 0x50], 0x80
lea r8d, [r12 + 1]
xor r9d, r9d
mov edx, 0x80000000
mov r15d, r12d
mov ebx, r12d
mov edi, r12d
mov dword [rax - 0x34], r12d
mov dword [rax - 0x58], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
mov esi, 0x80004005
cmp rax, 0xffffffffffffffff
jne 0x10007f2da
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
cmp eax, r12d
cmovle ebx, eax
cmp ebx, r12d
jl 0x10007f307
mov ebx, esi
jmp 0x10007f307
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp eax, 0xffffffff
jne 0x10007f307
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
cmp eax, r12d
cmovle ebx, eax
cmp ebx, r12d
cmovge ebx, esi
cmp ebx, r12d
mov sil, 1
jl 0x10007f628
cmp edi, 2
jbe 0x10007f451
lea r9, [rsp + 0x44]
lea rdx, [rsp + 0x40]
mov r8d, 2
mov rcx, r13
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, r12d
jne 0x10007f361
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
cmp eax, r12d
cmovle ebx, eax
mov eax, 0x80004005
cmp ebx, r12d
cmovge ebx, eax
jmp 0x10007f366
mov eax, 0x80004005
cmp dword [rsp + 0x44], 2
cmovne ebx, eax
cmp ebx, r12d
jl 0x10007f628
mov eax, 0xfeff
cmp word [rsp + 0x40], ax
jne 0x10007f38e
mov sil, r12b
add edi, 0xfffffffe
jmp 0x10007f451
cmp edi, 3
jbe 0x10007f418
mov ax, word [rsp + 0x40]
cmp ax, word [0x1000062ec]
jne 0x10007f418
lea r9, [rsp + 0x44]
lea rdx, [rsp + 0x88]
mov r8d, 1
mov rcx, r13
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, r12d
jne 0x10007f3ed
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
cmp eax, r12d
cmovle ebx, eax
mov eax, 0x80004005
cmp ebx, r12d
cmovge ebx, eax
jmp 0x10007f3f2
mov eax, 0x80004005
cmp dword [rsp + 0x44], 1
cmovne ebx, eax
cmp ebx, r12d
jl 0x10007f628
cmp byte [rsp + 0x88], 0xbf
jne 0x10007f418
mov r15d, 0xfde9
add edi, 0xfffffffd
jmp 0x10007f451
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x10007f451
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
cmp eax, r12d
cmovle ebx, eax
cmp ebx, r12d
jl 0x10007f628
mov ebx, 0x80004005
cmp ebx, r12d
jl 0x10007f628
cmp sil, r12b
je 0x10007f598
lea ecx, [rdi + 1]
call sub.msvcrt.dll_void____ptr64___cdecl_operator_new___unsigned_long_long_unsigned___int64__
mov r12d, 0x8007000e
test rax, rax
mov rsi, rax
cmove ebx, r12d
test ebx, ebx
js 0x10007f628
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x88]
mov r8d, edi
mov rdx, rax
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10007f4c5
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x10007f58b
mov ebx, 0x80004005
test ebx, ebx
js 0x10007f58b
mov r9d, dword [rsp + 0x88]
and dword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
mov r8, rsi
xor edx, edx
mov ecx, r15d
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rdi, eax
cmp edi, 0x7ffffffe
ja 0x10007f509
lea ecx, [rdi + 1]
call fcn.10007d1d0
xor edx, edx
mov qword [rbp], rax
jmp 0x10007f50f
xor edx, edx
mov qword [rbp], rdx
mov rax, qword [rbp]
cmp rax, rdx
cmove ebx, r12d
cmp ebx, edx
jl 0x10007f58b
mov r9d, dword [rsp + 0x88]
mov r12d, edx
cmp r9d, edx
jbe 0x10007f56d
mov r8, rsi
xor edx, edx
mov ecx, r15d
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor edx, edx
mov r12d, eax
cmp eax, edx
jne 0x10007f56d
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor edx, edx
movzx ebx, ax
or ebx, 0x80070000
cmp eax, edx
cmovle ebx, eax
cmp ebx, edx
jl 0x10007f583
mov ebx, 0x80004005
cmp ebx, edx
jl 0x10007f583
mov rax, qword [rbp]
mov word [rax + rdi*2], dx
cmp r14, rdx
je 0x10007f58b
mov dword [r14], r12d
jmp 0x10007f58b
mov rcx, rbp
call fcn.10007d264
mov rcx, rsi
call sub.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_
jmp 0x10007f628
mov ecx, edi
shr ecx, 1
inc ecx
call fcn.10007d1d0
xor esi, esi
mov r12d, 0x8007000e
cmp rax, rsi
mov qword [rbp], rax
cmove ebx, r12d
cmp ebx, esi
jl 0x10007f628
lea r9, [rsp + 0x88]
mov r8d, edi
mov rdx, rax
mov rcx, r13
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, esi
jne 0x10007f5f7
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
cmp eax, esi
cmovle ebx, eax
cmp ebx, esi
jl 0x10007f620
mov ebx, 0x80004005
cmp ebx, esi
jl 0x10007f620
mov ecx, dword [rsp + 0x88]
mov rax, qword [rbp]
shr rcx, 1
mov word [rax + rcx*2], si
cmp r14, rsi
je 0x10007f628
mov eax, dword [rsp + 0x88]
shr eax, 1
mov dword [r14], eax
jmp 0x10007f628
mov rcx, rbp
call fcn.10007d264
cmp r13, 0xffffffffffffffff
je 0x10007f637
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r11, [rsp + 0x50]
mov eax, ebx
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret