Function at 0x4ffefd
Capabilities:
Read file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0xa8
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x40], rcx
mov qword [rbp + 0x48], rdx
mov dword [rbp + 0x1c], 0
mov rax, qword [rbp + 0x48]
mov rax, qword [rax]
mov qword [rbp], rax
mov dword [rbp + 0x18], 0x7d0
jmp 0x50029b
mov rax, qword [rbp + 0x48]
mov rax, qword [rax]
mov edx, dword [rbp + 0x1c]
movsxd rdx, edx
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, byte [rax]
cmp al, 0x40
jne 0x500294
sub dword [rbp + 0x18], 1
cmp dword [rbp + 0x18], 0
jne 0x4fff9b
mov rax, qword [rbp + 0x48]
mov rax, qword [rax]
mov rbx, qword [rax]
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x60
mov r8, rbx
lea rdx, str._s:_error:_too_many___files_encountered_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.0050bfc0
mov rax, qword [rbp - 8]
lea rcx, [rax + 1]
lea rax, [rbp - 0x60]
mov rdx, rax
mov rax, qword [sym.imp.msvcrt.dll__stat64]
call rax
test eax, eax
js 0x500297
movzx eax, word [rbp - 0x5a]
movzx eax, ax
and eax, 0xf000
cmp eax, 0x4000
jne 0x500001
mov rax, qword [rbp + 0x48]
mov rax, qword [rax]
mov rbx, qword [rax]
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x60
mov r8, rbx
lea rdx, str._s:_error:___file_refers_to_a_directory_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.0050bfc0
add qword [rbp - 8], 1
mov rax, qword [rbp - 8]
lea rdx, [0x005667d9]
mov rcx, rax
call sub.msvcrt.dll_fopen
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
je 0x50029a
mov rax, qword [rbp - 0x10]
mov r8d, 2
mov edx, 0
mov rcx, rax
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x50027c
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.msvcrt.dll_ftell
mov dword [rbp - 0x14], eax
cmp dword [rbp - 0x14], 0xffffffff
je 0x50027f
mov rax, qword [rbp - 0x10]
mov r8d, 0
mov edx, 0
mov rcx, rax
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x500282
mov eax, dword [rbp - 0x14]
cdqe
add rax, 1
mov rcx, rax
call fcn.0050c076
mov qword [rbp - 0x20], rax
mov eax, dword [rbp - 0x14]
movsxd rdx, eax
mov rcx, qword [rbp - 0x10]
mov rax, qword [rbp - 0x20]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sub.msvcrt.dll_fread
mov qword [rbp - 0x28], rax
mov eax, dword [rbp - 0x14]
cdqe
cmp qword [rbp - 0x28], rax
je 0x5000da
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x500285
mov rdx, qword [rbp - 0x20]
mov rax, qword [rbp - 0x28]
add rax, rdx
mov byte [rax], 0
mov rax, qword [rbp - 0x20]
mov rcx, rax
call fcn.004ffb09
test eax, eax
je 0x500113
mov ecx, 8
call fcn.0050c076
mov qword [rbp + 0x10], rax
mov rax, qword [rbp + 0x10]
mov qword [rax], 0
jmp 0x500123
mov rax, qword [rbp - 0x20]
mov rcx, rax
call fcn.004ffb59
mov qword [rbp + 0x10], rax
mov rax, qword [rbp + 0x48]
mov rax, qword [rax]
cmp qword [rbp], rax
jne 0x500149
mov rax, qword [rbp + 0x48]
mov rax, qword [rax]
mov rcx, rax
call fcn.004ff990
mov rdx, rax
mov rax, qword [rbp + 0x48]
mov qword [rax], rdx
mov qword [rbp + 8], 0
jmp 0x500158
add qword [rbp + 8], 1
mov rax, qword [rbp + 8]
lea rdx, [rax*8]
mov rax, qword [rbp + 0x10]
add rax, rdx
mov rax, qword [rax]
test rax, rax
jne 0x500153
mov rax, qword [rbp + 0x48]
mov rax, qword [rax]
mov edx, dword [rbp + 0x1c]
movsxd rdx, edx
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_free
mov rax, qword [rbp + 0x40]
mov eax, dword [rax]
movsxd rdx, eax
mov rax, qword [rbp + 8]
add rax, rdx
add rax, 1
lea rdx, [rax*8]
mov rax, qword [rbp + 0x48]
mov rax, qword [rax]
mov rcx, rax
call fcn.0050c11c
mov rdx, rax
mov rax, qword [rbp + 0x48]
mov qword [rax], rdx
mov rax, qword [rbp + 0x40]
mov eax, dword [rax]
sub eax, dword [rbp + 0x1c]
cdqe
lea r9, [rax*8]
mov rax, qword [rbp + 0x48]
mov rax, qword [rax]
mov edx, dword [rbp + 0x1c]
movsxd rdx, edx
add rdx, 1
shl rdx, 3
add rdx, rax
mov rax, qword [rbp + 0x48]
mov rax, qword [rax]
mov ecx, dword [rbp + 0x1c]
movsxd r8, ecx
mov rcx, qword [rbp + 8]
add rcx, r8
shl rcx, 3
add rax, rcx
mov r8, r9
mov rcx, rax
call sub.msvcrt.dll_memmove
mov rax, qword [rbp + 8]
lea r8, [rax*8]
mov rax, qword [rbp + 0x48]
mov rax, qword [rax]
mov edx, dword [rbp + 0x1c]
movsxd rdx, edx
shl rdx, 3
lea rcx, [rax + rdx]
mov rax, qword [rbp + 0x10]
mov rdx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [rbp + 0x40]
mov eax, dword [rax]
mov edx, eax
mov rax, qword [rbp + 8]
add eax, edx
sub eax, 1
mov edx, eax
mov rax, qword [rbp + 0x40]
mov dword [rax], edx
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sub.msvcrt.dll_free
mov rax, qword [rbp - 0x20]
mov rcx, rax
call sub.msvcrt.dll_free
sub dword [rbp + 0x1c], 1
jmp 0x500286
nop
jmp 0x500286
nop
jmp 0x500286
nop
jmp 0x500286
nop
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.msvcrt.dll_fclose
jmp 0x50029b
nop
jmp 0x50029b
nop
jmp 0x50029b
nop
add dword [rbp + 0x1c], 1
mov rax, qword [rbp + 0x40]
mov eax, dword [rax]
cmp dword [rbp + 0x1c], eax
jl 0x4fff34
nop
add rsp, 0xa8
pop rbx
pop rbp
ret