Function at 0x1400183a0
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
mov rsi, qword [rcx + 0x70]
mov r12d, dword [rsi]
mov rbx, rcx
and r12d, 8
jne 0x1400183d0
mov dword [rcx + 0x60], 0x6f
mov eax, r12d
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi + 0x40]
lea rdi, [rsp + 0x2d]
test rax, rax
je 0x1400185b0
mov r8d, 2
mov rdx, rdi
call rax
cmp eax, 2
jne 0x140018598
movzx eax, word [rsp + 0x2d]
mov rdx, qword [rbx + 0x70]
mov dword [rbx + 0x28], eax
mov rax, qword [rdx + 0x40]
test rax, rax
je 0x1400185f0
mov r8d, 2
mov rdx, rdi
mov rcx, rbx
call rax
cmp eax, 2
jne 0x140018598
movzx eax, word [rsp + 0x2d]
mov rdx, qword [rbx + 0x70]
mov dword [rbx + 0x2c], eax
mov rax, qword [rdx + 0x40]
test rax, rax
je 0x140018610
mov r8d, 2
mov rdx, rdi
mov rcx, rbx
call rax
cmp eax, 2
jne 0x140018598
movzx eax, word [rsp + 0x2d]
mov rdx, qword [rbx + 0x70]
mov dword [rbx + 0x30], eax
mov rax, qword [rdx + 0x40]
test rax, rax
je 0x1400185d0
mov r8d, 2
mov rdx, rdi
mov rcx, rbx
call rax
cmp eax, 2
jne 0x140018598
movzx eax, word [rsp + 0x2d]
mov rdx, qword [rbx + 0x70]
mov dword [rbx + 0x34], eax
mov rax, qword [rdx + 0x40]
test rax, rax
je 0x1400186e9
mov r8d, 1
mov rdx, rdi
mov rcx, rbx
call rax
mov r12d, eax
mov rcx, qword [rbx + 0x40]
cmp r12d, 1
jne 0x14001862c
movzx eax, byte [rsp + 0x2d]
mov ebp, eax
sar eax, 6
mov byte [rbx + 0x38], al
mov eax, ebp
and byte [rbx + 0x38], 1
test rcx, rcx
je 0x1400184e8
call fcn.14001b170
mov qword [rbx + 0x40], 0
movzx eax, byte [rsp + 0x2d]
test al, al
js 0x140018648
mov eax, dword [rbx + 0x30]
imul eax, dword [rbx + 0x34]
mov dword [rsi + 0x34], eax
mov rsi, qword [rbx + 0x70]
mov rax, qword [rsi + 0x40]
test rax, rax
je 0x14001872c
lea rdx, [rsp + 0x2c]
mov r8d, 1
mov rcx, rbx
call rax
test eax, eax
jle 0x140018708
movzx ecx, byte [rsp + 0x2c]
cmp ecx, 8
jg 0x140018598
mov edx, 1
mov dword [rsi + 8], ecx
mov eax, edx
mov byte [rsi + 0x50], 0
shl eax, cl
add ecx, 1
mov dword [rsi + 0x20], 0x1002
lea r8d, [rax + 1]
mov dword [rsi + 0x18], ecx
shl edx, cl
mov dword [rsi + 0x10], r8d
mov qword [rsi + 0x28], 0
mov dword [rsi + 0x30], 0
mov dword [rsi + 0xc], eax
add eax, 2
mov dword [rsi + 0x14], eax
lea rax, [rsi + 0x2150]
mov dword [rsi + 0x1c], edx
lea rdx, [rsi + 0x6150]
nop dword [rax]
mov dword [rax], 0x1002
add rax, 4
cmp rax, rdx
jne 0x140018580
jmp 0x1400183c1
xor r12d, r12d
mov dword [rbx + 0x60], 0x66
mov eax, r12d
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov r9, qword [rsi + 0x38]
mov r8d, 2
mov edx, 1
mov rcx, rdi
call sub.msvcrt.dll_fread
jmp 0x1400183ed
mov r9, qword [rdx + 0x38]
mov r8d, 2
mov edx, 1
mov rcx, rdi
call sub.msvcrt.dll_fread
jmp 0x14001847d
mov r9, qword [rdx + 0x38]
mov r8d, 2
mov edx, 1
mov rcx, rdi
call sub.msvcrt.dll_fread
jmp 0x14001841d
mov r9, qword [rdx + 0x38]
mov r8d, 2
mov edx, 1
mov rcx, rdi
call sub.msvcrt.dll_fread
jmp 0x14001844d
mov dword [rbx + 0x60], 0x66
xor r12d, r12d
call fcn.14001b170
mov qword [rbx + 0x40], 0
jmp 0x1400183c1
and ebp, 7
mov eax, 1
xor edx, edx
lea ecx, [rbp + 1]
shl eax, cl
mov ecx, eax
call fcn.14001b040
mov qword [rbx + 0x40], rax
test rax, rax
je 0x14001874a
mov eax, dword [rax]
xor ebp, ebp
test eax, eax
jne 0x1400186c3
jmp 0x1400184f0
mov r8d, 3
mov rdx, rdi
mov rcx, rbx
call rax
mov rcx, qword [rbx + 0x40]
cmp eax, 3
jne 0x140018710
movzx edx, byte [rsp + 0x2d]
mov eax, ebp
add ebp, 1
lea rax, [rax + rax*2]
add rax, qword [rcx + 0x10]
mov byte [rax], dl
movzx edx, byte [rsp + 0x2e]
mov byte [rax + 1], dl
movzx edx, byte [rsp + 0x2f]
mov byte [rax + 2], dl
cmp dword [rcx], ebp
jbe 0x1400184f0
mov rdx, qword [rbx + 0x70]
mov rax, qword [rdx + 0x40]
test rax, rax
jne 0x140018680
mov r9, qword [rdx + 0x38]
mov r8d, 3
mov edx, 1
mov rcx, rdi
call sub.msvcrt.dll_fread
jmp 0x14001868e
mov r9, qword [rdx + 0x38]
mov r8d, 1
mov edx, 1
mov rcx, rdi
call sub.msvcrt.dll_fread
mov r12d, eax
jmp 0x1400184b0
xor r12d, r12d
jmp 0x1400183c1
call fcn.14001b170
xor r12d, r12d
mov dword [rbx + 0x60], 0x66
mov qword [rbx + 0x40], 0
jmp 0x1400183c1
mov r9, qword [rsi + 0x38]
lea rcx, [rsp + 0x2c]
mov r8d, 1
mov edx, 1
call sub.msvcrt.dll_fread
jmp 0x14001851b
mov dword [rbx + 0x60], 0x6d
xor r12d, r12d
jmp 0x1400183c1