Function at 0x4b8e30
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
mov edi, 0x7d0
xor esi, esi
lea rax, [rsp + 0x50]
mov rbp, rdx
mov edx, dword [rcx]
mov qword [rsp + 0xe0], rcx
mov qword [rsp + 0x28], rax
lea ebx, [rsi + 1]
cmp ebx, edx
jge 0x4b8f70
mov rax, qword [rbp]
movsxd r13, ebx
lea r14, [r13*8]
mov rcx, qword [rax + r13*8]
cmp byte [rcx], 0x40
jne 0x4b8f8e
sub edi, 1
je 0x4b9140
lea r12, [rcx + 1]
mov rdx, qword [rsp + 0x28]
mov rcx, r12
call qword [sym.imp.msvcrt.dll__stat64]
test eax, eax
js 0x4b8f84
movzx eax, word [rsp + 0x56]
and ax, 0xf000
cmp ax, 0x4000
je 0x4b9112
lea rdx, [0x005045b9]
mov rcx, r12
call sub.msvcrt.dll_fopen
test rax, rax
mov r15, rax
je 0x4b8f84
xor edx, edx
mov r8d, 2
mov rcx, rax
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x4b8f51
mov rcx, r15
call sub.msvcrt.dll_ftell
movsxd r12, eax
cmp r12d, 0xffffffff
je 0x4b8f51
xor r8d, r8d
xor edx, edx
mov rcx, r15
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x4b8f51
lea rcx, [r12 + 1]
call fcn.004be5f0
mov edx, 1
mov r9, r15
mov r8, r12
mov rcx, rax
mov qword [rsp + 0x30], rax
call sub.msvcrt.dll_fread
cmp r12, rax
mov rdx, rax
je 0x4b8f95
mov rcx, r15
mov qword [rsp + 0x38], rax
call sub.msvcrt.dll_ferror
mov rdx, qword [rsp + 0x38]
test eax, eax
je 0x4b8f95
mov rcx, r15
mov esi, ebx
call sub.msvcrt.dll_fclose
mov rax, qword [rsp + 0xe0]
lea ebx, [rsi + 1]
mov edx, dword [rax]
cmp ebx, edx
jl 0x4b8e6c
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [rsp + 0xe0]
mov edx, dword [rax]
mov esi, ebx
jmp 0x4b8e61
mov rax, qword [rsp + 0x30]
mov byte [rax + rdx], 0
movzx eax, byte [rax]
test al, al
je 0x4b8fdc
mov rdx, qword [0x00505e60]
test byte [rdx + rax*2], 0x40
je 0x4b90a9
mov rdx, qword [rsp + 0x30]
jmp 0x4b8fd1
mov rcx, qword [0x00505e60]
test byte [rcx + rax*2], 0x40
je 0x4b90a9
add rdx, 1
movzx eax, byte [rdx]
test al, al
jne 0x4b8fc0
mov ecx, 8
xor r13d, r13d
call fcn.004be5f0
mov rcx, qword [rbp]
mov qword [rax], 0
mov r12, rax
call fcn.004b89f0
mov r11, r14
xor edx, edx
xor r9d, r9d
mov qword [rbp], rax
mov rcx, qword [rsp + 0xe0]
mov qword [rsp + 0x40], r9
mov qword [rsp + 0x48], r11
movsxd rcx, dword [rcx]
lea rdx, [rdx + rcx + 1]
mov rcx, rax
shl rdx, 3
call fcn.004be670
mov rdx, qword [rsp + 0xe0]
mov r11, qword [rsp + 0x48]
mov qword [rbp], rax
mov edx, dword [rdx]
lea rcx, [rax + r11]
mov r8d, edx
mov dword [rsp + 0x38], edx
lea rdx, [rax + r14 + 8]
sub r8d, ebx
mov ebx, esi
movsxd r8, r8d
shl r8, 3
call sub.msvcrt.dll_memmove
mov r9, qword [rsp + 0x40]
mov rdx, r12
mov rcx, qword [rbp]
mov r8, r9
add rcx, r14
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0xe0]
mov rcx, r12
mov rdx, qword [rsp + 0xe0]
mov eax, dword [rax]
lea eax, [r13 + rax - 1]
mov dword [rdx], eax
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x30]
call sub.msvcrt.dll_free
jmp 0x4b8f51
mov rcx, qword [rsp + 0x30]
call fcn.004b8ae0
mov rcx, qword [rbp]
mov r8, qword [rax]
mov r12, rax
mov qword [rsp + 0x38], r8
call fcn.004b89f0
mov r8, qword [rsp + 0x38]
xor edx, edx
mov qword [rbp], rax
test r8, r8
je 0x4b9104
nop word [rax + rax]
add rdx, 1
cmp qword [r12 + rdx*8], 0
lea r9, [rdx*8]
jne 0x4b90e0
lea r11, [r13 + rdx]
mov r13d, edx
shl r11, 3
jmp 0x4b9008
mov r11, r14
xor r13d, r13d
xor r9d, r9d
jmp 0x4b9008
mov rax, qword [rbp]
mov ecx, 2
mov rbx, qword [rax]
call qword [fcn.004c1900]
lea rdx, str._s:_error:___file_refers_to_a_directory_n
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.004be560
mov rbx, qword [rax]
mov ecx, 2
call qword [fcn.004c1900]
lea rdx, str._s:_error:_too_many___files_encountered_n
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.004be560
nop
nop dword [rax + rax]
xor eax, eax
test rcx, rcx
je 0x4b9190
cmp qword [rcx], 0
je 0x4b9190
mov edx, 1
mov eax, edx
add rdx, 1
cmp qword [rcx + rdx*8 - 8], 0
jne 0x4b9182
ret