Function at 0x66d0e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
push ebx
push esi
mov esi, ecx
push edi
cmp dword [esi + 0xc], 0
mov edi, edx
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x28], esi
mov ebx, 1
je 0x66d104
mov ebx, dword [esi + 0x6c]
mov al, byte [esi + 0x808c]
mov byte [ebp - 5], al
mov al, byte [esi + 0x808d]
mov byte [ebp - 0x31], al
mov eax, dword [esi + 0x85b8]
xor edx, edx
mov ecx, dword [eax + 0x28]
mov eax, dword [eax + 0x2c]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [esi + 0x8614]
shl ecx, 6
add eax, 0xffffffc0
add eax, ecx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x30], eax
test ebx, ebx
je 0x66d15e
add esi, 0x86dc
mov eax, dword [esi]
mov ecx, edx
and ecx, 0xf
inc edx
mov dword [ebp + ecx*4 - 0x88], eax
lea esi, [esi + 4]
cmp edx, ebx
jb 0x66d145
mov esi, dword [ebp - 0x28]
cmp dword [esi + 0x85c0], 0
je 0x66d17c
mov eax, dword [esi + 0x87dc]
mov dword [ebp - 0x84], eax
mov eax, dword [esi + 0x87e0]
mov dword [ebp - 0x80], eax
mov eax, dword [esi + 0x10]
dec eax
cmp eax, 6
ja case.default.0x66d189
jmp dword [eax*4 + 0x66d880]
cmp edi, dword [ebp + 0x10]
jae case.default.0x66d189
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov ecx, edi
shl ecx, 4
mov dword [ebp - 4], ecx
mov ebx, dword [ebp - 0x30]
mov eax, esi
mov edi, dword [ebx + edi*4]
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x14], edi
cmp esi, edx
jae 0x66d252
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x2c]
mov esi, dword [edx + eax*4]
add esi, dword [ecx + 0x80a8]
xor edx, edx
add esi, edi
test ebx, ebx
je 0x66d23d
mov ecx, eax
mov edi, eax
and ecx, 0xf
and edi, 0xfffffff0
mov dword [ebp - 0x18], ecx
shl edi, 4
jmp 0x66d1f0
mov eax, dword [ebp - 4]
movzx ecx, byte [ecx + eax + 0x725ab8]
mov eax, edx
and eax, 0xf
add ecx, edi
mov eax, dword [ebp + eax*4 - 0x88]
mov eax, dword [eax + ecx*4]
add eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
sar eax, cl
test eax, eax
jns 0x66d21c
xor eax, eax
jmp 0x66d229
cmp eax, 0xff
mov ecx, 0xff
cmovg eax, ecx
mov ecx, dword [ebp - 0x18]
mov byte [esi + edx], al
inc edx
cmp edx, ebx
jb 0x66d1f0
mov eax, dword [ebp - 0xc]
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp + 0xc]
inc eax
mov dword [ebp - 0xc], eax
cmp eax, edx
jb 0x66d1c3
mov ecx, dword [ebp - 4]
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 0x10]
inc edi
add ecx, 0x10
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], ecx
cmp edi, dword [ebp + 0x10]
jb 0x66d1a7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp edi, dword [ebp + 0x10]
jae case.default.0x66d189
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov esi, edi
shl esi, 4
mov dword [ebp - 4], esi
mov edx, edi
mov ebx, dword [ebp - 0x30]
mov edi, ecx
mov edx, dword [ebx + edx*4]
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x1c], edx
cmp ecx, eax
jae 0x66d346
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + edi*4]
mov eax, dword [ebp - 0x28]
add ecx, edx
mov eax, dword [eax + 0x80a8]
xor edx, edx
lea eax, [eax + ecx*2]
mov dword [ebp - 0x20], eax
test ebx, ebx
je 0x66d32e
mov eax, edi
and eax, 0xf
mov dword [ebp - 0x14], eax
movzx eax, byte [ebp - 5]
mov esi, edi
mov edi, dword [ebp - 0x14]
and esi, 0xfffffff0
shl esi, 4
mov dword [ebp - 0x18], eax
jmp 0x66d2e0
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 - 0x88]
mov eax, dword [eax + ecx*4]
add eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
sar eax, cl
mov ecx, dword [ebp - 0x18]
shl eax, cl
test eax, eax
jns 0x66d311
xor eax, eax
jmp 0x66d31e
cmp eax, 0xffff
mov ecx, 0xffff
cmovg eax, ecx
mov ecx, dword [ebp - 0x20]
inc edx
mov word [ecx + edx*2 - 2], ax
cmp edx, ebx
jb 0x66d2e0
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x1c]
inc edi
mov dword [ebp - 0xc], edi
cmp edi, eax
jb 0x66d2a1
mov esi, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
inc edx
add esi, 0x10
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], esi
cmp edx, dword [ebp + 0x10]
jb 0x66d288
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp edi, dword [ebp + 0x10]
jae case.default.0x66d189
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov esi, edi
shl esi, 4
mov dword [ebp - 4], esi
mov edx, edi
lea esp, [esp]
mov ebx, dword [ebp - 0x30]
mov edi, ecx
mov edx, dword [ebx + edx*4]
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x18], edx
cmp ecx, eax
jae 0x66d44c
lea esp, [esp]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + edi*4]
mov eax, dword [ebp - 0x28]
add ecx, edx
mov eax, dword [eax + 0x80a8]
xor edx, edx
lea eax, [eax + ecx*2]
mov dword [ebp - 0x14], eax
test ebx, ebx
je 0x66d434
mov eax, edi
and eax, 0xf
mov dword [ebp - 0x1c], eax
movzx eax, byte [ebp - 5]
mov esi, edi
mov edi, dword [ebp - 0x1c]
and esi, 0xfffffff0
shl esi, 4
mov dword [ebp - 0x20], eax
jmp 0x66d3e0
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 - 0x88]
mov eax, dword [eax + ecx*4]
add eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
sar eax, cl
mov ecx, dword [ebp - 0x20]
shl eax, cl
cmp eax, 0xffff8000
jge 0x66d417
mov eax, 0xffff8000
jmp 0x66d424
cmp eax, 0x7fff
mov ecx, 0x7fff
cmovg eax, ecx
mov ecx, dword [ebp - 0x14]
inc edx
mov word [ecx + edx*2 - 2], ax
cmp edx, ebx
jb 0x66d3e0
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x18]
inc edi
mov dword [ebp - 0xc], edi
cmp edi, eax
jb 0x66d3a0
mov esi, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
inc edx
add esi, 0x10
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], esi
cmp edx, dword [ebp + 0x10]
jb 0x66d380
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp edi, dword [ebp + 0x10]
jae case.default.0x66d189
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
shl edi, 4
mov dword [ebp - 4], edi
mov edi, edi
mov ebx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x10]
mov edx, ecx
mov esi, dword [ebx + esi*4]
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x14], esi
cmp ecx, eax
jae 0x66d52e
lea esp, [esp]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + edx*4]
mov eax, dword [ebp - 0x28]
add ecx, esi
mov eax, dword [eax + 0x80a8]
xor esi, esi
lea eax, [eax + ecx*2]
mov dword [ebp - 0x1c], eax
test ebx, ebx
je 0x66d516
mov eax, edx
mov edi, edx
and eax, 0xf
and edi, 0xfffffff0
mov dword [ebp - 0x20], eax
shl edi, 4
lea ecx, [ecx]
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 - 0x88]
inc esi
mov edx, dword [eax + ecx*4]
add edx, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
sar edx, cl
mov eax, edx
sar eax, 0x1f
and edx, 0x7fff
xor edx, eax
sub edx, eax
mov eax, dword [ebp - 0x1c]
mov word [eax + esi*2 - 2], dx
mov eax, dword [ebp - 0x20]
cmp esi, ebx
jb 0x66d4d0
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp - 0x14]
inc edx
mov dword [ebp - 0xc], edx
cmp edx, eax
jb 0x66d4a0
mov edi, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
inc edx
add edi, 0x10
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], edi
cmp edx, dword [ebp + 0x10]
jb 0x66d480
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp edi, dword [ebp + 0x10]
jae case.default.0x66d189
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov esi, edi
shl esi, 4
mov dword [ebp - 4], esi
mov edx, edi
mov ebx, dword [ebp - 0x30]
mov edi, ecx
mov edx, dword [ebx + edx*4]
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x18], edx
cmp ecx, eax
jae 0x66d610
lea ecx, [ecx]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + edi*4]
mov eax, dword [ebp - 0x28]
add ecx, edx
mov eax, dword [eax + 0x80a8]
xor edx, edx
lea eax, [eax + ecx*4]
mov dword [ebp - 0x14], eax
test ebx, ebx
je 0x66d5f8
mov eax, edi
and eax, 0xf
mov dword [ebp - 0x1c], eax
movzx eax, byte [ebp - 5]
mov esi, edi
mov edi, dword [ebp - 0x1c]
and esi, 0xfffffff0
shl esi, 4
mov dword [ebp - 0x20], eax
jmp 0x66d5c0
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 - 0x88]
inc edx
mov eax, dword [eax + ecx*4]
add eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
sar eax, cl
mov ecx, dword [ebp - 0x20]
shl eax, cl
mov ecx, dword [ebp - 0x14]
mov dword [ecx + edx*4 - 4], eax
cmp edx, ebx
jb 0x66d5c0
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x18]
inc edi
mov dword [ebp - 0xc], edi
cmp edi, eax
jb 0x66d580
mov esi, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
inc edx
add esi, 0x10
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], esi
cmp edx, dword [ebp + 0x10]
jb 0x66d564
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp edi, dword [ebp + 0x10]
jae case.default.0x66d189
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov esi, edi
shl esi, 4
mov dword [ebp - 4], esi
mov edx, edi
mov ebx, dword [ebp - 0x30]
mov edi, ecx
mov edx, dword [ebx + edx*4]
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x18], edx
cmp ecx, eax
jae 0x66d6f0
nop
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + edi*4]
mov eax, dword [ebp - 0x28]
add ecx, edx
mov eax, dword [eax + 0x80a8]
xor edx, edx
lea eax, [eax + ecx*4]
mov dword [ebp - 0x14], eax
test ebx, ebx
je 0x66d6d8
mov eax, edi
and eax, 0xf
mov dword [ebp - 0x1c], eax
movzx eax, byte [ebp - 5]
mov esi, edi
mov edi, dword [ebp - 0x1c]
and esi, 0xfffffff0
shl esi, 4
mov dword [ebp - 0x20], eax
jmp 0x66d6a0
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 - 0x88]
inc edx
mov eax, dword [eax + ecx*4]
add eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
sar eax, cl
mov ecx, dword [ebp - 0x20]
shl eax, cl
mov ecx, dword [ebp - 0x14]
mov dword [ecx + edx*4 - 4], eax
cmp edx, ebx
jb 0x66d6a0
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x18]
inc edi
mov dword [ebp - 0xc], edi
cmp edi, eax
jb 0x66d660
mov esi, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
inc edx
add esi, 0x10
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], esi
cmp edx, dword [ebp + 0x10]
jb 0x66d646
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp edi, dword [ebp + 0x10]
jae case.default.0x66d189
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov esi, edi
shl esi, 4
mov dword [ebp - 4], esi
mov ebx, dword [ebp - 0x30]
mov edx, ecx
mov edi, dword [ebx + edi*4]
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x44], edi
cmp ecx, eax
jae 0x66d85a
lea ecx, [ecx]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + edx*4]
mov eax, dword [ebp - 0x28]
add ecx, edi
mov eax, dword [eax + 0x80a8]
lea eax, [eax + ecx*4]
mov dword [ebp - 0x40], eax
xor eax, eax
mov dword [ebp - 0xc], eax
test ebx, ebx
je 0x66d845
movzx esi, byte [ebp - 5]
mov ecx, esi
mov ebx, 1
shl ebx, cl
movsx ecx, byte [ebp - 0x31]
mov edi, edx
and edx, 0xfffffff0
mov dword [ebp - 0x1c], ecx
and edi, 0xf
shl edx, 4
mov ecx, 0x17
sub ecx, esi
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x20], ecx
jmp 0x66d7a0
mov ecx, dword [ebp - 4]
and eax, 0xf
movzx ecx, byte [edi + ecx + 0x725ab8]
mov eax, dword [ebp + eax*4 - 0x88]
add ecx, edx
mov eax, dword [eax + ecx*4]
add eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
sar eax, cl
mov ecx, eax
sar ecx, 0x1f
mov edx, ecx
xor edx, eax
sub edx, ecx
mov dword [ebp - 0x14], ecx
mov ecx, esi
mov edi, edx
shr edi, cl
lea esi, [ebx - 1]
and esi, edx
or esi, ebx
test edi, edi
jne 0x66d7e8
xor esi, ebx
mov edi, 1
mov eax, 0x7f
sub eax, dword [ebp - 0x1c]
add edi, eax
cmp esi, ebx
jge 0x66d806
cmp edi, 1
jle 0x66d877
test esi, esi
jle 0x66d877
add esi, esi
dec edi
cmp esi, ebx
jl 0x66d7f6
xor esi, ebx
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x38]
shl esi, cl
mov ecx, dword [ebp - 0x40]
shl edi, 0x17
and eax, 0x80000000
or esi, edi
mov edi, dword [ebp - 0x3c]
or esi, eax
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ecx + eax*4 - 4], esi
mov esi, dword [ebp - 0x48]
mov dword [ebp - 0xc], eax
cmp eax, dword [ebp - 0x24]
jb 0x66d7a0
mov ebx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x44]
mov eax, dword [ebp + 0xc]
inc edx
mov dword [ebp - 0x18], edx
cmp edx, eax
jb 0x66d740
mov esi, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov edi, dword [ebp - 0x10]
inc edi
add esi, 0x10
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], esi
cmp edi, dword [ebp + 0x10]
jb 0x66d724
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp esi, ebx
jge 0x66d806
xor edi, edi
jmp 0x66d808