Function at 0x1400ca800
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x50
xor r12d, r12d
mov rbp, rcx
mov qword [rcx + 0x58], r12
mov dword [rcx + 0x50], r12d
nop dword [rax]
lea rdx, [rsp + 0x98]
mov rcx, rbp
call fcn.1400c9f00
test eax, eax
je 0x1400caa9c
mov edx, dword [rsp + 0x98]
mov ecx, edx
sub ecx, 2
je 0x1400ca96f
dec ecx
je 0x1400ca869
cmp edx, 4
jne 0x1400ca820
cmp dword [rbp + 0x20], r12d
jne 0x1400caa78
mov dword [rbp + 0x60], WSAGetLastError
jmp 0x1400caa9c
mov r9, qword [rbp + 0x70]
test byte [r9], 8
je 0x1400caa95
mov rax, qword [r9 + 0x40]
test rax, rax
je 0x1400ca897
lea rdx, [rsp + 0x90]
mov r8d, 1
mov rcx, rbp
call rax
cdqe
jmp 0x1400ca8b1
mov r9, qword [r9 + 0x38]
mov edx, 1
lea rcx, [rsp + 0x90]
mov r8d, edx
call qword [sym.imp.msvcrt.dll_fread]
cmp rax, 1
jne 0x1400caa8c
movzx ebx, byte [rsp + 0x90]
lea rdx, [rsp + 0xa0]
mov rcx, rbp
call fcn.1400c9940
test eax, eax
je 0x1400caa9c
mov rcx, qword [rsp + 0xa0]
test rcx, rcx
je 0x1400ca820
movzx r9d, byte [rcx]
lea rax, [rcx + 1]
lea rdx, [rbp + 0x58]
lea rcx, [rbp + 0x50]
mov r8d, ebx
mov qword [rsp + 0x20], rax
call fcn.1400cab40
test eax, eax
je 0x1400caa9c
nop dword [rax]
nop word [rax + rax]
lea rdx, [rsp + 0xa0]
mov rcx, rbp
call fcn.1400c9940
test eax, eax
je 0x1400caa9c
mov rcx, qword [rsp + 0xa0]
test rcx, rcx
je 0x1400ca820
movzx r9d, byte [rcx]
lea rax, [rcx + 1]
lea rdx, [rbp + 0x58]
lea rcx, [rbp + 0x50]
xor r8d, r8d
mov qword [rsp + 0x20], rax
call fcn.1400cab40
test eax, eax
jne 0x1400ca920
jmp 0x1400caa9c
mov rcx, rbp
call fcn.1400c9a20
test eax, eax
je 0x1400caa9c
mov eax, dword [rbp + 0x20]
dec eax
cdqe
imul rdi, rax, 0x38
add rdi, qword [rbp + 0x48]
mov ecx, dword [rdi + 8]
test ecx, ecx
jns 0x1400ca9af
mov r8d, dword [rdi + 0xc]
test r8d, r8d
jns 0x1400ca9af
mov eax, 0x7fffffff
cdq
idiv r8d
cmp ecx, eax
jg 0x1400caa9c
imul ecx, dword [rdi + 0xc]
movsxd rbx, ecx
cmp rbx, 0xffffffffffffffff
ja 0x1400caa9c
mov r8d, 1
mov rdx, rbx
xor ecx, ecx
call fcn.1400cb210
mov qword [rdi + 0x20], rax
test rax, rax
je 0x1400caa9c
cmp byte [rdi + 0x10], r12b
je 0x1400caa42
movdqa xmm0, xmmword [0x14014b1d0]
movdqa xmm1, xmmword [0x14014b1e0]
mov rsi, r12
movdqu xmmword [rsp + 0x30], xmm0
movdqu xmmword [rsp + 0x40], xmm1
mov ebx, dword [rsp + rsi + 0x30]
cmp ebx, dword [rdi + 0xc]
jge 0x1400caa36
nop dword [rax + rax]
mov r8d, dword [rdi + 8]
mov rcx, rbp
mov eax, r8d
imul eax, ebx
movsxd rdx, eax
add rdx, qword [rdi + 0x20]
call fcn.1400c9d80
test eax, eax
je 0x1400caa9c
add ebx, dword [rsp + rsi + 0x40]
cmp ebx, dword [rdi + 0xc]
jl 0x1400caa10
add rsi, 4
cmp rsi, 0x10
jl 0x1400caa02
jmp 0x1400caa54
mov r8d, ebx
mov rdx, rax
mov rcx, rbp
call fcn.1400c9d80
test eax, eax
je 0x1400caa9c
mov rax, qword [rbp + 0x58]
test rax, rax
je 0x1400ca820
mov qword [rdi + 0x30], rax
mov eax, dword [rbp + 0x50]
mov dword [rdi + 0x28], eax
mov qword [rbp + 0x58], r12
mov dword [rbp + 0x50], r12d
jmp 0x1400ca820
mov eax, 1
add rsp, 0x50
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov dword [rbp + 0x60], 0x66
jmp 0x1400caa9c
mov dword [rbp + 0x60], reloc.WS2_32.dll_WSAGetLastError
xor eax, eax
add rsp, 0x50
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret