Function at 0x140002570
Capabilities:
Read file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
push rbx
push rbp
push rsi
push r12
sub rsp, 0x38
xor ebx, ebx
mov ebp, r8d
mov r12, rdx
mov rsi, rcx
test rcx, rcx
je 0x1400025b3
test rdx, rdx
je 0x1400025b3
cmp r8d, 0x10
jge 0x1400025c0
lea ecx, [rbx + 2]
call fcn.140009d00
mov rcx, rax
lea rdx, str.Format_error__invalid_filesize___d_n
mov r8d, ebp
call fcn.140004e60
mov rax, rbx
add rsp, 0x38
pop r12
pop rsi
pop rbp
pop rbx
ret
mov qword [rsp + 0x60], rdi
mov edx, 1
mov qword [rsp + 0x68], r13
mov r9, r12
mov qword [rsp + 0x70], r14
mov qword [rsp + 0x30], r15
lea r8d, [rdx + 3]
call fcn.14000a8dc
mov edx, 1
lea rcx, [rsi + 4]
mov r9, r12
mov rdi, rax
lea r8d, [rdx + 3]
call fcn.14000a8dc
mov edx, 1
lea rcx, [rsi + 8]
mov r9, r12
add edi, eax
lea r8d, [rdx + 3]
call fcn.14000a8dc
mov edx, 1
lea rcx, [rsi + 0xc]
mov r9, r12
add edi, eax
lea r8d, [rdx + 3]
call fcn.14000a8dc
add eax, edi
cmp eax, 0x10
je 0x14000266c
mov ecx, 2
call fcn.140009d00
mov rcx, rax
lea rdx, str.GetVivHeader:_File_read_error_n
call fcn.140004e60
mov rax, rbx
mov r14, qword [rsp + 0x70]
mov r13, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x60]
mov r15, qword [rsp + 0x30]
add rsp, 0x38
pop r12
pop rsi
pop rbp
pop rbx
ret
mov r8d, 4
mov byte [rsi + 0x30], 0xc
lea rdx, str.BIG4
mov rcx, rsi
call fcn.14000f530
test eax, eax
je 0x140002695
mov eax, dword [rsi + 4]
add byte [rsi + 0x30], 2
bswap eax
mov dword [rsi + 4], eax
mov eax, dword [rsi + 8]
mov rcx, rsi
bswap eax
mov dword [rsi + 8], eax
mov eax, dword [rsi + 0xc]
bswap eax
mov dword [rsi + 0xc], eax
call fcn.140004da0
mov edx, dword [rsi + 8]
test edx, edx
jns 0x1400026dd
mov r8d, edx
lea rcx, str.Warning:FixVivHdr:_Format__invalid_number_of_purported_directory_entries____d__0x_x___n
call fcn.140005be0
mov eax, dword [rsi + 8]
lea rcx, str.Warning:FixVivHdr:_assume__d_entries_n
btr eax, 0x1f
mov edi, 0x180000
cmp eax, edi
cmovb edi, eax
jmp 0x1400026fc
mov edi, 0x180000
cmp edx, edi
jle 0x140002706
mov r8d, edx
lea rcx, str.Warning:FixVivHdr:_Format__unsupported_number_of_purported_directory_entries____d__0x_x___n
call fcn.140005be0
lea rcx, str.assume__d_entries_n
mov edx, edi
mov dword [rsi + 8], edi
call fcn.140005be0
mov eax, dword [rsi + 4]
bswap eax
cmp eax, ebp
jne 0x140002716
xor byte [rsi + 0x30], 2
mov dword [rsi + 4], ebp
mov edx, ebp
mov rcx, rsi
call fcn.1400012e0
test eax, eax
je 0x14000264b
mov eax, dword [rsp + 0x88]
mov r8, r12
mov r9d, dword [rsp + 0x78]
mov edx, ebp
mov dword [rsp + 0x28], eax
mov rcx, rsi
mov eax, dword [rsp + 0x80]
mov dword [rsp + 0x20], eax
call fcn.1400019f0
test eax, eax
je 0x14000264b
mov edx, ebp
mov rcx, rsi
call fcn.140001040
test eax, eax
jne 0x140002836
lea rcx, str.PrintVivDirEntr_n
call fcn.140005be0
mov edx, dword [rsi + 8]
lea rcx, str.vd__count_dir_entries:__d_n
call fcn.140005be0
mov edx, dword [rsi + 0x10]
lea rcx, str.vd__count_dir_entries_true:__d_n
call fcn.140005be0
mov edx, dword [rsi + 0x18]
lea rcx, str.vd__length:__d_n
call fcn.140005be0
mov edx, dword [rsi + 0x1c]
lea rcx, str.vd__null_count:__d_n
call fcn.140005be0
mov edi, dword [rsi + 8]
mov r11d, ebx
mov r8d, ebx
test edi, edi
jle 0x140002816
mov rbp, qword [rsi + 0x20]
mov r10, rbx
mov r9, rbx
mov r14d, 0x3ff
nop
mov rax, r10
movzx ecx, r8b
shr rax, 3
and cl, 7
movzx edx, byte [rax + rbp]
sar dl, cl
test dl, 1
je 0x140002807
mov rax, qword [rsi + 0x28]
mov ecx, dword [r9 + rax + 0xc]
test ecx, ecx
js 0x1400027ff
cmp ecx, r14d
cmovg ecx, r14d
jmp 0x140002801
mov ecx, ebx
inc r11d
add r11d, ecx
inc r8d
inc r10
add r9, 0x10
cmp r8d, edi
jl 0x1400027d0
mov edx, r11d
lea rcx, str.vd_valid_filenames_strings_size:__d_n
call fcn.140005be0
lea rcx, str.i_____valid__offset__________filesize________filename_ofs_________filename_len__n
call fcn.140005be0
jmp 0x14000264b
mov r11d, dword [rsi + 8]
mov r10d, dword [rsi + 0x14]
test r11d, r11d
jle 0x14000287f
mov rdi, qword [rsi + 0x20]
mov r9, rbx
mov r8, rbx
nop dword [rax]
mov rax, r9
movzx ecx, bl
shr rax, 3
and cl, 7
movzx edx, byte [rax + rdi]
sar dl, cl
test dl, 1
je 0x140002871
mov rax, qword [rsi + 0x28]
add r10d, dword [rax + r8 + 4]
inc ebx
inc r9
add r8, 0x10
cmp ebx, r11d
jl 0x140002850
mov r8d, r10d
lea rcx, str.Archive_Size__parsed____d__0x_x__n
mov edx, r10d
call fcn.140005be0
mov edx, dword [rsi + 0x14]
lea rcx, str.Header_Size__parsed____d__0x_x__n
mov r8d, edx
call fcn.140005be0
mov edx, dword [rsi + 0x10]
lea rcx, str.Directory_Entries__parsed____d_n
call fcn.140005be0
movsx edx, byte [rsi + 0x30]
lea rcx, str.Endianness__parsed___0x_x_n
call fcn.140005be0
mov rax, rsi
jmp 0x14000264e