Function at 0x47da50
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
mov r15d, 0x7d0
xor edi, edi
mov rax, qword [rdx]
mov r12, rdx
mov edx, dword [rcx]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0xe0], rcx
mov qword [rsp + 0x20], rax
nop word [rax + rax]
lea ebx, [rdi + 1]
cmp ebx, edx
jge 0x47db9f
mov rax, qword [r12]
movsxd rsi, ebx
lea r13, [rsi*8]
mov rcx, qword [rax + rsi*8]
cmp byte [rcx], 0x40
jne 0x47dbbd
sub r15d, 1
je 0x47dd4d
lea rbp, [rcx + 1]
mov rdx, qword [rsp + 0x20]
mov rcx, rbp
call qword [sym.imp.msvcrt.dll__stat64]
test eax, eax
js 0x47dbb3
movzx eax, word [rsp + 0x56]
and ax, 0xf000
cmp ax, 0x4000
je 0x47dd77
lea rdx, [0x005cc2b9]
mov rcx, rbp
call sub.msvcrt.dll_fopen
test rax, rax
mov rbp, rax
je 0x47dbb3
xor edx, edx
mov r8d, 2
mov rcx, rax
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x47db80
mov rcx, rbp
call sub.msvcrt.dll_ftell
movsxd r14, eax
cmp r14d, 0xffffffff
je 0x47db80
xor r8d, r8d
xor edx, edx
mov rcx, rbp
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x47db80
lea rcx, [r14 + 1]
call fcn.00482890
mov edx, 1
mov r9, rbp
mov r8, r14
mov rcx, rax
mov qword [rsp + 0x28], rax
call sub.msvcrt.dll_fread
cmp r14, rax
mov rdx, rax
je 0x47dbc4
mov rcx, rbp
mov qword [rsp + 0x30], rax
call sub.msvcrt.dll_ferror
mov rdx, qword [rsp + 0x30]
test eax, eax
je 0x47dbc4
mov rcx, rbp
mov edi, ebx
call sub.msvcrt.dll_fclose
mov rax, qword [rsp + 0xe0]
lea ebx, [rdi + 1]
mov edx, dword [rax]
cmp ebx, edx
jl 0x47da9b
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [rsp + 0xe0]
mov edx, dword [rax]
mov edi, ebx
jmp 0x47da90
mov rax, qword [rsp + 0x28]
mov byte [rax + rdx], 0
movzx eax, byte [rax]
test al, al
je 0x47dc08
mov rdx, qword [0x005cfd20]
test byte [rdx + rax*2], 0x40
je 0x47dc50
mov rdx, qword [rsp + 0x28]
jmp 0x47dbfd
mov rcx, qword [0x005cfd20]
test byte [rcx + rax*2], 0x40
je 0x47dc50
add rdx, 1
movzx eax, byte [rdx]
test al, al
jne 0x47dbf0
mov ecx, 8
call fcn.00482890
mov rcx, qword [r12]
mov r14, rax
mov qword [rax], 0
mov rax, qword [rsp + 0x48]
cmp rax, rcx
jne 0x47dd3c
mov rcx, rax
xor esi, esi
call fcn.0047d640
mov qword [rsp + 0x30], r13
xor edx, edx
xor r9d, r9d
mov rcx, rax
mov qword [r12], rax
jmp 0x47dca5
mov rcx, qword [rsp + 0x28]
call fcn.0047d730
mov rcx, qword [r12]
cmp rcx, qword [rsp + 0x48]
mov r14, rax
mov rdx, qword [rax]
je 0x47dda5
test rdx, rdx
je 0x47dd3c
xor edx, edx
nop word [rax + rax]
add rdx, 1
cmp qword [r14 + rdx*8], 0
lea r9, [rdx*8]
jne 0x47dc80
add rsi, rdx
lea rax, [rsi*8]
mov esi, edx
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0xe0]
mov qword [rsp + 0x40], r9
movsxd rax, dword [rax]
lea rdx, [rdx + rax + 1]
shl rdx, 3
call fcn.00482910
mov rdx, qword [rsp + 0xe0]
mov rcx, qword [rsp + 0x30]
mov qword [r12], rax
mov edx, dword [rdx]
add rcx, rax
mov r8d, edx
mov dword [rsp + 0x3c], edx
lea rdx, [rax + r13 + 8]
sub r8d, ebx
mov ebx, edi
movsxd r8, r8d
shl r8, 3
call sub.msvcrt.dll_memmove
mov r9, qword [rsp + 0x40]
mov rdx, r14
mov rcx, qword [r12]
mov r8, r9
add rcx, r13
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0xe0]
mov rcx, r14
mov eax, dword [rax]
lea eax, [rsi + rax - 1]
mov rsi, qword [rsp + 0xe0]
mov dword [rsi], eax
call fcn.0049a918
mov rcx, qword [rsp + 0x28]
call fcn.0049a918
jmp 0x47db80
mov qword [rsp + 0x30], r13
xor esi, esi
xor edx, edx
xor r9d, r9d
jmp 0x47dca5
mov rbx, qword [rax]
mov ecx, 2
call qword [fcn.0049ab10]
lea rdx, str._s:_error:_too_many___files_encountered_n
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.00482800
mov rax, qword [r12]
mov ecx, 2
mov rbx, qword [rax]
call qword [fcn.0049ab10]
lea rdx, str._s:_error:___file_refers_to_a_directory_n
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_fprintf
mov ecx, 1
call fcn.00482800
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x30], rdx
call fcn.0047d640
mov rdx, qword [rsp + 0x30]
mov rcx, rax
mov qword [r12], rax
jmp 0x47dc6f