Function at 0x6683a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 0x44], edi
mov edx, ecx
mov dword [ebp - 0x38], edx
mov ebx, 0x10
mov ecx, dword [edx + 0x85b8]
mov esi, dword [edx + 0x8614]
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ecx + 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx + 0x24]
dec esi
shl esi, 4
sub eax, esi
inc eax
cmp eax, ebx
cmovb ebx, eax
mov al, byte [edx + 0x808c]
mov byte [ebp - 5], al
mov al, byte [edx + 0x808d]
mov byte [ebp - 0x39], al
mov eax, dword [ecx + 0x28]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x20], ebx
mov ebx, dword [edx + 0x6c]
mov eax, esi
mov esi, dword [ebp - 0x10]
xor edx, edx
div esi
mov ecx, dword [ecx + 0x2c]
mov dword [ebp - 0x18], 0
lea eax, [ecx + eax*4]
mov dword [ebp - 0x40], eax
mov eax, 1
cmp esi, eax
jbe 0x66842f
xor ecx, ecx
rol eax, 1
inc ecx
cmp eax, esi
jb 0x668425
mov dword [ebp - 0x18], ecx
xor edx, edx
test ebx, ebx
je 0x668459
mov esi, dword [ebp - 0x38]
add esi, 0x86dc
mov edi, edi
mov eax, dword [esi]
mov ecx, edx
and ecx, 0xf
inc edx
mov dword [ebp + ecx*4 - 0x9c], eax
lea esi, [esi + 4]
cmp edx, ebx
jb 0x668440
mov esi, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 0x85c0], 0
je 0x66847d
mov eax, dword [ecx + 0x87dc]
mov dword [ebp - 0x98], eax
mov eax, dword [ecx + 0x87e0]
mov dword [ebp - 0x94], eax
mov eax, dword [ecx + 0x10]
dec eax
cmp eax, 6
ja case.default.0x66848a
jmp dword [eax*4 + 0x668c28]
mov ecx, dword [ebp + 8]
mov eax, 0x80
shl eax, cl
cdq
idiv edi
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
cmp eax, dword [ebp - 0x20]
jae case.default.0x66848a
mov edx, eax
mov ecx, esi
mov esi, dword [ebp + 0x10]
shl edx, 4
shl ecx, 4
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 4], edx
mov edx, dword [ebp - 0x40]
shr eax, cl
mov edi, esi
mov dword [ebp - 0xc], edi
mov eax, dword [edx + eax*4]
mov edx, dword [ebp - 4]
mov dword [ebp - 0x4c], eax
cmp esi, dword [ebp - 0x1c]
jae 0x668573
mov edx, dword [ebp - 0x48]
mov eax, edi
shr eax, cl
mov esi, dword [edx + eax*4]
mov eax, dword [ebp - 0x38]
xor edx, edx
add esi, dword [eax + 0x80a8]
add esi, dword [ebp - 0x4c]
test ebx, ebx
je 0x66855e
mov eax, edi
and eax, 0xf
and edi, 0xfffffff0
mov dword [ebp - 0x28], eax
shl edi, 4
lea esp, [esp]
mov ecx, dword [ebp - 4]
movzx ecx, byte [eax + ecx + 0x725ab8]
mov eax, edx
and eax, 0xf
add ecx, edi
mov eax, dword [ebp + eax*4 - 0x9c]
mov eax, dword [eax + ecx*4]
add eax, dword [ebp - 0x34]
mov ecx, dword [ebp + 8]
imul eax, dword [ebp - 0x44]
sar eax, cl
test eax, eax
jns 0x668540
xor eax, eax
jmp 0x66854d
cmp eax, 0xff
mov ecx, 0xff
cmovg eax, ecx
mov byte [esi + edx], al
mov eax, dword [ebp - 0x28]
inc edx
cmp edx, ebx
jb 0x668510
mov edi, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
add edi, dword [ebp - 0x10]
mov dword [ebp - 0xc], edi
cmp edi, dword [ebp - 0x1c]
jb 0x6684e2
mov edx, dword [ebp - 4]
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 0x10]
add edx, dword [ebp - 0x24]
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], edx
cmp eax, dword [ebp - 0x20]
jb 0x6684c6
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
mov eax, 0x8000
shl eax, cl
cdq
idiv edi
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
cmp eax, dword [ebp - 0x20]
jae case.default.0x66848a
mov ecx, dword [ebp - 0x10]
mov esi, eax
shl esi, 4
shl ecx, 4
mov dword [ebp - 0x30], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 4], esi
mov edi, ecx
mov ecx, dword [ebp - 0x18]
shr eax, cl
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x14], edi
mov edx, dword [ecx + eax*4]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x2c], edx
cmp ecx, dword [ebp - 0x1c]
jae 0x66868c
mov ecx, dword [ebp - 0x18]
mov eax, edi
shr eax, cl
mov ecx, dword [ebp - 0x48]
mov ecx, dword [ecx + eax*4]
mov eax, dword [ebp - 0x38]
add ecx, edx
mov eax, dword [eax + 0x80a8]
xor edx, edx
lea eax, [eax + ecx*2]
mov dword [ebp - 0x4c], eax
test ebx, ebx
je 0x668674
mov eax, edi
and eax, 0xf
mov dword [ebp - 0x24], eax
movzx eax, byte [ebp - 5]
mov esi, edi
mov edi, dword [ebp - 0x24]
and esi, 0xfffffff0
shl esi, 4
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 4]
movzx ecx, byte [edi + eax + 0x725ab8]
mov eax, edx
and eax, 0xf
add ecx, esi
mov eax, dword [ebp + eax*4 - 0x9c]
mov eax, dword [eax + ecx*4]
add eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 8]
imul eax, dword [ebp - 0x44]
sar eax, cl
mov ecx, dword [ebp - 0x34]
shl eax, cl
test eax, eax
jns 0x668657
xor eax, eax
jmp 0x668664
cmp eax, 0xffff
mov ecx, 0xffff
cmovg eax, ecx
mov ecx, dword [ebp - 0x4c]
inc edx
mov word [ecx + edx*2 - 2], ax
cmp edx, ebx
jb 0x668622
mov edi, dword [ebp - 0x14]
add edi, dword [ebp - 0x10]
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x14], edi
cmp edi, dword [ebp - 0x1c]
jb 0x6685e4
mov esi, dword [ebp - 4]
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x10]
add esi, dword [ebp - 0x30]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], esi
cmp eax, dword [ebp - 0x20]
jb 0x6685c5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ecx
cmp ecx, dword [ebp - 0x20]
jae case.default.0x66848a
mov eax, dword [ebp - 0x10]
mov esi, ecx
shl esi, 4
shl eax, 4
mov dword [ebp - 4], esi
mov dword [ebp - 0x34], eax
jmp 0x6686d0
mov edx, dword [ebp - 0x40]
mov edi, dword [ebp + 0x10]
mov eax, ecx
mov ecx, dword [ebp - 0x18]
shr eax, cl
mov dword [ebp - 0x14], edi
mov edx, dword [edx + eax*4]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x28], edx
cmp edi, eax
jae 0x6687a1
mov eax, edi
shr eax, cl
mov ecx, dword [ebp - 0x48]
mov ecx, dword [ecx + eax*4]
mov eax, dword [ebp - 0x38]
add ecx, edx
mov eax, dword [eax + 0x80a8]
xor edx, edx
lea eax, [eax + ecx*2]
mov dword [ebp - 0x24], eax
test ebx, ebx
je 0x668785
mov eax, edi
and eax, 0xf
mov dword [ebp - 0x30], eax
movzx eax, byte [ebp - 5]
mov esi, edi
mov edi, dword [ebp - 0x30]
and esi, 0xfffffff0
shl esi, 4
mov dword [ebp - 0x2c], eax
lea esp, [esp]
mov eax, dword [ebp - 4]
movzx ecx, byte [edi + eax + 0x725ab8]
mov eax, edx
and eax, 0xf
add ecx, esi
mov eax, dword [ebp + eax*4 - 0x9c]
mov eax, dword [eax + ecx*4]
imul eax, dword [ebp - 0x44]
mov ecx, dword [ebp + 8]
sar eax, cl
mov ecx, dword [ebp - 0x2c]
shl eax, cl
cmp eax, 0xffff8000
jge 0x668768
mov eax, 0xffff8000
jmp 0x668775
cmp eax, 0x7fff
mov ecx, 0x7fff
cmovg eax, ecx
mov ecx, dword [ebp - 0x24]
inc edx
mov word [ecx + edx*2 - 2], ax
cmp edx, ebx
jb 0x668730
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x18]
add edi, eax
mov dword [ebp - 0x14], edi
cmp edi, dword [ebp - 0x1c]
jb 0x6686f1
mov esi, dword [ebp - 4]
jmp 0x6687a4
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
add esi, dword [ebp - 0x34]
add ecx, eax
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], esi
cmp ecx, dword [ebp - 0x20]
jb 0x6686d0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ecx
cmp ecx, dword [ebp - 0x20]
jae case.default.0x66848a
mov edi, ecx
shl edi, 4
mov eax, esi
shl eax, 4
mov dword [ebp - 4], edi
mov dword [ebp - 0x28], eax
mov esi, dword [ebp - 0x40]
mov edx, dword [ebp + 0x10]
mov eax, ecx
mov ecx, dword [ebp - 0x18]
shr eax, cl
mov dword [ebp - 0x14], edx
mov esi, dword [esi + eax*4]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x24], esi
cmp edx, eax
jae 0x668896
mov eax, edx
shr eax, cl
mov ecx, dword [ebp - 0x48]
mov ecx, dword [ecx + eax*4]
mov eax, dword [ebp - 0x38]
add ecx, esi
mov eax, dword [eax + 0x80a8]
xor esi, esi
lea eax, [eax + ecx*2]
mov dword [ebp - 0x30], eax
test ebx, ebx
je 0x66887a
mov eax, edx
mov edi, edx
and eax, 0xf
and edi, 0xfffffff0
mov dword [ebp - 0x2c], eax
shl edi, 4
mov ecx, dword [ebp - 4]
movzx ecx, byte [eax + ecx + 0x725ab8]
mov eax, esi
and eax, 0xf
add ecx, edi
mov eax, dword [ebp + eax*4 - 0x9c]
inc esi
mov edx, dword [eax + ecx*4]
imul edx, dword [ebp - 0x44]
mov ecx, dword [ebp + 8]
sar edx, cl
mov eax, edx
sar eax, 0x1f
and edx, 0x7fff
xor edx, eax
sub edx, eax
mov eax, dword [ebp - 0x30]
mov word [eax + esi*2 - 2], dx
mov eax, dword [ebp - 0x2c]
cmp esi, ebx
jb 0x668833
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
mov esi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x18]
add edx, eax
mov dword [ebp - 0x14], edx
cmp edx, dword [ebp - 0x1c]
jb 0x668802
mov edi, dword [ebp - 4]
jmp 0x668899
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
add edi, dword [ebp - 0x28]
add ecx, eax
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], edi
cmp ecx, dword [ebp - 0x20]
jb 0x6687e1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx ecx, byte [ebp - 5]
mov eax, 0x80000000
sar eax, cl
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp + 8]
shl eax, cl
cdq
idiv edi
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
cmp eax, dword [ebp - 0x20]
jae case.default.0x66848a
mov edi, eax
shl edi, 4
mov ecx, esi
shl ecx, 4
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 4], edi
mov esi, ecx
mov ecx, dword [ebp - 0x18]
shr eax, cl
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x14], esi
mov edx, dword [ecx + eax*4]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x28], edx
cmp ecx, dword [ebp - 0x1c]
jae 0x668990
mov ecx, dword [ebp - 0x18]
mov eax, esi
shr eax, cl
mov ecx, dword [ebp - 0x48]
mov ecx, dword [ecx + eax*4]
mov eax, dword [ebp - 0x38]
add ecx, edx
mov eax, dword [eax + 0x80a8]
xor edx, edx
lea eax, [eax + ecx*4]
mov dword [ebp - 0x24], eax
test ebx, ebx
je 0x66897c
mov edi, esi
and esi, 0xfffffff0
and edi, 0xf
shl esi, 4
mov eax, dword [ebp - 4]
movzx ecx, byte [edi + eax + 0x725ab8]
mov eax, edx
and eax, 0xf
add ecx, esi
mov eax, dword [ebp + eax*4 - 0x9c]
inc edx
mov eax, dword [eax + ecx*4]
add eax, dword [ebp - 0x30]
mov ecx, dword [ebp + 8]
imul eax, dword [ebp - 0x44]
sar eax, cl
mov ecx, dword [ebp - 0x2c]
shl eax, cl
mov ecx, dword [ebp - 0x24]
mov dword [ecx + edx*4 - 4], eax
cmp edx, ebx
jb 0x668940
mov esi, dword [ebp - 0x14]
add esi, dword [ebp - 0x10]
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x14], esi
cmp esi, dword [ebp - 0x1c]
jb 0x668911
mov edi, dword [ebp - 4]
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x10]
add edi, dword [ebp - 0x34]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edi
cmp eax, dword [ebp - 0x20]
jb 0x6688f2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ecx
cmp ecx, dword [ebp - 0x20]
jae case.default.0x66848a
mov eax, dword [ebp - 0x10]
mov esi, ecx
shl esi, 4
shl eax, 4
mov dword [ebp - 4], esi
mov dword [ebp - 0x34], eax
nop
mov edx, dword [ebp - 0x40]
mov edi, dword [ebp + 0x10]
mov eax, ecx
mov ecx, dword [ebp - 0x18]
shr eax, cl
mov dword [ebp - 0x14], edi
mov edx, dword [edx + eax*4]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x28], edx
cmp edi, eax
jae 0x668a85
mov eax, edi
shr eax, cl
mov ecx, dword [ebp - 0x48]
mov ecx, dword [ecx + eax*4]
mov eax, dword [ebp - 0x38]
add ecx, edx
mov eax, dword [eax + 0x80a8]
xor edx, edx
lea eax, [eax + ecx*4]
mov dword [ebp - 0x24], eax
test ebx, ebx
je 0x668a69
mov eax, edi
and eax, 0xf
mov dword [ebp - 0x30], eax
movzx eax, byte [ebp - 5]
mov esi, edi
mov edi, dword [ebp - 0x30]
and esi, 0xfffffff0
shl esi, 4
mov dword [ebp - 0x2c], eax
lea esp, [esp]
mov eax, dword [ebp - 4]
movzx ecx, byte [edi + eax + 0x725ab8]
mov eax, edx
and eax, 0xf
add ecx, esi
mov eax, dword [ebp + eax*4 - 0x9c]
inc edx
mov eax, dword [eax + ecx*4]
imul eax, dword [ebp - 0x44]
mov ecx, dword [ebp + 8]
sar eax, cl
mov ecx, dword [ebp - 0x2c]
shl eax, cl
mov ecx, dword [ebp - 0x24]
mov dword [ecx + edx*4 - 4], eax
cmp edx, ebx
jb 0x668a30
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x18]
add edi, eax
mov dword [ebp - 0x14], edi
cmp edi, dword [ebp - 0x1c]
jb 0x6689f1
mov esi, dword [ebp - 4]
jmp 0x668a88
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
add esi, dword [ebp - 0x34]
add ecx, eax
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], esi
cmp ecx, dword [ebp - 0x20]
jb 0x6689d0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x4c], ecx
cmp ecx, dword [ebp - 0x20]
jae case.default.0x66848a
mov eax, dword [ebp - 0x10]
mov esi, ecx
shl esi, 4
shl eax, 4
mov dword [ebp - 4], esi
mov dword [ebp - 0x58], eax
mov edi, dword [ebp - 0x40]
mov edx, dword [ebp + 0x10]
mov eax, ecx
mov ecx, dword [ebp - 0x18]
shr eax, cl
mov dword [ebp - 0xc], edx
mov edi, dword [edi + eax*4]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x50], edi
cmp edx, eax
jae 0x668c06
mov eax, edx
shr eax, cl
mov ecx, dword [ebp - 0x48]
mov ecx, dword [ecx + eax*4]
mov eax, dword [ebp - 0x38]
add ecx, edi
mov eax, dword [eax + 0x80a8]
lea eax, [eax + ecx*4]
mov dword [ebp - 0x54], eax
xor eax, eax
mov dword [ebp - 0x14], eax
test ebx, ebx
je 0x668be5
movzx esi, byte [ebp - 5]
mov ecx, esi
mov edi, 1
shl edi, cl
mov ecx, edx
and ecx, 0xf
mov dword [ebp - 0x30], ecx
movsx ecx, byte [ebp - 0x39]
and edx, 0xfffffff0
mov dword [ebp - 0x24], ecx
shl edx, 4
mov ecx, 0x17
sub ecx, esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x5c], edx
mov dword [ebp - 0x28], ecx
mov esi, dword [ebp - 4]
mov ecx, dword [ebp - 0x30]
and eax, 0xf
movzx ecx, byte [ecx + esi + 0x725ab8]
mov eax, dword [ebp + eax*4 - 0x9c]
add ecx, edx
mov eax, dword [eax + ecx*4]
imul eax, dword [ebp - 0x44]
mov ecx, dword [ebp + 8]
sar eax, cl
mov ecx, eax
sar ecx, 0x1f
mov edx, ecx
xor edx, eax
sub edx, ecx
mov esi, edx
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x2c]
shr esi, cl
lea eax, [edi - 1]
and edx, eax
or edx, edi
test esi, esi
jne 0x668b8e
xor edx, edi
mov esi, 1
mov eax, 0x7f
sub eax, dword [ebp - 0x24]
add esi, eax
cmp edx, edi
jge 0x668bb0
lea esp, [esp]
cmp esi, 1
jle 0x668bfe
test edx, edx
jle 0x668bfe
add edx, edx
dec esi
cmp edx, edi
jl 0x668ba0
xor edx, edi
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x34]
shl edx, cl
mov ecx, dword [ebp - 0x54]
shl esi, 0x17
and eax, 0x80000000
or edx, esi
or edx, eax
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ecx + eax*4 - 4], edx
mov edx, dword [ebp - 0x5c]
mov dword [ebp - 0x14], eax
cmp eax, ebx
jb 0x668b41
mov edx, dword [ebp - 0xc]
mov edi, dword [ebp - 0x50]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x18]
add edx, eax
mov dword [ebp - 0xc], edx
cmp edx, dword [ebp - 0x1c]
jb 0x668ae7
mov esi, dword [ebp - 4]
jmp 0x668c09
cmp edx, edi
jge 0x668bb0
xor esi, esi
jmp 0x668bb2
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x4c]
add esi, dword [ebp - 0x58]
add ecx, eax
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 4], esi
cmp ecx, dword [ebp - 0x20]
jb 0x668ac6
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret