Function at 0x140003a40
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r13
push r14
sub rsp, 0x58
mov rax, qword [0x14001d008]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor r13d, r13d
mov qword [rsp + 0x30], rdx
mov r14d, 1
mov rbx, rcx
mov edi, r14d
cmp byte [rcx], r13b
je 0x140003a9f
mov rcx, qword [rcx + 8]
lea r9, [rsp + 0x3c]
mov r8d, r14d
mov qword [rsp + 0x20], r13
lea rdx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140003a99
mov byte [rbx + 0x10], dil
mov ebp, dword [rsp + 0x3c]
jmp 0x140003acc
mov esi, dword [rcx + 0x24]
mov ecx, dword [rcx + 0x20]
lea eax, [rsi + 1]
cmp eax, ecx
jbe 0x140003ab0
mov edi, ecx
sub edi, esi
mov rdx, rsi
mov r8d, edi
add rdx, qword [rbx + 0x18]
lea rcx, [rsp + 0x38]
mov ebp, edi
call fcn.140007840
lea eax, [rsi + rdi]
mov dword [rbx + 0x24], eax
movzx eax, byte [rbx]
mov qword [rsp + 0xa0], r12
mov qword [rsp + 0x50], r15
cmp ebp, r14d
jne 0x140003ae8
movzx edi, byte [rsp + 0x38]
jmp 0x140003afa
test al, al
je 0x140003af6
cmp byte [rbx + 0x10], r13b
jne 0x140003cc9
mov edi, dword [rsp + 0x3c]
mov r15d, edi
mov esi, r14d
test al, al
je 0x140003b2f
mov rcx, qword [rbx + 8]
lea r9, [rsp + 0x3c]
mov r8d, r14d
mov qword [rsp + 0x20], r13
lea rdx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140003b28
mov byte [rbx + 0x10], sil
mov r12d, dword [rsp + 0x3c]
jmp 0x140003b5d
mov ebp, dword [rbx + 0x24]
mov ecx, dword [rbx + 0x20]
lea eax, [rbp + 1]
cmp eax, ecx
jbe 0x140003b40
mov esi, ecx
sub esi, ebp
mov rdx, rbp
mov r8d, esi
add rdx, qword [rbx + 0x18]
lea rcx, [rsp + 0x38]
mov r12d, esi
call fcn.140007840
lea eax, [rsi + rbp]
mov dword [rbx + 0x24], eax
cmp r12d, r14d
jne 0x140003b69
movzx edi, byte [rsp + 0x38]
jmp 0x140003b78
cmp byte [rbx], r13b
je 0x140003b78
cmp byte [rbx + 0x10], r13b
jne 0x140003cc9
mov ebp, edi
mov esi, edi
shl ebp, 8
add ebp, r15d
mov r15d, r14d
cmp byte [rbx], r13b
je 0x140003bb5
mov rcx, qword [rbx + 8]
lea r9, [rsp + 0x3c]
mov r8d, r14d
mov qword [rsp + 0x20], r13
lea rdx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140003bae
mov byte [rbx + 0x10], r14b
mov r13d, dword [rsp + 0x3c]
jmp 0x140003be9
mov r12d, dword [rbx + 0x24]
mov ecx, dword [rbx + 0x20]
lea eax, [r12 + 1]
cmp eax, ecx
jbe 0x140003bcb
mov r15d, ecx
sub r15d, r12d
mov rdx, r12
mov r8d, r15d
add rdx, qword [rbx + 0x18]
lea rcx, [rsp + 0x38]
mov r13d, r15d
call fcn.140007840
lea eax, [r12 + r15]
mov dword [rbx + 0x24], eax
cmp r13d, r14d
jne 0x140003c2c
movzx edi, byte [rsp + 0x38]
mov esi, edi
shl esi, 0x10
add esi, ebp
cmp byte [rbx], 0
je 0x140003c48
mov rcx, qword [rbx + 8]
lea r9, [rsp + 0x3c]
xor r13d, r13d
lea rdx, [rsp + 0x38]
mov r8d, r14d
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140003c26
mov byte [rbx + 0x10], r14b
mov ebp, dword [rsp + 0x3c]
jmp 0x140003c7e
cmp byte [rbx], 0
je 0x140003bf5
cmp byte [rbx + 0x10], 0
je 0x140003bf5
mov rcx, qword [rsp + 0x30]
xor r13d, r13d
lea eax, [r13 - 1]
mov dword [rcx], r13d
jmp 0x140003c97
mov r15d, dword [rbx + 0x24]
mov ecx, dword [rbx + 0x20]
lea eax, [r15 + 1]
cmp eax, ecx
jbe 0x140003c5d
mov r14d, ecx
sub r14d, r15d
mov rdx, r15
mov r8d, r14d
add rdx, qword [rbx + 0x18]
lea rcx, [rsp + 0x38]
mov ebp, r14d
call fcn.140007840
lea eax, [r15 + r14]
xor r13d, r13d
mov dword [rbx + 0x24], eax
cmp ebp, 1
jne 0x140003cbe
movzx edi, byte [rsp + 0x38]
mov rcx, qword [rsp + 0x30]
mov eax, r13d
shl edi, 0x18
add edi, esi
mov dword [rcx], edi
mov r15, qword [rsp + 0x50]
mov r12, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140005d90
add rsp, 0x58
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret
cmp byte [rbx], 0
je 0x140003c88
cmp byte [rbx + 0x10], 0
je 0x140003c88
mov rcx, qword [rsp + 0x30]
mov eax, 0xffffffff
mov dword [rcx], r13d
jmp 0x140003c97