Function at 0x140009900
Capabilities:
Read file on windows

Disassembly:
push rbx
push r15
sub rsp, 0x478
mov rax, qword [0x14002d030]
xor rax, rsp
mov qword [rsp + 0x460], rax
xor r15d, r15d
mov rbx, rcx
cmp dword [0x14002da14], 1
jg 0x14000993c
lea rdx, str.attempting_to_ascertain_archive_format
lea ecx, [r15 + 1]
call fcn.1400166d0
mov rcx, qword [rbx + 0xb0]
test rcx, rcx
je 0x14000994e
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rsp + 0x4a0], rsi
mov ecx, 0x200
mov qword [rsp + 0x4a8], rdi
mov qword [rbx + 0xb8], 0x200
call fcn.140015f10
mov rcx, qword [rbx + 0x1e0]
mov qword [rbx + 0xb0], rax
mov qword [rbx + 0xc0], r15
mov qword [rbx + 0xc8], r15
test rcx, rcx
je 0x140009b29
lea rdx, [rsp + 0x20]
mov r15d, 1
call fcn.14001aea0
test eax, eax
jne 0x140009aea
movzx eax, word [rsp + 0x26]
mov edi, 0xf000
and ax, di
mov ecx, 0x4000
cmp ax, cx
jne 0x140009aea
mov r9, qword [rbx + 0x1e0]
lea r8, str._s_toc.dat
mov edx, 0x400
lea rcx, [rsp + 0x60]
call fcn.140018490
cmp eax, 0x400
jl 0x140009a17
cmp dword [0x14002da14], 4
jg 0x140009a0f
mov r8, qword [rbx + 0x1e0]
lea rdx, str.directory_name_too_long:___s_
lea ecx, [r15 + 3]
call fcn.1400166d0
mov ecx, r15d
call fcn.1400133f0
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x60]
call fcn.14001aea0
mov esi, 0x8000
test eax, eax
jne 0x140009a3c
movzx eax, word [rsp + 0x26]
and ax, di
cmp ax, si
je 0x140009aa9
mov r9, qword [rbx + 0x1e0]
lea r8, str._s_toc.dat.gz
mov edx, 0x400
lea rcx, [rsp + 0x60]
call fcn.140018490
cmp eax, 0x400
jl 0x140009a89
cmp dword [0x14002da14], 4
jg 0x140009a81
mov r8, qword [rbx + 0x1e0]
lea rdx, str.directory_name_too_long:___s_
mov ecx, 4
call fcn.1400166d0
mov ecx, r15d
call fcn.1400133f0
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x60]
call fcn.14001aea0
test eax, eax
jne 0x140009abd
movzx eax, word [rsp + 0x26]
and ax, di
cmp ax, si
jne 0x140009abd
mov dword [rbx + 0x88], 5
mov eax, 5
jmp 0x14000a0c7
cmp dword [0x14002da14], 4
jg 0x140009ade
mov r8, qword [rbx + 0x1e0]
lea rdx, str.directory___s__does_not_appear_to_be_a_valid_archive___toc.dat__does_not_exist_
mov ecx, 4
call fcn.1400166d0
mov ecx, r15d
call fcn.1400133f0
xor edi, edi
jmp 0x140009b59
mov rcx, qword [rbx + 0x1e0]
lea rdx, [0x140022184]
call fcn.14001a5e0
mov rdi, rax
test rax, rax
jne 0x140009b59
cmp dword [0x14002da14], 4
jg 0x140009b24
mov r8, qword [rbx + 0x1e0]
lea rdx, str.could_not_open_input_file___s_:__m
lea ecx, [rax + 4]
call fcn.1400166d0
mov ecx, r15d
jmp 0x140009b54
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rdi, rax
test rax, rax
jne 0x140009b59
cmp dword [0x14002da14], 4
jg 0x140009b4f
lea rdx, str.could_not_open_input_file:__m
lea ecx, [rax + 4]
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
mov edx, 1
lea rcx, [rsp + 0x50]
mov r9, rdi
lea r8d, [rdx + 4]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rsi, rax
cmp rax, 5
je 0x140009bc9
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
test eax, eax
je 0x140009ba2
cmp dword [0x14002da14], 4
jg 0x140009bbf
lea rdx, str.could_not_read_input_file:__m
mov ecx, 4
call fcn.1400166d0
jmp 0x140009bbf
cmp dword [0x14002da14], 4
jg 0x140009bbf
mov r8d, esi
lea rdx, str.input_file_is_too_short__read__lu__expected_5_
mov ecx, 4
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
mov rcx, qword [rbx + 0xb0]
lea rdx, str.PGDMP
mov eax, dword [rsp + 0x50]
mov r8d, 5
mov dword [rcx], eax
movzx eax, byte [rsp + 0x54]
mov byte [rcx + 4], al
lea rcx, [rsp + 0x50]
mov qword [rbx + 0xc0], 5
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140009f19
mov qword [rsp + 0x498], rbp
mov rcx, rdi
mov qword [rsp + 0x470], r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgetc]
mov ebp, eax
cmp eax, 0xffffffff
jne 0x140009c6c
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
test eax, eax
je 0x140009c48
cmp dword [0x14002da14], 4
jg 0x140009c62
lea rdx, str.could_not_read_from_input_file:_end_of_file
jmp 0x140009c58
cmp dword [0x14002da14], 4
jg 0x140009c62
lea rdx, str.could_not_read_from_input_file:__m
mov ecx, 4
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgetc]
mov r14d, eax
cmp eax, 0xffffffff
jne 0x140009cc0
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
test eax, eax
je 0x140009c9c
cmp dword [0x14002da14], 4
jg 0x140009cb6
lea rdx, str.could_not_read_from_input_file:_end_of_file
jmp 0x140009cac
cmp dword [0x14002da14], 4
jg 0x140009cb6
lea rdx, str.could_not_read_from_input_file:__m
mov ecx, 4
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
mov rcx, qword [rbx + 0xc0]
mov rax, qword [rbx + 0xb0]
mov byte [rcx + rax], bpl
mov rcx, qword [rbx + 0xc0]
mov rax, qword [rbx + 0xb0]
inc rcx
mov qword [rbx + 0xc0], rcx
mov byte [rcx + rax], r14b
inc qword [rbx + 0xc0]
cmp bpl, 1
jg 0x140009d07
jne 0x140009d02
test r14b, r14b
jg 0x140009d07
xor sil, sil
jmp 0x140009d73
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgetc]
mov esi, eax
cmp eax, 0xffffffff
jne 0x140009d5a
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
test eax, eax
je 0x140009d36
cmp dword [0x14002da14], 4
jg 0x140009d50
lea rdx, str.could_not_read_from_input_file:_end_of_file
jmp 0x140009d46
cmp dword [0x14002da14], 4
jg 0x140009d50
lea rdx, str.could_not_read_from_input_file:__m
mov ecx, 4
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
mov rcx, qword [rbx + 0xc0]
mov rax, qword [rbx + 0xb0]
mov byte [rcx + rax], sil
inc qword [rbx + 0xc0]
movsx eax, r14b
movsx ecx, bpl
shl ecx, 8
add ecx, eax
movsx eax, sil
shl ecx, 8
add ecx, eax
mov dword [rbx + 0x60], ecx
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgetc]
mov r14, qword [rsp + 0x470]
mov rbp, qword [rsp + 0x498]
movsxd rdx, eax
mov qword [rbx + 0x78], rdx
cmp rdx, 0xffffffffffffffff
jne 0x140009df9
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
test eax, eax
je 0x140009dd1
cmp dword [0x14002da14], 4
jg 0x140009deb
lea rdx, str.could_not_read_from_input_file:_end_of_file
jmp 0x140009de1
cmp dword [0x14002da14], 4
jg 0x140009deb
lea rdx, str.could_not_read_from_input_file:__m
mov ecx, 4
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
movzx edx, byte [rbx + 0x78]
mov rcx, qword [rbx + 0xc0]
mov rax, qword [rbx + 0xb0]
mov byte [rcx + rax], dl
inc qword [rbx + 0xc0]
cmp dword [rbx + 0x60], 0x10700
jl 0x140009e97
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgetc]
movsxd rdx, eax
mov qword [rbx + 0x80], rdx
cmp rdx, 0xffffffffffffffff
jne 0x140009e7d
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
test eax, eax
je 0x140009e52
cmp dword [0x14002da14], 4
jg 0x140009e6c
lea rdx, str.could_not_read_from_input_file:_end_of_file
jmp 0x140009e62
cmp dword [0x14002da14], 4
jg 0x140009e6c
lea rdx, str.could_not_read_from_input_file:__m
mov ecx, 4
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
movzx edx, byte [rbx + 0x80]
mov rcx, qword [rbx + 0xc0]
mov rax, qword [rbx + 0xb0]
mov byte [rcx + rax], dl
inc qword [rbx + 0xc0]
jmp 0x140009ea2
mov rax, qword [rbx + 0x78]
mov qword [rbx + 0x80], rax
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgetc]
mov esi, eax
cmp eax, 0xffffffff
jne 0x140009ef5
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
test eax, eax
je 0x140009ed1
cmp dword [0x14002da14], 4
jg 0x140009eeb
lea rdx, str.could_not_read_from_input_file:_end_of_file
jmp 0x140009ee1
cmp dword [0x14002da14], 4
jg 0x140009eeb
lea rdx, str.could_not_read_from_input_file:__m
mov ecx, 4
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
mov rcx, qword [rbx + 0xc0]
mov rax, qword [rbx + 0xb0]
mov dword [rbx + 0x88], esi
mov byte [rcx + rax], sil
inc qword [rbx + 0xc0]
jmp 0x14000a062
mov rcx, qword [rbx + 0xc0]
mov r8d, 0x200
sub r8, rcx
mov r9, rdi
add rcx, qword [rbx + 0xb0]
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rdx, qword [rbx + 0xc0]
add rdx, rax
mov qword [rbx + 0xc0], rdx
cmp rdx, 0x2b
jb 0x140009fb5
mov rcx, qword [rbx + 0xb0]
lea rdx, str.___n___PostgreSQL_database_dump_n___n_n
mov r8d, 0x23
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
je 0x140009f91
mov rcx, qword [rbx + 0xb0]
lea rdx, str.___n___PostgreSQL_database_cluster_dump_n___n_n
mov r8d, Ordinal_45
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140009fb5
cmp dword [0x14002da14], 4
jg 0x140009fab
lea rdx, str.input_file_appears_to_be_a_text_format_dump._Please_use_psql.
mov ecx, 4
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
cmp qword [rbx + 0xc0], 0x200
je 0x14000a024
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
test eax, eax
je 0x140009fe1
cmp dword [0x14002da14], 4
jg 0x14000a01a
lea rdx, str.input_file_does_not_appear_to_be_a_valid_archive__too_short__
jmp 0x14000a010
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
test eax, eax
je 0x14000a000
cmp dword [0x14002da14], 4
jg 0x14000a01a
lea rdx, str.could_not_read_from_input_file:_end_of_file
jmp 0x14000a010
cmp dword [0x14002da14], 4
jg 0x14000a01a
lea rdx, str.could_not_read_from_input_file:__m
mov ecx, 4
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
mov rcx, qword [rbx + 0xb0]
call fcn.140011360
test al, al
jne 0x14000a058
cmp dword [0x14002da14], 4
jg 0x14000a04e
lea rdx, str.input_file_does_not_appear_to_be_a_valid_archive
mov ecx, 4
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
mov dword [rbx + 0x88], 3
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
test eax, eax
je 0x14000a080
mov dword [rbx + 0xa8], 1
jmp 0x14000a08b
mov qword [rbx + 0xc0], 0
test r15d, r15d
je 0x14000a0c1
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test eax, eax
je 0x14000a0c1
cmp dword [0x14002da14], 4
jg 0x14000a0b7
lea rdx, str.could_not_close_input_file:__m
mov ecx, 4
call fcn.1400166d0
mov ecx, 1
call fcn.1400133f0
mov eax, dword [rbx + 0x88]
mov rdi, qword [rsp + 0x4a8]
mov rsi, qword [rsp + 0x4a0]
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.14001e2e0
add rsp, 0x478
pop r15
pop rbx
ret