Function at 0x140004a40
Capabilities:
Read file on windows

Disassembly:
push rbx
push r12
push r13
push r15
sub rsp, 0x48
mov rax, qword [0x14001d008]
xor rax, rsp
mov qword [rsp + 0x38], rax
xor r13d, r13d
mov r12d, r13d
mov r15d, r13d
test rcx, rcx
je 0x140004cb2
mov rbx, qword [rcx + 0x80]
test rbx, rbx
je 0x140004cb2
cmp qword [rbx], r12
jne 0x140004a8b
lea eax, [r13 - 0x64]
jmp 0x140004c92
test r8d, r8d
jne 0x140004a97
xor eax, eax
jmp 0x140004c92
mov eax, dword [rbx + 0x80]
mov qword [rbx + 0x18], rdx
mov dword [rbx + 0x20], r8d
cmp r8d, eax
jbe 0x140004ab0
mov dword [rbx + 0x20], eax
mov r8d, eax
mov qword [rsp + 0x78], rbp
mov qword [rsp + 0x80], rsi
mov qword [rsp + 0x88], rdi
mov qword [rsp + 0x40], r14
test r8d, r8d
je 0x140004c75
mov esi, dword [rbx + 0x10]
test esi, esi
jne 0x140004bae
mov eax, dword [rbx + 0x7c]
mov esi, r13d
test eax, eax
je 0x140004bae
mov rcx, qword [rbx + 0x88]
mov esi, 0x4000
mov edx, dword [rbx + 0x94]
cmp eax, esi
cmovb esi, eax
add edx, dword [rbx + 0x60]
cmp byte [rcx], r13b
je 0x140004b2a
cmp byte [rcx + 1], r13b
je 0x140004cab
add edx, dword [rcx + 0x14]
xor r9d, r9d
mov rcx, qword [rcx + 8]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x140004b2d
mov dword [rcx + 0x24], edx
mov rbp, qword [rbx + 0x88]
mov r10, qword [rbx]
mov r14d, esi
cmp byte [rbp], r13b
je 0x140004b68
mov rcx, qword [rbp + 8]
lea r9, [rsp + 0x30]
mov r8d, esi
mov qword [rsp + 0x20], r13
mov rdx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140004b62
mov byte [rbp + 0x10], 1
mov eax, dword [rsp + 0x30]
jmp 0x140004b8f
mov edx, dword [rbp + 0x24]
mov ecx, dword [rbp + 0x20]
sub ecx, edx
lea eax, [rdx + rsi]
cmp eax, dword [rbp + 0x20]
cmovbe ecx, esi
add rdx, qword [rbp + 0x18]
mov edi, ecx
mov r8d, ecx
mov rcx, r10
call fcn.140007840
add dword [rbp + 0x24], edi
mov eax, edi
xor edx, edx
div r14
cmp rax, 1
jne 0x140004cab
add dword [rbx + 0x60], esi
mov rax, qword [rbx]
sub dword [rbx + 0x7c], esi
mov qword [rbx + 8], rax
mov dword [rbx + 0x10], esi
cmp dword [rbx + 0x90], r13d
jne 0x140004c2e
mov r14d, dword [rbx + 0x20]
mov r8d, r13d
cmp r14d, esi
mov ebp, r14d
cmovae ebp, esi
test ebp, ebp
je 0x140004bf1
nop dword [rax + rax]
mov rax, qword [rbx + 8]
mov rcx, qword [rbx + 0x18]
mov edx, r8d
inc r8d
movzx eax, byte [rdx + rax]
mov byte [rdx + rcx], al
cmp r8d, ebp
jb 0x140004bd0
mov esi, dword [rbx + 0x10]
mov r14d, dword [rbx + 0x20]
mov rdi, qword [rbx + 0x18]
mov r8d, ebp
mov ecx, dword [rbx + 0x74]
mov rdx, rdi
call fcn.140002e60
sub dword [rbx + 0x80], ebp
sub esi, ebp
add dword [rbx + 0x24], ebp
sub r14d, ebp
mov ecx, ebp
add qword [rbx + 8], rcx
mov dword [rbx + 0x74], eax
add r15d, ebp
lea rax, [rdi + rbp]
mov dword [rbx + 0x10], esi
mov dword [rbx + 0x20], r14d
mov qword [rbx + 0x18], rax
jmp 0x140004c6b
mov edi, dword [rbx + 0x24]
lea rcx, [rbx + 8]
mov rsi, qword [rbx + 0x18]
call fcn.140003420
mov ebp, dword [rbx + 0x24]
mov rdx, rsi
mov ecx, dword [rbx + 0x74]
sub ebp, edi
mov r8d, ebp
mov r12d, eax
call fcn.140002e60
sub dword [rbx + 0x80], ebp
add r15d, ebp
mov dword [rbx + 0x74], eax
cmp r12d, 1
je 0x140004c75
test r12d, r12d
jne 0x140004c75
cmp dword [rbx + 0x20], r13d
ja 0x140004ad3
mov eax, r15d
mov rdi, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x78]
mov r14, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.140005d90
add rsp, 0x48
pop r15
pop r13
pop r12
pop rbx
ret
mov eax, 0xffffffff
jmp 0x140004c78
mov eax, 0xffffff9a
jmp 0x140004c92