Function at 0x6678ab10
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x6c
mov ebp, dword [0x66a21d4c]
mov ebx, dword [esp + 0x84]
mov ecx, ebx
call ebp
cmp eax, 1
jle 0x6678ab3c
mov edi, dword [0x66a21d54]
mov ecx, ebx
call edi
cmp eax, 1
jg 0x6678ab60
mov ecx, dword [esp + 0x80]
call dword [0x66a213cc]
mov eax, dword [esp + 0x80]
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
lea ecx, [esp + 0x40]
mov dword [esp], ebx
call dword [0x66a213c4]
mov esi, dword [0x66a21d50]
mov ecx, ebx
sub esp, 4
call esi
cmp eax, 3
je 0x6678ad70
mov ecx, ebx
call esi
cmp eax, 0x18
je 0x6678ad70
mov ecx, ebx
call esi
cmp eax, 8
je 0x6678af31
mov ecx, ebx
call esi
cmp eax, 6
jne 0x6678af0e
lea eax, [esp + 0x50]
mov dword [esp + 0x28], eax
mov eax, dword [0x66a213d0]
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x40]
call esi
mov ecx, ebx
mov dword [esp + 0x10], eax
call edi
mov ecx, ebx
mov esi, eax
call ebp
mov edx, dword [esp + 0x10]
mov dword [esp + 8], edx
mov edx, esi
shr edx, 0x1f
add esi, edx
mov edx, eax
shr edx, 0x1f
sar esi, 1
add eax, edx
mov dword [esp + 4], esi
mov esi, dword [esp + 0x28]
sar eax, 1
mov ecx, esi
mov dword [esp], eax
call dword [0x66a213c8]
mov eax, dword [ebx]
mov ecx, ebx
sub esp, 0xc
mov dword [esp], 0xc
call dword [eax + 0x10]
pxor xmm0, xmm0
mov ecx, esi
cvtsi2sd xmm0, eax
sub esp, 4
mulsd xmm0, qword [0x66848dc8]
movsd qword [esp], xmm0
call dword [0x66a2139c]
sub esp, 8
lea ecx, [esp + 0x40]
call dword [0x66a21d38]
mov edx, dword [0x66a21d24]
lea ecx, [esp + 0x40]
mov ebx, eax
mov dword [esp + 0x10], edx
call edx
mov ecx, esi
mov dword [esp + 0x28], esi
sar eax, 2
mov dword [esp + 0x18], eax
call dword [0x66a213a4]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
mov esi, eax
call edx
mov ecx, dword [esp + 0x28]
sar eax, 2
mov dword [esp + 0x1c], eax
call ebp
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x10], eax
call edi
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov dword [esp + 0x24], eax
mov ecx, eax
lea eax, [edx*4]
lea ebp, [edi*4]
mov dword [esp + 0x1c], eax
lea eax, [edi*8]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x20], eax
test ecx, ecx
je 0x6678ad2c
lea esi, [esi]
mov eax, dword [esp + 0x18]
xor ecx, ecx
lea ebp, [ebx + eax]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x6678ad1d
lea esi, [esi]
mov eax, dword [ebx + ecx*8]
xor eax, dword [ebx + ecx*8 + 4]
shr eax, 1
mov edx, dword [ebx + ecx*8]
and edx, dword [ebx + ecx*8 + 4]
and eax, 0x7f7f7f7f
mov edi, dword [ebp + ecx*8]
and edi, dword [ebp + ecx*8 + 4]
add eax, edx
mov edx, dword [ebp + ecx*8]
xor edx, dword [ebp + ecx*8 + 4]
shr edx, 1
and edx, 0x7f7f7f7f
add edx, edi
mov edi, eax
xor edi, edx
and eax, edx
shr edi, 1
and edi, 0x7f7f7f7f
add eax, edi
mov dword [esi + ecx*4], eax
add ecx, 1
cmp dword [esp + 0x10], ecx
jne 0x6678acd0
add esi, dword [esp + 0x1c]
add ebx, dword [esp + 0x20]
sub dword [esp + 0x24], 1
jne 0x6678acb8
mov ecx, dword [esp + 0x80]
call dword [0x66a20c00]
mov eax, dword [0x66a22000]
mov ebx, dword [esp + 0x80]
mov ecx, dword [esp + 0x28]
add eax, 8
mov dword [ebx], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x5c], 0
mov dword [ebx + 0xc], eax
mov eax, dword [esp + 0x14]
call eax
jmp 0x6678aef5
lea ecx, [esp + 0x40]
call esi
mov ecx, ebx
mov dword [esp + 0x10], eax
call edi
mov ecx, ebx
mov esi, eax
call ebp
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x50]
mov dword [esp + 8], edx
mov edx, esi
shr edx, 0x1f
add esi, edx
mov edx, eax
shr edx, 0x1f
sar esi, 1
add eax, edx
mov dword [esp + 4], esi
mov esi, ecx
sar eax, 1
mov dword [esp], eax
call dword [0x66a213c8]
mov eax, dword [ebx]
mov ecx, ebx
mov ebx, esi
sub esp, 0xc
mov dword [esp], 0xc
call dword [eax + 0x10]
pxor xmm0, xmm0
mov ecx, esi
cvtsi2sd xmm0, eax
sub esp, 4
mulsd xmm0, qword [0x66848dc8]
movsd qword [esp], xmm0
call dword [0x66a2139c]
sub esp, 8
lea ecx, [esp + 0x40]
call dword [0x66a21d38]
mov esi, dword [0x66a21d24]
lea ecx, [esp + 0x40]
mov dword [esp + 0x24], eax
call esi
mov ecx, ebx
mov dword [esp + 0x28], ebx
mov edx, eax
add eax, eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x14], eax
call dword [0x66a213a4]
mov ecx, dword [esp + 0x28]
mov ebx, eax
call esi
mov esi, dword [esp + 0x28]
mov dword [esp + 0x18], eax
mov ecx, esi
call ebp
mov ecx, esi
mov dword [esp + 0x10], eax
call edi
mov edx, dword [esp + 0x20]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x6678aeb9
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x24]
add eax, eax
mov esi, eax
sub edx, eax
add edi, eax
neg esi
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], esi
lea esi, [esi]
nop
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
lea edx, [edi + esi]
add eax, edi
mov esi, ebx
test ecx, ecx
je 0x6678aeaa
lea esi, [esi]
nop
movzx ebp, byte [eax + 1]
movzx ecx, byte [eax]
add eax, 2
add esi, 1
add edx, 2
add ecx, ebp
movzx ebp, byte [edx - 2]
add ecx, ebp
movzx ebp, byte [edx - 1]
lea ecx, [ecx + ebp + 2]
sar ecx, 2
mov byte [esi - 1], cl
cmp eax, edi
jne 0x6678ae80
add ebx, dword [esp + 0x18]
add edi, dword [esp + 0x14]
sub dword [esp + 0x1c], 1
jne 0x6678ae60
mov ecx, dword [esp + 0x80]
call dword [0x66a20c00]
mov eax, dword [0x66a22000]
mov ebx, dword [esp + 0x80]
mov ecx, dword [esp + 0x28]
add eax, 8
mov dword [ebx], eax
mov eax, dword [esp + 0x5c]
mov dword [ebx + 0xc], eax
mov eax, dword [0x66a213d0]
mov dword [esp + 0x5c], 0
mov dword [esp + 0x14], eax
call eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x40]
call eax
mov eax, dword [esp + 0x80]
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, ebx
call esi
cmp eax, 4
lea eax, [esp + 0x50]
jne 0x6678b136
mov dword [esp + 0x28], eax
mov eax, dword [0x66a213d0]
mov dword [esp + 0x14], eax
jmp 0x6678abbb
lea ecx, [esp + 0x40]
call esi
mov ecx, ebx
mov dword [esp + 0x10], eax
call edi
mov ecx, ebx
mov esi, eax
call ebp
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x50]
mov dword [esp + 8], edx
mov edx, esi
shr edx, 0x1f
add esi, edx
mov edx, eax
shr edx, 0x1f
sar esi, 1
add eax, edx
mov dword [esp + 4], esi
mov esi, ecx
sar eax, 1
mov dword [esp], eax
call dword [0x66a213c8]
mov eax, dword [ebx]
mov ecx, ebx
sub esp, 0xc
mov dword [esp], 0xc
call dword [eax + 0x10]
pxor xmm0, xmm0
mov ecx, esi
cvtsi2sd xmm0, eax
sub esp, 4
mulsd xmm0, qword [0x66848dc8]
movsd qword [esp], xmm0
call dword [0x66a2139c]
sub esp, 8
lea ecx, [esp + 0x40]
call dword [0x66a21d38]
mov ebx, dword [0x66a21d24]
lea ecx, [esp + 0x40]
mov dword [esp + 0x20], eax
call ebx
mov ecx, esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x30], eax
add eax, eax
mov dword [esp + 0x34], eax
call dword [0x66a213a4]
mov ecx, dword [esp + 0x28]
mov esi, eax
call ebx
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x38], eax
mov ecx, ebx
call ebp
mov ecx, ebx
mov dword [esp + 0x24], eax
call edi
mov dword [esp + 0x3c], eax
test eax, eax
je 0x6678aeb9
mov eax, dword [esp + 0x24]
lea eax, [eax + eax*2]
lea ebx, [esi + eax]
neg eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x2c], eax
lea esi, [esi]
mov ebp, dword [esp + 0x20]
mov edi, dword [esp + 0x30]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
add eax, dword [esp + 0x2c]
add edi, ebp
mov dword [esp + 0x10], eax
test edx, edx
je 0x6678b116
lea esi, [esi]
movzx eax, byte [ebp]
xor al, byte [ebp + 3]
movzx edx, byte [ebp]
movzx esi, al
and dl, byte [ebp + 3]
movzx ebx, byte [edi]
shr esi, 1
xor bl, byte [edi + 3]
movzx eax, dl
movzx ecx, byte [edi]
add eax, esi
and cl, byte [edi + 3]
movzx ebx, bl
mov dword [esp + 0x14], eax
shr ebx, 1
movzx eax, cl
add edx, esi
add eax, ebx
lea esi, [ecx + ebx]
xor eax, dword [esp + 0x14]
and edx, esi
shr al, 1
mov esi, dword [esp + 0x10]
add eax, edx
mov byte [esi], al
movzx eax, word [ebp + 1]
movzx ecx, word [edi + 1]
xor ax, word [ebp + 4]
xor cx, word [edi + 4]
shr ax, 1
movzx edx, word [ebp + 1]
shr cx, 1
mov ebx, eax
and dx, word [ebp + 4]
and eax, 0x7bef
mov esi, ecx
and bx, 0x7bef
and ecx, 0x7bef
and si, 0x7bef
mov word [esp + 0x14], bx
movzx ebx, word [edi + 1]
mov word [esp + 0x18], si
and bx, word [edi + 4]
movzx esi, dx
add eax, esi
movzx esi, bx
add dx, word [esp + 0x14]
add bx, word [esp + 0x18]
add ecx, esi
and edx, ebx
xor ecx, eax
mov eax, dword [esp + 0x10]
shr ecx, 1
and cx, 0x7bef
add ecx, edx
mov byte [eax + 1], cl
shr cx, 8
add eax, 3
add ebp, 6
mov byte [eax - 1], cl
add edi, 6
mov dword [esp + 0x10], eax
cmp eax, dword [esp + 0x1c]
jne 0x6678b040
mov ebx, dword [esp + 0x34]
add dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x38]
add dword [esp + 0x1c], ebx
sub dword [esp + 0x3c], 1
jne 0x6678b018
jmp 0x6678aeb9
mov ecx, eax
mov dword [esp], ebx
mov dword [esp + 0x28], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 6
call dword [0x66a21d34]
sub esp, 0xc
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x5c]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x5c], eax
mov eax, dword [0x66a213d0]
mov dword [esp + 0x4c], edx
mov dword [esp + 0x14], eax
call eax
jmp 0x6678abbb