Function at 0x401cb0
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
add rsp, 0xffffffffffffff80
lea rdx, [0x0041012c]
mov rbp, rcx
call fcn.00403d30
test rax, rax
mov rbx, rax
je 0x401ed0
mov rax, qword [0x00415ae0]
lea r12, [rsp + 0x20]
mov r8d, 8
xor esi, esi
mov rdx, r12
mov rcx, rbx
mov rax, qword [rax]
mov qword [rsp + 0x20], rax
shr rax, 0x18
add eax, 0xc
mov byte [rsp + 0x23], al
call fcn.004072a0
test rax, rax
mov rdi, rax
jne 0x401d25
mov rcx, rbx
call sub.msvcrt.dll_fclose
mov rax, rsi
sub rsp, 0xffffffffffffff80
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
xor r8d, r8d
mov edx, eax
mov rcx, rbx
call fcn.0040e6a0
test eax, eax
js 0x401ee0
mov r9, rbx
mov r8d, 1
mov edx, 0x58
mov rcx, r12
call sub.msvcrt.dll_fread
test rax, rax
je 0x401f00
mov edx, 0x1070
mov ecx, 1
call sub.msvcrt.dll_calloc
test rax, rax
mov rsi, rax
je 0x401f20
mov r9, rbp
mov edx, 0x1000
mov rcx, rax
lea r8, [0x00410129]
call fcn.00401870
mov eax, dword [rsp + 0x28]
lea r9, [r12 + 0x18]
mov edx, 0x40
lea rcx, [rsi + 0x102c]
lea r8, [0x00410129]
bswap eax
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x2c]
bswap eax
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x30]
bswap eax
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x34]
bswap eax
mov dword [rsi + 0x1028], eax
mov dword [rsp + 0x34], eax
call fcn.00401870
mov eax, dword [rsp + 0x28]
xor r8d, r8d
mov rcx, rbx
sub rdi, rax
lea rdx, [rdi + 0x58]
mov qword [rsi + 0x1000], rdx
add edx, dword [rsp + 0x2c]
call fcn.0040e6a0
mov edi, dword [rsp + 0x30]
mov rcx, rdi
call sub.msvcrt.dll_malloc
test rax, rax
mov qword [rsi + 0x1008], rax
je 0x401f60
mov r9, rbx
mov r8d, 1
mov rdx, rdi
mov rcx, rax
call sub.msvcrt.dll_fread
test rax, rax
je 0x401f40
mov eax, dword [rsp + 0x30]
mov rcx, rbx
add rax, qword [rsi + 0x1008]
mov qword [rsi + 0x1010], rax
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x401f80
mov rax, qword [rsi + 0x1008]
mov r9, qword [rsi + 0x1010]
cmp rax, r9
jae 0x401d0f
mov r10d, 1
nop
mov ecx, dword [rax + 4]
movzx r8d, byte [rax + 0x11]
mov edx, dword [rax]
bswap ecx
mov dword [rax + 4], ecx
mov ecx, dword [rax + 8]
bswap edx
mov dword [rax], edx
bswap ecx
mov dword [rax + 8], ecx
mov ecx, dword [rax + 0xc]
bswap ecx
mov dword [rax + 0xc], ecx
lea ecx, [r8 - 0x5a]
cmp cl, 0x1e
ja 0x401ebe
mov rdi, r10
shl rdi, cl
test edi, 0x40100501
setne cl
or byte [rsi + 0x1018], cl
cmp r8b, 0x6c
jne 0x401ebe
mov qword [rsi + 0x1020], rax
mov edx, edx
add rax, rdx
cmp rax, r9
jb 0x401e70
jmp 0x401d0f
xor esi, esi
mov rax, rsi
sub rsp, 0xffffffffffffff80
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call qword [sym.imp.msvcrt.dll__errno]
lea r8, str.Failed_to_seek_to_cookie_position__n
mov edx, dword [rax]
lea rcx, str.fseek
call fcn.00402310
jmp 0x401d0f
call qword [sym.imp.msvcrt.dll__errno]
lea r8, str.Failed_to_read_cookie__n
mov edx, dword [rax]
lea rcx, str.fread
call fcn.00402310
jmp 0x401d0f
call qword [sym.imp.msvcrt.dll__errno]
lea r8, str.Could_not_allocate_memory_for_archive_structure__n
mov edx, dword [rax]
lea rcx, [0x0041038a]
call fcn.00402310
jmp 0x401d0f
call qword [sym.imp.msvcrt.dll__errno]
lea r8, str.Could_not_read_full_TOC__n
mov edx, dword [rax]
lea rcx, str.fread
call fcn.00402310
jmp 0x401d0f
call qword [sym.imp.msvcrt.dll__errno]
lea r8, str.Could_not_allocate_buffer_for_TOC__n
mov edx, dword [rax]
lea rcx, str.malloc
call fcn.00402310
jmp 0x401d0f
lea rcx, str.Error_on_file._n
call fcn.004022b0
jmp 0x401d0f