Function at 0x1400586b0
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x28
mov rsi, rcx
mov eax, dword [rcx + 0x48]
test eax, eax
je 0x140058717
cmp eax, 2
je 0x140058984
cmp eax, 1
jne 0x1400589a7
mov ecx, dword [rsi + 4]
mov edi, dword [rsi + 0x14]
add edi, edi
mov rdx, qword [rsi + 0x28]
mov dword [rsi + 0x38], 0
mov r8d, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
test eax, eax
js 0x14005889c
je 0x1400588d4
mov dword [rsi + 0x38], eax
mov ecx, 2
cmp eax, edi
jb 0x1400588d9
jmp 0x1400588dc
lea rdi, [rsi + 0x70]
cmp dword [rsi + 0x14], 0
je 0x1400587ca
lea rbx, [rsi + 0x78]
mov r8d, dword [rsi + 0x78]
test r8d, r8d
je 0x14005887a
mov rdx, qword [rdi]
cmp byte [rdx], 0x1f
jne 0x140058864
inc rdx
dec r8d
mov dword [rbx], r8d
mov qword [rdi], rdx
je 0x1400588f7
cmp byte [rdx], 0x8b
jne 0x14005891c
inc rdx
dec r8d
mov dword [rbx], r8d
mov qword [rdi], rdx
je 0x1400589c8
dec r8d
mov dword [rbx], r8d
lea rcx, [rdx + 1]
mov qword [rdi], rcx
cmp byte [rdx], 8
jne 0x1400589e5
test r8d, r8d
je 0x1400589ee
dec r8d
mov dword [rbx], r8d
lea rax, [rcx + 1]
mov qword [rdi], rax
movzx ebp, byte [rcx]
cmp ebp, 0x20
jae 0x140058a0b
test r8d, r8d
je 0x140058a33
dec r8d
mov dword [rbx], r8d
inc rax
mov qword [rdi], rax
test r8d, r8d
jne 0x140058a6b
jmp 0x140058a55
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 0x1400588e9
test rax, rax
je 0x1400589ab
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 0x140058725
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 0x1400589b7
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 0x140058949
mov rcx, rsi
call fcn.140058ec0
cmp eax, 0xffffffff
je 0x140058a1f
mov r8d, dword [rbx]
test r8d, r8d
jne 0x140058736
jmp 0x14005896c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, 2
cmp dword [rax], 0xb
je 0x1400588d9
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 edi, 0xffffffff
mov rcx, rsi
mov edx, 0xffffffff
mov r8, rax
call fcn.140056740
jmp 0x140058a24
mov ecx, 1
mov dword [rsi + 0x3c], ecx
mov rax, qword [rsi + 0x28]
mov qword [rsi + 0x30], rax
jmp 0x1400589a7
test rax, rax
jne 0x1400589ae
jmp 0x1400589b7
mov rcx, rsi
call fcn.140058ec0
cmp eax, 0xffffffff
je 0x140058a1f
mov r8d, dword [rbx]
test r8d, r8d
je 0x14005891c
mov rdx, qword [rdi]
cmp byte [rdx], 0x8b
je 0x14005875d
mov rax, qword [rsi + 0x28]
mov byte [rax], 0x1f
mov dword [rsi + 0x38], 1
mov r8d, dword [rsi + 0x78]
mov eax, dword [rsi + 0x10]
mov dword [rsi + 0x44], eax
mov rax, qword [rsi + 0x28]
mov qword [rsi + 0x30], rax
test r8d, r8d
je 0x140058961
mov rdx, qword [rdi]
mov ecx, 1
add rcx, rax
mov r8d, r8d
call fcn.1400adb90
mov eax, dword [rsi + 0x78]
add dword [rsi + 0x38], eax
mov dword [rsi + 0x78], 0
movaps xmm0, xmmword [0x140139f80]
movlps qword [rsi + 0x48], xmm0
xor edi, edi
cmp dword [rsi + 0x38], 0
jne 0x140058a24
mov eax, dword [rsi + 0x48]
cmp eax, 2
jne 0x1400586cf
mov eax, dword [rsi + 0x14]
add eax, eax
mov dword [rsi + 0x88], eax
mov rax, qword [rsi + 0x28]
mov qword [rsi + 0x80], rax
mov rcx, rsi
call fcn.140058d20
cmp eax, 0xffffffff
je 0x140058a1f
xor edi, edi
jmp 0x140058a24
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
jmp 0x140058a1a
mov rcx, rsi
call fcn.140058ec0
cmp eax, 0xffffffff
je 0x1400589e5
mov r8d, dword [rbx]
test r8d, r8d
je 0x1400589e5
mov rdx, qword [rdi]
jmp 0x14005876f
lea r8, str.unknown_compression_method
jmp 0x140058a12
mov rcx, rsi
call fcn.140058ec0
cmp eax, 0xffffffff
je 0x140058a0b
mov r8d, dword [rbx]
test r8d, r8d
je 0x140058a0b
mov rcx, qword [rdi]
jmp 0x14005878e
lea r8, str.unknown_header_flags_set
mov rcx, rsi
mov edx, 0xfffffffd
call fcn.140056740
mov edi, 0xffffffff
mov eax, edi
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret
mov rcx, rsi
call fcn.140058ec0
mov r8d, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x1400587bc
test r8d, r8d
je 0x140058a55
mov rax, qword [rdi]
jmp 0x1400587b0
mov rcx, rsi
call fcn.140058ec0
mov r8d, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x140058a74
test r8d, r8d
je 0x140058a79
dec r8d
mov dword [rbx], r8d
inc qword [rdi]
test r8d, r8d
jne 0x140058a8f
mov rcx, rsi
call fcn.140058ec0
mov r8d, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x140058a98
test r8d, r8d
je 0x140058a9d
dec r8d
mov dword [rbx], r8d
inc qword [rdi]
test r8d, r8d
jne 0x140058ab3
mov rcx, rsi
call fcn.140058ec0
mov r8d, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x140058abc
test r8d, r8d
je 0x140058ac1
dec r8d
mov dword [rbx], r8d
inc qword [rdi]
test r8d, r8d
jne 0x140058ad7
mov rcx, rsi
call fcn.140058ec0
mov r8d, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x140058ae0
test r8d, r8d
je 0x140058ae5
dec r8d
mov dword [rbx], r8d
inc qword [rdi]
test r8d, r8d
jne 0x140058afa
mov rcx, rsi
call fcn.140058ec0
cmp eax, 0xffffffff
je 0x140058b03
mov r8d, dword [rbx]
test r8d, r8d
je 0x140058b03
dec r8d
mov dword [rbx], r8d
inc qword [rdi]
test bpl, 4
je 0x140058ba8
mov ecx, dword [rbx]
test ecx, ecx
je 0x140058b2b
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 0x140058b69
jmp 0x140058b51
mov rcx, rsi
call fcn.140058ec0
mov ecx, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x140058b47
test ecx, ecx
jne 0x140058b13
mov r14d, 0xffffffff
jmp 0x140058b51
mov r14d, 0xffffffff
test ecx, ecx
jne 0x140058b69
mov rcx, rsi
call fcn.140058ec0
mov edx, 0xffffff00
cmp eax, 0xffffffff
je 0x140058b7d
mov ecx, dword [rbx]
test ecx, ecx
je 0x140058b7d
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 0x140058ba8
mov eax, dword [rbx]
cmp r14d, 1
jne 0x140058c90
mov ecx, r14d
and ecx, 0xfffffffe
cmp ecx, r14d
jae 0x140058ba8
test eax, eax
je 0x140058cfc
dec eax
mov dword [rbx], eax
inc qword [rdi]
test bpl, 8
jne 0x140058bd5
test bpl, 0x10
jne 0x140058c05
test bpl, 2
je 0x140058c6a
mov ecx, dword [rbx]
test ecx, ecx
je 0x140058c38
dec ecx
mov dword [rbx], ecx
inc qword [rdi]
test ecx, ecx
jne 0x140058c63
jmp 0x140058c50
mov eax, dword [rbx]
jmp 0x140058bec
dec eax
mov dword [rbx], eax
mov rcx, qword [rdi]
lea rdx, [rcx + 1]
mov qword [rdi], rdx
cmp byte [rcx], 0
je 0x140058bae
test eax, eax
jne 0x140058bd9
mov rcx, rsi
call fcn.140058ec0
cmp eax, 0xffffffff
je 0x140058bae
mov eax, dword [rbx]
test eax, eax
jne 0x140058bd9
jmp 0x140058bae
mov eax, dword [rbx]
jmp 0x140058c1c
dec eax
mov dword [rbx], eax
mov rcx, qword [rdi]
lea rdx, [rcx + 1]
mov qword [rdi], rdx
cmp byte [rcx], 0
je 0x140058bb4
test eax, eax
jne 0x140058c09
mov rcx, rsi
call fcn.140058ec0
cmp eax, 0xffffffff
je 0x140058bb4
mov eax, dword [rbx]
test eax, eax
jne 0x140058c09
jmp 0x140058bb4
mov rcx, rsi
call fcn.140058ec0
mov ecx, dword [rsi + 0x78]
cmp eax, 0xffffffff
je 0x140058bcb
test ecx, ecx
jne 0x140058bc4
mov rcx, rsi
call fcn.140058ec0
cmp eax, 0xffffffff
je 0x140058c6a
mov ecx, dword [rbx]
test ecx, ecx
je 0x140058c6a
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 dword [rsi + 0xbc], eax
movaps xmm0, xmmword [0x140139f70]
jmp 0x140058968
mov r15d, r14d
shr r15d, 1
jmp 0x140058cab
dec eax
mov dword [rbx], eax
inc rcx
mov qword [rdi], rcx
dec r15d
je 0x140058b8e
test eax, eax
jne 0x140058cca
mov rcx, rsi
call fcn.140058ec0
cmp eax, 0xffffffff
je 0x140058ba8
mov eax, dword [rbx]
test eax, eax
je 0x140058ba8
lea ecx, [rax - 1]
mov dword [rbx], ecx
mov rcx, qword [rdi]
inc rcx
mov qword [rdi], rcx
dec eax
jne 0x140058c98
mov rcx, rsi
call fcn.140058ec0
cmp eax, 0xffffffff
je 0x140058ba8
mov eax, dword [rbx]
test eax, eax
je 0x140058ba8
mov rcx, qword [rdi]
jmp 0x140058c98
mov rcx, rsi
call fcn.140058ec0
cmp eax, 0xffffffff
je 0x140058ba8
mov eax, dword [rbx]
test eax, eax
jne 0x140058ba1
jmp 0x140058ba8