Function at 0x4c3d40
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
mov rax, qword [rdx]
mov r13d, 0x7d0
xor edi, edi
mov rbp, rdx
mov edx, dword [rcx]
mov r15, rcx
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
lea ebx, [rdi + 1]
cmp ebx, edx
jge 0x4c3da1
nop dword [rax]
mov rax, qword [rbp]
movsxd rsi, ebx
lea r12, [rsi*8]
mov rcx, qword [rax + rsi*8]
cmp byte [rcx], 0x40
je 0x4c3db5
mov edi, ebx
lea ebx, [rdi + 1]
cmp ebx, edx
jl 0x4c3d80
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
sub r13d, 1
je 0x4c4077
lea r14, [rcx + 1]
mov rdx, qword [rsp + 0x28]
mov rcx, r14
call qword [sym.imp.msvcrt.dll__stat64]
test eax, eax
js 0x4c3ea2
movzx eax, word [rsp + 0x66]
and ax, 0xf000
cmp ax, 0x4000
je 0x4c404d
lea rdx, [0x0051d321]
mov rcx, r14
call sub.msvcrt.dll_fopen
test rax, rax
mov r14, rax
je 0x4c3ea2
xor edx, edx
mov r8d, 2
mov rcx, rax
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x4c3e90
mov rcx, r14
call sub.msvcrt.dll_ftell
cmp eax, 0xffffffff
mov dword [rsp + 0x30], eax
je 0x4c3e90
xor r8d, r8d
xor edx, edx
mov rcx, r14
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x4c3e90
movsxd rax, dword [rsp + 0x30]
lea rcx, [rax + 1]
mov qword [rsp + 0x40], rax
call fcn.004cb930
mov r8, qword [rsp + 0x40]
mov edx, 1
mov rcx, rax
mov r9, r14
mov qword [rsp + 0x30], rax
call sub.msvcrt.dll_fread
cmp qword [rsp + 0x40], rax
mov rdx, rax
je 0x4c3eb1
mov rcx, r14
mov qword [rsp + 0x40], rax
call sub.msvcrt.dll_ferror
test eax, eax
je 0x4c3eac
nop word [rax + rax]
mov rcx, r14
mov edi, ebx
call sub.msvcrt.dll_fclose
mov edx, dword [r15]
jmp 0x4c3d75
mov edx, dword [r15]
mov edi, ebx
jmp 0x4c3d9a
mov rdx, qword [rsp + 0x40]
mov rax, qword [rsp + 0x30]
mov byte [rax + rdx], 0
movzx eax, byte [rax]
test al, al
je 0x4c3efc
mov rdx, qword [0x0051ee30]
test byte [rdx + rax*2], 0x40
je 0x4c3ffd
mov rdx, qword [rsp + 0x30]
jmp 0x4c3ef1
mov rcx, qword [0x0051ee30]
test byte [rcx + rax*2], 0x40
je 0x4c3ffd
add rdx, 1
movzx eax, byte [rdx]
test al, al
jne 0x4c3ee0
mov ecx, 8
call fcn.004cb930
mov r10, rax
mov qword [rax], 0
mov rax, qword [rbp]
cmp qword [rsp + 0x38], rax
jne 0x4c403f
mov rcx, qword [rsp + 0x38]
mov qword [rsp + 0x40], r10
call fcn.004c3930
mov r10, qword [rsp + 0x40]
mov qword [rbp], rax
xor r11d, r11d
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rax + rsi*8]
mov dword [rsp + 0x5c], r11d
mov qword [rsp + 0x50], r9
mov qword [rsp + 0x48], r10
mov qword [rsp + 0x40], r8
call sub.msvcrt.dll_free
movsxd rax, dword [r15]
mov r8, qword [rsp + 0x40]
mov rcx, qword [rbp]
lea rdx, [r8 + rax + 1]
shl rdx, 3
call fcn.004cb9b0
mov edx, dword [r15]
mov r8, qword [rsp + 0x40]
mov qword [rbp], rax
sub edx, ebx
add r8, rsi
movsxd rbx, edx
lea rcx, [rax + r8*8]
lea rdx, [rax + r12 + 8]
lea r8, [rbx*8]
mov ebx, edi
mov edi, ebx
call sub.msvcrt.dll_memmove
mov r9, qword [rsp + 0x50]
mov r10, qword [rsp + 0x48]
mov rcx, r12
add rcx, qword [rbp]
mov rdx, r10
mov r8, r9
mov qword [rsp + 0x40], r10
call sub.msvcrt.dll_memcpy
mov r11d, dword [rsp + 0x5c]
mov eax, dword [r15]
mov r10, qword [rsp + 0x40]
lea eax, [r11 + rax - 1]
mov rcx, r10
mov dword [r15], eax
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x30]
call sub.msvcrt.dll_free
mov rcx, r14
call sub.msvcrt.dll_fclose
mov edx, dword [r15]
jmp 0x4c3d75
mov rcx, qword [rsp + 0x30]
call fcn.004c3a10
mov r10, rax
mov rax, qword [rbp]
cmp qword [rsp + 0x38], rax
mov rdx, qword [r10]
je 0x4c409d
test rdx, rdx
je 0x4c403f
xor r8d, r8d
add r8, 1
cmp qword [r10 + r8*8], 0
lea r9, [r8*8]
jne 0x4c4024
mov r11d, r8d
jmp 0x4c3f40
xor r11d, r11d
xor r9d, r9d
xor r8d, r8d
jmp 0x4c3f40
mov rax, qword [rbp]
mov rbx, qword [rax]
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str._s:_error:___file_refers_to_a_directory_n
lea rcx, [rax + 0x60]
mov r8, rbx
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.004cb8a0
mov rbx, qword [rax]
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str._s:_error:_too_many___files_encountered_n
lea rcx, [rax + 0x60]
mov r8, rbx
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.004cb8a0
mov rcx, qword [rsp + 0x38]
mov qword [rsp + 0x48], r10
mov qword [rsp + 0x40], rdx
call fcn.004c3930
mov rdx, qword [rsp + 0x40]
mov qword [rbp], rax
mov r10, qword [rsp + 0x48]
jmp 0x4c401c