Function at 0x140012920
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x348
mov rax, qword [0x14002d030]
xor rax, rsp
mov qword [rsp + 0x330], rax
mov rbp, qword [rcx + 0x238]
mov rdi, rcx
mov ecx, reloc.LIBPQ.dll_Ordinal_72
mov qword [rsp + 0x48], rdx
mov rsi, rdx
call fcn.140015f10
mov r15, rax
mov qword [rsp + 0x40], rax
mov r14d, 1
mov qword [rax + 0x40], rdi
mov r9, qword [rbp + 0x20]
test r9, r9
je 0x140012b14
lea r8, str._lld
lea edx, [r14 + 0x63]
lea rcx, [rsp + 0x50]
call fcn.140018490
mov r9, qword [rbp + 0x28]
lea r8, str._lld
lea edx, [r14 + 0x63]
lea rcx, [rsp + 0xc0]
call fcn.140018490
cmp dword [0x14002da14], r14d
jg 0x1400129d3
lea r9, [rsp + 0xc0]
mov ecx, r14d
lea r8, [rsp + 0x50]
lea rdx, str.moving_from_position__s_to_next_member_at_file_position__s
call fcn.1400166d0
mov r9, qword [rbp + 0x20]
cmp r9, qword [rbp + 0x28]
jge 0x140012b14
mov qword [rsp + 0x390], r12
mov r15, r14
mov qword [rsp + 0x340], r13
mov rax, qword [rdi + 0x238]
xor r12d, r12d
mov r14, qword [rdi + 0xc8]
xor r13d, r13d
mov rbx, qword [rbp + 0x18]
mov rsi, r15
mov qword [rsp + 0x38], rax
mov rax, qword [rdi + 0xc0]
sub rax, r14
je 0x140012a55
mov rdx, qword [rdi + 0xb0]
lea rcx, [rsp + 0x30]
cmp rax, r15
mov r12, rax
cmovae r12, r15
add rdx, r14
mov r8, r12
call sub.VCRUNTIME140.dll_memcpy
lea rax, [r14 + r12]
mov qword [rdi + 0xc8], rax
sub rsi, r12
je 0x140012ad9
test rbx, rbx
je 0x140012ab7
lea rcx, [rsp + 0x30]
mov r9, rbx
add rcx, r12
mov r8, rsi
mov rdx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov r13, rax
cmp rax, rsi
je 0x140012ad9
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
test eax, eax
jne 0x140012ad9
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
test eax, eax
je 0x140012aa5
cmp dword [0x14002da14], 4
jg 0x140012ad1
lea rdx, str.could_not_read_from_input_file:_end_of_file
jmp 0x140012ac7
cmp dword [0x14002da14], 4
jg 0x140012ad1
lea rdx, str.could_not_read_from_input_file:__m
jmp 0x140012ac7
cmp dword [0x14002da14], 4
jg 0x140012ad1
lea rdx, str.internal_error____neither_th_nor_fh_specified_in_tarReadRaw__
mov ecx, 4
call fcn.1400166d0
mov ecx, r15d
call fcn.1400133f0
mov rcx, qword [rsp + 0x38]
lea rax, [r12 + r13]
add qword [rcx + 0x20], rax
mov r9, qword [rbp + 0x20]
cmp r9, qword [rbp + 0x28]
jl 0x1400129f4
mov r15, qword [rsp + 0x40]
mov r14d, 1
mov rsi, qword [rsp + 0x48]
mov r13, qword [rsp + 0x340]
mov r12, qword [rsp + 0x390]
lea r8, str._lld
mov edx, Ordinal_104
lea rcx, [rsp + 0x50]
call fcn.140018490
cmp dword [0x14002da14], 1
jg 0x140012b47
lea r8, [rsp + 0x50]
mov ecx, r14d
lea rdx, str.now_at_file_position__s
call fcn.1400166d0
mov rdx, r15
mov rcx, rdi
call fcn.1400125e0
test eax, eax
jne 0x140012b82
test rsi, rsi
je 0x140012c93
cmp dword [0x14002da14], 4
jg 0x140012b7a
mov r8, rsi
lea rdx, str.could_not_find_header_for_file___s__in_tar_archive
lea ecx, [rax + 4]
call fcn.1400166d0
mov ecx, r14d
call fcn.1400133f0
test rsi, rsi
je 0x140012ca0
nop dword [rax + rax]
mov r9, qword [r15 + 0x20]
mov r8, rsi
mov rax, r9
sub r8, r9
nop dword [rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x140012bb3
inc rax
test ecx, ecx
jne 0x140012ba0
test edx, edx
je 0x140012ca0
cmp dword [0x14002da14], 1
jg 0x140012bda
mov r8, r9
lea rdx, str.skipping_tar_member__s
mov ecx, r14d
call fcn.1400166d0
mov r9, qword [r15 + 0x20]
mov rcx, r9
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov edx, eax
mov rcx, rdi
call fcn.140008500
test al, 2
je 0x140012c1a
cmp dword [0x14002da14], 4
jg 0x140012c12
mov r8, qword [r15 + 0x20]
lea rdx, str.restoring_data_out_of_order_is_not_supported_in_this_archive_format:___s__is_required__but_comes_before___s__in_the_archive_file.
mov r9, rsi
mov ecx, 4
call fcn.1400166d0
mov ecx, r14d
call fcn.1400133f0
mov rbx, qword [r15 + 0x38]
add rbx, 0x1ff
shr rbx, 9
test rbx, rbx
je 0x140012c58
nop
mov rax, qword [rbp + 0x18]
lea rdx, [rsp + 0x130]
xor r9d, r9d
mov qword [rsp + 0x20], rax
mov r8d, 0x200
mov rcx, rdi
call fcn.140012cf0
sub rbx, 1
jne 0x140012c30
mov rdx, r15
mov rcx, rdi
call fcn.1400125e0
test eax, eax
jne 0x140012b90
cmp dword [0x14002da14], 4
jg 0x140012c86
mov r8, rsi
lea rdx, str.could_not_find_header_for_file___s__in_tar_archive
lea ecx, [rax + 4]
call fcn.1400166d0
mov ecx, r14d
call fcn.1400133f0
jmp 0x140012b90
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor eax, eax
jmp 0x140012cc3
mov rax, qword [r15 + 0x38]
add rax, 0x1ff
and rax, 0xfffffffffffffe00
add rax, qword [rbp + 0x20]
mov qword [rbp + 0x28], rax
mov rax, r15
mov qword [r15 + 0x30], 0
mov rcx, qword [rsp + 0x330]
xor rcx, rsp
call fcn.14001e2e0
add rsp, 0x348
pop r15
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret