Function at 0x140001600
Capabilities:
Read file on windows

Disassembly:
mov dword [rsp + 8], ecx
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
xor r12d, r12d
mov rdi, r8
mov qword [rbp - 0x18], r12
mov esi, edx
mov r14d, ecx
test r8, r8
je 0x140001c3e
xor r8d, r8d
mov rdx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__lseeki64]
cmp rax, rdi
jne 0x140001c51
cmp dword [0x140007128], r12d
mov ecx, r14d
jne 0x140001683
lea r8d, [r12 + 2]
lea rdx, [rbp + 0x50]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
cmp eax, 2
jne 0x140001c5e
cmp dword [0x140007120], r12d
je 0x140001678
lea rcx, [rbp + 0x50]
call sub.tiff.dll_TIFFSwabShort
movzx eax, word [rbp + 0x50]
mov ebx, 0xc
jmp 0x1400016d8
mov r8d, 8
mov qword [rbp + 0x58], r12
lea rdx, [rbp + 0x58]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
cmp eax, 8
jne 0x140001c6b
cmp dword [0x140007120], r12d
je 0x1400016b2
lea rcx, [rbp + 0x58]
call sub.tiff.dll_TIFFSwabLong8
mov rax, qword [rbp + 0x58]
cmp rax, 0xffff
jbe 0x1400016cf
lea rcx, str.Sanity_check_on_directory_count_failed
call fcn.140001000
jmp 0x140001c3e
mov word [rbp + 0x50], ax
mov ebx, 0x14
movzx r8d, ax
xor edx, edx
mov eax, r8d
imul eax, ebx
mov ecx, eax
div ebx
cmp eax, r8d
cmovne rcx, r12
call sub.tiff.dll__TIFFmalloc
mov qword [rbp - 8], rax
mov r15, rax
test rax, rax
je 0x140001c78
movzx r8d, word [rbp + 0x50]
mov rdx, rax
imul r8d, ebx
mov ecx, r14d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
movzx r8d, word [rbp + 0x50]
mov ecx, r8d
imul ecx, ebx
cmp eax, ecx
je 0x140001745
xor edx, edx
lea rcx, str.Could_only_read__u_of__hu_entries_in_directory_at_offset__llu
div ebx
mov r9, rdi
mov edx, eax
mov ebx, eax
call fcn.140001000
mov word [rbp + 0x50], bx
jmp 0x1400017ba
cmp dword [0x140007128], r12d
mov ecx, r14d
jne 0x140001789
mov r8d, 4
lea rdx, [rbp + 0x58]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
mov ecx, dword [rbp + 0x58]
cmp eax, 4
cmovne ecx, r12d
cmp dword [0x140007120], r12d
mov dword [rbp + 0x58], ecx
je 0x140001783
lea rcx, [rbp + 0x58]
call sub.tiff.dll_TIFFSwabLong
mov ecx, dword [rbp + 0x58]
mov qword [rbp - 0x18], rcx
jmp 0x1400017be
mov r8d, 8
lea rdx, [rbp - 0x18]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
mov rcx, qword [rbp - 0x18]
cmp eax, 8
cmovne rcx, r12
cmp dword [0x140007120], r12d
mov qword [rbp - 0x18], rcx
je 0x1400017be
lea rcx, [rbp - 0x18]
call sub.tiff.dll_TIFFSwabLong8
mov rcx, qword [rbp - 0x18]
mov qword [rsp + 0x28], rcx
mov r9, rdi
mov qword [rsp + 0x20], rcx
mov r8, rdi
lea rcx, str.Directory__u:_offset__llu___llx__next__llu___llx__n
mov edx, esi
call fcn.1400021e0
movzx eax, word [rbp + 0x50]
mov r12, r15
mov dword [rbp - 0x28], eax
test eax, eax
je 0x140001c36
mov qword [rsp + 0xa8], r13
lea rdi, str.SubFileType
lea rsi, [0x140000000]
nop dword [rax]
nop dword [rax + rax]
movzx eax, word [r12]
mov ecx, dword [0x140007120]
mov word [rbp - 0x30], ax
test ecx, ecx
je 0x140001832
lea rcx, [rbp - 0x30]
call sub.tiff.dll_TIFFSwabShort
mov ecx, dword [0x140007120]
movzx eax, word [r12 + 2]
add r12, 4
mov word [rbp + 0x58], ax
test ecx, ecx
je 0x14000184d
lea rcx, [rbp + 0x58]
call sub.tiff.dll_TIFFSwabShort
movzx ebx, word [rbp - 0x30]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea r8, [0x140004390]
cmp word [r8], bx
je 0x14000188a
add r8, 0x10
cmp r8, rdi
jb 0x140001863
movzx r8d, bx
lea rdx, str._u___x_
mov r9d, r8d
mov rcx, rax
call fcn.140002010
jmp 0x1400018a1
mov r8, qword [r8 + 8]
lea rdx, str._s___u_
movzx r9d, bx
mov rcx, rax
call fcn.140002010
mov ecx, 0x20
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putchar]
movzx ebx, word [rbp + 0x58]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ecx, ebx
mov r9d, ebx
cmp ebx, 0x13
jae 0x1400018e2
movzx r8d, bx
lea rdx, str._s___u_
mov rcx, rax
mov r8, qword [rsi + r8*8 + 0x7010]
call fcn.140002010
jmp 0x1400018f4
mov r8d, ecx
lea rdx, str._u___x_
mov rcx, rax
call fcn.140002010
mov ecx, 0x20
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putchar]
cmp dword [0x140007128], 0
jne 0x140001931
cmp dword [0x140007120], 0
mov eax, dword [r12]
mov dword [rbp - 0x2c], eax
je 0x140001924
lea rcx, [rbp - 0x2c]
call sub.tiff.dll_TIFFSwabLong
mov eax, dword [rbp - 0x2c]
mov edx, eax
mov eax, 4
mov qword [rbp - 0x20], rdx
jmp 0x140001954
cmp dword [0x140007120], 0
mov rdx, qword [r12]
mov qword [rbp - 0x20], rdx
je 0x14000194f
lea rcx, [rbp - 0x20]
call sub.tiff.dll_TIFFSwabLong8
mov rdx, qword [rbp - 0x20]
mov eax, 8
lea rcx, str._llu_
add r12, rax
call fcn.1400021e0
mov r8, qword [rbp - 0x20]
xor r9d, r9d
cmp word [rbp + 0x58], 0x13
jb 0x1400019ee
movzx r15d, r9w
mov r14, r9
mov rbx, r9
test r15w, r15w
je 0x140001993
xor edx, edx
mov rax, rbx
div r14
mov esi, 1
cmp rax, r8
jne 0x140001996
mov esi, r9d
cmp dword [0x140007128], 0
mov r13d, 1
mov rdi, r12
mov qword [rbp - 0x10], r9
mov dword [rbp - 0x24], r9d
jne 0x140001a26
test esi, esi
jne 0x1400019ba
cmp rbx, 4
jbe 0x1400019e7
cmp dword [0x140007120], 0
mov r13d, r9d
mov eax, dword [r12]
mov rdi, r9
mov dword [rbp - 0x2c], eax
je 0x1400019e3
lea rcx, [rbp - 0x2c]
call sub.tiff.dll_TIFFSwabLong
mov r8, qword [rbp - 0x20]
xor r9d, r9d
mov eax, dword [rbp - 0x2c]
mov qword [rbp - 0x10], rax
mov eax, 4
jmp 0x140001a5c
movzx eax, word [rbp + 0x58]
movzx r15d, word [rsi + rax*4 + 0x4340]
test r15w, r15w
je 0x140001975
movzx r14d, r15w
xor edx, edx
mov ebx, r14d
imul rbx, r8
mov rax, rbx
div r14
cmp rax, r8
jne 0x140001978
jmp 0x14000197b
test esi, esi
jne 0x140001a30
cmp rbx, 8
jbe 0x140001a57
cmp dword [0x140007120], 0
mov r13d, r9d
mov rax, qword [r12]
mov rdi, r9
mov qword [rbp - 0x10], rax
je 0x140001a57
lea rcx, [rbp - 0x10]
call sub.tiff.dll_TIFFSwabLong8
mov r8, qword [rbp - 0x20]
xor r9d, r9d
mov eax, 8
add r12, rax
test esi, esi
jne 0x140001a6c
cmp rbx, 0x10000
jbe 0x140001aa4
xor edx, edx
movzx ecx, r15w
mov eax, 0x10000
mov esi, 1
div ecx
movsxd r8, eax
mov qword [rbp - 0x20], r8
test r15w, r15w
je 0x140001a9f
xor edx, edx
mov rbx, r14
imul rbx, r8
mov rax, rbx
div r14
cmp rax, r8
je 0x140001aa7
mov rbx, r9
jmp 0x140001aa7
mov esi, dword [rbp - 0x24]
mov eax, dword [section..data]
cmp r8, rax
jbe 0x140001adb
mov qword [rbp - 0x20], rax
mov esi, 1
mov r8d, eax
test r15w, r15w
je 0x140001ad8
xor edx, edx
mov rbx, r14
imul rbx, r8
mov rax, rbx
div r14
cmp rax, r8
je 0x140001adb
mov rbx, r9
test r13d, r13d
jne 0x140001b53
mov rcx, rbx
call sub.tiff.dll__TIFFmalloc
mov rdi, rax
test rax, rax
je 0x140001b86
mov r14d, dword [rbp + 0x40]
xor r8d, r8d
mov rdx, qword [rbp - 0x10]
mov ecx, r14d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__lseeki64]
cmp rax, qword [rbp - 0x10]
je 0x140001b23
movzx edx, word [rbp - 0x30]
lea rcx, str.Seek_error_accessing_tag__u_value
call fcn.140001000
jmp 0x140001bfe
mov r8d, ebx
mov rdx, rdi
mov ecx, r14d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
movsxd rcx, eax
cmp rcx, rbx
je 0x140001b4f
movzx edx, word [rbp - 0x30]
lea rcx, str.Read_error_accessing_tag__u_value
call fcn.140001000
jmp 0x140001bfe
mov r8, qword [rbp - 0x20]
test rdi, rdi
je 0x140001c06
cmp dword [0x140007120], 0
je case.0x140001b84.6
movzx eax, word [rbp + 0x58]
add eax, 0xfffffffd
cmp eax, 0xf
ja case.0x140001b84.6
lea rdx, [0x140000000]
cdqe
mov ecx, dword [rdx + rax*4 + 0x1c88]
add rcx, rdx
jmp rcx
movzx edx, word [rbp - 0x30]
lea rcx, str.No_space_for_data_for_tag__u
call fcn.140001000
jmp 0x140001c06
mov rdx, r8
mov rcx, rdi
call sub.tiff.dll_TIFFSwabArrayOfShort
jmp case.0x140001b84.6
mov rdx, r8
mov rcx, rdi
call sub.tiff.dll_TIFFSwabArrayOfLong
jmp case.0x140001b84.6
lea rdx, [r8 + r8]
mov rcx, rdi
call sub.tiff.dll_TIFFSwabArrayOfLong
jmp case.0x140001b84.6
mov rdx, r8
mov rcx, rdi
call sub.tiff.dll_TIFFSwabArrayOfLong8
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, dword [rbp - 0x20]
mov r9, rdi
movzx edx, word [rbp + 0x58]
mov rcx, rax
call fcn.1400010d0
test esi, esi
je 0x140001bf9
lea rcx, str._...
call fcn.1400021e0
test r13d, r13d
jne 0x140001c06
mov rcx, rdi
call sub.tiff.dll__TIFFfree
lea rcx, [0x140005408]
call fcn.1400021e0
add dword [rbp - 0x28], 0xffffffff
lea rdi, str.SubFileType
lea rsi, [0x140000000]
jne 0x140001810
mov r15, qword [rbp - 8]
mov r13, qword [rsp + 0xa8]
mov rcx, r15
call sub.tiff.dll__TIFFfree
mov rax, qword [rbp - 0x18]
add rsp, 0x60
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rcx, str.Seek_error_accessing_TIFF_directory
call fcn.140001080
int3
lea rcx, str.directory_count
call fcn.140001cd0
int3
lea rcx, str.directory_count
call fcn.140001cd0
int3
lea rcx, str.No_space_for_TIFF_directory
call fcn.140001080
int3