Function at 0x4dc230
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
cmp dword [rcx], 1
mov r10, qword [rdx]
mov r14, rcx
mov r15, rdx
jle 0x4dc37d
mov rcx, r10
mov ebx, 1
xor r12d, r12d
mov qword [rsp + 0x30], r10
mov dword [rsp + 0x40], 0x7d0
jmp 0x4dc358
sub dword [rsp + 0x40], 1
je 0x4dc508
lea rdi, [rax + 1]
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [sym.imp.msvcrt.dll__stat64]
test eax, eax
js 0x4dc370
movzx eax, word [rsp + 0x56]
and ax, 0xf000
cmp ax, 0x4000
je 0x4dc532
lea rdx, [0x005668b9]
mov rcx, rdi
call sub.msvcrt.dll_fopen
test rax, rax
mov rdi, rax
je 0x4dc370
xor edx, edx
mov r8d, 2
mov rcx, rax
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x4dc340
mov rcx, rdi
call sub.msvcrt.dll_ftell
movsxd r13, eax
cmp r13d, 0xffffffff
je 0x4dc340
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x4dc340
lea rcx, [r13 + 1]
call fcn.004e3920
mov edx, 1
mov r9, rdi
mov r8, r13
mov rcx, rax
mov qword [rsp + 0x20], rax
call sub.msvcrt.dll_fread
cmp r13, rax
mov rdx, rax
je 0x4dc39d
mov rcx, rdi
mov qword [rsp + 0x28], rax
call sub.msvcrt.dll_ferror
test eax, eax
je 0x4dc398
nop dword [rax]
mov r12d, ebx
lea ebx, [r12 + 1]
mov rcx, rdi
call fcn.004f26e0
cmp dword [r14], ebx
jle 0x4dc37d
mov rcx, qword [r15]
movsxd rsi, ebx
mov rax, qword [rcx + rsi*8]
lea rbp, [rsi*8]
cmp byte [rax], 0x40
je 0x4dc278
mov r12d, ebx
lea ebx, [r12 + 1]
cmp dword [r14], ebx
jg 0x4dc355
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rdx, qword [rsp + 0x28]
mov rax, qword [rsp + 0x20]
mov byte [rax + rdx], 0
mov rdx, rax
movzx eax, byte [rax]
test al, al
jne 0x4dc3c8
jmp 0x4dc4b8
movzx eax, byte [rdx + 1]
add rdx, 1
test al, al
je 0x4dc4b8
mov rcx, qword [0x00568450]
test byte [rcx + rax*2], 0x40
jne 0x4dc3b8
mov rcx, qword [rsp + 0x20]
call fcn.004dbf40
mov rdx, qword [rsp + 0x30]
mov r13, rax
mov rax, qword [r15]
cmp rax, rdx
je 0x4dc4d9
cmp qword [r13], 0
je 0x4dc4eb
xor edx, edx
add rdx, 1
cmp qword [r13 + rdx*8], 0
jne 0x4dc400
lea rcx, [rdx*8]
mov dword [rsp + 0x44], edx
mov qword [rsp + 0x28], rcx
lea rcx, [rsi + rdx]
shl rcx, 3
mov qword [rsp + 0x38], rcx
mov rcx, qword [rax + rsi*8]
mov qword [rsp + 0x48], rdx
call sub.msvcrt.dll_free
movsxd rax, dword [r14]
mov rdx, qword [rsp + 0x48]
mov rcx, qword [r15]
lea rdx, [rdx + rax + 1]
shl rdx, 3
call fcn.004e39a0
mov edx, dword [r14]
mov rcx, qword [rsp + 0x38]
lea r10, [rax + rbp + 8]
mov qword [r15], rax
sub edx, ebx
movsxd rdx, edx
add rcx, rax
lea r8, [rdx*8]
mov rdx, r10
call sub.msvcrt.dll_memmove
mov rcx, qword [r15]
mov rdx, r13
mov r8, qword [rsp + 0x28]
add rcx, rbp
call sub.msvcrt.dll_memcpy
mov eax, dword [r14]
mov rcx, r13
mov esi, dword [rsp + 0x44]
lea eax, [rsi + rax - 1]
mov dword [r14], eax
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x20]
call sub.msvcrt.dll_free
jmp 0x4dc343
mov ecx, 8
call fcn.004e3920
mov rdx, qword [rsp + 0x30]
mov r13, rax
mov qword [rax], 0
mov rax, qword [r15]
cmp rax, rdx
jne 0x4dc4eb
mov rcx, qword [rsp + 0x30]
call fcn.004dbe40
mov qword [r15], rax
jmp 0x4dc3f3
mov qword [rsp + 0x38], rbp
xor edx, edx
mov dword [rsp + 0x44], 0
mov qword [rsp + 0x28], 0
jmp 0x4dc42a
mov rbx, qword [rcx]
mov ecx, 2
call qword [fcn.004f2040]
lea rdx, str._s:_error:_too_many___files_encountered_n
mov rcx, rax
mov r8, rbx
call fcn.004dbe10
mov ecx, 1
call fcn.004e3860
mov rax, qword [r15]
mov ecx, 2
mov rbx, qword [rax]
call qword [fcn.004f2040]
lea rdx, str._s:_error:___file_refers_to_a_directory_n
mov rcx, rax
mov r8, rbx
call fcn.004dbe10
mov ecx, 1
call fcn.004e3860
nop
xor eax, eax
test rcx, rcx
je 0x4dc581
cmp qword [rcx], 0
je 0x4dc581
mov edx, 1
mov rax, rdx
add rdx, 1
cmp qword [rcx + rdx*8 - 8], 0
jne 0x4dc572
ret