Function at 0x140001df0
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0xd0
movaps xmmword [rsp + 0x90], xmm8
mov rax, qword [0x140006028]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rdi, qword [rsp + 0x138]
mov ebp, ecx
mov rsi, qword [rsp + 0x140]
mov r12, r8
mov dword [rsp + 0x20], ecx
mov r15d, edx
mov ecx, edx
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x30], rsi
mov ebx, r9d
mov qword [rsp + 0x38], r8
call sub.tiff.dll_TIFFDataWidth
mov r14d, eax
lea rdx, [rsp + 0x48]
mov ecx, ebp
mov dword [rsp + 0x24], r14d
xorps xmm8, xmm8
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__fstat64]
cmp eax, 0xffffffff
jne 0x140001e92
lea ecx, [rax + 3]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Failed_to_obtain_file_size._n
call fcn.140001da0
mov eax, 0xffffffff
jmp 0x140002274
mov r8, qword [rsp + 0x60]
cmp r8, r12
jge 0x140001ec0
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Too_large_header_size_specified._n
call fcn.140001da0
mov eax, 0xffffffff
jmp 0x140002274
mov ecx, dword [rdi]
mov rax, r8
sub rax, r12
cqo
idiv rbx
cqo
idiv r14
mov edx, dword [rsi]
mov qword [rsp + 0x40], rax
mov rbp, rax
test ecx, ecx
je 0x140001f69
test edx, edx
jne 0x140001f31
lea ecx, [rdx + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Image_height_is_not_specified._n
call fcn.140001da0
xor edx, edx
mov eax, ebp
div dword [rdi]
mov ecx, 2
mov ebx, eax
mov dword [rsi], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.Height_is_guessed_as__u._n
mov rcx, rax
call fcn.140001da0
mov eax, 1
jmp 0x140002274
imul ecx, edx
imul ecx, ebx
imul ecx, r14d
mov eax, ecx
add rax, r12
cmp r8, rax
jge 0x140001f27
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Input_file_too_small._n
call fcn.140001da0
mov eax, 0xffffffff
jmp 0x140002274
mov ecx, 2
test edx, edx
je 0x140001fb8
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Image_width_is_not_specified._n
call fcn.140001da0
xor edx, edx
mov eax, ebp
div dword [rsi]
mov ecx, 2
mov ebx, eax
mov dword [rdi], eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.Width_is_guessed_as__u._n
mov rcx, rax
call fcn.140001da0
mov eax, 1
jmp 0x140002274
movaps xmmword [rsp + 0xb0], xmm6
xor r12d, r12d
movaps xmmword [rsp + 0xa0], xmm7
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Image_width_and_height_are_not_specified._n
call fcn.140001da0
movss xmm7, dword [0x140004e18]
xorps xmm6, xmm6
mov eax, ebp
cvtsi2ss xmm6, rax
movaps xmm0, xmm6
divss xmm0, xmm7
cvtps2pd xmm0, xmm0
call sub.api_ms_win_crt_math_l1_1_0.dll_sqrt
cvttsd2si rbx, xmm0
test ebx, ebx
jne 0x14000202c
lea ecx, [rbx + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Too_small_image_size._n
call fcn.140001da0
mov eax, 0xffffffff
jmp 0x140002264
mulss xmm6, xmm7
cvtps2pd xmm0, xmm6
call sub.api_ms_win_crt_math_l1_1_0.dll_sqrt
mov eax, ebx
xorps xmm1, xmm1
movaps xmm6, xmm0
cvtsi2sd xmm1, rax
comisd xmm0, xmm1
jbe 0x14000223f
movsd xmm7, qword [0x140004e20]
mov qword [rsp + 0xc8], r13
nop
xor edx, edx
mov eax, ebp
div ebx
test edx, edx
jne 0x14000220e
xor edx, edx
mov eax, ebp
div ebx
mov edi, ebx
imul edi, r14d
mov r14d, eax
cmp eax, 2
jb 0x140002209
mov ecx, edi
mov r13d, edi
call sub.tiff.dll__TIFFmalloc
mov ecx, edi
mov rsi, rax
call sub.tiff.dll__TIFFmalloc
mov ecx, dword [rsp + 0x20]
lea edx, [r14 - 1]
shr edx, 1
xor r8d, r8d
imul edx, edi
mov rbp, rax
add rdx, qword [rsp + 0x38]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__lseeki64]
cmp rax, 0xffffffffffffffff
jne 0x1400020e1
lea ecx, [rax + 3]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.seek_error._n
call fcn.140001da0
mov r12d, 1
jmp 0x1400021f4
mov ecx, dword [rsp + 0x20]
mov r8d, edi
mov rdx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
cmp eax, edi
je 0x14000211a
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.read_error._n
call fcn.140001da0
mov r12d, 1
jmp 0x1400021f4
mov ecx, dword [rsp + 0x20]
mov r8d, edi
mov rdx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
cmp eax, edi
jne 0x1400020f5
cmp dword [rsp + 0x130], 0
je 0x1400021b4
mov ecx, r15d
sub ecx, 3
je 0x14000216c
sub ecx, 1
je 0x140002160
sub ecx, 4
je 0x14000216c
sub ecx, 1
je 0x140002160
cmp ecx, 3
jne 0x140002176
mov edx, ebx
mov rcx, rsi
call sub.tiff.dll_TIFFSwabArrayOfDouble
jmp 0x140002176
mov edx, ebx
mov rcx, rsi
call sub.tiff.dll_TIFFSwabArrayOfLong
jmp 0x140002176
mov edx, ebx
mov rcx, rsi
call sub.tiff.dll_TIFFSwabArrayOfShort
mov ecx, r15d
sub ecx, 3
je 0x1400021aa
sub ecx, 1
je 0x14000219e
sub ecx, 4
je 0x1400021aa
sub ecx, 1
je 0x14000219e
cmp ecx, 3
jne 0x1400021b4
mov edx, ebx
mov rcx, rbp
call sub.tiff.dll_TIFFSwabArrayOfDouble
jmp 0x1400021b4
mov edx, ebx
mov rcx, rbp
call sub.tiff.dll_TIFFSwabArrayOfLong
jmp 0x1400021b4
mov edx, ebx
mov rcx, rbp
call sub.tiff.dll_TIFFSwabArrayOfShort
mov r8, r13
mov rdx, rbp
mov rcx, rsi
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x1400021e5
mov r9d, r15d
mov r8d, ebx
mov rdx, rbp
mov rcx, rsi
call fcn.140001010
andps xmm0, xmm7
comisd xmm0, xmm8
jbe 0x1400021f4
movaps xmm8, xmm0
mov rax, qword [rsp + 0x28]
mov dword [rax], ebx
mov rax, qword [rsp + 0x30]
mov dword [rax], r14d
mov rcx, rsi
call sub.tiff.dll__TIFFfree
mov rcx, rbp
call sub.tiff.dll__TIFFfree
mov rbp, qword [rsp + 0x40]
mov r14d, dword [rsp + 0x24]
inc ebx
xorps xmm0, xmm0
mov eax, ebx
cvtsi2sd xmm0, rax
comisd xmm6, xmm0
ja 0x140002060
mov r13, qword [rsp + 0xc8]
test r12d, r12d
jne 0x140002022
mov rdi, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x30]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9d, dword [rsi]
lea rdx, str.Width_is_guessed_as__u__height_is_guessed_as__u._n
mov r8d, dword [rdi]
mov rcx, rax
call fcn.140001da0
mov eax, 1
movaps xmm6, xmmword [rsp + 0xb0]
movaps xmm7, xmmword [rsp + 0xa0]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.1400032b0
movaps xmm8, xmmword [rsp + 0x90]
add rsp, 0xd0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret