Function at 0x46ee30
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x18
mov eax, dword [esp + 0x44]
mov ebx, dword [esp + 0x34]
mov edx, dword [esp + 0x40]
mov ebp, dword [esp + 0x30]
mov edi, dword [esp + 0x2c]
mov ecx, dword [eax]
test ebx, ebx
je 0x46ee7b
nop word cs:[eax + eax]
nop dword [eax + eax]
test ecx, ecx
je 0x46ee7b
movzx eax, byte [edx + ecx]
inc ecx
and ecx, 0xf
xor al, byte [edi]
inc edi
mov byte [ebp], al
inc ebp
cmp ebx, 1
lea ebx, [ebx - 1]
jne 0x46ee60
mov edx, dword [esp + 0x3c]
cmp ebx, 0x10
mov dword [esp + 4], ecx
mov esi, dword [edx + 0xc]
bswap esi
jb 0x46ef82
nop word cs:[eax + eax]
nop dword [eax + eax]
mov eax, ebx
mov dword [esp + 8], ebx
mov ebx, edi
mov edi, esi
mov ecx, 0
shr eax, 4
neg edi
add esi, eax
cmovb esi, ecx
cmovae edi, eax
push edx
push dword [esp + 0x3c]
push edi
push ebp
mov dword [esp + 0x1c], ebx
push ebx
call dword [esp + 0x5c]
mov edx, dword [esp + 0x50]
add esp, 0x14
mov eax, esi
test esi, esi
bswap eax
mov dword [edx + 0xc], eax
jne 0x46ef64
movzx eax, byte [edx + 0xb]
inc eax
mov byte [edx + 0xb], al
shr eax, 8
movzx ecx, byte [edx + 0xa]
add ecx, eax
mov byte [edx + 0xa], cl
shr ecx, 8
movzx eax, byte [edx + 9]
add eax, ecx
mov byte [edx + 9], al
shr eax, 8
movzx ecx, byte [edx + 8]
add ecx, eax
mov byte [edx + 8], cl
shr ecx, 8
movzx eax, byte [edx + 7]
add eax, ecx
mov byte [edx + 7], al
shr eax, 8
movzx ecx, byte [edx + 6]
add ecx, eax
mov byte [edx + 6], cl
shr ecx, 8
movzx eax, byte [edx + 5]
add eax, ecx
mov byte [edx + 5], al
shr eax, 8
movzx ecx, byte [edx + 4]
add ecx, eax
mov byte [edx + 4], cl
shr ecx, 8
movzx eax, byte [edx + 3]
add eax, ecx
mov byte [edx + 3], al
shr eax, 8
movzx ecx, byte [edx + 2]
add ecx, eax
mov byte [edx + 2], cl
shr ecx, 8
movzx eax, byte [edx + 1]
add eax, ecx
mov byte [edx + 1], al
add byte [edx], ah
mov ecx, dword [esp + 8]
mov eax, dword [esp + 0xc]
shl edi, 4
add ebp, edi
sub ecx, edi
add eax, edi
cmp ecx, 0xf
mov edi, eax
mov ebx, ecx
ja 0x46eea0
test ebx, ebx
mov dword [esp + 8], ebp
je 0x46f168
mov eax, dword [esp + 0x40]
mov dword [esp + 0xc], edi
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [eax + 0xc], 0
mov dword [eax + 8], 0
push edx
push dword [esp + 0x3c]
push 1
push eax
push eax
call dword [esp + 0x5c]
mov edx, dword [esp + 0x50]
add esp, 0x14
inc esi
bswap esi
mov dword [edx + 0xc], esi
mov esi, dword [esp + 4]
jne 0x46f057
movzx eax, byte [edx + 0xb]
inc eax
mov byte [edx + 0xb], al
shr eax, 8
movzx ecx, byte [edx + 0xa]
add ecx, eax
mov byte [edx + 0xa], cl
shr ecx, 8
movzx eax, byte [edx + 9]
add eax, ecx
mov byte [edx + 9], al
shr eax, 8
movzx ecx, byte [edx + 8]
add ecx, eax
mov byte [edx + 8], cl
shr ecx, 8
movzx eax, byte [edx + 7]
add eax, ecx
mov byte [edx + 7], al
shr eax, 8
movzx ecx, byte [edx + 6]
add ecx, eax
mov byte [edx + 6], cl
shr ecx, 8
movzx eax, byte [edx + 5]
add eax, ecx
mov byte [edx + 5], al
shr eax, 8
movzx ecx, byte [edx + 4]
add ecx, eax
mov byte [edx + 4], cl
shr ecx, 8
movzx eax, byte [edx + 3]
add eax, ecx
mov byte [edx + 3], al
shr eax, 8
movzx ecx, byte [edx + 2]
add ecx, eax
mov byte [edx + 2], cl
shr ecx, 8
movzx eax, byte [edx + 1]
add eax, ecx
mov byte [edx + 1], al
add byte [edx], ah
mov ecx, esi
mov esi, dword [esp + 0x40]
mov ebp, dword [esp + 8]
mov edi, dword [esp + 0xc]
cmp ebx, 0x20
mov eax, ebx
jb 0x46f13d
mov eax, dword [esp + 4]
lea ecx, [ebx + eax]
lea edx, [ebp + eax]
lea esi, [ebp + ecx]
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], esi
lea esi, [edi + ecx]
add ecx, dword [esp + 0x40]
cmp edx, esi
mov edx, dword [esp + 0x14]
lea esi, [edi + eax]
setb byte [esp + 3]
cmp esi, edx
mov esi, dword [esp + 0x40]
setb byte [esp + 2]
cmp dword [esp + 0x10], ecx
lea ecx, [esi + eax]
setb byte [esp + 0x10]
cmp ecx, edx
mov cl, byte [esp + 2]
setb dl
test byte [esp + 3], cl
mov ecx, eax
mov eax, ebx
jne 0x46f13d
and byte [esp + 0x10], dl
mov ecx, dword [esp + 4]
mov eax, ebx
jne 0x46f13d
mov ecx, dword [esp + 4]
mov edx, ebx
and edx, 0xffffffe0
lea esi, [ebp + ecx + 0x10]
mov ebp, dword [esp + 0x40]
lea eax, [ecx + edx]
mov dword [esp + 0x14], eax
mov eax, ebx
sub eax, edx
lea ebp, [ebp + ecx + 0x10]
lea ecx, [edi + ecx + 0x10]
mov edi, edx
xor edx, edx
nop word [eax + eax]
movups xmm0, xmmword [ecx + edx - 0x10]
movups xmm2, xmmword [ebp + edx - 0x10]
movups xmm1, xmmword [ecx + edx]
movups xmm3, xmmword [ebp + edx]
xorps xmm2, xmm0
xorps xmm3, xmm1
movups xmmword [esi + edx - 0x10], xmm2
movups xmmword [esi + edx], xmm3
add edx, 0x20
cmp edi, edx
jne 0x46f100
cmp ebx, edi
mov esi, dword [esp + 0x40]
mov ebp, dword [esp + 8]
mov edi, dword [esp + 0xc]
mov ecx, dword [esp + 0x14]
je 0x46f160
add edi, ecx
add esi, ecx
add ebp, ecx
xor ecx, ecx
nop word cs:[eax + eax]
nop
movzx edx, byte [esi + ecx]
xor dl, byte [edi + ecx]
mov byte [ebp + ecx], dl
inc ecx
cmp eax, ecx
jne 0x46f150
mov ecx, dword [esp + 4]
add ecx, ebx
jmp 0x46f16c
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0x44]
mov dword [eax], ecx
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret