Function at 0x404c2d
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 0x404fcb
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 0x404fc4
sub dword [rbp + 0x18], 1
cmp dword [rbp + 0x18], 0
jne 0x404ccb
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.004064b0
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 0x404fc7
movzx eax, word [rbp - 0x5a]
movzx eax, ax
and eax, 0xf000
cmp eax, 0x4000
jne 0x404d31
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.004064b0
add qword [rbp - 8], 1
mov rax, qword [rbp - 8]
lea rdx, [0x0040b0e9]
mov rcx, rax
call sub.msvcrt.dll_fopen
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
je 0x404fca
mov rax, qword [rbp - 0x10]
mov r8d, 2
mov edx, 0
mov rcx, rax
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x404fac
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.msvcrt.dll_ftell
mov dword [rbp - 0x14], eax
cmp dword [rbp - 0x14], 0xffffffff
je 0x404faf
mov rax, qword [rbp - 0x10]
mov r8d, 0
mov edx, 0
mov rcx, rax
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x404fb2
mov eax, dword [rbp - 0x14]
cdqe
add rax, 1
mov rcx, rax
call fcn.00406566
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 0x404e0a
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x404fb5
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.00404839
test eax, eax
je 0x404e43
mov ecx, 8
call fcn.00406566
mov qword [rbp + 0x10], rax
mov rax, qword [rbp + 0x10]
mov qword [rax], 0
jmp 0x404e53
mov rax, qword [rbp - 0x20]
mov rcx, rax
call fcn.00404889
mov qword [rbp + 0x10], rax
mov rax, qword [rbp + 0x48]
mov rax, qword [rax]
cmp qword [rbp], rax
jne 0x404e79
mov rax, qword [rbp + 0x48]
mov rax, qword [rax]
mov rcx, rax
call fcn.004046c0
mov rdx, rax
mov rax, qword [rbp + 0x48]
mov qword [rax], rdx
mov qword [rbp + 8], 0
jmp 0x404e88
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 0x404e83
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.0040660c
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 0x404fb6
nop
jmp 0x404fb6
nop
jmp 0x404fb6
nop
jmp 0x404fb6
nop
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.msvcrt.dll_fclose
jmp 0x404fcb
nop
jmp 0x404fcb
nop
jmp 0x404fcb
nop
add dword [rbp + 0x1c], 1
mov rax, qword [rbp + 0x40]
mov eax, dword [rax]
cmp dword [rbp + 0x1c], eax
jl 0x404c64
nop
add rsp, 0xa8
pop rbx
pop rbp
ret