Function at 0x1001eb10
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov ecx, dword [ebp + 0x18]
xor eax, eax
cmp dword [ebp + 0x20], 0x10
push ebx
sete al
push esi
mov ebx, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x48], ecx
inc eax
mov esi, eax
imul esi, dword [ebp + 0x14]
mov edx, esi
imul edx, ecx
mov dword [ebp - 0x34], edx
mov edx, dword [ebp + 8]
mov edx, dword [edx]
mov edi, dword [edx + 8]
mov dword [ebp - 0x10], edi
imul edi, eax
mov dword [ebp - 4], esi
test ecx, ecx
js 0x1001eba8
cmp dword [ebp + 0x1c], 0
jl 0x1001eba8
je 0x1001eb6d
mov eax, 0x7fffffff
cdq
idiv dword [ebp + 0x1c]
xor edx, edx
cmp ecx, eax
setle dl
mov eax, edx
test eax, eax
je 0x1001eba8
mov eax, ecx
imul eax, dword [ebp + 0x1c]
mov dword [ebp - 0x44], eax
test eax, eax
js 0x1001eba8
test esi, esi
js 0x1001eba8
je 0x1001eb99
mov eax, 0x7fffffff
cdq
idiv esi
xor ecx, ecx
cmp dword [ebp - 0x44], eax
setle cl
mov eax, ecx
mov ecx, dword [ebp + 0x18]
test eax, eax
je 0x1001eba8
imul esi, ecx
imul esi, dword [ebp + 0x1c]
cmp esi, 0x7fffffff
jle 0x1001ebac
xor eax, eax
jmp 0x1001ebb9
push esi
call dword [sym.imp.MSVCR100.dll_malloc]
mov ecx, dword [ebp + 0x18]
add esp, 4
mov edx, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
mov dword [edx + 0xc], eax
test eax, eax
jne 0x1001ebe5
mov eax, dword [0x102f8ca0]
mov ecx, dword fs:[0x2c]
mov edx, dword [ecx + eax*4]
pop edi
pop esi
mov dword [edx + 0xc], str.outofmem
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x10], 0
jl 0x1001ec47
test ecx, ecx
js 0x1001ec47
je 0x1001ec0a
mov eax, 0x7fffffff
cdq
idiv ecx
xor edx, edx
cmp dword [ebp - 0x10], eax
setle dl
mov eax, edx
test eax, eax
je 0x1001ec47
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x10]
imul esi, ecx
mov dword [ebp - 0x30], esi
test esi, esi
js 0x1001ec47
mov edx, dword [ebp + 0x20]
test edx, edx
js 0x1001ec47
je 0x1001ec3c
mov eax, 0x7fffffff
cdq
idiv dword [ebp + 0x20]
xor edx, edx
cmp esi, eax
setle dl
mov eax, edx
test eax, eax
je 0x1001ec47
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp + 0x20]
imul esi, edx
cmp esi, 0x7ffffff8
jle 0x1001ec66
mov eax, dword [0x102f8ca0]
mov ecx, dword fs:[0x2c]
mov edx, dword [ecx + eax*4]
pop edi
pop esi
mov dword [edx + 0xc], str.too_large
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [esi + 7]
mov esi, dword [ebp + 0x1c]
shr edx, 3
mov dword [ebp - 0x2c], edx
inc edx
imul edx, esi
cmp dword [ebp + 0x10], edx
jae 0x1001ec9a
mov eax, dword [0x102f8ca0]
mov ecx, dword fs:[0x2c]
mov edx, dword [ecx + eax*4]
pop edi
pop esi
mov dword [edx + 0xc], str.not_enough_pixels
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x20], 0
test esi, esi
je 0x1001f373
lea esp, [esp]
mov esi, dword [ebp - 0x20]
imul esi, dword [ebp - 0x34]
movzx eax, byte [ebx]
add esi, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x2c]
inc ebx
mov dword [ebp - 0x4c], esi
mov dword [ebp + 8], eax
cmp eax, 4
jg 0x1001f39f
cmp dword [ebp + 0x20], 8
jge 0x1001ecf3
mov edx, dword [ebp + 0x18]
cmp ecx, edx
ja 0x1001f3bf
mov edi, dword [ebp + 0x14]
imul edi, edx
sub edi, ecx
add esi, edi
mov edi, 1
mov dword [ebp - 0x48], ecx
mov edx, esi
sub edx, dword [ebp - 0x34]
cmp dword [ebp - 0x20], 0
mov dword [ebp - 0xc], edx
jne 0x1001ed0b
movzx eax, byte [eax + 0x1002f1d8]
mov dword [ebp + 8], eax
test edi, edi
jle 0x1001ed84
sub edx, ebx
mov ecx, esi
mov eax, ebx
sub ecx, ebx
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], edx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x28], edi
mov edx, dword [ebp + 8]
cmp edx, 6
ja case.default.0x1001ed2b
jmp dword [edx*4 + 0x1001f688]
mov edx, dword [ebp - 8]
mov dl, byte [edx + eax]
add dl, byte [eax]
jmp 0x1001ed72
mov edx, dword [ebp - 8]
mov dl, byte [edx + eax]
shr dl, 1
add dl, byte [eax]
jmp 0x1001ed72
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x14]
movzx edx, byte [eax + ecx]
push 0
push edx
push 0
call fcn.1001eab0
mov edx, dword [ebp - 0x18]
mov ecx, eax
mov eax, dword [ebp - 0x14]
add esp, 0xc
add cl, byte [eax]
mov byte [edx + eax], cl
mov ecx, edx
jmp case.default.0x1001ed2b
mov dl, byte [eax]
mov byte [ecx + eax], dl
inc eax
dec dword [ebp - 0x28]
mov dword [ebp - 0x14], eax
jne 0x1001ed23
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x20]
cmp ecx, 8
jne 0x1001eda8
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp + 0x14]
cmp ecx, eax
je 0x1001ed9a
mov byte [esi + ecx], 0xff
add ebx, ecx
add esi, eax
add edx, eax
mov dword [ebp + 0xc], ebx
mov dword [ebp - 0xc], edx
jmp 0x1001ede4
cmp ecx, 0x10
jne 0x1001edcc
mov eax, dword [ebp + 0x14]
cmp dword [ebp - 0x10], eax
je 0x1001edbb
mov word [esi + edi], 0xffff
mov ecx, dword [ebp - 4]
add ebx, edi
add esi, ecx
add edx, ecx
mov dword [ebp + 0xc], ebx
mov dword [ebp - 0xc], edx
jmp 0x1001ede1
inc ebx
inc edx
inc esi
mov dword [ebp + 0xc], ebx
mov dword [ebp - 0xc], edx
cmp ecx, 8
jl 0x1001f14d
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x10]
cmp ecx, eax
mov eax, dword [ebp + 8]
je 0x1001f14d
cmp eax, 6
ja case.default.0x1001edf8
jmp dword [eax*4 + 0x1001f6a4]
mov eax, dword [ebp + 0x18]
dec eax
cmp eax, 1
jb case.default.0x1001edf8
mov dword [ebp - 0x28], eax
nop
test edi, edi
jle 0x1001ee2b
mov ecx, ebx
mov eax, esi
sub ecx, esi
mov dword [ebp + 8], edi
lea ecx, [ecx]
mov dl, byte [ecx + eax]
mov byte [eax], dl
inc eax
dec dword [ebp + 8]
jne 0x1001ee20
mov byte [esi + edi], 0xff
add esi, dword [ebp - 4]
add ebx, edi
dec dword [ebp - 0x28]
jne 0x1001ee10
jmp case.default.0x1001edf8
mov eax, dword [ebp + 0x18]
dec eax
cmp eax, 1
jb case.default.0x1001edf8
mov ecx, esi
sub ecx, dword [ebp - 4]
mov dword [ebp - 0x28], eax
mov dword [ebp + 8], ecx
xor eax, eax
test edi, edi
jle 0x1001ee76
sub ebx, esi
mov edi, edi
mov edx, dword [ebp + 8]
mov dl, byte [edx + eax]
lea ecx, [eax + esi]
add dl, byte [ebx + ecx]
inc eax
mov byte [ecx], dl
cmp eax, edi
jl 0x1001ee60
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
add dword [ebp + 8], eax
mov byte [esi + edi], 0xff
add ebx, edi
add esi, eax
dec dword [ebp - 0x28]
mov dword [ebp + 0xc], ebx
jne 0x1001ee56
jmp case.default.0x1001edf8
mov eax, dword [ebp + 0x18]
dec eax
cmp eax, 1
jb case.default.0x1001edf8
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], eax
test edi, edi
jle 0x1001eeca
sub edx, ebx
mov ecx, esi
mov eax, ebx
mov dword [ebp - 0x44], edx
sub ecx, ebx
mov dword [ebp + 8], edi
jmp 0x1001eebb
mov edx, dword [ebp - 0x44]
mov dl, byte [eax + edx]
add dl, byte [eax]
inc eax
dec dword [ebp + 8]
mov byte [eax + ecx - 1], dl
jne 0x1001eeb8
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x28]
mov byte [esi + edi], 0xff
add edx, eax
add ebx, edi
add esi, eax
dec dword [ebp - 0x24]
mov dword [ebp - 0x28], edx
jne 0x1001eea4
jmp case.default.0x1001edf8
mov eax, dword [ebp + 0x18]
dec eax
cmp eax, 1
jb case.default.0x1001edf8
mov ecx, esi
sub ecx, dword [ebp - 4]
mov dword [ebp - 0x28], eax
mov dword [ebp + 8], ecx
nop
xor ecx, ecx
test edi, edi
jle 0x1001ef43
mov edx, dword [ebp - 0xc]
sub edx, ebx
mov dword [ebp - 8], edx
mov edx, esi
sub edx, ebx
mov eax, ebx
mov dword [ebp - 0x18], edx
jmp 0x1001ef20
mov edx, dword [ebp - 8]
movzx edx, byte [edx + eax]
mov ebx, dword [ebp + 8]
movzx ebx, byte [ebx + ecx]
add edx, ebx
mov ebx, dword [ebp - 0x18]
sar edx, 1
add dl, byte [eax]
inc ecx
mov byte [ebx + eax], dl
inc eax
cmp ecx, edi
jl 0x1001ef20
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
add dword [ebp + 8], eax
add dword [ebp - 0xc], eax
mov byte [esi + edi], 0xff
add ebx, edi
add esi, eax
dec dword [ebp - 0x28]
mov dword [ebp + 0xc], ebx
jne 0x1001ef00
jmp case.default.0x1001edf8
mov ecx, dword [ebp + 0x18]
dec ecx
cmp ecx, 1
jb case.default.0x1001edf8
mov eax, esi
sub eax, dword [ebp - 4]
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x24], eax
lea esp, [esp]
test edi, edi
jle 0x1001f025
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp + 0xc]
mov dword [ebp + 8], ecx
mov ecx, dword [ebp - 0xc]
mov edx, ecx
sub edx, esi
sub ecx, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x28], edx
mov dword [ebp - 8], ecx
mov dword [ebp - 0x40], edi
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x28]
movzx ebx, byte [eax + edx]
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
movzx ecx, byte [ecx + edx]
movzx edx, byte [eax]
mov dword [ebp - 0x18], ecx
mov ecx, edx
sub ecx, ebx
add ecx, dword [ebp - 0x18]
mov dword [ebp - 0x3c], ebx
mov eax, ecx
sub eax, edx
cdq
mov ebx, eax
xor ebx, edx
sub ebx, edx
mov eax, ecx
sub eax, dword [ebp - 0x18]
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x38], eax
mov eax, ecx
sub eax, dword [ebp - 0x3c]
cdq
xor eax, edx
sub eax, edx
cmp ebx, dword [ebp - 0x38]
jg 0x1001effd
cmp ebx, eax
jg 0x1001effd
mov edx, dword [ebp + 8]
movzx eax, byte [edx]
jmp 0x1001f008
cmp dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x18]
jle 0x1001f008
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x14]
mov dl, byte [ecx]
mov ebx, dword [ebp - 4]
add dl, al
mov eax, dword [ebp + 8]
mov byte [eax + ebx], dl
inc eax
inc ecx
dec dword [ebp - 0x40]
mov dword [ebp + 8], eax
mov dword [ebp - 0x14], ecx
jne 0x1001efa6
mov eax, dword [ebp - 4]
add dword [ebp + 0xc], edi
add dword [ebp - 0x24], eax
add dword [ebp - 0xc], eax
mov byte [esi + edi], 0xff
add esi, eax
dec dword [ebp - 0x44]
jne 0x1001ef80
mov ebx, dword [ebp + 0xc]
jmp case.default.0x1001edf8
mov eax, dword [ebp + 0x18]
dec eax
cmp eax, 1
jb case.default.0x1001edf8
mov ecx, esi
sub ecx, dword [ebp - 4]
mov dword [ebp - 0x44], eax
mov dword [ebp + 8], ecx
xor eax, eax
test edi, edi
jle 0x1001f088
sub ebx, esi
jmp 0x1001f070
mov edx, dword [ebp + 8]
mov dl, byte [edx + eax]
lea ecx, [eax + esi]
shr dl, 1
add dl, byte [ebx + ecx]
inc eax
mov byte [ecx], dl
cmp eax, edi
jl 0x1001f070
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
add dword [ebp + 8], eax
mov byte [esi + edi], 0xff
add ebx, edi
add esi, eax
dec dword [ebp - 0x44]
mov dword [ebp + 0xc], ebx
jne 0x1001f060
jmp case.default.0x1001edf8
mov eax, dword [ebp + 0x18]
dec eax
cmp eax, 1
jb case.default.0x1001edf8
mov ecx, esi
sub ecx, dword [ebp - 4]
mov dword [ebp - 0x3c], eax
mov dword [ebp + 8], ecx
xor ecx, ecx
test edi, edi
jle 0x1001f109
xor eax, eax
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x44], eax
mov eax, ebx
sub eax, esi
mov dword [ebp - 0xc], eax
jmp 0x1001f0d0
mov eax, dword [ebp + 8]
movzx eax, byte [eax + ecx]
cdq
xor eax, edx
sub eax, edx
cmp dword [ebp - 0x44], eax
jg 0x1001f0ed
mov edx, dword [ebp + 8]
movzx eax, byte [edx + ecx]
mov dword [ebp - 0x40], eax
jmp 0x1001f0f4
mov dword [ebp - 0x40], 0
mov edx, dword [ebp - 0xc]
lea eax, [ecx + esi]
mov al, byte [edx + eax]
add al, byte [ebp - 0x40]
inc ecx
mov byte [ecx + esi - 1], al
cmp ecx, edi
jl 0x1001f0d0
mov eax, dword [ebp - 4]
add dword [ebp + 8], eax
mov byte [esi + edi], 0xff
add ebx, edi
add esi, eax
dec dword [ebp - 0x3c]
jne 0x1001f0b4
cmp dword [ebp + 0x20], 0x10
jne 0x1001f35a
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x1001f35a
mov edx, dword [ebp - 0x4c]
lea eax, [edx + edi + 1]
mov edx, dword [ebp - 4]
jmp 0x1001f140
mov byte [eax], 0xff
add eax, edx
dec ecx
jne 0x1001f140
jmp 0x1001f35a
mov ecx, dword [ebp - 0x48]
dec ecx
imul ecx, edi
mov dword [ebp - 0x18], ecx
cmp eax, 6
ja case.default.0x1001f160
jmp dword [eax*4 + 0x1001f6c0]
mov eax, dword [ebp - 0x18]
push eax
push ebx
push esi
call sub.MSVCR100.dll_memcpy
mov ecx, dword [ebp - 0x18]
add esp, 0xc
jmp case.default.0x1001f160
xor eax, eax
mov dword [ebp + 8], eax
test ecx, ecx
jle case.default.0x1001f160
mov edx, esi
sub edx, edi
mov ecx, ebx
sub ecx, esi
mov dword [ebp - 0x14], edx
mov dword [ebp - 0xc], ecx
jmp 0x1001f1a3
mov edx, dword [ebp - 0x14]
mov dl, byte [edx + eax]
lea ecx, [eax + esi]
mov eax, dword [ebp - 0xc]
add dl, byte [eax + ecx]
mov eax, dword [ebp + 8]
mov byte [ecx], dl
mov ecx, dword [ebp - 0x18]
inc eax
mov dword [ebp + 8], eax
cmp eax, ecx
jl 0x1001f1a0
jmp case.default.0x1001f160
test ecx, ecx
jle case.default.0x1001f160
sub edx, ebx
mov eax, ebx
mov dword [ebp - 8], edx
sub esi, ebx
mov dword [ebp + 8], ecx
jmp 0x1001f1e3
mov edx, dword [ebp - 8]
mov dl, byte [edx + eax]
add dl, byte [eax]
inc eax
dec dword [ebp + 8]
mov byte [esi + eax - 1], dl
jne 0x1001f1e0
jmp case.default.0x1001f160
mov dword [ebp + 8], 0
test ecx, ecx
jle case.default.0x1001f160
mov edx, esi
sub edx, edi
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
sub edx, ebx
sub esi, ebx
mov eax, ebx
mov dword [ebp - 8], edx
mov dword [ebp - 0x18], esi
lea esp, [esp]
mov esi, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
movzx edx, byte [edx + esi]
mov esi, dword [ebp - 8]
movzx esi, byte [eax + esi]
add edx, esi
mov esi, dword [ebp - 0x18]
sar edx, 1
add dl, byte [eax]
inc eax
mov byte [eax + esi - 1], dl
mov edx, dword [ebp + 8]
inc edx
mov dword [ebp + 8], edx
cmp edx, ecx
jl 0x1001f220
jmp case.default.0x1001f160
test ecx, ecx
jle case.default.0x1001f160
mov eax, esi
sub eax, edi
mov dword [ebp - 0x4c], eax
mov eax, edx
sub eax, esi
mov esi, dword [ebp - 0x4c]
sub edx, ebx
mov dword [ebp + 8], ebx
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], edx
mov dword [ebp - 0x44], ecx
mov eax, dword [ebp - 0x28]
movzx ecx, byte [esi + eax]
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 8]
push ecx
movzx ecx, byte [edx + eax]
movzx edx, byte [esi]
push ecx
push edx
call fcn.1001eab0
mov ecx, eax
mov eax, dword [ebp + 8]
add cl, byte [eax]
inc eax
mov byte [esi + edi], cl
add esp, 0xc
inc esi
dec dword [ebp - 0x44]
mov dword [ebp + 8], eax
jne 0x1001f273
mov ecx, dword [ebp - 0x18]
jmp case.default.0x1001f160
xor eax, eax
mov dword [ebp + 8], eax
test ecx, ecx
jle case.default.0x1001f160
mov edx, esi
sub edx, edi
mov ecx, ebx
sub ecx, esi
mov dword [ebp - 0x14], edx
mov dword [ebp - 0xc], ecx
jmp 0x1001f2d3
mov edx, dword [ebp - 0x14]
mov dl, byte [edx + eax]
lea ecx, [eax + esi]
mov eax, dword [ebp - 0xc]
shr dl, 1
add dl, byte [eax + ecx]
mov eax, dword [ebp + 8]
mov byte [ecx], dl
mov ecx, dword [ebp - 0x18]
inc eax
mov dword [ebp + 8], eax
cmp eax, ecx
jl 0x1001f2d0
jmp case.default.0x1001f160
mov dword [ebp + 8], 0
test ecx, ecx
jle case.default.0x1001f160
xor eax, eax
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x44], eax
mov eax, esi
sub eax, edi
mov dword [ebp - 0x14], eax
mov eax, ebx
sub eax, esi
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
movzx eax, byte [edx + eax]
mov dword [ebp - 0x4c], eax
cdq
xor eax, edx
sub eax, edx
cmp dword [ebp - 0x44], eax
jg 0x1001f335
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x40], edx
jmp 0x1001f33c
mov dword [ebp - 0x40], 0
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0xc]
add eax, esi
mov dl, byte [edx + eax]
add dl, byte [ebp - 0x40]
mov eax, dword [ebp + 8]
mov byte [eax + esi], dl
inc eax
mov dword [ebp + 8], eax
cmp eax, ecx
jl 0x1001f316
add ebx, ecx
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
cmp eax, dword [ebp + 0x1c]
jb 0x1001ecb0
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 0x18]
mov esi, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x20]
cmp edx, 8
jge 0x1001f643
test esi, esi
je 0x1001f67a
mov edx, dword [ebp + 0x14]
imul edx, ecx
sub edx, dword [ebp - 0x2c]
mov edi, eax
add edx, eax
mov dword [ebp + 8], edi
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x48], esi
jmp 0x1001f3e3
mov ecx, dword [0x102f8ca0]
mov edx, dword fs:[0x2c]
mov eax, dword [edx + ecx*4]
pop edi
pop esi
mov dword [eax + 0xc], str.invalid_filter
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x102f8ca0]
mov edx, dword fs:[0x2c]
mov eax, dword [edx + ecx*4]
pop edi
pop esi
mov dword [eax + 0xc], str.invalid_width
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x2c]
cmp dword [ebp + 0x24], 0
mov eax, dword [ebp + 0x20]
mov ecx, edi
mov esi, edx
jne 0x1001f3f8
mov dl, byte [eax + 0x1002b5a4]
jmp 0x1001f3fa
mov dl, 1
cmp eax, 4
jne 0x1001f442
mov ebx, dword [ebp - 0x30]
cmp ebx, 2
jl 0x1001f430
mov edi, ebx
shr edi, 1
mov eax, edi
neg eax
lea ebx, [ebx + eax*2]
movzx eax, byte [esi]
shr al, 4
imul dl
mov byte [ecx], al
movzx eax, byte [esi]
and al, 0xf
imul dl
mov byte [ecx + 1], al
add ecx, 2
inc esi
dec edi
jne 0x1001f412
mov edi, dword [ebp + 8]
test ebx, ebx
jle 0x1001f5cd
mov al, byte [esi]
shr al, 4
jmp 0x1001f5c9
cmp eax, 2
jne 0x1001f4cc
mov ebx, dword [ebp - 0x30]
cmp ebx, 4
jl 0x1001f498
mov edi, ebx
shr edi, 2
mov eax, edi
neg eax
lea ebx, [ebx + eax*4]
nop
movzx eax, byte [esi]
shr al, 6
imul dl
mov byte [ecx], al
movzx eax, byte [esi]
shr al, 4
and al, 3
imul dl
mov byte [ecx + 1], al
movzx eax, byte [esi]
shr al, 2
and al, 3
imul dl
mov byte [ecx + 2], al
movzx eax, byte [esi]
and al, 3
imul dl
mov byte [ecx + 3], al
add ecx, 4
inc esi
dec edi
jne 0x1001f460
mov edi, dword [ebp + 8]
test ebx, ebx
jle 0x1001f4a6
mov al, byte [esi]
shr al, 6
imul dl
mov byte [ecx], al
inc ecx
cmp ebx, 1
jle 0x1001f4b7
mov al, byte [esi]
shr al, 4
and al, 3
imul dl
mov byte [ecx], al
inc ecx
cmp ebx, 2
jle 0x1001f5cd
mov al, byte [esi]
shr al, 2
and al, 3
jmp 0x1001f5c9
cmp eax, 1
jne 0x1001f5cd
mov ebx, dword [ebp - 0x30]
cmp ebx, 8
jl 0x1001f55b
mov edi, ebx
shr edi, 3
mov eax, edi
neg eax
lea ebx, [ebx + eax*8]
lea ecx, [ecx]
movzx eax, byte [esi]
shr al, 7
imul dl
mov byte [ecx], al
movzx eax, byte [esi]
shr al, 6
and al, 1
imul dl
mov byte [ecx + 1], al
movzx eax, byte [esi]
shr al, 5
and al, 1
imul dl
mov byte [ecx + 2], al
movzx eax, byte [esi]
shr al, 4
and al, 1
imul dl
mov byte [ecx + 3], al
movzx eax, byte [esi]
shr al, 3
and al, 1
imul dl
mov byte [ecx + 4], al
movzx eax, byte [esi]
shr al, 2
and al, 1
imul dl
mov byte [ecx + 5], al
movzx eax, byte [esi]
shr al, 1
and al, 1
imul dl
mov byte [ecx + 6], al
movzx eax, byte [esi]
and al, 1
imul dl
mov byte [ecx + 7], al
add ecx, 8
inc esi
dec edi
jne 0x1001f4f0
mov edi, dword [ebp + 8]
test ebx, ebx
jle 0x1001f569
mov al, byte [esi]
shr al, 7
imul dl
mov byte [ecx], al
inc ecx
cmp ebx, 1
jle 0x1001f57a
mov al, byte [esi]
shr al, 6
and al, 1
imul dl
mov byte [ecx], al
inc ecx
cmp ebx, 2
jle 0x1001f58b
mov al, byte [esi]
shr al, 5
and al, 1
imul dl
mov byte [ecx], al
inc ecx
cmp ebx, 3
jle 0x1001f59c
mov al, byte [esi]
shr al, 4
and al, 1
imul dl
mov byte [ecx], al
inc ecx
cmp ebx, 4
jle 0x1001f5ad
mov al, byte [esi]
shr al, 3
and al, 1
imul dl
mov byte [ecx], al
inc ecx
cmp ebx, 5
jle 0x1001f5be
mov al, byte [esi]
shr al, 2
and al, 1
imul dl
mov byte [ecx], al
inc ecx
cmp ebx, 6
jle 0x1001f5cd
mov al, byte [esi]
shr al, 1
and al, 1
imul dl
mov byte [ecx], al
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp + 0x14]
je 0x1001f623
cmp ecx, 1
jne 0x1001f5f2
mov eax, dword [ebp + 0x18]
dec eax
js 0x1001f623
dec eax
mov byte [edi + eax*2 + 3], 0xff
mov dl, byte [edi + eax + 1]
mov byte [edi + eax*2 + 2], dl
jns 0x1001f5e0
jmp 0x1001f623
mov esi, dword [ebp + 0x18]
dec esi
js 0x1001f623
lea eax, [edi + esi*2]
lea ecx, [esi + eax + 1]
lea eax, [edi + esi*4 + 2]
mov byte [eax + 1], 0xff
movzx edx, byte [ecx + 1]
mov byte [eax], dl
movzx edx, byte [ecx]
mov byte [eax - 1], dl
movzx edx, byte [ecx - 1]
mov byte [eax - 2], dl
sub ecx, 3
sub eax, 4
dec esi
jns 0x1001f603
mov eax, dword [ebp - 0x34]
add dword [ebp - 0x2c], eax
add edi, eax
dec dword [ebp - 0x48]
mov dword [ebp + 8], edi
jne 0x1001f3e0
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
cmp edx, 0x10
jne 0x1001f67a
mov edi, eax
mov edx, eax
mov eax, dword [ebp + 0x14]
imul eax, ecx
imul eax, esi
test eax, eax
je 0x1001f67a
lea esp, [esp]
movzx ecx, byte [edi]
movzx esi, byte [edx + 1]
shl cx, 8
or cx, si
mov word [edx], cx
add edx, 2
add edi, 2
dec eax
jne 0x1001f660
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret