Function at 0x495620
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
push ebx
push esi
push edi
push 0x5ac458
push dword [ebp + 8]
mov edi, ecx
mov dword [ebp - 0x40], edi
call fcn.0049b390
mov ebx, eax
mov dword [ebp - 0xc], 0
add esp, 8
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], 0
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x60], 1
mov dword [ebp - 0x74], 0xffffffff
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x8c], 1
mov dword [ebp - 0x94], 1
test ebx, ebx
jne 0x4956a3
push 0xff
lea esi, [edi + 0x44]
push str.Error_encountered_while_opening_TIFF_file
push esi
call fcn.00504fa0
add esp, 0xc
jmp 0x496864
push ebx
call fcn.004ddac6
movzx eax, ax
mov dword [edi + 0x160], eax
movzx eax, word [edi + 0x15c]
push eax
push ebx
call fcn.004ddafe
add esp, 0xc
test eax, eax
jne 0x4956e2
push 0xff
lea esi, [edi + 0x44]
push str.Error:_page_not_present_in_TIFF_file
push esi
call fcn.00504fa0
add esp, 0xc
jmp 0x496864
lea eax, [ebp - 8]
push eax
push 0x100
push ebx
call fcn.004ddaaf
lea eax, [ebp - 0xc]
push eax
push 0x101
push ebx
call fcn.004ddaaf
lea eax, [ebp - 0x60]
push eax
push 0x115
push ebx
call fcn.004ddaaf
lea eax, [ebp - 0x2c]
push eax
push 0x102
push ebx
call fcn.004ddaaf
lea eax, [ebp - 0x74]
push eax
push 0x116
push ebx
call fcn.004ddaaf
lea eax, [ebp - 0x78]
push eax
push 0x106
push ebx
call fcn.004ddaaf
add esp, 0x48
lea eax, [ebp - 0x94]
push eax
push 0x112
push ebx
call fcn.004ddaaf
add esp, 0xc
cmp dword [edi + 0x148], 0xffffffff
jne 0x49578b
mov eax, dword [ebp - 8]
lea esi, [edi + 0x44]
push 0xff
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0xc]
push str.output_dimensions_returned
push esi
mov dword [edi + 0x10], eax
mov dword [edi + 0x40], 6
call fcn.00504fa0
add esp, 0xc
jmp 0x496864
lea eax, [ebp - 0x7c]
push eax
push 0x128
push ebx
call fcn.004def90
lea eax, [ebp - 0x6c]
push eax
push 0x11a
push ebx
call fcn.004ddaaf
add esp, 0x18
test eax, eax
je 0x4957dd
cmp word [ebp - 0x7c], 3
movss xmm0, dword [ebp - 0x6c]
jne 0x4957d1
mulss xmm0, dword [0x5acc00]
addss xmm0, dword [0x5a1780]
movss dword [ebp - 0x6c], xmm0
cvttss2si eax, xmm0
mov ecx, edi
push eax
call fcn.00486640
lea eax, [ebp - 0x6c]
push eax
push 0x11b
push ebx
call fcn.004ddaaf
add esp, 0xc
test eax, eax
je 0x495820
cmp word [ebp - 0x7c], 3
movss xmm0, dword [ebp - 0x6c]
jne 0x495814
mulss xmm0, dword [0x5acc00]
addss xmm0, dword [0x5a1780]
movss dword [ebp - 0x6c], xmm0
cvttss2si eax, xmm0
mov ecx, edi
push eax
call fcn.004866b0
lea eax, [ebp - 0x88]
push eax
push 0x11e
push ebx
call fcn.004ddaaf
add esp, 0xc
test eax, eax
je 0x495847
cvttss2si eax, dword [ebp - 0x88]
mov dword [edi + 0x184], eax
lea eax, [ebp - 0x88]
push eax
push 0x11f
push ebx
call fcn.004ddaaf
add esp, 0xc
test eax, eax
je 0x49586e
cvttss2si eax, dword [ebp - 0x88]
mov dword [edi + 0x188], eax
mov edx, dword [ebp - 0xc]
mov dword [edi + 0x28], 0
mov dword [edi + 0x14c], 0xffffffff
cmp dword [ebp - 0x74], edx
jbe 0x49589c
push edx
push 0x116
push ebx
mov dword [ebp - 0x74], edx
call fcn.004ddb63
mov edx, dword [ebp - 0xc]
add esp, 0xc
mov ecx, dword [ebp - 0x78]
mov eax, 1
cmp cx, 2
je 0x495974
cmp cx, 6
je 0x495974
cmp cx, 5
je 0x495974
mov esi, 0x804c
cmp cx, si
je 0x495974
mov esi, 0x804d
cmp cx, si
je 0x495974
cmp cx, ax
je 0x495930
test cx, cx
je 0x495930
cmp cx, 3
je 0x495930
mov ebx, dword [ebp - 0x2c]
cmp bx, 4
jne 0x495946
mov eax, 4
mov dword [edi + 0x28], 0x10
mov word [edi + 0x16], ax
xor esi, esi
mov ebx, dword [ebp - 0x10]
cmp dword [edi + 0x148], 0
je 0x495981
push 0xff
lea esi, [edi + 0x44]
push str.Cancelled
push esi
call fcn.00504fa0
add esp, 0xc
jmp 0x496864
mov ebx, dword [ebp - 0x2c]
cmp bx, 1
jne 0x4958f1
mov word [edi + 0x16], ax
mov dword [edi + 0x28], 2
jmp 0x495907
mov eax, 8
xor esi, esi
mov word [edi + 0x16], ax
mov dword [edi + 0x28], 0x100
cmp bx, ax
jbe 0x495909
mov ebx, dword [ebp - 0x10]
cmp cx, 3
jne 0x49590c
mov eax, 0x18
mov dword [edi + 0x28], esi
mov word [edi + 0x16], ax
jmp 0x49590c
mov esi, eax
mov eax, 0x18
mov word [edi + 0x16], ax
jmp 0x49590c
push 6
push eax
push edx
push dword [ebp - 8]
mov ecx, edi
call fcn.00488f20
cmp dword [edi + 4], 0
jne 0x4959b0
push 0xff
lea esi, [edi + 0x44]
push str.CxImageTIF_cant_create_image
push esi
call fcn.00504fa0
add esp, 0xc
jmp 0x496864
lea eax, [ebp - 0x8c]
push eax
push 0x103
push ebx
call fcn.004ddaaf
movzx eax, word [ebp - 0x8c]
add esp, 0xc
mov ecx, edi
push 0
push eax
call fcn.004864f0
test esi, esi
je 0x495ac6
mov eax, dword [ebp - 8]
imul eax, dword [ebp - 0xc]
shl eax, 2
push eax
call fcn.0049b3c0
mov esi, eax
add esp, 4
mov dword [ebp - 0x54], esi
test esi, esi
jne 0x495a15
push 0xff
lea esi, [edi + 0x44]
push str.No_space_for_raster_buffer
push esi
call fcn.00504fa0
add esp, 0xc
jmp 0x496864
push 1
push esi
push dword [ebp - 0xc]
push dword [ebp - 8]
push ebx
call fcn.004e2ac3
add esp, 0x14
test eax, eax
jne 0x495a40
push esi
call fcn.0049b3b0
push 0xff
push str.Corrupted_TIFF_file_
jmp 0x496858
mov ecx, dword [edi + 0x34]
xor ebx, ebx
mov edx, esi
mov dword [ebp - 0x58], esi
mov dword [ebp - 0x30], ecx
cmp dword [ebp - 0xc], ebx
jbe 0x495aa3
mov eax, dword [ebp - 8]
cmp dword [edi + 0x148], 0
jne 0x495ab9
xor esi, esi
test eax, eax
je 0x495a8b
inc edx
movzx eax, byte [edx + 1]
lea ecx, [ecx + 3]
mov byte [ecx - 3], al
lea edx, [edx + 4]
movzx eax, byte [edx - 4]
inc esi
mov byte [ecx - 2], al
movzx eax, byte [edx - 5]
mov byte [ecx - 1], al
mov eax, dword [ebp - 8]
cmp esi, eax
jb 0x495a65
mov edx, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x30]
lea edx, [edx + eax*4]
add ecx, dword [edi + 0x30]
inc ebx
mov dword [ebp - 0x58], edx
mov dword [ebp - 0x30], ecx
cmp ebx, dword [ebp - 0xc]
jb 0x495a55
mov esi, dword [ebp - 0x54]
push esi
call fcn.0049b3b0
mov al, byte [0x615266]
add esp, 4
mov byte [ebp + 0xb], al
jmp 0x496950
push dword [ebp - 0x54]
call fcn.0049b3b0
jmp 0x49684e
mov ecx, dword [ebp - 0x2c]
cmp cx, 8
jbe 0x495b0a
cmp word [ebp - 0x78], 3
jne 0x495b0a
mov ebx, 1
mov dword [ebp - 0x38], ebx
mov esi, ebx
mov dword [ebp - 0x24], esi
cmp cx, 0x18
jbe 0x495b04
push 0xff
lea esi, [edi + 0x44]
push str.Too_big_palette_to_handle
push esi
call fcn.00504fa0
add esp, 0xc
jmp 0x496864
mov eax, ebx
shl eax, cl
jmp 0x495b19
xor ebx, ebx
mov eax, 0x100
xor esi, esi
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x24], esi
push 4
push eax
call fcn.0050489e
add esp, 8
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x495b46
push 0xff
lea esi, [edi + 0x44]
push str.Unable_to_allocate_TIFF_palette
push esi
call fcn.00504fa0
add esp, 0xc
jmp 0x496864
mov ecx, dword [ebp - 0x2c]
movzx edx, cx
cmp cx, 8
jbe 0x495b57
mov edx, 8
mov eax, dword [ebp - 0x78]
movzx eax, ax
mov dword [ebp - 4], edx
sub eax, 0
je 0x495d2f
sub eax, 1
je 0x495d2f
sub eax, 2
jne 0x495de4
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x48]
push eax
push 0x140
push dword [ebp - 0x10]
call fcn.004ddaaf
mov eax, dword [ebp - 0x44]
add esp, 0x14
mov edx, ebx
mov dword [ebp - 0x28], edx
test ebx, ebx
jne 0x495c1f
mov ecx, dword [ebp - 4]
mov edx, 1
shl edx, cl
test edx, edx
jle 0x495c1a
mov ecx, dword [ebp - 0x64]
mov edi, dword [ebp - 0x48]
sub edi, ecx
mov dword [ebp - 0x34], edi
mov edi, dword [ebp - 0x44]
lea eax, [ecx + edx*2]
sub edi, ecx
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x68], edi
mov edi, dword [ebp - 0x40]
mov esi, 0x100
lea eax, [eax - 2]
dec edx
cmp word [ecx + eax], si
mov esi, dword [ebp - 0x24]
jae 0x495c10
mov ebx, 0x100
cmp word [eax], bx
mov ebx, dword [ebp - 0x38]
jae 0x495c10
mov esi, dword [ebp - 0x68]
mov edi, 0x100
cmp word [esi + eax], di
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0x40]
jae 0x495c10
test edx, edx
jg 0x495bd1
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 4]
jmp 0x495c28
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x28], 1
mov ecx, dword [ebp - 4]
jmp 0x495c28
mov ecx, dword [ebp - 0x2c]
movzx ecx, cx
mov dword [ebp - 0x28], edx
mov edx, 1
shl edx, cl
sub edx, 1
mov dword [ebp - 0x34], edx
js 0x495de4
mov edi, dword [ebp - 0x18]
lea edi, [edi + edx*4]
inc edi
cmp dword [ebp - 0x28], 0
je 0x495ce1
mov esi, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x48]
sub ecx, esi
sub eax, esi
mov dword [ebp - 0x1c], ecx
lea ebx, [esi + edx*2]
mov dword [ebp - 0x28], eax
mov esi, edx
movzx eax, word [ebx + ecx]
lea ebx, [ebx - 2]
imul ecx, eax, 0xff
lea edi, [edi - 4]
mov eax, 0x80008001
imul ecx
add edx, ecx
sar edx, 0xf
mov eax, edx
shr eax, 0x1f
add eax, edx
mov byte [edi + 5], al
movzx eax, word [ebx + 2]
imul ecx, eax, 0xff
mov eax, 0x80008001
imul ecx
add edx, ecx
sar edx, 0xf
mov eax, edx
shr eax, 0x1f
add eax, edx
mov byte [edi + 4], al
mov eax, dword [ebp - 0x28]
movzx eax, word [ebx + eax + 2]
imul ecx, eax, 0xff
mov eax, 0x80008001
imul ecx
add edx, ecx
mov ecx, dword [ebp - 0x1c]
sar edx, 0xf
mov eax, edx
shr eax, 0x1f
add eax, edx
sub esi, 1
mov byte [edi + 3], al
jns 0x495c61
mov ebx, dword [ebp - 0x38]
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0x40]
jmp 0x495de4
mov ebx, dword [ebp - 0x64]
mov esi, dword [ebp - 0x48]
sub esi, ebx
sub eax, ebx
mov dword [ebp - 0x1c], esi
mov esi, eax
lea ecx, [ebx + edx*2]
mov dword [ebp - 0x28], eax
mov ebx, dword [ebp - 0x1c]
nop dword [eax]
sub edx, 1
movzx eax, byte [ecx + ebx]
mov byte [edi + 1], al
lea ecx, [ecx - 2]
movzx eax, byte [ecx + 2]
lea edi, [edi - 4]
mov byte [edi + 4], al
movzx eax, byte [ecx + esi + 2]
mov byte [edi + 3], al
jns 0x495d00
mov ebx, dword [ebp - 0x38]
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0x40]
jmp 0x495de4
cmp cx, 1
jne 0x495d5f
cmp word [ebp - 0x78], 1
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 4]
jne 0x495d51
mov word [edx + 4], 0xffff
mov byte [edx + 6], 0xff
jmp 0x495dea
mov word [edx], 0xffff
mov byte [edx + 2], 0xff
jmp 0x495dea
mov ecx, edx
mov eax, 1
rol eax, cl
mov edx, 1
mov ecx, dword [ebp - 4]
shl edx, cl
mov dword [ebp - 0x58], edx
test edx, edx
jle 0x495de7
cmp word [ebp - 0x78], 1
lea ecx, [eax - 1]
jne 0x495db6
mov eax, 0xff
cdq
idiv ecx
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x58]
add ecx, 2
mov dword [ebp - 0x34], eax
xor eax, eax
nop dword [eax]
mov byte [ecx - 2], al
lea ecx, [ecx + 4]
mov byte [ecx - 5], al
mov byte [ecx - 4], al
add eax, dword [ebp - 0x34]
sub edx, 1
jne 0x495da0
jmp 0x495de4
mov eax, 0xffffff01
cdq
idiv ecx
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x58]
add edx, 2
mov dword [ebp - 0x34], eax
mov eax, 0xff
nop
mov byte [edx - 2], al
lea edx, [edx + 4]
mov byte [edx - 5], al
mov byte [edx - 4], al
add eax, dword [ebp - 0x34]
sub ecx, 1
jne 0x495dd0
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
test ebx, ebx
jne 0x495e0c
mov eax, 1
shl eax, cl
mov ecx, edi
push eax
push edx
call fcn.00485fc0
push dword [ebp - 0x18]
call fcn.00504903
add esp, 4
mov dword [ebp - 0x18], ebx
mov eax, dword [ebp - 0x2c]
movzx ecx, word [ebp - 0x60]
push dword [ebp - 0x10]
movzx eax, ax
imul ecx, eax
imul ecx, dword [ebp - 8]
add ecx, 7
shr ecx, 3
mov dword [ebp - 0x14], ecx
call fcn.004df651
movzx ecx, word [ebp - 0x60]
add esp, 4
imul ecx, dword [edi + 0x1c]
cmp eax, ecx
cmovg eax, ecx
mov ecx, dword [edi + 0x30]
imul ecx, dword [ebp - 0x74]
cmp eax, ecx
cmovge ecx, eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], ecx
cmp ax, 8
jbe 0x495e6e
mov dword [ebp - 0x1c], ecx
cmp ax, 0x10
je 0x495e6e
movzx eax, ax
add eax, 7
shr eax, 3
imul eax, ecx
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x10]
call fcn.004e00d5
add esp, 4
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x44], 0
test eax, eax
je 0x495ef3
lea eax, [ebp - 0x80]
push eax
push 0x142
push dword [ebp - 0x10]
call fcn.004ddaaf
lea eax, [ebp - 0x90]
push eax
push 0x143
push dword [ebp - 0x10]
call fcn.004ddaaf
mov eax, dword [ebp - 0x90]
push dword [ebp - 0x10]
mov dword [ebp - 0x74], eax
call fcn.004dfac4
mov ecx, eax
xor edx, edx
mov eax, dword [ebp - 8]
div dword [ebp - 0x80]
push dword [ebp - 0x10]
inc eax
imul ecx, eax
mov dword [ebp - 0x1c], ecx
call fcn.004dfac4
push eax
call fcn.0050491e
add esp, 0x24
mov dword [ebp - 0x44], eax
cmp word [ebp - 0x2c], 0x10
mov eax, dword [ebp - 0x1c]
jne 0x495eff
add eax, eax
push eax
call fcn.0050491e
mov ecx, eax
add esp, 4
xor eax, eax
mov dword [ebp - 4], ecx
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x84], eax
cmp dword [ebp - 0x58], eax
jne 0x495f55
cmp word [ebp - 0x2c], 0x10
jne 0x495f55
mov eax, dword [ebp - 0x14]
push dword [ebp - 0x1c]
mov dword [ebp - 0x84], eax
movzx eax, word [ebp - 0x60]
imul eax, dword [ebp - 8]
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x14], eax
call fcn.0050491e
mov ecx, eax
add esp, 4
and dword [ebp - 0x14], 0x1fffffff
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 4], ecx
test ecx, ecx
jne 0x495fa1
test eax, eax
je 0x495f66
push eax
call fcn.00504903
add esp, 4
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x495f76
push eax
call fcn.00504903
add esp, 4
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x495f86
push eax
call fcn.00504903
add esp, 4
push 0xff
lea esi, [edi + 0x44]
push str.CxImageTIF_cant_allocate_memory
push esi
call fcn.00504fa0
add esp, 0xc
jmp 0x496864
mov dword [ebp - 0x48], 0
test eax, eax
je 0x495fba
push dword [ebp - 0xc]
call fcn.0050491e
add esp, 4
mov dword [ebp - 0x48], eax
xor eax, eax
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0xc], eax
jbe 0x4962a8
mov esi, dword [ebp - 0x74]
nop dword [eax + eax]
cmp dword [edi + 0x148], 0
jne 0x496846
mov ecx, dword [ebp - 0xc]
lea edx, [eax + esi]
sub ecx, dword [ebp - 0x1c]
cmp edx, dword [ebp - 0xc]
cmova esi, ecx
cmp dword [ebp - 0x58], 0
mov dword [ebp - 0x70], esi
je 0x4961a3
push dword [ebp - 0x10]
call fcn.004df504
push dword [ebp - 0x10]
mov esi, eax
mov dword [ebp - 0x34], esi
call fcn.004dfa65
mov ecx, dword [ebp - 8]
sub esi, eax
mov dword [ebp - 0x28], eax
add esp, 8
mov dword [ebp - 0x30], esi
xor eax, eax
xor esi, esi
mov dword [ebp - 0x54], eax
test ecx, ecx
je 0x49608f
push 0
push 0
push dword [ebp - 0x1c]
push eax
push dword [ebp - 0x44]
push dword [ebp - 0x10]
call fcn.004e820f
add esp, 0x18
test eax, eax
js 0x49681e
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x34]
add eax, esi
mov edx, dword [ebp - 0x30]
cmp eax, ecx
jbe 0x496061
mov eax, ecx
mov ecx, dword [ebp - 0x28]
sub eax, esi
sub ecx, eax
add edx, ecx
jmp 0x496066
mov eax, dword [ebp - 0x28]
xor ecx, ecx
push ecx
push edx
push eax
push dword [ebp - 0x70]
mov eax, dword [ebp - 4]
mov ecx, edi
push dword [ebp - 0x44]
add eax, esi
push eax
call fcn.00497410
mov eax, dword [ebp - 0x54]
add eax, dword [ebp - 0x80]
add esi, dword [ebp - 0x28]
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x54], eax
cmp eax, ecx
jb 0x496027
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x70]
test eax, eax
je 0x496291
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x34], eax
neg eax
mov edi, dword [ebp - 0x40]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x84]
neg eax
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp - 0x70]
lea edx, [eax - 1]
mov ebx, edx
imul edx, esi
imul ebx, dword [ebp - 0x84]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x64], ebx
mov ebx, dword [ebp - 0x5c]
add ebx, dword [ebp - 0x64]
mov dword [ebp - 0x28], ebx
mov ebx, dword [ebp - 0x38]
nop dword [eax]
cmp word [ebp - 0x2c], 0x10
jne 0x49621c
test ebx, ebx
jne 0x49621c
cmp dword [ebp - 0x5c], ebx
je 0x4961f4
xor ch, ch
test esi, esi
je 0x49612d
mov esi, dword [ebp - 0x28]
mov edi, dword [ebp - 0x14]
inc esi
nop dword [eax]
mov cl, byte [esi]
lea esi, [esi + 2]
cmp cl, ch
movzx eax, ch
movzx edx, cl
cmovbe edx, eax
mov ch, dl
sub edi, 1
jne 0x496110
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x70]
xor edx, edx
mov edi, 8
test ch, ch
cmove edx, edi
je 0x496145
js 0x496145
nop dword [eax]
inc edx
add ch, ch
jns 0x496140
mov ecx, dword [ebp - 0x48]
sub ecx, eax
mov eax, dword [ebp - 0xc]
sub ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x34]
add ecx, dword [ebp - 0x50]
mov byte [ecx + eax], dl
mov ecx, edi
sub ecx, edx
xor edi, edi
test esi, esi
je 0x4961ef
mov esi, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x20]
add esi, dword [ebp - 0x64]
add eax, dword [ebp - 4]
mov dword [ebp - 0x68], eax
mov ebx, eax
nop dword [eax + eax]
movzx edx, byte [esi + 1]
lea esi, [esi + 2]
movzx eax, byte [esi - 2]
shl edx, 8
or edx, eax
sar edx, cl
mov byte [edi + ebx], dl
inc edi
cmp edi, dword [ebp - 0x14]
jb 0x496180
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp - 0x38]
jmp 0x496213
mov ecx, dword [ebp - 0x5c]
test ecx, ecx
mov esi, dword [ebp - 0x14]
mov eax, esi
cmovne eax, dword [ebp - 0x84]
imul eax, dword [ebp - 0x70]
test ecx, ecx
push eax
mov eax, dword [ebp - 4]
cmovne eax, ecx
push eax
push 0
push dword [ebp - 0x1c]
push dword [ebp - 0x10]
call fcn.004df314
add esp, 0xc
push eax
push dword [ebp - 0x10]
call fcn.004e7e9b
add esp, 0x10
cmp eax, 0xffffffff
je 0x4962a5
mov ecx, dword [ebp - 8]
jmp 0x496092
mov ecx, dword [ebp - 8]
jmp 0x496216
xor edx, edx
test ecx, ecx
je 0x496219
mov edi, dword [ebp - 0x20]
add edi, dword [ebp - 4]
lea esi, [edi + 1]
mov al, byte [esi]
lea esi, [esi + 2]
mov byte [edi + edx], al
inc edx
mov ecx, dword [ebp - 8]
cmp edx, ecx
jb 0x496203
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x40]
mov edx, dword [ebp - 0x20]
cmp word [ebp - 0x60], 1
jne 0x496470
test ebx, ebx
je 0x496411
cmp dword [ebp - 0x5c], 0
push dword [ebp - 0x18]
movzx eax, word [ebp - 0x2c]
mov edx, dword [edi + 0x30]
mov esi, dword [edi + 0x34]
push eax
push ecx
mov ecx, edi
je 0x496405
push dword [ebp - 0x28]
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x50]
imul eax, edx
add eax, esi
push eax
call fcn.00497350
mov esi, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0xa0]
sub edx, esi
add dword [ebp - 0x64], eax
add dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x50]
mov edi, dword [ebp - 0x40]
inc eax
mov dword [ebp - 0x50], eax
add eax, dword [ebp - 0x34]
cmp eax, dword [ebp - 0x70]
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x20], edx
jb 0x4960e0
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x74]
add eax, esi
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebp - 0xc]
jb 0x495fd0
mov esi, dword [ebp - 0x24]
push dword [ebp - 4]
call fcn.00504903
mov eax, dword [ebp - 0x5c]
add esp, 4
test eax, eax
je 0x4962c3
push eax
call fcn.00504903
add esp, 4
mov edx, dword [ebp - 0x48]
test edx, edx
je 0x4963ca
cmp word [ebp - 0x60], 1
jne 0x4963c1
cmp word [ebp - 0x2c], 0x10
jne 0x4963c1
test esi, esi
jne 0x4963c1
mov ebx, dword [ebp - 0xc]
xor ecx, ecx
mov esi, 8
test ebx, ebx
je 0x496374
cmp ebx, esi
jb 0x496360
cmp dword [0x9143e4], 2
jl 0x496360
movaps xmm1, xmmword [0x5acc20]
mov eax, ebx
and eax, 0xfffffff8
movaps xmm2, xmm1
nop word [eax + eax]
pmovzxbd xmm0, dword [edx + ecx]
pminsd xmm1, xmm0
pmovzxbd xmm0, dword [edx + ecx + 4]
add ecx, esi
pminsd xmm2, xmm0
cmp ecx, eax
jb 0x496320
pminsd xmm1, xmm2
movaps xmm0, xmm1
psrldq xmm0, 8
pminsd xmm1, xmm0
movups xmm0, xmm1
psrldq xmm0, 4
pminsd xmm1, xmm0
movd esi, xmm1
cmp ecx, ebx
jae 0x496374
movzx eax, byte [edx + ecx]
cmp esi, eax
cmovle eax, esi
inc ecx
mov esi, eax
cmp ecx, ebx
jb 0x496364
xor edx, edx
mov dword [ebp - 0x30], edx
test ebx, ebx
je 0x4963be
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x48]
movzx ebx, byte [ebx + edx]
cmp esi, ebx
jge 0x4963b6
mov eax, dword [edi + 0x30]
sub ebx, esi
imul eax, edx
xor edx, edx
add eax, dword [edi + 0x34]
test ecx, ecx
je 0x4963b0
nop
mov cl, bl
lea eax, [eax + 1]
shr byte [eax - 1], cl
inc edx
mov ecx, dword [ebp - 8]
cmp edx, ecx
jb 0x4963a0
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x30]
inc edx
mov dword [ebp - 0x30], edx
cmp edx, eax
jb 0x496383
mov edx, dword [ebp - 0x48]
push edx
call fcn.00504903
add esp, 4
cmp dword [ebp - 0x58], 0
je 0x4963db
push dword [ebp - 0x44]
call fcn.00504903
add esp, 4
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4963eb
push eax
call fcn.00504903
add esp, 4
movzx eax, word [ebp - 0x94]
add eax, 0xfffffffe
cmp eax, 6
ja case.default.0x4963fe
jmp dword [eax*4 + 0x496968]
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 4]
push eax
jmp 0x49624d
mov eax, dword [ebp - 0x2c]
cmp ax, word [edi + 0x16]
je 0x496445
cmp ax, 0x10
je 0x496445
movzx eax, ax
push eax
mov eax, dword [ebp - 4]
add eax, edx
push ecx
push eax
mov eax, dword [ebp - 0xc]
mov ecx, edi
add eax, dword [ebp - 0x50]
imul eax, dword [edi + 0x30]
add eax, dword [edi + 0x34]
push eax
call fcn.004971c0
jmp 0x496261
mov ecx, dword [edi + 0x30]
mov eax, esi
cmp esi, ecx
cmovae eax, ecx
push eax
mov eax, dword [ebp - 4]
add eax, edx
push eax
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x50]
imul eax, ecx
add eax, dword [edi + 0x34]
push eax
call fcn.005010e0
add esp, 0xc
jmp 0x496261
cmp word [ebp - 0x60], 2
jne 0x4964d0
mov eax, dword [ebp - 0xc]
xor esi, esi
add eax, dword [ebp - 0x50]
xor edi, edi
mov ebx, dword [ebp - 0x38]
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x14], esi
jbe 0x496816
mov eax, dword [ebp - 4]
mov ebx, dword [ebp - 0x68]
add eax, edx
mov dword [ebp - 0x30], eax
nop dword [eax + eax]
movzx eax, byte [edi + eax]
mov ecx, dword [ebp - 0x40]
push eax
push ebx
push esi
call fcn.00486160
mov ecx, dword [ebp - 8]
inc esi
add edi, 2
cmp esi, ecx
jl 0x4964bd
dec ebx
xor esi, esi
mov eax, dword [ebp - 0x30]
cmp edi, dword [ebp - 0x14]
jl 0x4964a0
mov ebx, dword [ebp - 0x38]
mov esi, dword [ebp - 0x14]
jmp 0x496264
cmp word [edi + 0x16], 0x18
je 0x4964e9
push 6
push 0x18
push dword [ebp - 0xc]
push ecx
mov ecx, edi
call fcn.00488f20
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp - 0x38]
xor eax, eax
mov dword [ebp - 0x30], eax
xor edx, edx
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x50]
mov dword [ebp - 0x68], edx
mov dword [ebp - 0x54], eax
test ecx, ecx
je 0x496264
nop word [eax + eax]
movzx eax, word [ebp - 0x60]
mov ecx, dword [ebp - 4]
imul eax, edx
movsd xmm1, qword [0x618090]
add eax, dword [ebp - 0x20]
movzx esi, byte [eax + ecx + 1]
movzx edi, byte [eax + ecx + 2]
movzx eax, byte [eax + ecx]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm0, qword [0x5acbf0]
addsd xmm0, qword [0x5a5160]
divsd xmm0, qword [0x5acc10]
movsd qword [ebp - 0x3c], xmm0
call fcn.00514b30
movsd xmm1, qword [0x618090]
lea eax, [esi - 0x100]
cmp esi, 0x7f
movsd qword [ebp - 0x9c], xmm0
cmovbe eax, esi
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [0x5acb78]
addsd xmm0, qword [ebp - 0x3c]
call fcn.00514b30
mulsd xmm0, qword [0x5acbb8]
lea eax, [edi - 0x100]
cmp edi, 0x7f
cmovbe eax, edi
movsd qword [ebp - 0xa8], xmm0
movsd xmm0, qword [ebp - 0x3c]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
mulsd xmm1, qword [0x617f38]
subsd xmm0, xmm1
movsd xmm1, qword [0x618090]
call fcn.00514b30
movsd xmm5, qword [ebp - 0xa8]
movaps xmm2, xmm0
movsd xmm3, qword [ebp - 0x9c]
movaps xmm4, xmm5
mulsd xmm2, qword [0x5acbd8]
movaps xmm1, xmm3
mulsd xmm1, qword [0x5acbe0]
movaps xmm0, xmm5
mulsd xmm4, qword [0x5acbf8]
mulsd xmm0, qword [0x5acbc0]
mulsd xmm5, qword [0x5acb98]
subsd xmm4, xmm1
movaps xmm1, xmm2
mulsd xmm1, qword [0x5acbb0]
subsd xmm4, xmm1
movaps xmm1, xmm3
mulsd xmm1, qword [0x5acbe8]
mulsd xmm3, qword [0x5acba0]
comisd xmm4, xmmword [0x5acb80]
subsd xmm1, xmm0
movaps xmm0, xmm2
mulsd xmm0, qword [0x5acb88]
subsd xmm5, xmm3
mulsd xmm2, qword [0x5acbd0]
addsd xmm1, xmm0
addsd xmm5, xmm2
movsd qword [ebp - 0x3c], xmm1
movsd qword [ebp - 0xa8], xmm5
jbe 0x4966b0
movsd xmm1, qword [0x5acba8]
movaps xmm0, xmm4
call fcn.00514b30
mulsd xmm0, qword [0x5acbc8]
movsd xmm1, qword [ebp - 0x3c]
subsd xmm0, qword [0x5acb90]
movsd qword [ebp - 0x9c], xmm0
movsd xmm0, qword [str.p_n]
jmp 0x4966c4
movsd xmm0, qword [str.p_n]
mulsd xmm4, xmm0
movsd qword [ebp - 0x9c], xmm4
movsd xmm2, qword [0x5acb80]
comisd xmm1, xmm2
jbe 0x496709
movaps xmm0, xmm1
movsd xmm1, qword [0x5acba8]
call fcn.00514b30
mulsd xmm0, qword [0x5acbc8]
movsd xmm2, qword [0x5acb80]
subsd xmm0, qword [0x5acb90]
movsd qword [ebp - 0x3c], xmm0
movsd xmm0, qword [str.p_n]
jmp 0x496712
mulsd xmm1, xmm0
movsd qword [ebp - 0x3c], xmm1
movsd xmm1, qword [ebp - 0xa8]
comisd xmm1, xmm2
jbe 0x496745
movaps xmm0, xmm1
movsd xmm1, qword [0x5acba8]
call fcn.00514b30
movaps xmm1, xmm0
mulsd xmm1, qword [0x5acbc8]
subsd xmm1, qword [0x5acb90]
jmp 0x496749
mulsd xmm1, xmm0
movsd xmm0, qword [ebp - 0x9c]
movsd xmm2, qword [0x6181b0]
mulsd xmm0, xmm2
cvttsd2si eax, xmm0
cmp eax, 0xff
jle 0x49676e
mov byte [ebp - 0x4a], 0xff
jmp 0x49677e
test eax, eax
jns 0x49677b
mov eax, dword [ebp - 0x24]
mov byte [ebp - 0x4a], 0
jmp 0x496784
mov byte [ebp - 0x4a], al
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x24], eax
movsd xmm0, qword [ebp - 0x3c]
mulsd xmm0, xmm2
cvttsd2si ecx, xmm0
cmp ecx, 0xff
jle 0x49679f
mov byte [ebp - 0x4b], 0xff
jmp 0x4967ac
test ecx, ecx
jns 0x4967a9
mov byte [ebp - 0x4b], 0
jmp 0x4967af
mov byte [ebp - 0x4b], cl
mov dword [ebp - 0x24], eax
mulsd xmm1, xmm2
cvttsd2si ecx, xmm1
cmp ecx, 0xff
jle 0x4967c5
mov byte [ebp - 0x4c], 0xff
jmp 0x4967d2
test ecx, ecx
jns 0x4967cf
mov byte [ebp - 0x4c], 0
jmp 0x4967d5
mov byte [ebp - 0x4c], cl
mov dword [ebp - 0x24], eax
mov esi, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x40]
push 0
push dword [ebp - 0x4c]
push dword [ebp - 0x54]
push esi
call fcn.004860f0
mov edx, dword [ebp - 0x68]
inc esi
mov ecx, dword [ebp - 8]
inc edx
mov dword [ebp - 0x68], edx
mov dword [ebp - 0x30], esi
cmp esi, ecx
jl 0x496803
dec dword [ebp - 0x54]
xor eax, eax
mov dword [ebp - 0x30], eax
cmp edx, ecx
jb 0x496510
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x38], ebx
jmp 0x496264
mov esi, dword [ebp - 0x14]
jmp 0x496267
push dword [ebp - 0x44]
call fcn.00504903
push dword [ebp - 4]
call fcn.00504903
push 0xff
lea esi, [edi + 0x44]
push str.Corrupted_tiled_TIFF_file_
push esi
call fcn.00504fa0
add esp, 0x14
jmp 0x496864
push dword [ebp - 4]
call fcn.00504903
push 0xff
push str.Cancelled
lea esi, [edi + 0x44]
push esi
call fcn.00504fa0
add esp, 0x10
mov al, byte [0x615266]
mov ecx, 0x615266
mov byte [ebp + 0xb], al
lea eax, [ebp + 0xb]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x496894
test dl, dl
je 0x496890
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x496894
add eax, 2
add ecx, 2
test dl, dl
jne 0x496874
xor eax, eax
jmp 0x496899
sbb eax, eax
or eax, 1
test eax, eax
je 0x4968af
push 0xff
lea eax, [ebp + 0xb]
push eax
push esi
call fcn.00504fa0
add esp, 0xc
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4968bf
push eax
call fcn.004dd634
add esp, 4
cmp dword [edi + 0x148], 0xffffffff
jne 0x4968d8
cmp dword [edi + 0x40], 6
pop edi
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 4
push 1
push 0
mov ecx, edi
call fcn.004899d0
mov al, byte [0x615266]
mov byte [ebp + 0xb], al
jmp 0x496950
push 1
push 0
mov ecx, edi
call fcn.00489550
jmp case.0x4963fe.2
push 1
push 0
mov ecx, edi
call fcn.00489550
mov al, byte [0x615266]
mov byte [ebp + 0xb], al
jmp 0x496950
push 0
mov ecx, edi
call fcn.0048b470
jmp case.0x4963fe.2
push 0
mov ecx, edi
call fcn.0048afb0
mov al, byte [0x615266]
mov byte [ebp + 0xb], al
jmp 0x496950
push 0
mov ecx, edi
call fcn.0048afb0
jmp case.0x4963fe.2
push 0
mov ecx, edi
call fcn.0048b470
mov byte [ebp + 0xb], 0
push dword [ebp - 0x10]
call fcn.004dd634
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4