Function at 0x1400cd730
Capabilities:
Read file on windows

Disassembly:
push r15
mov eax, 0x1048
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.1403423d0
sub rsp, rax
mov qword [rsp + 0x1090], rcx
mov rbp, rdx
mov qword [rsp + 0x10a0], r8
mov qword [rsp + 0x10a8], r9
test rdx, rdx
je 0x1400cd9a0
lea rax, [rsp + 0x40]
xor r15d, r15d
xor r13d, r13d
xor ebx, ebx
mov qword [rsp + 0x30], rax
mov rcx, rbp
call sub.msvcrt.dll_feof
mov r12d, eax
test eax, eax
jne 0x1400cda24
mov rcx, qword [rsp + 0x30]
mov r9, rbp
mov r8d, 0x1000
mov edx, 1
call sub.msvcrt.dll_fread
mov rdi, rax
call qword [sym.imp.msvcrt.dll__errno]
mov rsi, rdi
mov eax, dword [rax]
mov dword [rsp + 0x3c], eax
add rsi, r13
jb 0x1400cdb57
cmp rsi, r15
jb 0x1400cd9e3
test rbx, rbx
jne 0x1400cd8c0
lea r15, [rdi + 1]
mov eax, 0x1000
cmp r15, rax
cmova r15, rax
test r15, r15
jne 0x1400cd890
mov rcx, rbx
call fcn.14034efb0
mov rcx, qword [rsp + 0x1090]
call fcn.1400c69f0
lea rdx, str.Could_not_allocate__lu_byte_to_read_file__s
mov r9d, r15d
lea r8, str.Could_not_allocate__lu_bytes_to_read_file__s
lea rcx, [0x140390943]
mov rdi, rax
call fcn.1402ab610
mov r13, qword [0x14048eef0]
mov r14, rax
mov edx, dword [r13]
test edx, edx
je 0x1400cd958
mov qword [rsp + 0x28], rdi
mov rcx, qword [rsp + 0x10b0]
mov r9, r14
mov r8d, 0xd
mov dword [rsp + 0x20], r15d
call fcn.1400cab90
mov rcx, rdi
call fcn.14034efb0
mov rcx, rbx
call fcn.14034efb0
mov rcx, rbp
call sub.msvcrt.dll_fclose
mov eax, r12d
add rsp, 0x1048
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rdx, r15
mov rcx, rbx
call sub.msvcrt.dll_realloc
mov r14, rax
test rax, rax
je 0x1400cd7f8
cmp rsi, r15
jb 0x1400cd970
test r15, r15
js 0x1400cd8d0
add r15, r15
mov rbx, r14
jmp 0x1400cd7e7
mov r14, rbx
test r15, r15
jns 0x1400cd8b5
nop dword [rax + rax]
mov rcx, qword [rsp + 0x1090]
call fcn.1400c69f0
mov rcx, qword [0x14048def0]
mov rbx, rax
mov rax, qword [rcx]
test rax, rax
je 0x1400cd9cc
lea rdx, str.File__s_is_too_large
lea rcx, [0x140390943]
call fcn.1400c7f40
mov rdi, qword [0x14048eef0]
mov rsi, rax
mov edx, dword [rdi]
test edx, edx
jne 0x1400cd926
lea rcx, [0x140390930]
call fcn.1400daa90
mov dword [rdi], eax
mov edx, eax
mov qword [rsp + 0x20], rbx
mov r9, rsi
mov rcx, qword [rsp + 0x10b0]
mov r8d, 0x18
call fcn.1400cab90
mov rcx, rbx
mov rbx, r14
call fcn.14034efb0
jmp 0x1400cd863
lea rcx, [0x140390930]
call fcn.1400daa90
mov dword [r13], eax
mov edx, eax
jmp 0x1400cd83b
mov rcx, rbp
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x1400cda6b
mov rdx, qword [rsp + 0x30]
lea rcx, [r14 + r13]
mov r8, rdi
mov r13, rsi
mov rbx, r14
call sub.msvcrt.dll_memcpy
jmp 0x1400cd77f
lea rax, str.f___NULL
lea r9, str.get_contents_stdio
mov r8d, 0x2bd
mov qword [rsp + 0x20], rax
lea rdx, [0x14039117d]
lea rcx, [0x1403903fa]
call fcn.1400e7f70
call fcn.1400e7370
test eax, eax
je 0x1400cd8f3
call fcn.1400cb3d0
jmp 0x1400cd8f3
mov rcx, rbp
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x1400cda68
test rbx, rbx
jne 0x1400cdb4f
lea rax, [0x140391230]
lea r9, str.get_contents_stdio
mov r8d, 0x2f8
mov qword [rsp + 0x20], rax
lea rdx, [0x14039117d]
lea rcx, [0x1403903fa]
call fcn.1400e7f70
mov rcx, rbp
call sub.msvcrt.dll_fclose
lea rax, [rbx + r13]
test r15, r15
je 0x1400cdb1e
cmp qword [rsp + 0x10a8], 0
mov byte [rax], 0
je 0x1400cda52
mov rax, qword [rsp + 0x10a8]
mov qword [rax], r13
mov rax, qword [rsp + 0x10a0]
mov r12d, 1
mov qword [rax], rbx
jmp 0x1400cd873
mov r14, rbx
mov rcx, qword [rsp + 0x1090]
call fcn.1400c69f0
mov ecx, dword [rsp + 0x3c]
mov rbx, rax
call fcn.1400e79b0
mov rcx, qword [0x14048def0]
mov rdi, rax
mov rax, qword [rcx]
test rax, rax
je 0x1400cdb38
lea rdx, str.Error_reading_file__s:__s
lea rcx, [0x140390943]
mov r15d, 0x18
call fcn.1400c7f40
mov rsi, rax
mov eax, dword [rsp + 0x3c]
sub eax, 1
cmp eax, 0x8a
ja 0x1400cdad0
mov rdx, qword [0x14048b530]
movzx r15d, byte [rdx + rax]
mov r13, qword [0x14048eef0]
mov edx, dword [r13]
test edx, edx
jne 0x1400cdaf1
lea rcx, [0x140390930]
call fcn.1400daa90
mov dword [r13], eax
mov edx, eax
mov qword [rsp + 0x20], rbx
mov rcx, qword [rsp + 0x10b0]
mov r9, rsi
mov r8d, r15d
mov qword [rsp + 0x28], rdi
call fcn.1400cab90
mov rcx, rbx
mov rbx, r14
call fcn.14034efb0
jmp 0x1400cd863
mov ecx, 1
call sub.msvcrt.dll_malloc
mov rbx, rax
test rax, rax
je 0x1400cdb5f
xor r13d, r13d
jmp 0x1400cda39
call fcn.1400e7370
test eax, eax
je 0x1400cda9a
call fcn.1400cb3d0
jmp 0x1400cda9a
mov r14, rbx
jmp 0x1400cd980
mov r14, rbx
jmp 0x1400cd8d0
mov qword [rsp + 0x20], 1
lea r9, [0x14039042a]
lea r8, [0x140390440]
mov edx, 4
lea rcx, [0x1403903fa]
call fcn.1400d2190
jmp 0x1400cdb87