Function at 0x140067420
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x28
mov rsi, rcx
lea rdi, [rcx + 0x70]
cmp dword [rcx + 0x14], 0
je 0x1400674e8
lea rbx, [rsi + 0x78]
mov r9d, dword [rsi + 0x78]
test r9d, r9d
je 0x140067582
mov rdx, qword [rdi]
cmp byte [rdx], 0x1f
jne 0x140067616
inc rdx
dec r9d
mov dword [rbx], r9d
mov qword [rdi], rdx
je 0x140067657
cmp byte [rdx], 0x8b
jne 0x14006766c
inc rdx
dec r9d
mov dword [rbx], r9d
mov qword [rdi], rdx
je 0x1400676d2
dec r9d
mov dword [rbx], r9d
lea rcx, [rdx + 1]
mov qword [rdi], rcx
cmp byte [rdx], 8
jne 0x1400676e2
test r9d, r9d
je 0x140067773
dec r9d
mov dword [rbx], r9d
lea rax, [rcx + 1]
mov qword [rdi], rax
movzx r13d, byte [rcx]
cmp r13d, 0x20
jae 0x140067790
test r9d, r9d
je 0x140067855
dec r9d
mov dword [rbx], r9d
inc rax
mov qword [rdi], rax
test r9d, r9d
jne 0x14006788d
jmp 0x140067877
mov ebx, dword [rsi + 0x18]
mov r15, qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rcx, rbx
call r15
mov r14, rax
mov qword [rsi + 0x20], rax
lea ecx, [rbx + rbx]
call r15
mov qword [rsi + 0x28], rax
test r14, r14
je 0x140067629
test rax, rax
je 0x140067630
mov dword [rsi + 0x14], ebx
mov dword [rsi + 0x78], 0
mov qword [rdi], 0
xorps xmm0, xmm0
movups xmmword [rsi + 0xa0], xmm0
mov qword [rsi + 0xb0], 0
lea r8, str.1.2.5
mov rcx, rdi
mov edx, 0xfffffff1
mov r9d, 0x58
call fcn.140059f60
test eax, eax
je 0x140067441
mov rcx, qword [rsi + 0x28]
mov rdi, qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call rdi
mov rcx, qword [rsi + 0x20]
call rdi
mov dword [rsi + 0x14], 0
jmp 0x14006763c
mov eax, 0xffffffff
cmp dword [rsi + 0x60], 0
jne 0x1400676c1
xor eax, eax
cmp dword [rsi + 0x3c], 0
jne 0x1400676c1
mov ebp, dword [rsi + 0x14]
mov r14, qword [rsi + 0x20]
mov dword [rsi + 0x78], 0
xor r9d, r9d
mov r15, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
nop word cs:[rax + rax]
nop
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r14
mov r8d, ebp
sub r8d, r9d
call r15
test eax, eax
jle 0x1400676ee
mov r9d, dword [rbx]
add r9d, eax
mov dword [rbx], r9d
mov r8d, ebp
sub r8d, r9d
jbe 0x140067701
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r14
call r15
test eax, eax
jle 0x1400676ee
mov r9d, dword [rbx]
add r9d, eax
mov dword [rbx], r9d
cmp r9d, ebp
jb 0x1400675c0
jmp 0x140067701
mov eax, dword [rsi + 0x10]
mov dword [rsi + 0x44], eax
mov rax, qword [rsi + 0x28]
mov qword [rsi + 0x30], rax
mov ecx, dword [rsi + 0x38]
jmp 0x140067699
test rax, rax
jne 0x140067633
jmp 0x14006763c
mov rax, r14
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea r8, str.out_of_memory
mov rcx, rsi
mov edx, 0xfffffffc
call fcn.140056740
mov eax, 0xffffffff
jmp 0x1400676c1
mov eax, 0xffffffff
cmp dword [rsi + 0x60], 0
jne 0x1400676c1
cmp dword [rsi + 0x3c], 0
je 0x140067714
mov rax, qword [rsi + 0x28]
mov byte [rax], 0x1f
mov dword [rsi + 0x38], 1
mov r9d, dword [rsi + 0x78]
mov eax, dword [rsi + 0x10]
mov dword [rsi + 0x44], eax
mov rax, qword [rsi + 0x28]
mov qword [rsi + 0x30], rax
test r9d, r9d
je 0x1400676b1
mov rdx, qword [rdi]
mov ecx, 1
add rcx, rax
mov r8d, r9d
call fcn.1400adb90
mov eax, dword [rsi + 0x78]
add dword [rsi + 0x38], eax
mov dword [rsi + 0x78], 0
movabs rax, 0x100000001
mov qword [rsi + 0x48], rax
xor eax, eax
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp dword [rsi + 0x60], 0
jne 0x1400676e2
cmp dword [rsi + 0x3c], 0
je 0x1400677e7
lea r8, str.unknown_compression_method
jmp 0x140067797
test eax, eax
js 0x1400677c9
mov dword [rsi + 0x3c], 1
mov r9d, dword [rsi + 0x78]
mov rdx, qword [rsi + 0x20]
mov qword [rsi + 0x70], rdx
test r9d, r9d
jne 0x140067455
jmp 0x1400676bf
mov ebp, dword [rsi + 0x14]
mov r14, qword [rsi + 0x20]
mov dword [rsi + 0x78], 0
xor r9d, r9d
mov r15, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r14
mov r8d, ebp
sub r8d, r9d
call r15
test eax, eax
jle 0x1400677a4
mov r9d, dword [rbx]
add r9d, eax
mov dword [rbx], r9d
mov r8d, ebp
sub r8d, r9d
jbe 0x1400677b3
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r14
call r15
test eax, eax
jle 0x1400677a4
mov r9d, dword [rbx]
add r9d, eax
mov dword [rbx], r9d
cmp r9d, ebp
jb 0x14006772c
jmp 0x1400677b3
mov rcx, rsi
call fcn.140068240
cmp eax, 0xffffffff
je 0x140067790
mov r9d, dword [rbx]
test r9d, r9d
je 0x140067790
mov rcx, qword [rdi]
jmp 0x1400674aa
lea r8, str.unknown_header_flags_set
mov rcx, rsi
mov edx, 0xfffffffd
jmp 0x14006764b
test eax, eax
js 0x1400677c9
mov dword [rsi + 0x3c], 1
mov r9d, dword [rsi + 0x78]
mov rdx, qword [rsi + 0x20]
mov qword [rsi + 0x70], rdx
test r9d, r9d
jne 0x140067470
jmp 0x14006766c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov rcx, rsi
mov edx, 0xffffffff
mov r8, rax
jmp 0x14006764b
mov ebp, dword [rsi + 0x14]
mov r14, qword [rsi + 0x20]
mov dword [rsi + 0x78], 0
xor r9d, r9d
mov r15, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r14
mov r8d, ebp
sub r8d, r9d
call r15
test eax, eax
jle 0x140067951
mov r9d, dword [rbx]
add r9d, eax
mov dword [rbx], r9d
mov r8d, ebp
sub r8d, r9d
jbe 0x140067960
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r14
call r15
test eax, eax
jle 0x140067951
mov r9d, dword [rbx]
add r9d, eax
mov dword [rbx], r9d
cmp r9d, ebp
jb 0x1400677ff
jmp 0x140067960
mov rcx, rsi
call fcn.140068240
mov r9d, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x1400674da
test r9d, r9d
je 0x140067877
mov rax, qword [rdi]
jmp 0x1400674ce
mov rcx, rsi
call fcn.140068240
mov r9d, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x140067896
test r9d, r9d
je 0x14006789b
dec r9d
mov dword [rbx], r9d
inc qword [rdi]
test r9d, r9d
jne 0x1400678b1
mov rcx, rsi
call fcn.140068240
mov r9d, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x1400678ba
test r9d, r9d
je 0x1400678bf
dec r9d
mov dword [rbx], r9d
inc qword [rdi]
test r9d, r9d
jne 0x1400678d5
mov rcx, rsi
call fcn.140068240
mov r9d, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x1400678de
test r9d, r9d
je 0x1400678e3
dec r9d
mov dword [rbx], r9d
inc qword [rdi]
test r9d, r9d
jne 0x1400678f9
mov rcx, rsi
call fcn.140068240
mov r9d, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x140067902
test r9d, r9d
je 0x140067907
dec r9d
mov dword [rbx], r9d
inc qword [rdi]
test r9d, r9d
jne 0x14006791c
mov rcx, rsi
call fcn.140068240
cmp eax, 0xffffffff
je 0x140067925
mov r9d, dword [rbx]
test r9d, r9d
je 0x140067925
dec r9d
mov dword [rbx], r9d
inc qword [rdi]
test r13b, 4
je 0x140067adf
mov ecx, dword [rbx]
test ecx, ecx
je 0x140067976
dec ecx
mov dword [rbx], ecx
mov rax, qword [rdi]
lea rdx, [rax + 1]
mov qword [rdi], rdx
movzx r14d, byte [rax]
test ecx, ecx
jne 0x1400679d7
jmp 0x1400679bf
test eax, eax
js 0x140067992
mov dword [rsi + 0x3c], 1
mov r9d, dword [rsi + 0x78]
mov rdx, qword [rsi + 0x20]
mov qword [rsi + 0x70], rdx
test r9d, r9d
jne 0x14006748b
jmp 0x1400676e2
mov rcx, rsi
call fcn.140068240
mov ecx, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x1400679b5
test ecx, ecx
jne 0x140067935
mov r14d, 0xffffffff
jmp 0x1400679bf
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov rcx, rsi
mov edx, 0xffffffff
mov r8, rax
call fcn.140056740
jmp 0x1400676e2
mov r14d, 0xffffffff
test ecx, ecx
jne 0x1400679d7
mov rcx, rsi
call fcn.140068240
mov edx, 0xffffff00
cmp eax, 0xffffffff
je 0x1400679eb
mov ecx, dword [rbx]
test ecx, ecx
je 0x1400679eb
dec ecx
mov dword [rbx], ecx
mov rax, qword [rdi]
lea rcx, [rax + 1]
mov qword [rdi], rcx
movzx edx, byte [rax]
shl edx, 8
add r14d, edx
je 0x140067adf
mov r9d, dword [rsi + 0x78]
mov rax, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
jmp 0x140067a1c
mov rcx, qword [rdi]
dec r14d
dec r9d
mov dword [rbx], r9d
inc rcx
mov qword [rdi], rcx
test r14d, r14d
je 0x140067adf
test r9d, r9d
jne 0x140067a01
cmp dword [rsi + 0x60], 0
jne 0x140067adf
cmp dword [rsi + 0x3c], 0
jne 0x140067adf
mov r8d, dword [rsi + 0x14]
mov r10, qword [rsi + 0x20]
mov dword [rsi + 0x78], 0
xor r9d, r9d
mov ecx, dword [rsi + 4]
mov edx, r9d
mov rbp, r10
add rdx, r10
mov r12d, r8d
sub r8d, r9d
mov r15, rax
call rax
test eax, eax
jle 0x140067a9c
mov r9d, dword [rbx]
add r9d, eax
mov dword [rbx], r9d
mov r8d, r12d
sub r8d, r9d
jbe 0x140067aab
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, rbp
call r15
test eax, eax
jle 0x140067a9c
mov r9d, dword [rbx]
add r9d, eax
mov dword [rbx], r9d
mov r8d, r12d
cmp r9d, r12d
mov rax, r15
mov r10, rbp
jb 0x140067a47
jmp 0x140067aae
test eax, eax
js 0x140067ac1
mov dword [rsi + 0x3c], 1
mov r9d, dword [rsi + 0x78]
mov rax, r15
mov rcx, qword [rsi + 0x20]
mov qword [rsi + 0x70], rcx
test r9d, r9d
jne 0x140067a04
jmp 0x140067adf
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov rcx, rsi
mov edx, 0xffffffff
mov r8, rax
call fcn.140056740
test r13b, 8
jne 0x140067b17
test r13b, 0x10
jne 0x140067bd5
test r13b, 2
je 0x140067cd5
mov ecx, dword [rbx]
test ecx, ecx
je 0x140067c9f
dec ecx
mov dword [rbx], ecx
inc qword [rdi]
test ecx, ecx
jne 0x140067cce
jmp 0x140067cbb
mov r9d, dword [rsi + 0x78]
mov r14, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
jmp 0x140067b39
mov rax, qword [rdi]
dec r9d
mov dword [rbx], r9d
lea rcx, [rax + 1]
mov qword [rdi], rcx
cmp byte [rax], 0
je 0x140067ae5
test r9d, r9d
jne 0x140067b24
cmp dword [rsi + 0x60], 0
jne 0x140067ae5
cmp dword [rsi + 0x3c], 0
jne 0x140067ae5
mov r8d, dword [rsi + 0x14]
mov rax, qword [rsi + 0x20]
mov dword [rsi + 0x78], 0
xor r9d, r9d
mov ecx, dword [rsi + 4]
mov edx, r9d
mov r15, rax
add rdx, rax
mov ebp, r8d
sub r8d, r9d
call r14
test eax, eax
jle 0x140067bac
mov r9d, dword [rbx]
add r9d, eax
mov dword [rbx], r9d
mov r8d, ebp
sub r8d, r9d
jbe 0x140067bbf
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r15
call r14
test eax, eax
jle 0x140067bac
mov r9d, dword [rbx]
add r9d, eax
mov dword [rbx], r9d
mov r8d, ebp
cmp r9d, ebp
mov rax, r15
jb 0x140067b5c
jmp 0x140067bbf
test eax, eax
js 0x140067d00
mov dword [rsi + 0x3c], 1
mov r9d, dword [rsi + 0x78]
mov rax, qword [rsi + 0x20]
mov qword [rsi + 0x70], rax
test r9d, r9d
jne 0x140067b27
jmp 0x140067ae5
mov r9d, dword [rsi + 0x78]
mov r14, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
jmp 0x140067bfb
mov rax, qword [rdi]
dec r9d
mov dword [rbx], r9d
lea rcx, [rax + 1]
mov qword [rdi], rcx
cmp byte [rax], 0
je 0x140067aef
test r9d, r9d
jne 0x140067be2
cmp dword [rsi + 0x60], 0
jne 0x140067aef
cmp dword [rsi + 0x3c], 0
jne 0x140067aef
mov r8d, dword [rsi + 0x14]
mov rax, qword [rsi + 0x20]
mov dword [rsi + 0x78], 0
xor r9d, r9d
mov ecx, dword [rsi + 4]
mov edx, r9d
mov r15, rax
add rdx, rax
mov ebp, r8d
sub r8d, r9d
call r14
test eax, eax
jle 0x140067c76
mov r9d, dword [rbx]
add r9d, eax
mov dword [rbx], r9d
mov r8d, ebp
sub r8d, r9d
jbe 0x140067c89
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r15
call r14
test eax, eax
jle 0x140067c76
mov r9d, dword [rbx]
add r9d, eax
mov dword [rbx], r9d
mov r8d, ebp
cmp r9d, ebp
mov rax, r15
jb 0x140067c26
jmp 0x140067c89
test eax, eax
js 0x140067d23
mov dword [rsi + 0x3c], 1
mov r9d, dword [rsi + 0x78]
mov rax, qword [rsi + 0x20]
mov qword [rsi + 0x70], rax
test r9d, r9d
jne 0x140067be5
jmp 0x140067aef
mov rcx, rsi
call fcn.140068240
mov ecx, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x140067b0a
test ecx, ecx
jne 0x140067b03
mov rcx, rsi
call fcn.140068240
cmp eax, 0xffffffff
je 0x140067cd5
mov ecx, dword [rbx]
test ecx, ecx
je 0x140067cd5
dec ecx
mov dword [rbx], ecx
inc qword [rdi]
mov rcx, rdi
call fcn.140059d90
xor ecx, ecx
xor edx, edx
xor r8d, r8d
call fcn.1400606e0
mov ecx, eax
xor eax, eax
mov dword [rsi + 0xbc], ecx
mov qword [rsi + 0x48], 2
jmp 0x1400676c1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov rcx, rsi
mov edx, 0xffffffff
mov r8, rax
call fcn.140056740
jmp 0x140067ae5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov rcx, rsi
mov edx, 0xffffffff
mov r8, rax
call fcn.140056740
jmp 0x140067aef