Function at 0x140078540
Capabilities:
Read file on windows

Disassembly:
jmp 0x140078540
push rbx
push r15
sub rsp, 0x28
movsxd rax, dword [rcx + 4]
mov r15, rcx
lea rbx, [rax + rax*2]
shl rbx, 4
lea rax, [0x140311020]
add rbx, rax
mov qword [0x1403122e0], rbx
mov r8d, dword [rcx + 4]
cmp r8d, 0x63
ja 0x1400787cc
cmp dword [rbx + 0x14], 0
jne 0x1400785b8
cmp dword [rcx], 0
je 0x14007859a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x6a
mov eax, 0x6a
add rsp, 0x28
pop r15
pop rbx
ret
lea rdx, str.backspace
mov ecx, 0x6a
call fcn.14000142e
mov eax, 0x6a
add rsp, 0x28
pop r15
pop rbx
ret
cmp qword [rbx], 0
jne 0x1400785d4
mov edx, 1
mov ecx, edx
call fcn.140001582
xor eax, eax
add rsp, 0x28
pop r15
pop rbx
ret
cmp dword [rbx + 0x24], 1
mov qword [rsp + 0x48], rbp
jne 0x1400785f3
xor ebp, ebp
mov dword [rbx + 0x24], ebp
xor eax, eax
mov rbp, qword [rsp + 0x48]
add rsp, 0x28
pop r15
pop rbx
ret
cmp dword [rbx + 0x28], 0
je 0x140078661
call fcn.1400013a7
mov rcx, rbx
call fcn.14000157d
test eax, eax
je 0x140078661
cmp dword [r15], 0
je 0x140078638
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rbx]
mov dword [rax], ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov rbp, qword [rsp + 0x48]
mov eax, dword [rax]
add rsp, 0x28
pop r15
pop rbx
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
lea rdx, str.backspace
mov ecx, dword [rax]
call fcn.14000142e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov rbp, qword [rsp + 0x48]
mov eax, dword [rax]
add rsp, 0x28
pop r15
pop rbx
ret
cmp dword [rbx + 0x10], 0
mov qword [rsp + 0x58], rdi
mov rdi, qword [rbx]
mov rcx, rdi
jle 0x1400786b2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
mov r8d, dword [rbx + 0x10]
mov ecx, eax
cdq
idiv r8d
test edx, edx
jne 0x140078688
dec ecx
mov eax, ecx
cdq
idiv r8d
xor r8d, r8d
sub ecx, edx
mov edx, ecx
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov rdi, qword [rsp + 0x58]
xor eax, eax
mov rbp, qword [rsp + 0x48]
add rsp, 0x28
pop r15
pop rbx
ret
cmp dword [rbx + 0x18], 0
jne 0x14007870a
mov edx, 0xfffffffc
lea r8d, [rdx + 5]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov edx, 4
lea rcx, [rsp + 0x40]
mov r9, rdi
lea r8d, [rdx - 3]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edx, 0xfffffff8
mov r8d, 1
sub edx, dword [rsp + 0x40]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov rdi, qword [rsp + 0x58]
xor eax, eax
mov rbp, qword [rsp + 0x48]
add rsp, 0x28
pop r15
pop rbx
ret
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x20], r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
mov r14d, eax
mov esi, eax
xor ebp, ebp
test r14d, r14d
je 0x14007876f
mov ecx, 0x40
cmp r14d, ecx
cmovl ecx, r14d
xor r8d, r8d
sub r14d, ecx
mov rcx, rdi
mov edx, r14d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov ebx, r14d
cmp ebx, esi
jge 0x14007879b
mov rcx, rdi
call fcn.14000117c
cmp eax, 0xa
jne 0x140078767
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
cmp eax, esi
je 0x14007876b
mov ebp, eax
inc ebx
jmp 0x140078747
test ebp, ebp
je 0x140078721
xor r8d, r8d
mov edx, ebp
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
xor eax, eax
mov rsi, qword [rsp + 0x50]
mov r14, qword [rsp + 0x20]
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
add rsp, 0x28
pop r15
pop rbx
ret
cmp dword [r15], 0
je 0x1400787b4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0xffffffff
mov eax, 0xffffffff
jmp 0x14007877f
lea rdx, str.backspace
mov ecx, 0xffffffff
call fcn.14000142e
mov eax, 0xffffffff
jmp 0x14007877f
cmp dword [rcx], 0
je 0x1400787ea
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x65
mov eax, 0x65
add rsp, 0x28
pop r15
pop rbx
ret
lea rdx, str.backspace
mov ecx, 0x65
call fcn.14000142e
mov eax, 0x65
add rsp, 0x28
pop r15
pop rbx
ret