Function at 0x140001d00
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r15
sub rsp, 0x30
mov rbx, rdx
xor r8d, r8d
xor edx, edx
mov r15d, ecx
xor esi, esi
xor edi, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__lseeki64]
lea r8d, [rsi + 4]
mov ecx, r15d
lea rdx, [0x140007100]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
cmp eax, 4
jne 0x140001f9d
movzx eax, word [0x140007100]
mov ebp, 0x4d4d
cmp ax, bp
je 0x140001d7f
mov ecx, 0x4949
cmp ax, cx
je 0x140001d6d
mov ecx, 0x5045
cmp cx, ax
jne 0x140001faa
mov ecx, 0x4550
cmp ax, cx
je 0x140001d7f
mov eax, dword [0x140007124]
jmp 0x140001d8a
xor eax, eax
cmp dword [0x140007124], eax
sete al
mov dword [0x140007120], eax
test eax, eax
je 0x140001da0
lea rcx, [0x140007102]
call sub.tiff.dll_TIFFSwabShort
movzx eax, word [0x140007102]
cmp ax, 0x2a
jne 0x140001e34
mov r8d, 4
lea rdx, [0x140007104]
mov ecx, r15d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
cmp eax, 4
jne 0x140001f9d
cmp dword [0x140007120], esi
je 0x140001de4
lea rcx, [0x140007104]
call sub.tiff.dll_TIFFSwabLong
movzx eax, word [0x140007100]
lea rcx, [0x1400051bc]
cmp ax, bp
lea r8, str.little
mov edx, eax
mov r9d, 0x2a
cmove r8, rcx
lea rax, str.ClassicTIFF
lea rcx, str.Magic:__x___s_endian__Version:__x___s__n
mov qword [rsp + 0x20], rax
call fcn.1400021e0
test rbx, rbx
jne 0x140001ef5
mov ebx, dword [0x140007104]
jmp 0x140001ef5
cmp ax, 0x2b
jne 0x140001fee
mov r8d, 0xc
lea rdx, [0x140007104]
mov ecx, r15d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
cmp eax, 0xc
jne 0x140001f9d
cmp dword [0x140007120], esi
je 0x140001e89
lea rcx, [0x140007104]
call sub.tiff.dll_TIFFSwabShort
lea rcx, [0x140007106]
call sub.tiff.dll_TIFFSwabShort
lea rcx, [0x140007108]
call sub.tiff.dll_TIFFSwabLong8
movzx eax, word [0x140007100]
lea rcx, [0x1400051bc]
cmp ax, bp
lea r8, str.little
mov edx, eax
mov r9d, 0x2b
cmove r8, rcx
lea rax, str.BigTIFF
lea rcx, str.Magic:__x___s_endian__Version:__x___s__n
mov qword [rsp + 0x20], rax
call fcn.1400021e0
movzx r8d, word [0x140007106]
lea rcx, str.OffsetSize:__x_Unused:__x_n
movzx edx, word [0x140007104]
call fcn.1400021e0
test rbx, rbx
mov dword [0x140007128], 1
cmove rbx, qword [0x140007108]
xor ebp, ebp
test rbx, rbx
je 0x140001f8a
mov qword [rsp + 0x50], r14
xor edx, edx
test edi, edi
je 0x140001f23
mov rax, rsi
nop
cmp qword [rax], rbx
je 0x140001fbd
inc edx
add rax, 8
cmp edx, edi
jb 0x140001f10
lea r14d, [rdi + 1]
lea rdx, [r14*8]
test r14d, r14d
je 0x140001fd3
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov rsi, rax
test rax, rax
je 0x140001fe1
mov eax, edi
mov edi, r14d
mov qword [rsi + rax*8], rbx
test ebp, ebp
je 0x140001f65
mov ecx, 0xa
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putchar]
mov r8, rbx
mov edx, ebp
mov ecx, r15d
call fcn.140001600
inc ebp
mov rbx, rax
test rax, rax
jne 0x140001f05
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r14, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r15
pop rdi
pop rsi
ret
lea rcx, str.TIFF_header
call fcn.140001cd0
int3
movzx edx, ax
lea rcx, str.Not_a_TIFF_or_MDI_file__bad_magic_number__u___x_
mov r8d, edx
call fcn.140001080
int3
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rcx, str.Cycle_detected_in_chaining_of_TIFF_directories_
call fcn.140001080
int3
test rsi, rsi
je 0x140001fe1
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rcx, str.Out_of_memory
call fcn.140001080
int3
movzx edx, ax
lea rcx, str.Not_a_TIFF_file__bad_version_number__u___x_
mov r8d, edx
call fcn.140001080
int3