Function at 0x10084690
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, ecx
xor ecx, ecx
cmp dword [ebp + 0x18], 0x10
push ebx
sete cl
mov dword [ebp - 0x24], eax
mov eax, dword [eax]
inc ecx
push esi
push edi
mov esi, ecx
mov edi, edx
mov edx, dword [ebp + 0xc]
mov eax, dword [eax + 8]
imul esi, edx
mov dword [ebp - 0x20], eax
mov ebx, esi
mov dword [ebp - 4], esi
imul ebx, dword [ebp + 0x10]
mov dword [ebp - 0x30], ebx
mov ebx, eax
imul ebx, ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0xc], ebx
cmp edx, eax
je 0x100846f7
inc eax
cmp edx, eax
je 0x100846f7
push 0x11c8
push 0x101c6b40
push str.out_n__s__img_n__out_n__s__img_n1
call fcn.10140c96
mov ecx, dword [ebp + 0x10]
add esp, 0xc
test ecx, ecx
js 0x1008574e
mov eax, dword [ebp + 0x14]
test eax, eax
js 0x1008574e
je 0x10084721
xor edx, edx
mov eax, 0x7fffffff
div dword [ebp + 0x14]
cmp ecx, eax
jg 0x1008574e
mov eax, dword [ebp + 0x14]
imul ecx, eax
test ecx, ecx
js 0x1008574e
test esi, esi
js 0x1008574e
je 0x10084746
mov eax, 0x7fffffff
cdq
idiv esi
cmp ecx, eax
jg 0x1008574e
mov eax, dword [ebp - 0x30]
imul eax, dword [ebp + 0x14]
push eax
call fcn.101412cf
mov ecx, dword [ebp - 0x24]
add esp, 4
mov dword [ecx + 0xc], eax
test eax, eax
je 0x10085758
mov eax, dword [ebp - 0x20]
test eax, eax
js 0x1008572c
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x1008478b
xor edx, edx
mov eax, 0x7fffffff
div ecx
cmp dword [ebp - 0x20], eax
jg 0x1008572c
mov eax, dword [ebp - 0x20]
mov edx, eax
imul edx, ecx
mov dword [ebp - 0x28], edx
test edx, edx
js 0x1008572c
mov ecx, dword [ebp + 0x18]
test ecx, ecx
js 0x1008572c
je 0x100847bc
xor edx, edx
mov eax, 0x7fffffff
div ecx
mov edx, dword [ebp - 0x28]
cmp edx, eax
jg 0x1008572c
mov eax, edx
imul eax, ecx
cmp eax, 0x7ffffff8
jg 0x1008572c
mov eax, edx
imul eax, ecx
mov ecx, dword [ebp + 0x14]
add eax, 7
shr eax, 3
mov dword [ebp - 0x2c], eax
inc eax
imul eax, ecx
cmp dword [ebp + 8], eax
jae 0x10084808
mov ecx, dword [0x10228440]
mov eax, dword fs:[0x2c]
pop edi
pop esi
pop ebx
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], str.not_enough_pixels
xor eax, eax
mov esp, ebp
pop ebp
ret
xor eax, eax
mov dword [ebp - 0x38], eax
test ecx, ecx
je 0x10085332
mov dword [ebp - 0x28], edx
nop dword [eax + eax]
imul eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx + 0xc]
movzx ecx, byte [edi]
add edx, eax
inc edi
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], ecx
cmp ecx, 4
ja 0x10085310
cmp dword [ebp + 0x18], 8
jge 0x10084870
mov ebx, dword [ebp + 0x10]
cmp dword [ebp - 0x2c], ebx
ja 0x100852ee
mov eax, dword [ebp + 0xc]
imul eax, ebx
mov ebx, 1
mov dword [ebp - 0xc], ebx
sub eax, dword [ebp - 0x2c]
add edx, eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x44], eax
mov eax, edx
sub eax, dword [ebp - 0x30]
cmp dword [ebp - 0x38], 0
mov dword [ebp - 0x1c], eax
jne 0x10084888
movzx ecx, byte [ecx + 0x101c7cf0]
mov dword [ebp - 0x14], ecx
test ebx, ebx
jle 0x1008499e
sub eax, edi
mov ecx, ebx
mov dword [ebp - 8], eax
mov edx, edi
mov eax, dword [ebp - 0x18]
sub eax, edi
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
mov esi, edx
cmp eax, 6
ja case.default.0x100848ae
jmp dword [eax*4 + 0x1008577c]
inc edx
sub ecx, 1
mov dword [ebp - 0x34], ecx
jne 0x100848a7
jmp 0x10084992
mov ebx, dword [ebp - 0x10]
mov al, byte [edx]
inc edx
mov byte [esi + ebx], al
mov ebx, dword [ebp - 0xc]
sub ecx, 1
je 0x10084992
mov esi, edx
jmp case.0x100848ae.0
mov ebx, dword [ebp - 0x10]
mov al, byte [edx]
inc edx
mov byte [esi + ebx], al
mov ebx, dword [ebp - 0xc]
sub ecx, 1
je 0x10084992
mov esi, edx
jmp case.0x100848ae.1
mov eax, dword [ebp - 8]
mov ebx, dword [ebp - 0x10]
mov al, byte [eax + esi]
add al, byte [edx]
inc edx
mov byte [esi + ebx], al
mov ebx, dword [ebp - 0xc]
sub ecx, 1
je 0x10084992
mov esi, edx
jmp case.0x100848ae.2
mov eax, dword [ebp - 8]
mov ebx, dword [ebp - 0x10]
mov al, byte [eax + esi]
shr al, 1
add al, byte [edx]
inc edx
mov byte [esi + ebx], al
mov ebx, dword [ebp - 0xc]
sub ecx, 1
je 0x10084992
mov esi, edx
jmp case.0x100848ae.3
mov eax, dword [ebp - 8]
mov cl, byte [eax + esi]
xor al, al
cmp al, cl
sbb al, al
and al, cl
mov ecx, dword [ebp - 0x10]
add al, byte [edx]
inc edx
sub dword [ebp - 0x34], 1
mov byte [esi + ecx], al
je 0x10084992
mov esi, edx
jmp case.0x100848ae.4
mov ebx, dword [ebp - 0x10]
mov al, byte [edx]
inc edx
mov byte [esi + ebx], al
mov ebx, dword [ebp - 0xc]
sub ecx, 1
je 0x10084992
mov esi, edx
jmp case.0x100848ae.5
mov ebx, dword [ebp - 0x10]
nop dword [eax]
mov al, byte [edx]
inc edx
mov byte [esi + ebx], al
sub ecx, 1
je 0x1008498f
mov esi, edx
jmp 0x10084980
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov esi, dword [ebp - 4]
cmp dword [ebp + 0x18], 8
jne 0x100849d0
mov esi, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x14]
cmp dword [ebp - 0x20], esi
je 0x100849b9
mov ecx, dword [ebp - 0x20]
mov byte [edx + ecx], 0xff
mov ecx, dword [ebp - 0x14]
add edi, dword [ebp - 0x20]
lea edx, [esi + eax]
add esi, dword [ebp - 0x18]
mov dword [ebp - 8], edi
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x1c], esi
jmp 0x10084a1c
cmp dword [ebp + 0x18], 0x10
jne 0x100849fd
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x14]
je 0x100849e7
mov word [edx + ebx], 0xffff
add edi, ebx
lea edx, [eax + esi]
add esi, dword [ebp - 0x18]
mov dword [ebp - 8], edi
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x1c], esi
jmp 0x10084a1c
mov edx, dword [ebp - 0x1c]
inc edi
mov esi, dword [ebp - 0x18]
inc edx
inc esi
mov dword [ebp - 8], edi
cmp dword [ebp + 0x18], 8
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x1c], esi
jl 0x10084f8f
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp + 0xc]
je 0x10084f8f
inc eax
cmp eax, dword [ebp + 0xc]
je 0x10084a45
push 0x121c
push 0x101c6ec0
push str.img_n1__out_n
call fcn.10140c96
add esp, 0xc
mov ecx, dword [ebp - 0x14]
cmp ecx, 6
ja case.default.0x10084a56
mov eax, dword [ebp - 0x34]
mov edi, eax
jmp dword [ecx*4 + 0x10085798]
mov edx, dword [ebp + 0x10]
mov edi, eax
mov ecx, dword [ebp - 4]
dec edx
mov dword [ebp - 0x34], edx
cmp edx, 1
jb 0x10084f58
test ebx, ebx
jle 0x10084a9a
mov eax, edi
mov edx, ebx
sub eax, esi
mov ecx, esi
mov dword [ebp - 0x40], eax
mov ebx, eax
mov al, byte [ebx + ecx]
lea ecx, [ecx + 1]
mov byte [ecx - 1], al
sub edx, 1
jne 0x10084a83
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x34]
mov byte [ebx + esi], 0xff
add edi, ebx
add esi, ecx
sub edx, 1
mov dword [ebp - 0x34], edx
jne 0x10084a72
jmp 0x10084f58
mov edx, dword [ebp + 0x10]
mov edi, eax
lea ecx, [edx - 1]
mov dword [ebp - 0x1c], ecx
cmp ecx, 1
mov ecx, dword [ebp - 4]
jb 0x10084f5b
mov eax, esi
mov dword [ebp - 8], edi
sub eax, ecx
mov dword [ebp - 0x34], eax
xor edx, edx
test ebx, ebx
jle 0x10084aff
mov dword [ebp - 0x40], edi
sub edi, esi
nop dword [eax + eax]
mov ebx, dword [ebp - 0x34]
lea ecx, [edx + esi]
mov al, byte [ecx + edi]
add al, byte [ebx + edx]
inc edx
mov ebx, dword [ebp - 0xc]
mov byte [ecx], al
cmp edx, ebx
jl 0x10084ae0
mov edi, dword [ebp - 8]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x34]
mov byte [esi + ebx], 0xff
add edi, ebx
add eax, ecx
mov dword [ebp - 8], edi
add esi, ecx
mov dword [ebp - 0x34], eax
sub dword [ebp - 0x1c], 1
jne 0x10084ad0
jmp 0x10084f58
mov edx, dword [ebp + 0x10]
mov edi, eax
lea ecx, [edx - 1]
mov dword [ebp - 0x3c], ecx
cmp ecx, 1
jb 0x10084f50
mov edx, dword [ebp - 0x10]
lea eax, [esi + ebx]
mov ecx, 0x20
mov dword [ebp - 8], edi
sub ecx, ebx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x40], ecx
xor ecx, ecx
test ebx, ebx
jle 0x10084cc3
cmp ebx, 8
jb 0x10084c8b
lea eax, [edi - 1]
add eax, ebx
cmp esi, eax
ja 0x10084b6d
lea eax, [esi - 1]
add eax, ebx
cmp eax, edi
jae 0x10084c8b
lea eax, [edx - 1]
add eax, ebx
cmp esi, eax
ja 0x10084b83
lea eax, [esi - 1]
add eax, ebx
cmp eax, edx
jae 0x10084c8b
cmp ebx, 0x40
jb 0x10084c39
mov eax, ebx
and eax, 0x8000003f
jns 0x10084b9a
dec eax
or eax, 0xffffffc0
inc eax
mov dword [ebp - 0x34], ebx
mov ebx, edx
sub dword [ebp - 0x34], eax
sub ebx, edi
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x40]
mov dword [ebp - 0x14], ebx
mov ebx, esi
sub ebx, edi
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x4c], ebx
lea eax, [edi + 0x10]
mov edi, dword [ebp - 0x4c]
mov ebx, edx
sub ebx, esi
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x50], ebx
mov ebx, dword [ebp - 0x48]
nop word [eax + eax]
movups xmm0, xmmword [eax - 0x10]
lea eax, [eax + 0x40]
movups xmm1, xmmword [ecx + edx]
lea ebx, [ebx + 0x40]
paddb xmm1, xmm0
movups xmmword [ebx - 0x60], xmm1
movups xmm1, xmmword [eax + esi - 0x40]
mov esi, dword [ebp - 0x50]
movups xmm0, xmmword [eax - 0x40]
paddb xmm1, xmm0
movups xmmword [eax + edi - 0x40], xmm1
movups xmm1, xmmword [esi + ebx - 0x40]
mov esi, dword [ebp - 0x14]
movups xmm0, xmmword [eax - 0x30]
paddb xmm1, xmm0
movups xmmword [ebx - 0x40], xmm1
movups xmm1, xmmword [edx + ecx + 0x30]
add ecx, 0x40
movups xmm0, xmmword [eax - 0x20]
paddb xmm1, xmm0
movups xmmword [ebx - 0x30], xmm1
cmp ecx, dword [ebp - 0x34]
jl 0x10084bd0
mov ebx, dword [ebp - 0xc]
mov eax, ebx
mov esi, dword [ebp - 0x1c]
and al, 0x3f
mov edi, dword [ebp - 8]
cmp al, 8
jb 0x10084c87
mov eax, ebx
and eax, 0x80000007
jns 0x10084c47
dec eax
or eax, 0xfffffff8
inc eax
mov dword [ebp - 0x34], ebx
mov ebx, edx
sub dword [ebp - 0x34], eax
sub ebx, edi
mov dword [ebp - 0x50], ebx
lea eax, [ecx + edi]
mov ebx, dword [ebp - 0xc]
sub esi, edi
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x4c], esi
movq xmm1, qword [eax + edx]
lea eax, [eax + 8]
movq xmm0, qword [eax - 8]
add ecx, 8
paddb xmm1, xmm0
movq qword [esi + eax - 8], xmm1
cmp ecx, dword [ebp - 0x34]
jl 0x10084c62
mov esi, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x10]
cmp ecx, ebx
jge 0x10084cc0
mov eax, dword [ebp - 0x10]
lea edx, [ecx + edi]
sub esi, edi
mov dword [ebp - 0x50], ebx
sub eax, edi
mov dword [ebp - 0x48], esi
sub ebx, ecx
mov dword [ebp - 0x4c], eax
mov ecx, dword [ebp - 0x48]
mov esi, eax
mov al, byte [edx + esi]
lea edx, [edx + 1]
add al, byte [edx - 1]
mov byte [ecx + edx - 1], al
sub ebx, 1
jne 0x10084ca5
mov esi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 4]
add edi, ebx
mov byte [eax], 0xff
add esi, ecx
add eax, ecx
mov dword [ebp - 8], edi
add edx, ecx
mov dword [ebp - 0x1c], esi
sub dword [ebp - 0x3c], 1
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x10], edx
jne 0x10084b44
jmp 0x10084f58
mov edx, dword [ebp + 0x10]
mov edi, eax
lea ecx, [edx - 1]
mov dword [ebp - 0x3c], ecx
cmp ecx, 1
mov ecx, dword [ebp - 4]
jb 0x10084f5b
mov eax, dword [ebp - 0x10]
mov edx, esi
sub edx, ecx
mov dword [ebp - 8], edi
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x50], 0
test ebx, ebx
jle 0x10084d61
sub eax, edi
mov edx, edi
sub esi, edi
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], esi
mov edi, eax
mov esi, dword [ebp - 0x50]
nop dword [eax]
mov eax, dword [ebp - 0x34]
lea edx, [edx + 1]
movzx ecx, byte [eax + esi]
inc esi
movzx eax, byte [edx + edi - 1]
add ecx, eax
mov eax, dword [ebp - 0x48]
shr ecx, 1
add cl, byte [edx - 1]
mov byte [eax + edx - 1], cl
cmp esi, ebx
jl 0x10084d30
mov esi, dword [ebp - 0x1c]
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x34]
mov byte [esi + ebx], 0xff
add edi, ebx
add esi, ecx
mov dword [ebp - 8], edi
add edx, ecx
mov dword [ebp - 0x1c], esi
add eax, ecx
mov dword [ebp - 0x34], edx
sub dword [ebp - 0x3c], 1
mov dword [ebp - 0x10], eax
jne 0x10084d10
jmp 0x10084f58
mov edx, dword [ebp + 0x10]
mov edi, eax
lea ecx, [edx - 1]
mov dword [ebp - 0x40], ecx
cmp ecx, 1
mov ecx, dword [ebp - 4]
jb 0x10084f5b
mov eax, dword [ebp - 0x10]
mov edx, esi
sub edx, ecx
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], edx
test ebx, ebx
jle 0x10084e4e
mov dword [ebp - 0x50], edx
mov edx, eax
sub edx, esi
mov dword [ebp - 0x18], ebx
mov ebx, dword [ebp - 0x50]
sub eax, edi
mov dword [ebp - 0x4c], edi
mov esi, edi
mov dword [ebp - 0x58], edx
mov dword [ebp - 0x48], eax
nop word [eax + eax]
movzx eax, byte [ebx + edx]
mov ecx, dword [ebp - 0x48]
movzx edx, byte [ebx]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x34], edx
movzx edi, byte [esi + ecx]
mov ecx, edx
sub ecx, eax
mov dword [ebp - 0x54], edi
add edi, ecx
mov eax, edi
sub edi, dword [ebp - 0x3c]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x50], eax
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x4c], eax
mov eax, edi
cdq
mov ecx, eax
mov eax, dword [ebp - 0x50]
xor ecx, edx
sub ecx, edx
mov edx, dword [ebp - 0x4c]
cmp eax, edx
jg 0x10084e1d
cmp eax, ecx
jle 0x10084e29
mov eax, dword [ebp - 0x3c]
cmp edx, ecx
cmovle eax, dword [ebp - 0x54]
mov dword [ebp - 0x34], eax
mov al, byte [esi]
inc esi
mov ecx, dword [ebp - 4]
add al, byte [ebp - 0x34]
mov edx, dword [ebp - 0x58]
mov byte [ebx + ecx], al
inc ebx
sub dword [ebp - 0x18], 1
jne 0x10084dd0
mov esi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
mov byte [esi + ebx], 0xff
add edi, ebx
add esi, ecx
mov dword [ebp - 8], edi
add edx, ecx
mov dword [ebp - 0x1c], esi
add eax, ecx
mov dword [ebp - 0x14], edx
sub dword [ebp - 0x40], 1
mov dword [ebp - 0x10], eax
jne 0x10084da8
jmp 0x10084f58
mov edx, dword [ebp + 0x10]
mov edi, eax
lea ecx, [edx - 1]
mov dword [ebp - 0x40], ecx
cmp ecx, 1
mov ecx, dword [ebp - 4]
jb 0x10084f5b
mov eax, esi
mov dword [ebp - 8], edi
sub eax, ecx
mov dword [ebp - 0x34], eax
xor edx, edx
test ebx, ebx
jle 0x10084ebf
sub edi, esi
mov dword [ebp - 0x58], edi
mov eax, dword [ebp - 0x34]
lea ecx, [edx + esi]
mov al, byte [eax + edx]
inc edx
shr al, 1
add al, byte [ecx + edi]
mov byte [ecx], al
cmp edx, ebx
jl 0x10084ea1
mov edi, dword [ebp - 8]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x34]
mov byte [esi + ebx], 0xff
add edi, ebx
add eax, ecx
mov dword [ebp - 8], edi
add esi, ecx
mov dword [ebp - 0x34], eax
sub dword [ebp - 0x40], 1
jne 0x10084e96
jmp 0x10084f58
mov edx, dword [ebp + 0x10]
mov edi, eax
lea ecx, [edx - 1]
mov dword [ebp - 0x1c], ecx
cmp ecx, 1
mov ecx, dword [ebp - 4]
jb 0x10084f5b
mov eax, dword [ebp - 0x1c]
mov edx, esi
sub edx, ecx
mov dword [ebp - 8], edi
mov dword [ebp - 0x34], edx
nop
mov dword [ebp - 0x58], 0
test ebx, ebx
jle 0x10084f36
mov eax, edi
mov edi, dword [ebp - 0x58]
sub eax, esi
mov dword [ebp - 0x54], eax
mov cl, byte [edx + edi]
lea edx, [edi + esi]
mov al, byte [edx + eax]
inc edi
add al, cl
mov byte [edx], al
mov eax, dword [ebp - 0x54]
mov edx, dword [ebp - 0x34]
cmp edi, ebx
jl 0x10084f15
mov edi, dword [ebp - 8]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x1c]
mov byte [esi + ebx], 0xff
add edi, ebx
add edx, ecx
mov dword [ebp - 8], edi
add esi, ecx
mov dword [ebp - 0x34], edx
sub eax, 1
mov dword [ebp - 0x1c], eax
jne 0x10084f00
jmp 0x10084f58
mov ecx, dword [ebp - 4]
jmp 0x10084f5b
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0x10]
cmp dword [ebp + 0x18], 0x10
jne 0x100852d8
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc]
inc eax
test edx, edx
je 0x100852d8
add eax, dword [ebp - 0x5c]
add eax, ebx
nop dword [eax]
mov byte [eax], 0xff
add eax, ecx
sub edx, 1
jne 0x10084f80
jmp 0x100852d8
mov eax, dword [ebp - 0x44]
dec eax
imul eax, ebx
mov dword [ebp - 0x18], eax
cmp ecx, 6
ja case.default.0x10084fa2
jmp dword [ecx*4 + 0x100857b4]
push dword [ebp - 0x18]
push edi
push esi
call fcn.10137e80
add esp, 0xc
jmp case.default.0x10084fa2
xor edx, edx
test eax, eax
jle case.default.0x10084fa2
mov eax, esi
sub eax, ebx
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x5c], eax
mov eax, edi
mov edi, dword [ebp - 0x5c]
sub eax, esi
mov dword [ebp - 0x58], eax
nop dword [eax]
lea ecx, [esi + edx]
mov al, byte [ecx + eax]
add al, byte [edi + edx]
inc edx
mov byte [ecx], al
mov eax, dword [ebp - 0x58]
cmp edx, ebx
jl 0x10084fe0
jmp 0x100852cf
xor ecx, ecx
test eax, eax
jle case.default.0x10084fa2
cmp eax, 8
jb 0x1008514e
dec eax
mov dword [ebp - 0x5c], eax
lea ebx, [esi + eax]
add eax, edi
mov dword [ebp - 0x40], ebx
cmp esi, eax
ja 0x10085023
cmp ebx, edi
jae 0x1008514e
mov eax, dword [ebp - 0x5c]
add eax, edx
cmp esi, eax
ja 0x10085035
cmp dword [ebp - 0x40], edx
jae 0x1008514e
mov eax, dword [ebp - 0x18]
cmp eax, 0x40
jb 0x100850ef
and eax, 0x8000003f
jns 0x1008504d
dec eax
or eax, 0xffffffc0
inc eax
mov ebx, dword [ebp - 0x18]
sub ebx, eax
lea eax, [esi + 0x20]
mov dword [ebp - 0x50], ebx
mov ebx, edx
sub ebx, edi
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x40], ebx
lea eax, [edi + 0x10]
mov ebx, esi
sub ebx, edi
mov dword [ebp - 0x58], ebx
mov ebx, edx
mov edi, dword [ebp - 0x58]
sub ebx, esi
mov esi, dword [ebp - 0x40]
mov dword [ebp - 0x54], ebx
mov ebx, dword [ebp - 0x5c]
nop dword [eax]
movups xmm0, xmmword [eax - 0x10]
lea eax, [eax + 0x40]
movups xmm1, xmmword [edx + ecx]
lea ebx, [ebx + 0x40]
paddb xmm1, xmm0
movups xmmword [ebx - 0x60], xmm1
movups xmm1, xmmword [esi + eax - 0x40]
mov esi, dword [ebp - 0x54]
movups xmm0, xmmword [eax - 0x40]
paddb xmm1, xmm0
movups xmmword [edi + eax - 0x40], xmm1
movups xmm1, xmmword [esi + ebx - 0x40]
mov esi, edx
movups xmm0, xmmword [eax - 0x30]
paddb xmm1, xmm0
movups xmmword [ebx - 0x40], xmm1
movups xmm1, xmmword [esi + ecx + 0x30]
mov esi, dword [ebp - 0x40]
add ecx, 0x40
movups xmm0, xmmword [eax - 0x20]
paddb xmm1, xmm0
movups xmmword [ebx - 0x30], xmm1
cmp ecx, dword [ebp - 0x50]
jl 0x10085080
mov eax, dword [ebp - 0x18]
mov esi, dword [ebp - 0x1c]
and al, 0x3f
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
cmp al, 8
jb 0x10085145
mov eax, dword [ebp - 0x18]
and eax, 0x80000007
jns 0x100850fb
dec eax
or eax, 0xfffffff8
inc eax
mov ebx, dword [ebp - 0x18]
sub ebx, eax
lea eax, [edi + ecx]
mov dword [ebp - 0x54], ebx
mov ebx, edx
sub ebx, edi
mov dword [ebp - 0x5c], ebx
mov ebx, esi
sub ebx, edi
mov dword [ebp - 0x58], ebx
mov ebx, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x58]
nop word [eax + eax]
movq xmm1, qword [eax + ebx]
lea eax, [eax + 8]
movq xmm0, qword [eax - 8]
add ecx, 8
paddb xmm1, xmm0
movq qword [edx + eax - 8], xmm1
cmp ecx, dword [ebp - 0x54]
jl 0x10085120
mov ebx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0x18]
jge case.default.0x10084fa2
mov ebx, dword [ebp - 0x18]
lea eax, [edi + ecx]
sub edx, edi
mov dword [ebp - 0x5c], eax
sub esi, edi
sub ebx, ecx
mov ecx, eax
nop
mov al, byte [ecx + edx]
lea ecx, [ecx + 1]
add al, byte [ecx - 1]
mov byte [esi + ecx - 1], al
sub ebx, 1
jne 0x10085160
jmp 0x100852d2
xor ecx, ecx
mov dword [ebp - 0x40], ecx
test eax, eax
jle case.default.0x10084fa2
mov eax, esi
mov dword [ebp - 0x5c], edi
sub eax, ebx
sub edx, edi
mov ebx, dword [ebp - 0x18]
sub esi, edi
mov dword [ebp - 0x58], eax
nop word [eax + eax]
movzx ecx, byte [eax + ecx]
lea edi, [edi + 1]
movzx eax, byte [edi + edx - 1]
add ecx, eax
mov eax, dword [ebp - 0x58]
shr ecx, 1
add cl, byte [edi - 1]
mov byte [esi + edi - 1], cl
mov ecx, dword [ebp - 0x40]
inc ecx
mov dword [ebp - 0x40], ecx
cmp ecx, ebx
jl 0x100851a0
jmp 0x100852cf
test eax, eax
jle case.default.0x10084fa2
mov ecx, esi
mov dword [ebp - 0x34], edi
sub ecx, ebx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x5c], ecx
mov ecx, edx
sub ecx, esi
sub edx, edi
mov edi, dword [ebp - 0x5c]
mov dword [ebp - 0x58], ecx
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x10], edx
movzx esi, byte [edx + ecx]
mov eax, dword [ebp - 0x58]
movzx edx, byte [edi]
mov ecx, edx
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x3c], edx
movzx eax, byte [edi + eax]
sub ecx, eax
mov dword [ebp - 0x40], eax
add esi, ecx
mov eax, esi
sub esi, dword [ebp - 0x40]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x5c], eax
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x54], eax
mov eax, esi
cdq
mov ecx, eax
mov eax, dword [ebp - 0x5c]
xor ecx, edx
sub ecx, edx
mov edx, dword [ebp - 0x54]
cmp eax, edx
jg 0x1008523e
cmp eax, ecx
jle 0x1008524a
mov eax, dword [ebp - 0x40]
cmp edx, ecx
cmovle eax, dword [ebp - 0x50]
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x10]
mov al, byte [ecx]
inc ecx
add al, byte [ebp - 0x3c]
mov byte [edi + ebx], al
inc edi
sub dword [ebp - 0x1c], 1
mov dword [ebp - 0x34], ecx
jne 0x100851f1
mov edi, dword [ebp - 8]
jmp case.default.0x10084fa2
xor edx, edx
test eax, eax
jle case.default.0x10084fa2
mov eax, esi
sub eax, ebx
mov dword [ebp - 0x5c], eax
mov eax, edi
mov edi, dword [ebp - 0x5c]
sub eax, esi
mov dword [ebp - 0x58], eax
nop
mov al, byte [edi + edx]
lea ecx, [esi + edx]
mov ebx, dword [ebp - 0x58]
inc edx
shr al, 1
add al, byte [ecx + ebx]
mov byte [ecx], al
cmp edx, dword [ebp - 0x18]
jl 0x10085280
jmp 0x100852cf
mov dword [ebp - 0x5c], 0
test eax, eax
jle case.default.0x10084fa2
mov eax, esi
mov ecx, edi
mov edi, dword [ebp - 0x5c]
sub eax, ebx
mov ebx, dword [ebp - 0x18]
sub ecx, esi
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x58], ecx
mov cl, byte [eax + edi]
lea edx, [esi + edi]
mov eax, dword [ebp - 0x58]
inc edi
mov al, byte [edx + eax]
add al, cl
mov byte [edx], al
mov eax, dword [ebp - 0x54]
cmp edi, ebx
jl 0x100852b7
mov edi, dword [ebp - 8]
mov ebx, dword [ebp - 0xc]
add edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp + 0x14]
inc eax
mov dword [ebp - 0x38], eax
cmp eax, ecx
jae 0x10085332
mov esi, dword [ebp - 4]
jmp 0x10084820
mov ecx, dword [0x10228440]
mov eax, dword fs:[0x2c]
pop edi
pop esi
pop ebx
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], str.invalid_width
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x10228440]
mov eax, dword fs:[0x2c]
pop edi
pop esi
pop ebx
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], str.invalid_filter
xor eax, eax
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0x18]
cmp edi, 8
jge 0x100856e8
test ecx, ecx
je 0x10085720
mov ebx, dword [ebp + 0xc]
imul ebx, dword [ebp + 0x10]
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x54], ebx
mov eax, dword [ebp - 0x24]
mov esi, ebx
sub esi, dword [ebp - 0x2c]
mov eax, dword [eax + 0xc]
add esi, eax
add esi, ecx
cmp dword [ebp + 0x1c], 0
lea edx, [eax + ecx]
jne 0x10085375
mov bl, byte [edi + 0x101c7ce4]
jmp 0x10085377
mov bl, 1
cmp edi, 4
jne 0x100853d3
mov ecx, dword [ebp - 0x28]
cmp ecx, 2
jl 0x100853c1
mov edi, ecx
shr edi, 1
mov eax, edi
neg eax
lea ecx, [ecx + eax*2]
mov dword [ebp - 0x5c], ecx
movzx ecx, byte [esi]
shr cl, 4
movzx ecx, cl
movzx eax, bl
imul ecx, eax
movzx eax, bl
mov byte [edx], cl
movzx ecx, byte [esi]
inc esi
and cl, 0xf
movzx ecx, cl
imul ecx, eax
mov byte [edx + 1], cl
add edx, 2
sub edi, 1
jne 0x10085392
mov ecx, dword [ebp - 0x5c]
test ecx, ecx
jle 0x10085629
mov cl, byte [esi]
shr cl, 4
jmp 0x1008561e
cmp edi, 2
jne 0x100854a3
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x18], ecx
cmp ecx, 4
jl 0x10085459
mov edi, ecx
shr edi, 2
mov eax, edi
neg eax
lea ecx, [ecx + eax*4]
mov dword [ebp - 0x18], ecx
nop word [eax + eax]
movzx ecx, byte [esi]
shr cl, 6
movzx ecx, cl
movzx eax, bl
imul ecx, eax
movzx eax, bl
mov byte [edx], cl
movzx ecx, byte [esi]
shr cl, 4
and cl, 3
movzx ecx, cl
imul ecx, eax
movzx eax, bl
mov byte [edx + 1], cl
movzx ecx, byte [esi]
shr cl, 2
and cl, 3
movzx ecx, cl
imul ecx, eax
movzx eax, bl
mov byte [edx + 2], cl
movzx ecx, byte [esi]
inc esi
and cl, 3
movzx ecx, cl
imul ecx, eax
mov byte [edx + 3], cl
add edx, 4
sub edi, 1
jne 0x10085400
mov ecx, dword [ebp - 0x18]
test ecx, ecx
jle 0x10085471
mov cl, byte [esi]
shr cl, 6
movzx ecx, cl
movzx eax, bl
imul ecx, eax
mov byte [edx], cl
inc edx
mov ecx, dword [ebp - 0x18]
cmp ecx, 1
jle 0x1008548d
mov cl, byte [esi]
shr cl, 4
and cl, 3
movzx eax, bl
movzx ecx, cl
imul ecx, eax
mov byte [edx], cl
inc edx
mov ecx, dword [ebp - 0x18]
cmp ecx, 2
jle 0x10085629
mov cl, byte [esi]
shr cl, 2
and cl, 3
jmp 0x1008561e
cmp edi, 1
jne 0x1008562c
mov edi, dword [ebp - 0x28]
cmp edi, 8
jl 0x10085580
mov eax, edi
shr eax, 3
mov dword [ebp - 0x5c], eax
neg eax
lea edi, [edi + eax*8]
mov dword [ebp - 0x58], edi
mov edi, dword [ebp - 0x5c]
nop dword [eax + eax]
movzx ecx, byte [esi]
shr cl, 7
movzx ecx, cl
movzx eax, bl
imul ecx, eax
movzx eax, bl
mov byte [edx], cl
movzx ecx, byte [esi]
shr cl, 6
and cl, 1
movzx ecx, cl
imul ecx, eax
movzx eax, bl
mov byte [edx + 1], cl
movzx ecx, byte [esi]
shr cl, 5
and cl, 1
movzx ecx, cl
imul ecx, eax
movzx eax, bl
mov byte [edx + 2], cl
movzx ecx, byte [esi]
shr cl, 4
and cl, 1
movzx ecx, cl
imul ecx, eax
movzx eax, bl
mov byte [edx + 3], cl
movzx ecx, byte [esi]
shr cl, 3
and cl, 1
movzx ecx, cl
imul ecx, eax
movzx eax, bl
mov byte [edx + 4], cl
movzx ecx, byte [esi]
shr cl, 2
and cl, 1
movzx ecx, cl
imul ecx, eax
movzx eax, bl
mov byte [edx + 5], cl
movzx ecx, byte [esi]
shr cl, 1
and cl, 1
movzx ecx, cl
imul ecx, eax
movzx eax, bl
mov byte [edx + 6], cl
movzx ecx, byte [esi]
inc esi
and cl, 1
movzx ecx, cl
imul ecx, eax
mov byte [edx + 7], cl
add edx, 8
sub edi, 1
jne 0x100854d0
mov edi, dword [ebp - 0x58]
test edi, edi
jle 0x10085595
mov cl, byte [esi]
shr cl, 7
movzx eax, bl
movzx ecx, cl
imul ecx, eax
mov byte [edx], cl
inc edx
cmp edi, 1
jle 0x100855ae
mov cl, byte [esi]
shr cl, 6
and cl, 1
movzx eax, bl
movzx ecx, cl
imul ecx, eax
mov byte [edx], cl
inc edx
cmp edi, 2
jle 0x100855c7
mov cl, byte [esi]
shr cl, 5
and cl, 1
movzx eax, bl
movzx ecx, cl
imul ecx, eax
mov byte [edx], cl
inc edx
cmp edi, 3
jle 0x100855e0
mov cl, byte [esi]
shr cl, 4
and cl, 1
movzx eax, bl
movzx ecx, cl
imul ecx, eax
mov byte [edx], cl
inc edx
cmp edi, 4
jle 0x100855f9
mov cl, byte [esi]
shr cl, 3
and cl, 1
movzx eax, bl
movzx ecx, cl
imul ecx, eax
mov byte [edx], cl
inc edx
cmp edi, 5
jle 0x10085612
mov cl, byte [esi]
shr cl, 2
and cl, 1
movzx eax, bl
movzx ecx, cl
imul ecx, eax
mov byte [edx], cl
inc edx
cmp edi, 6
jle 0x10085629
mov cl, byte [esi]
shr cl, 1
and cl, 1
movzx eax, bl
movzx ecx, cl
imul ecx, eax
mov byte [edx], cl
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
cmp edx, dword [ebp + 0xc]
je 0x100856c6
mov esi, dword [ebp - 0x24]
mov edi, dword [esi + 0xc]
add edi, ecx
cmp edx, 1
jne 0x10085662
mov ecx, dword [ebp + 0x10]
sub ecx, edx
js 0x100856c3
mov byte [edi + ecx*2 + 1], 0xff
mov al, byte [ecx + edi]
mov byte [edi + ecx*2], al
sub ecx, 1
jns 0x10085650
jmp 0x100856c3
cmp edx, 3
je 0x10085681
push 0x1275
push 0x101c6cd0
push str.img_n__3
call fcn.10140c96
mov ecx, dword [ebp - 0x1c]
add esp, 0xc
mov esi, dword [ebp + 0x10]
sub esi, 1
js 0x100856c6
lea edx, [esi*2 + 1]
add edx, edi
lea ecx, [esi*4 + 2]
add edx, esi
add ecx, edi
nop dword [eax]
sub esi, 1
mov byte [ecx + 1], 0xff
movzx eax, byte [edx + 1]
lea edx, [edx - 3]
mov byte [ecx], al
lea ecx, [ecx - 4]
movzx eax, byte [edx + 3]
mov byte [ecx + 3], al
movzx eax, byte [edx + 2]
mov byte [ecx + 2], al
jns 0x100856a0
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x30]
sub dword [ebp + 0x14], 1
mov ebx, dword [ebp - 0x54]
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0x1c], ecx
jne 0x10085355
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
cmp edi, 0x10
jne 0x10085720
mov ebx, dword [ebp + 0xc]
imul ebx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x24]
mov esi, dword [eax + 0xc]
mov edx, esi
imul ebx, ecx
test ebx, ebx
je 0x10085720
movzx ecx, byte [esi]
lea edx, [edx + 2]
movzx eax, byte [edx - 1]
lea esi, [esi + 2]
shl cx, 8
or cx, ax
mov word [edx - 2], cx
sub ebx, 1
jne 0x10085703
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x10228440]
mov eax, dword fs:[0x2c]
pop edi
pop esi
pop ebx
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], 0x101c6e40
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x24]
mov dword [eax + 0xc], 0
mov ecx, dword [0x10228440]
mov eax, dword fs:[0x2c]
pop edi
pop esi
pop ebx
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], 0x101c6eb4
xor eax, eax
mov esp, ebp
pop ebp
ret