Function at 0x1400637d0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov r9, qword [rcx + 0x20]
mov edi, r8d
mov rbx, rcx
test edx, edx
je 0x1400638a8
mov edx, dword [rcx + 0xc]
xor r8d, r8d
mov rcx, r9
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
or dword [rbx + 8], 0x40
cmp qword [rbx + 0x50], 0
jne 0x140063819
mov ecx, 0x2000
call fcn.140001bb0
mov qword [rbx + 0x50], rax
cmp qword [rbx + 0x58], 0
jne 0x14006382e
mov ecx, 0x2000
call fcn.140001bb0
mov qword [rbx + 0x58], rax
mov edx, 0x58
lea ecx, [rdx - 0x57]
call fcn.140001250
mov r8d, 0x58
mov qword [rbx + 0x38], rax
lea rdx, [0x14018be10]
mov rcx, rax
call fcn.1400f62c0
test eax, eax
je 0x140063893
mov rcx, qword [rbx + 0x38]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r9, qword [rbx]
lea r8, str.Failed_to_initialize_compress_for_file___s__n
mov edx, 1
mov qword [rbx + 0x38], 0
mov ecx, 0x7d0
call fcn.140001480
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov dword [rbx + 0x4c], edi
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov edx, 1
lea rcx, [rsp + 0x38]
lea r8d, [rdx + 1]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp rax, 2
je 0x1400638eb
mov r9, qword [rbx]
lea r8, str.Failed_to_read_header_section_for_file____s__n
mov edx, 1
mov ecx, 0x7d0
call fcn.140001480
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov edx, dword [rbx + 0xc]
xor r8d, r8d
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
cmp byte [rsp + 0x38], 0x1f
jne 0x140063a31
cmp byte [rsp + 0x39], 0x8b
jne 0x140063a31
mov eax, dword [rbx + 8]
lea rcx, [0x14018be80]
test al, 0x10
lea rsi, [0x14018be84]
cmovne rsi, rcx
and eax, 0x10000
jne 0x140063956
cmp dword [rbx + 0xc], eax
jne 0x140063956
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, qword [rbx]
mov rdx, rsi
mov qword [rbx + 0x20], 0
call fcn.140063b00
jmp 0x1400639d6
mov rcx, qword [rbx + 0x20]
test eax, eax
je 0x14006396c
call sub.api_ms_win_crt_stdio_l1_1_0.dll__fileno
mov ecx, eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll__dup
jmp 0x140063990
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov edx, dword [rbx + 8]
mov rcx, qword [rbx]
shl edx, 0xb
not edx
mov qword [rbx + 0x20], 0
and edx, 0x8000
call fcn.14001ca10
mov edi, eax
test eax, eax
jns 0x1400639bf
mov r9, qword [rbx]
lea r8, [0x14018be88]
mov edx, 1
mov ecx, 0x7d1
call fcn.140001480
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov edx, dword [rbx + 0xc]
xor r8d, r8d
mov ecx, edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll__lseek
mov rdx, rsi
mov ecx, edi
call fcn.1400f6990
mov qword [rbx + 0x30], rax
test rax, rax
jne 0x140063a06
mov r9, qword [rbx]
lea r8, [0x14018bea8]
lea edx, [rax + 1]
mov ecx, 0x7d2
call fcn.140001480
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
or dword [rbx + 8], 0x40
cmp qword [rbx + 0x50], 0
jne 0x140063a35
mov ecx, 0x2000
call fcn.140001bb0
mov qword [rbx + 0x50], rax
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
and dword [rbx + 8], 0xffffffbf
mov rbx, qword [rsp + 0x30]
xor eax, eax
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret