Function at 0x140065cb0
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 0x140065d76
lea r14, [rsi + 0x78]
mov r9d, dword [rsi + 0x78]
test r9d, r9d
je 0x140065e10
mov rdx, qword [rdi]
cmp byte [rdx], 0x1f
jne 0x140065ea6
inc rdx
dec r9d
mov dword [r14], r9d
mov qword [rdi], rdx
je 0x140065ee7
cmp byte [rdx], 0x8b
jne 0x140065efc
inc rdx
dec r9d
mov dword [r14], r9d
mov qword [rdi], rdx
je 0x140065f64
dec r9d
mov dword [r14], r9d
lea rcx, [rdx + 1]
mov qword [rdi], rcx
cmp byte [rdx], 8
jne 0x140065f74
test r9d, r9d
je 0x140066005
dec r9d
mov dword [r14], r9d
lea rax, [rcx + 1]
mov qword [rdi], rax
movzx ebx, byte [rcx]
cmp ebx, 0x20
jae 0x140066022
test r9d, r9d
je 0x1400660f1
dec r9d
mov dword [r14], r9d
inc rax
mov qword [rdi], rax
test r9d, r9d
jne 0x140066129
jmp 0x140066113
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 0x140065eb9
test rax, rax
je 0x140065ec0
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 0x140065cd1
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 0x140065ecc
mov ebx, 0xffffffff
cmp dword [rsi + 0x60], 0
jne 0x140065f51
xor ebx, ebx
cmp dword [rsi + 0x3c], 0
jne 0x140065f51
mov ebx, dword [rsi + 0x14]
mov r15, qword [rsi + 0x20]
mov dword [rsi + 0x78], 0
xor r9d, r9d
mov r12, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
nop word cs:[rax + rax]
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r15
mov r8d, ebx
sub r8d, r9d
call r12
test eax, eax
jle 0x140065f80
mov r9d, dword [r14]
add r9d, eax
mov dword [r14], r9d
mov r8d, ebx
sub r8d, r9d
jbe 0x140065f93
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r15
call r12
test eax, eax
jle 0x140065f80
mov r9d, dword [r14]
add r9d, eax
mov dword [r14], r9d
cmp r9d, ebx
jb 0x140065e50
jmp 0x140065f93
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 0x140065f29
test rax, rax
jne 0x140065ec3
jmp 0x140065ecc
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 ebx, 0xffffffff
jmp 0x140065f51
mov ebx, 0xffffffff
cmp dword [rsi + 0x60], 0
jne 0x140065f51
cmp dword [rsi + 0x3c], 0
je 0x140065fa6
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 0x140065f41
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 ebx, ebx
mov eax, ebx
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 0x140065f74
cmp dword [rsi + 0x3c], 0
je 0x140066083
lea r8, str.unknown_compression_method
jmp 0x140066029
test eax, eax
js 0x14006605b
mov dword [rsi + 0x3c], 1
mov r9d, dword [rsi + 0x78]
mov rdx, qword [rsi + 0x20]
mov qword [rsi + 0x70], rdx
test r9d, r9d
jne 0x140065ce5
jmp 0x140065f4f
mov ebx, dword [rsi + 0x14]
mov r15, qword [rsi + 0x20]
mov dword [rsi + 0x78], 0
xor r9d, r9d
mov r12, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r15
mov r8d, ebx
sub r8d, r9d
call r12
test eax, eax
jle 0x140066036
mov r9d, dword [r14]
add r9d, eax
mov dword [r14], r9d
mov r8d, ebx
sub r8d, r9d
jbe 0x140066045
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r15
call r12
test eax, eax
jle 0x140066036
mov r9d, dword [r14]
add r9d, eax
mov dword [r14], r9d
cmp r9d, ebx
jb 0x140065fbe
jmp 0x140066045
mov rcx, rsi
call fcn.140066640
cmp eax, 0xffffffff
je 0x140066022
mov r9d, dword [r14]
test r9d, r9d
je 0x140066022
mov rcx, qword [rdi]
jmp 0x140065d3a
lea r8, str.unknown_header_flags_set
mov rcx, rsi
mov edx, 0xfffffffd
jmp 0x140065edb
test eax, eax
js 0x14006605b
mov dword [rsi + 0x3c], 1
mov r9d, dword [rsi + 0x78]
mov rdx, qword [rsi + 0x20]
mov qword [rsi + 0x70], rdx
test r9d, r9d
jne 0x140065d00
jmp 0x140065efc
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 ebx, 0xffffffff
mov rcx, rsi
mov edx, 0xffffffff
mov r8, rax
call fcn.140056740
jmp 0x140065f51
mov ebx, dword [rsi + 0x14]
mov r15, qword [rsi + 0x20]
mov dword [rsi + 0x78], 0
xor r9d, r9d
mov r12, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r15
mov r8d, ebx
sub r8d, r9d
call r12
test eax, eax
jle 0x1400661ed
mov r9d, dword [r14]
add r9d, eax
mov dword [r14], r9d
mov r8d, ebx
sub r8d, r9d
jbe 0x1400661fc
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r15
call r12
test eax, eax
jle 0x1400661ed
mov r9d, dword [r14]
add r9d, eax
mov dword [r14], r9d
cmp r9d, ebx
jb 0x14006609b
jmp 0x1400661fc
mov rcx, rsi
call fcn.140066640
mov r9d, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x140065d68
test r9d, r9d
je 0x140066113
mov rax, qword [rdi]
jmp 0x140065d5c
mov rcx, rsi
call fcn.140066640
mov r9d, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x140066132
test r9d, r9d
je 0x140066137
dec r9d
mov dword [r14], r9d
inc qword [rdi]
test r9d, r9d
jne 0x14006614d
mov rcx, rsi
call fcn.140066640
mov r9d, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x140066156
test r9d, r9d
je 0x14006615b
dec r9d
mov dword [r14], r9d
inc qword [rdi]
test r9d, r9d
jne 0x140066171
mov rcx, rsi
call fcn.140066640
mov r9d, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x14006617a
test r9d, r9d
je 0x14006617f
dec r9d
mov dword [r14], r9d
inc qword [rdi]
test r9d, r9d
jne 0x140066195
mov rcx, rsi
call fcn.140066640
mov r9d, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x14006619e
test r9d, r9d
je 0x1400661a3
dec r9d
mov dword [r14], r9d
inc qword [rdi]
test r9d, r9d
jne 0x1400661b8
mov rcx, rsi
call fcn.140066640
cmp eax, 0xffffffff
je 0x1400661c1
mov r9d, dword [r14]
test r9d, r9d
je 0x1400661c1
dec r9d
mov dword [r14], r9d
inc qword [rdi]
test bl, 4
je 0x140066367
mov ecx, dword [r14]
test ecx, ecx
je 0x140066212
dec ecx
mov dword [r14], ecx
mov rax, qword [rdi]
lea rdx, [rax + 1]
mov qword [rdi], rdx
movzx ebp, byte [rax]
test ecx, ecx
jne 0x140066272
jmp 0x140066259
test eax, eax
js 0x14006622d
mov dword [rsi + 0x3c], 1
mov r9d, dword [rsi + 0x78]
mov rdx, qword [rsi + 0x20]
mov qword [rsi + 0x70], rdx
test r9d, r9d
jne 0x140065d1b
jmp 0x140065f74
mov rcx, rsi
call fcn.140066640
mov ecx, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x140066250
test ecx, ecx
jne 0x1400661d1
mov ebp, 0xffffffff
jmp 0x140066259
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 0x140065f74
mov ebp, 0xffffffff
test ecx, ecx
jne 0x140066272
mov rcx, rsi
call fcn.140066640
mov edx, 0xffffff00
cmp eax, 0xffffffff
je 0x140066287
mov ecx, dword [r14]
test ecx, ecx
je 0x140066287
dec ecx
mov dword [r14], ecx
mov rax, qword [rdi]
lea rcx, [rax + 1]
mov qword [rdi], rcx
movzx edx, byte [rax]
shl edx, 8
add ebp, edx
je 0x140066367
mov r9d, dword [rsi + 0x78]
mov r15, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
jmp 0x1400662b5
mov rax, qword [rdi]
dec ebp
dec r9d
mov dword [r14], r9d
inc rax
mov qword [rdi], rax
test ebp, ebp
je 0x140066367
test r9d, r9d
jne 0x14006629c
cmp dword [rsi + 0x60], 0
jne 0x140066367
cmp dword [rsi + 0x3c], 0
jne 0x140066367
mov r12d, dword [rsi + 0x14]
mov r13, qword [rsi + 0x20]
mov dword [rsi + 0x78], 0
xor r9d, r9d
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r13
mov r8d, r12d
sub r8d, r9d
call r15
test eax, eax
jle 0x140066327
mov r9d, dword [r14]
add r9d, eax
mov dword [r14], r9d
mov r8d, r12d
sub r8d, r9d
jbe 0x140066336
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r13
call r15
test eax, eax
jle 0x140066327
mov r9d, dword [r14]
add r9d, eax
mov dword [r14], r9d
cmp r9d, r12d
jb 0x1400662e0
jmp 0x140066336
test eax, eax
js 0x140066349
mov dword [rsi + 0x3c], 1
mov r9d, dword [rsi + 0x78]
mov rax, qword [rsi + 0x20]
mov qword [rsi + 0x70], rax
test r9d, r9d
jne 0x14006629f
jmp 0x140066367
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 bl, 8
jne 0x14006639e
test bl, 0x10
jne 0x140066452
test bl, 2
je 0x14006654a
mov ecx, dword [r14]
test ecx, ecx
je 0x140066512
dec ecx
mov dword [r14], ecx
inc qword [rdi]
test ecx, ecx
jne 0x140066542
jmp 0x14006652e
mov r9d, dword [rsi + 0x78]
mov r15, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
jmp 0x1400663c0
mov rax, qword [rdi]
dec r9d
mov dword [r14], r9d
lea rcx, [rax + 1]
mov qword [rdi], rcx
cmp byte [rax], 0
je 0x14006636c
test r9d, r9d
jne 0x1400663ab
cmp dword [rsi + 0x60], 0
jne 0x14006636c
cmp dword [rsi + 0x3c], 0
jne 0x14006636c
mov ebp, dword [rsi + 0x14]
mov r12, qword [rsi + 0x20]
mov dword [rsi + 0x78], 0
xor r9d, r9d
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r12
mov r8d, ebp
sub r8d, r9d
call r15
test eax, eax
jle 0x140066429
mov r9d, dword [r14]
add r9d, eax
mov dword [r14], r9d
mov r8d, ebp
sub r8d, r9d
jbe 0x14006643c
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r12
call r15
test eax, eax
jle 0x140066429
mov r9d, dword [r14]
add r9d, eax
mov dword [r14], r9d
cmp r9d, ebp
jb 0x1400663e2
jmp 0x14006643c
test eax, eax
js 0x140066573
mov dword [rsi + 0x3c], 1
mov r9d, dword [rsi + 0x78]
mov rax, qword [rsi + 0x20]
mov qword [rsi + 0x70], rax
test r9d, r9d
jne 0x1400663ae
jmp 0x14006636c
mov r9d, dword [rsi + 0x78]
mov r15, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
jmp 0x140066478
mov rax, qword [rdi]
dec r9d
mov dword [r14], r9d
lea rcx, [rax + 1]
mov qword [rdi], rcx
cmp byte [rax], 0
je 0x140066375
test r9d, r9d
jne 0x14006645f
cmp dword [rsi + 0x60], 0
jne 0x140066375
cmp dword [rsi + 0x3c], 0
jne 0x140066375
mov ebp, dword [rsi + 0x14]
mov r12, qword [rsi + 0x20]
mov dword [rsi + 0x78], 0
xor r9d, r9d
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r12
mov r8d, ebp
sub r8d, r9d
call r15
test eax, eax
jle 0x1400664e9
mov r9d, dword [r14]
add r9d, eax
mov dword [r14], r9d
mov r8d, ebp
sub r8d, r9d
jbe 0x1400664fc
mov ecx, dword [rsi + 4]
mov edx, r9d
add rdx, r12
call r15
test eax, eax
jle 0x1400664e9
mov r9d, dword [r14]
add r9d, eax
mov dword [r14], r9d
cmp r9d, ebp
jb 0x1400664a2
jmp 0x1400664fc
test eax, eax
js 0x140066596
mov dword [rsi + 0x3c], 1
mov r9d, dword [rsi + 0x78]
mov rax, qword [rsi + 0x20]
mov qword [rsi + 0x70], rax
test r9d, r9d
jne 0x140066462
jmp 0x140066375
mov rcx, rsi
call fcn.140066640
mov ecx, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x140066391
test ecx, ecx
jne 0x140066389
mov rcx, rsi
call fcn.140066640
cmp eax, 0xffffffff
je 0x14006654a
mov ecx, dword [r14]
test ecx, ecx
je 0x14006654a
dec ecx
mov dword [r14], ecx
inc qword [rdi]
mov rcx, rdi
call fcn.140059d90
xor ebx, ebx
xor ecx, ecx
xor edx, edx
xor r8d, r8d
call fcn.1400606e0
mov dword [rsi + 0xbc], eax
mov qword [rsi + 0x48], 2
jmp 0x140065f51
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 0x14006636c
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 0x140066375