Function at 0x140001320
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 0x10], rdx
push rsi
push rdi
push r13
sub rsp, 0x60
mov rsi, rdx
lea r8, [rsp + 0x38]
mov edi, 1
mov edx, 0x100
mov dword [rsp + 0x30], edi
mov r13, rcx
call sub.tiff.dll_TIFFGetField
lea r8, [rsp + 0x34]
mov edx, 0x101
mov rcx, r13
call sub.tiff.dll_TIFFGetField
lea r8, [rsp + 0x90]
mov edx, 0x142
mov rcx, r13
call sub.tiff.dll_TIFFGetField
test eax, eax
je 0x140001638
lea r8, [rsp + 0x98]
mov edx, 0x143
mov rcx, r13
call sub.tiff.dll_TIFFGetField
test eax, eax
je 0x140001638
mov r8d, dword [rsp + 0x90]
mov edx, 0x142
mov rcx, rsi
call sub.tiff.dll_TIFFSetField
mov r8d, dword [rsp + 0x98]
mov edx, 0x143
mov rcx, rsi
call sub.tiff.dll_TIFFSetField
mov r9d, dword [rsp + 0x98]
xor edx, edx
imul r9d, dword [rsp + 0x90]
shl r9d, 2
mov eax, r9d
div dword [rsp + 0x98]
shr eax, 2
cmp dword [rsp + 0x90], eax
je 0x14000140f
mov rcx, r13
call sub.tiff.dll_TIFFFileName
mov rcx, rax
lea rdx, str.Integer_overflow_when_calculating_raster_buffer
call sub.tiff.dll_TIFFError
lea ecx, [rdi - 2]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov ecx, r9d
mov qword [rsp + 0x48], r14
call sub.tiff.dll__TIFFmalloc
mov r14, rax
test rax, rax
jne 0x14000144b
mov rcx, r13
call sub.tiff.dll_TIFFFileName
mov rcx, rax
lea rdx, str.No_space_for_raster_buffer
call sub.tiff.dll_TIFFError
mov r14, qword [rsp + 0x48]
xor eax, eax
add rsp, 0x60
pop r13
pop rdi
pop rsi
ret
mov ecx, dword [rsp + 0x90]
lea edx, [rcx*4]
mov eax, edx
shr eax, 2
cmp ecx, eax
je 0x140001485
mov rcx, r13
call sub.tiff.dll_TIFFFileName
mov rcx, rax
lea rdx, str.Integer_overflow_when_calculating_wrk_line_buffer
call sub.tiff.dll_TIFFError
mov ecx, 0xffffffff
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x50], r12
mov ecx, edx
mov qword [rsp + 0x40], r15
call sub.tiff.dll__TIFFmalloc
xor ebp, ebp
mov r12, rax
test rax, rax
jne 0x1400014c2
mov rcx, r13
call sub.tiff.dll_TIFFFileName
mov rcx, rax
lea rdx, str.No_space_for_raster_scanline_buffer
call sub.tiff.dll_TIFFError
mov edi, ebp
mov dword [rsp + 0x30], ebp
mov r15d, ebp
test edi, edi
je 0x140001609
mov qword [rsp + 0x80], rbx
cmp r15d, dword [rsp + 0x34]
jae 0x140001601
mov ebx, ebp
cmp ebx, dword [rsp + 0x38]
jae 0x1400015e9
mov r9, r14
mov r8d, r15d
mov edx, ebx
mov rcx, r13
call sub.tiff.dll_TIFFReadRGBATile
test eax, eax
je 0x1400015ff
mov ecx, dword [rsp + 0x98]
test ecx, 0xfffffffe
jbe 0x14000159b
nop word [rax + rax]
mov edx, dword [rsp + 0x90]
sub ecx, ebp
dec ecx
mov eax, ebp
imul ecx, edx
imul eax, edx
lea r8d, [rdx*4]
lea rdi, [r14 + rcx*4]
mov rcx, r12
lea rsi, [r14 + rax*4]
mov rdx, rsi
call sub.tiff.dll__TIFFmemcpy
mov eax, dword [rsp + 0x90]
mov rdx, rdi
mov rcx, rsi
lea r8d, [rax*4]
call sub.tiff.dll__TIFFmemcpy
mov eax, dword [rsp + 0x90]
mov rdx, r12
mov rcx, rdi
lea r8d, [rax*4]
call sub.tiff.dll__TIFFmemcpy
mov ecx, dword [rsp + 0x98]
inc ebp
mov eax, ecx
shr eax, 1
cmp ebp, eax
jb 0x140001520
mov rsi, qword [rsp + 0x88]
imul ecx, dword [rsp + 0x90]
xor ebp, ebp
xor r9d, r9d
mov word [rsp + 0x20], bp
mov r8d, r15d
mov edx, ebx
shl ecx, 2
mov edi, ecx
mov rcx, rsi
call sub.tiff.dll_TIFFComputeTile
mov edx, eax
mov r9d, edi
mov r8, r14
mov rcx, rsi
call sub.tiff.dll_TIFFWriteEncodedTile
cmp rax, 0xffffffffffffffff
je 0x1400015e1
add ebx, dword [rsp + 0x90]
jmp 0x1400014e2
mov edi, ebp
mov dword [rsp + 0x30], ebp
jmp 0x1400015ed
mov edi, dword [rsp + 0x30]
add r15d, dword [rsp + 0x98]
test edi, edi
jne 0x1400014d5
jmp 0x140001601
mov edi, ebp
mov rbx, qword [rsp + 0x80]
mov rcx, r14
call sub.tiff.dll__TIFFfree
mov rcx, r12
call sub.tiff.dll__TIFFfree
mov r15, qword [rsp + 0x40]
mov eax, edi
mov r12, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov r14, qword [rsp + 0x48]
add rsp, 0x60
pop r13
pop rdi
pop rsi
ret
mov rcx, r13
call sub.tiff.dll_TIFFFileName
mov rcx, rax
lea rdx, str.Source_image_not_tiled
call sub.tiff.dll_TIFFError
xor eax, eax
add rsp, 0x60
pop r13
pop rdi
pop rsi
ret