Function at 0x479fe0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
push ebx
push esi
push edi
push 0x58c388
push dword [ebp + 8]
mov edi, ecx
mov dword [ebp - 0x40], edi
call fcn.0047e490
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 0x47a063
push 0xff
lea esi, [edi + 0x44]
push str.Error_encountered_while_opening_TIFF_file
push esi
call fcn.004e2880
add esp, 0xc
jmp 0x47b224
push ebx
call fcn.004bbab6
movzx eax, ax
mov dword [edi + 0x160], eax
movzx eax, word [edi + 0x15c]
push eax
push ebx
call fcn.004bbaee
add esp, 0xc
test eax, eax
jne 0x47a0a2
push 0xff
lea esi, [edi + 0x44]
push str.Error:_page_not_present_in_TIFF_file
push esi
call fcn.004e2880
add esp, 0xc
jmp 0x47b224
lea eax, [ebp - 8]
push eax
push 0x100
push ebx
call fcn.004bba9f
lea eax, [ebp - 0xc]
push eax
push 0x101
push ebx
call fcn.004bba9f
lea eax, [ebp - 0x60]
push eax
push 0x115
push ebx
call fcn.004bba9f
lea eax, [ebp - 0x2c]
push eax
push 0x102
push ebx
call fcn.004bba9f
lea eax, [ebp - 0x74]
push eax
push 0x116
push ebx
call fcn.004bba9f
lea eax, [ebp - 0x78]
push eax
push 0x106
push ebx
call fcn.004bba9f
add esp, 0x48
lea eax, [ebp - 0x94]
push eax
push 0x112
push ebx
call fcn.004bba9f
add esp, 0xc
cmp dword [edi + 0x148], 0xffffffff
jne 0x47a14b
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.004e2880
add esp, 0xc
jmp 0x47b224
lea eax, [ebp - 0x7c]
push eax
push 0x128
push ebx
call fcn.004bcf80
lea eax, [ebp - 0x6c]
push eax
push 0x11a
push ebx
call fcn.004bba9f
add esp, 0x18
test eax, eax
je 0x47a19d
cmp word [ebp - 0x7c], 3
movss xmm0, dword [ebp - 0x6c]
jne 0x47a191
mulss xmm0, dword [0x58c7d0]
addss xmm0, dword [0x58179c]
movss dword [ebp - 0x6c], xmm0
cvttss2si eax, xmm0
mov ecx, edi
push eax
call fcn.00473230
lea eax, [ebp - 0x6c]
push eax
push 0x11b
push ebx
call fcn.004bba9f
add esp, 0xc
test eax, eax
je 0x47a1e0
cmp word [ebp - 0x7c], 3
movss xmm0, dword [ebp - 0x6c]
jne 0x47a1d4
mulss xmm0, dword [0x58c7d0]
addss xmm0, dword [0x58179c]
movss dword [ebp - 0x6c], xmm0
cvttss2si eax, xmm0
mov ecx, edi
push eax
call fcn.004732a0
lea eax, [ebp - 0x88]
push eax
push 0x11e
push ebx
call fcn.004bba9f
add esp, 0xc
test eax, eax
je 0x47a207
cvttss2si eax, dword [ebp - 0x88]
mov dword [edi + 0x184], eax
lea eax, [ebp - 0x88]
push eax
push 0x11f
push ebx
call fcn.004bba9f
add esp, 0xc
test eax, eax
je 0x47a22e
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 0x47a25c
push edx
push 0x116
push ebx
mov dword [ebp - 0x74], edx
call fcn.004bbb53
mov edx, dword [ebp - 0xc]
add esp, 0xc
mov ecx, dword [ebp - 0x78]
mov eax, 1
cmp cx, 2
je 0x47a334
cmp cx, 6
je 0x47a334
cmp cx, 5
je 0x47a334
mov esi, 0x804c
cmp cx, si
je 0x47a334
mov esi, 0x804d
cmp cx, si
je 0x47a334
cmp cx, ax
je 0x47a2f0
test cx, cx
je 0x47a2f0
cmp cx, 3
je 0x47a2f0
mov ebx, dword [ebp - 0x2c]
cmp bx, 4
jne 0x47a306
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 0x47a341
push 0xff
lea esi, [edi + 0x44]
push str.Cancelled
push esi
call fcn.004e2880
add esp, 0xc
jmp 0x47b224
mov ebx, dword [ebp - 0x2c]
cmp bx, 1
jne 0x47a2b1
mov word [edi + 0x16], ax
mov dword [edi + 0x28], 2
jmp 0x47a2c7
mov eax, 8
xor esi, esi
mov word [edi + 0x16], ax
mov dword [edi + 0x28], 0x100
cmp bx, ax
jbe 0x47a2c9
mov ebx, dword [ebp - 0x10]
cmp cx, 3
jne 0x47a2cc
mov eax, 0x18
mov dword [edi + 0x28], esi
mov word [edi + 0x16], ax
jmp 0x47a2cc
mov esi, eax
mov eax, 0x18
mov word [edi + 0x16], ax
jmp 0x47a2cc
push 6
push eax
push edx
push dword [ebp - 8]
mov ecx, edi
call fcn.004741d0
cmp dword [edi + 4], 0
jne 0x47a370
push 0xff
lea esi, [edi + 0x44]
push str.CxImageTIF_cant_create_image
push esi
call fcn.004e2880
add esp, 0xc
jmp 0x47b224
lea eax, [ebp - 0x8c]
push eax
push 0x103
push ebx
call fcn.004bba9f
movzx eax, word [ebp - 0x8c]
add esp, 0xc
mov ecx, edi
push 0
push eax
call fcn.00473120
test esi, esi
je 0x47a486
mov eax, dword [ebp - 8]
imul eax, dword [ebp - 0xc]
shl eax, 2
push eax
call fcn.0047e4c0
mov esi, eax
add esp, 4
mov dword [ebp - 0x54], esi
test esi, esi
jne 0x47a3d5
push 0xff
lea esi, [edi + 0x44]
push str.No_space_for_raster_buffer
push esi
call fcn.004e2880
add esp, 0xc
jmp 0x47b224
push 1
push esi
push dword [ebp - 0xc]
push dword [ebp - 8]
push ebx
call fcn.004c04e1
add esp, 0x14
test eax, eax
jne 0x47a400
push esi
call fcn.0047e4b0
push 0xff
push str.Corrupted_TIFF_file_
jmp 0x47b218
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 0x47a463
mov eax, dword [ebp - 8]
cmp dword [edi + 0x148], 0
jne 0x47a479
xor esi, esi
test eax, eax
je 0x47a44b
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 0x47a425
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 0x47a415
mov esi, dword [ebp - 0x54]
push esi
call fcn.0047e4b0
mov al, byte [0x5f53ae]
add esp, 4
mov byte [ebp + 0xb], al
jmp 0x47b310
push dword [ebp - 0x54]
call fcn.0047e4b0
jmp 0x47b20e
mov ecx, dword [ebp - 0x2c]
cmp cx, 8
jbe 0x47a4ca
cmp word [ebp - 0x78], 3
jne 0x47a4ca
mov ebx, 1
mov dword [ebp - 0x38], ebx
mov esi, ebx
mov dword [ebp - 0x24], esi
cmp cx, 0x18
jbe 0x47a4c4
push 0xff
lea esi, [edi + 0x44]
push str.Too_big_palette_to_handle
push esi
call fcn.004e2880
add esp, 0xc
jmp 0x47b224
mov eax, ebx
shl eax, cl
jmp 0x47a4d9
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.004e217e
add esp, 8
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x47a506
push 0xff
lea esi, [edi + 0x44]
push str.Unable_to_allocate_TIFF_palette
push esi
call fcn.004e2880
add esp, 0xc
jmp 0x47b224
mov ecx, dword [ebp - 0x2c]
movzx edx, cx
cmp cx, 8
jbe 0x47a517
mov edx, 8
mov eax, dword [ebp - 0x78]
movzx eax, ax
mov dword [ebp - 4], edx
sub eax, 0
je 0x47a6ef
sub eax, 1
je 0x47a6ef
sub eax, 2
jne 0x47a7a4
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.004bba9f
mov eax, dword [ebp - 0x44]
add esp, 0x14
mov edx, ebx
mov dword [ebp - 0x28], edx
test ebx, ebx
jne 0x47a5df
mov ecx, dword [ebp - 4]
mov edx, 1
shl edx, cl
test edx, edx
jle 0x47a5da
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 0x47a5d0
mov ebx, 0x100
cmp word [eax], bx
mov ebx, dword [ebp - 0x38]
jae 0x47a5d0
mov esi, dword [ebp - 0x68]
mov edi, 0x100
cmp word [esi + eax], di
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0x40]
jae 0x47a5d0
test edx, edx
jg 0x47a591
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 4]
jmp 0x47a5e8
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x28], 1
mov ecx, dword [ebp - 4]
jmp 0x47a5e8
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 0x47a7a4
mov edi, dword [ebp - 0x18]
lea edi, [edi + edx*4]
inc edi
cmp dword [ebp - 0x28], 0
je 0x47a6a1
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 0x47a621
mov ebx, dword [ebp - 0x38]
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0x40]
jmp 0x47a7a4
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 0x47a6c0
mov ebx, dword [ebp - 0x38]
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0x40]
jmp 0x47a7a4
cmp cx, 1
jne 0x47a71f
cmp word [ebp - 0x78], 1
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 4]
jne 0x47a711
mov word [edx + 4], 0xffff
mov byte [edx + 6], 0xff
jmp 0x47a7aa
mov word [edx], 0xffff
mov byte [edx + 2], 0xff
jmp 0x47a7aa
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 0x47a7a7
cmp word [ebp - 0x78], 1
lea ecx, [eax - 1]
jne 0x47a776
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 0x47a760
jmp 0x47a7a4
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 0x47a790
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
test ebx, ebx
jne 0x47a7cc
mov eax, 1
shl eax, cl
mov ecx, edi
push eax
push edx
call fcn.00472d70
push dword [ebp - 0x18]
call fcn.004e21e3
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.004bd62d
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 0x47a82e
mov dword [ebp - 0x1c], ecx
cmp ax, 0x10
je 0x47a82e
movzx eax, ax
add eax, 7
shr eax, 3
imul eax, ecx
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x10]
call fcn.004be0b1
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 0x47a8b3
lea eax, [ebp - 0x80]
push eax
push 0x142
push dword [ebp - 0x10]
call fcn.004bba9f
lea eax, [ebp - 0x90]
push eax
push 0x143
push dword [ebp - 0x10]
call fcn.004bba9f
mov eax, dword [ebp - 0x90]
push dword [ebp - 0x10]
mov dword [ebp - 0x74], eax
call fcn.004bdaa0
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.004bdaa0
push eax
call fcn.004e21fe
add esp, 0x24
mov dword [ebp - 0x44], eax
cmp word [ebp - 0x2c], 0x10
mov eax, dword [ebp - 0x1c]
jne 0x47a8bf
add eax, eax
push eax
call fcn.004e21fe
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 0x47a915
cmp word [ebp - 0x2c], 0x10
jne 0x47a915
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.004e21fe
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 0x47a961
test eax, eax
je 0x47a926
push eax
call fcn.004e21e3
add esp, 4
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x47a936
push eax
call fcn.004e21e3
add esp, 4
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x47a946
push eax
call fcn.004e21e3
add esp, 4
push 0xff
lea esi, [edi + 0x44]
push str.CxImageTIF_cant_allocate_memory
push esi
call fcn.004e2880
add esp, 0xc
jmp 0x47b224
mov dword [ebp - 0x48], 0
test eax, eax
je 0x47a97a
push dword [ebp - 0xc]
call fcn.004e21fe
add esp, 4
mov dword [ebp - 0x48], eax
xor eax, eax
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0xc], eax
jbe 0x47ac68
mov esi, dword [ebp - 0x74]
nop dword [eax + eax]
cmp dword [edi + 0x148], 0
jne 0x47b206
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 0x47ab63
push dword [ebp - 0x10]
call fcn.004bd4e0
push dword [ebp - 0x10]
mov esi, eax
mov dword [ebp - 0x34], esi
call fcn.004bda41
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 0x47aa4f
push 0
push 0
push dword [ebp - 0x1c]
push eax
push dword [ebp - 0x44]
push dword [ebp - 0x10]
call fcn.004c5c2d
add esp, 0x18
test eax, eax
js 0x47b1de
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x34]
add eax, esi
mov edx, dword [ebp - 0x30]
cmp eax, ecx
jbe 0x47aa21
mov eax, ecx
mov ecx, dword [ebp - 0x28]
sub eax, esi
sub ecx, eax
add edx, ecx
jmp 0x47aa26
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.0047b5a0
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 0x47a9e7
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x70]
test eax, eax
je 0x47ac51
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 0x47abdc
test ebx, ebx
jne 0x47abdc
cmp dword [ebp - 0x5c], ebx
je 0x47abb4
xor ch, ch
test esi, esi
je 0x47aaed
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 0x47aad0
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x70]
xor edx, edx
mov edi, 8
test ch, ch
cmove edx, edi
je 0x47ab05
js 0x47ab05
nop dword [eax]
inc edx
add ch, ch
jns 0x47ab00
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 0x47abaf
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 0x47ab40
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp - 0x38]
jmp 0x47abd3
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.004bd304
add esp, 0xc
push eax
push dword [ebp - 0x10]
call fcn.004c58b9
add esp, 0x10
cmp eax, 0xffffffff
je 0x47ac65
mov ecx, dword [ebp - 8]
jmp 0x47aa52
mov ecx, dword [ebp - 8]
jmp 0x47abd6
xor edx, edx
test ecx, ecx
je 0x47abd9
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 0x47abc3
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x40]
mov edx, dword [ebp - 0x20]
cmp word [ebp - 0x60], 1
jne 0x47ae30
test ebx, ebx
je 0x47add1
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 0x47adc5
push dword [ebp - 0x28]
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x50]
imul eax, edx
add eax, esi
push eax
call fcn.0047b4e0
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 0x47aaa0
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x74]
add eax, esi
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebp - 0xc]
jb 0x47a990
mov esi, dword [ebp - 0x24]
push dword [ebp - 4]
call fcn.004e21e3
mov eax, dword [ebp - 0x5c]
add esp, 4
test eax, eax
je 0x47ac83
push eax
call fcn.004e21e3
add esp, 4
mov edx, dword [ebp - 0x48]
test edx, edx
je 0x47ad8a
cmp word [ebp - 0x60], 1
jne 0x47ad81
cmp word [ebp - 0x2c], 0x10
jne 0x47ad81
test esi, esi
jne 0x47ad81
mov ebx, dword [ebp - 0xc]
xor ecx, ecx
mov esi, 8
test ebx, ebx
je 0x47ad34
cmp ebx, esi
jb 0x47ad20
cmp dword [0x6f25d8], 2
jl 0x47ad20
movaps xmm1, xmmword [0x58c7f0]
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 0x47ace0
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 0x47ad34
movzx eax, byte [edx + ecx]
cmp esi, eax
cmovle eax, esi
inc ecx
mov esi, eax
cmp ecx, ebx
jb 0x47ad24
xor edx, edx
mov dword [ebp - 0x30], edx
test ebx, ebx
je 0x47ad7e
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x48]
movzx ebx, byte [ebx + edx]
cmp esi, ebx
jge 0x47ad76
mov eax, dword [edi + 0x30]
sub ebx, esi
imul eax, edx
xor edx, edx
add eax, dword [edi + 0x34]
test ecx, ecx
je 0x47ad70
nop
mov cl, bl
lea eax, [eax + 1]
shr byte [eax - 1], cl
inc edx
mov ecx, dword [ebp - 8]
cmp edx, ecx
jb 0x47ad60
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x30]
inc edx
mov dword [ebp - 0x30], edx
cmp edx, eax
jb 0x47ad43
mov edx, dword [ebp - 0x48]
push edx
call fcn.004e21e3
add esp, 4
cmp dword [ebp - 0x58], 0
je 0x47ad9b
push dword [ebp - 0x44]
call fcn.004e21e3
add esp, 4
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x47adab
push eax
call fcn.004e21e3
add esp, 4
movzx eax, word [ebp - 0x94]
add eax, 0xfffffffe
cmp eax, 6
ja case.default.0x47adbe
jmp dword [eax*4 + 0x47b328]
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 4]
push eax
jmp 0x47ac0d
mov eax, dword [ebp - 0x2c]
cmp ax, word [edi + 0x16]
je 0x47ae05
cmp ax, 0x10
je 0x47ae05
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.0047b350
jmp 0x47ac21
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.004de9c0
add esp, 0xc
jmp 0x47ac21
cmp word [ebp - 0x60], 2
jne 0x47ae90
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 0x47b1d6
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.00472ec0
mov ecx, dword [ebp - 8]
inc esi
add edi, 2
cmp esi, ecx
jl 0x47ae7d
dec ebx
xor esi, esi
mov eax, dword [ebp - 0x30]
cmp edi, dword [ebp - 0x14]
jl 0x47ae60
mov ebx, dword [ebp - 0x38]
mov esi, dword [ebp - 0x14]
jmp 0x47ac24
cmp word [edi + 0x16], 0x18
je 0x47aea9
push 6
push 0x18
push dword [ebp - 0xc]
push ecx
mov ecx, edi
call fcn.004741d0
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 0x47ac24
nop word [eax + eax]
movzx eax, word [ebp - 0x60]
mov ecx, dword [ebp - 4]
imul eax, edx
movsd xmm1, qword [0x5f74f8]
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 [0x58c7c0]
addsd xmm0, qword [0x5850b0]
divsd xmm0, qword [0x58c7e0]
movsd qword [ebp - 0x3c], xmm0
call fcn.004f1990
movsd xmm1, qword [0x5f74f8]
lea eax, [esi - 0x100]
cmp esi, 0x7f
movsd qword [ebp - 0x9c], xmm0
cmovbe eax, esi
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [0x58c748]
addsd xmm0, qword [ebp - 0x3c]
call fcn.004f1990
mulsd xmm0, qword [0x58c788]
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 [0x5f7410]
subsd xmm0, xmm1
movsd xmm1, qword [0x5f74f8]
call fcn.004f1990
movsd xmm5, qword [ebp - 0xa8]
movaps xmm2, xmm0
movsd xmm3, qword [ebp - 0x9c]
movaps xmm4, xmm5
mulsd xmm2, qword [0x58c7a8]
movaps xmm1, xmm3
mulsd xmm1, qword [0x58c7b0]
movaps xmm0, xmm5
mulsd xmm4, qword [0x58c7c8]
mulsd xmm0, qword [0x58c790]
mulsd xmm5, qword [0x58c768]
subsd xmm4, xmm1
movaps xmm1, xmm2
mulsd xmm1, qword [0x58c780]
subsd xmm4, xmm1
movaps xmm1, xmm3
mulsd xmm1, qword [0x58c7b8]
mulsd xmm3, qword [0x58c770]
comisd xmm4, xmmword [0x58c750]
subsd xmm1, xmm0
movaps xmm0, xmm2
mulsd xmm0, qword [0x58c758]
subsd xmm5, xmm3
mulsd xmm2, qword [0x58c7a0]
addsd xmm1, xmm0
addsd xmm5, xmm2
movsd qword [ebp - 0x3c], xmm1
movsd qword [ebp - 0xa8], xmm5
jbe 0x47b070
movsd xmm1, qword [0x58c778]
movaps xmm0, xmm4
call fcn.004f1990
mulsd xmm0, qword [0x58c798]
movsd xmm1, qword [ebp - 0x3c]
subsd xmm0, qword [0x58c760]
movsd qword [ebp - 0x9c], xmm0
movsd xmm0, qword [0x58c7d8]
jmp 0x47b084
movsd xmm0, qword [0x58c7d8]
mulsd xmm4, xmm0
movsd qword [ebp - 0x9c], xmm4
movsd xmm2, qword [0x58c750]
comisd xmm1, xmm2
jbe 0x47b0c9
movaps xmm0, xmm1
movsd xmm1, qword [0x58c778]
call fcn.004f1990
mulsd xmm0, qword [0x58c798]
movsd xmm2, qword [0x58c750]
subsd xmm0, qword [0x58c760]
movsd qword [ebp - 0x3c], xmm0
movsd xmm0, qword [0x58c7d8]
jmp 0x47b0d2
mulsd xmm1, xmm0
movsd qword [ebp - 0x3c], xmm1
movsd xmm1, qword [ebp - 0xa8]
comisd xmm1, xmm2
jbe 0x47b105
movaps xmm0, xmm1
movsd xmm1, qword [0x58c778]
call fcn.004f1990
movaps xmm1, xmm0
mulsd xmm1, qword [0x58c798]
subsd xmm1, qword [0x58c760]
jmp 0x47b109
mulsd xmm1, xmm0
movsd xmm0, qword [ebp - 0x9c]
movsd xmm2, qword [0x5f75d8]
mulsd xmm0, xmm2
cvttsd2si eax, xmm0
cmp eax, 0xff
jle 0x47b12e
mov byte [ebp - 0x4a], 0xff
jmp 0x47b13e
test eax, eax
jns 0x47b13b
mov eax, dword [ebp - 0x24]
mov byte [ebp - 0x4a], 0
jmp 0x47b144
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 0x47b15f
mov byte [ebp - 0x4b], 0xff
jmp 0x47b16c
test ecx, ecx
jns 0x47b169
mov byte [ebp - 0x4b], 0
jmp 0x47b16f
mov byte [ebp - 0x4b], cl
mov dword [ebp - 0x24], eax
mulsd xmm1, xmm2
cvttsd2si ecx, xmm1
cmp ecx, 0xff
jle 0x47b185
mov byte [ebp - 0x4c], 0xff
jmp 0x47b192
test ecx, ecx
jns 0x47b18f
mov byte [ebp - 0x4c], 0
jmp 0x47b195
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.00472e50
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 0x47b1c3
dec dword [ebp - 0x54]
xor eax, eax
mov dword [ebp - 0x30], eax
cmp edx, ecx
jb 0x47aed0
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x38], ebx
jmp 0x47ac24
mov esi, dword [ebp - 0x14]
jmp 0x47ac27
push dword [ebp - 0x44]
call fcn.004e21e3
push dword [ebp - 4]
call fcn.004e21e3
push 0xff
lea esi, [edi + 0x44]
push str.Corrupted_tiled_TIFF_file_
push esi
call fcn.004e2880
add esp, 0x14
jmp 0x47b224
push dword [ebp - 4]
call fcn.004e21e3
push 0xff
push str.Cancelled
lea esi, [edi + 0x44]
push esi
call fcn.004e2880
add esp, 0x10
mov al, byte [0x5f53ae]
mov ecx, 0x5f53ae
mov byte [ebp + 0xb], al
lea eax, [ebp + 0xb]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x47b254
test dl, dl
je 0x47b250
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x47b254
add eax, 2
add ecx, 2
test dl, dl
jne 0x47b234
xor eax, eax
jmp 0x47b259
sbb eax, eax
or eax, 1
test eax, eax
je 0x47b26f
push 0xff
lea eax, [ebp + 0xb]
push eax
push esi
call fcn.004e2880
add esp, 0xc
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x47b27f
push eax
call fcn.004bb624
add esp, 4
cmp dword [edi + 0x148], 0xffffffff
jne 0x47b298
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.00474c60
mov al, byte [0x5f53ae]
mov byte [ebp + 0xb], al
jmp 0x47b310
push 1
push 0
mov ecx, edi
call fcn.004747e0
jmp case.0x47adbe.2
push 1
push 0
mov ecx, edi
call fcn.004747e0
mov al, byte [0x5f53ae]
mov byte [ebp + 0xb], al
jmp 0x47b310
push 0
mov ecx, edi
call fcn.004754b0
jmp case.0x47adbe.2
push 0
mov ecx, edi
call fcn.00474ff0
mov al, byte [0x5f53ae]
mov byte [ebp + 0xb], al
jmp 0x47b310
push 0
mov ecx, edi
call fcn.00474ff0
jmp case.0x47adbe.2
push 0
mov ecx, edi
call fcn.004754b0
mov byte [ebp + 0xb], 0
push dword [ebp - 0x10]
call fcn.004bb624
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4