Function at 0x475f0e
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 0x4762ac
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 0x4762a5
sub dword [rbp + 0x18], 1
cmp dword [rbp + 0x18], 0
jne 0x475fac
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.0047bff0
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 0x4762a8
movzx eax, word [rbp - 0x5a]
movzx eax, ax
and eax, 0xf000
cmp eax, 0x4000
jne 0x476012
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.0047bff0
add qword [rbp - 8], 1
mov rax, qword [rbp - 8]
lea rdx, [0x004fea41]
mov rcx, rax
call sub.msvcrt.dll_fopen
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
je 0x4762ab
mov rax, qword [rbp - 0x10]
mov r8d, 2
mov edx, 0
mov rcx, rax
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x47628d
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.msvcrt.dll_ftell
mov dword [rbp - 0x14], eax
cmp dword [rbp - 0x14], 0xffffffff
je 0x476290
mov rax, qword [rbp - 0x10]
mov r8d, 0
mov edx, 0
mov rcx, rax
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x476293
mov eax, dword [rbp - 0x14]
cdqe
add rax, 1
mov rcx, rax
call fcn.0047c0a6
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 0x4760eb
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x476296
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.00475ae9
test eax, eax
je 0x476124
mov ecx, 8
call fcn.0047c0a6
mov qword [rbp + 0x10], rax
mov rax, qword [rbp + 0x10]
mov qword [rax], 0
jmp 0x476134
mov rax, qword [rbp - 0x20]
mov rcx, rax
call fcn.00475b39
mov qword [rbp + 0x10], rax
mov rax, qword [rbp + 0x48]
mov rax, qword [rax]
cmp qword [rbp], rax
jne 0x47615a
mov rax, qword [rbp + 0x48]
mov rax, qword [rax]
mov rcx, rax
call fcn.00475970
mov rdx, rax
mov rax, qword [rbp + 0x48]
mov qword [rax], rdx
mov qword [rbp + 8], 0
jmp 0x476169
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 0x476164
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 fcn.00494cb8
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.0047c14c
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 fcn.00494cb8
mov rax, qword [rbp - 0x20]
mov rcx, rax
call fcn.00494cb8
sub dword [rbp + 0x1c], 1
jmp 0x476297
nop
jmp 0x476297
nop
jmp 0x476297
nop
jmp 0x476297
nop
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.msvcrt.dll_fclose
jmp 0x4762ac
nop
jmp 0x4762ac
nop
jmp 0x4762ac
nop
add dword [rbp + 0x1c], 1
mov rax, qword [rbp + 0x40]
mov eax, dword [rax]
cmp dword [rbp + 0x1c], eax
jl 0x475f45
nop
add rsp, 0xa8
pop rbx
pop rbp
ret