Function at 0x46e7e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
mov dword [ebp - 8], edx
push edi
movzx edi, byte [ebx + 0x23]
mov dword [ebp - 0x2c], esi
test byte [esi], 4
mov dword [ebp - 0x24], edi
je 0x46e86a
xor eax, eax
test edi, edi
je 0x46e85d
cmp edi, 0x10
jb 0x46e85d
movaps xmm2, xmmword [str._a_a_a_a]
lea ecx, [esi + 0x20]
mov edx, edi
and edx, 0xfffffff0
nop word [eax + eax]
movups xmm0, xmmword [ecx - 0x20]
lea ecx, [ecx + 0x40]
add eax, 0x10
movaps xmm1, xmm2
pxor xmm0, xmm2
movups xmmword [ecx - 0x60], xmm0
movups xmm0, xmmword [ecx - 0x50]
pxor xmm1, xmm0
movups xmmword [ecx - 0x50], xmm1
movups xmm0, xmmword [ecx - 0x40]
pxor xmm0, xmm2
movups xmmword [ecx - 0x40], xmm0
movups xmm0, xmmword [ecx - 0x30]
pxor xmm0, xmm2
movups xmmword [ecx - 0x30], xmm0
cmp eax, edx
jl 0x46e820
cmp eax, edi
jge 0x46e86a
xor dword [esi + eax*4], 7
inc eax
cmp eax, edi
jl 0x46e861
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x46ea4e
test byte [esi], 0x20
je 0x46e8e9
xor eax, eax
test edi, edi
je 0x46e8d7
cmp edi, 0x10
jb 0x46e8d7
movaps xmm2, xmmword [0x495260]
lea ecx, [esi + 0x20]
mov edx, edi
and edx, 0xfffffff0
movups xmm0, xmmword [ecx - 0x20]
lea ecx, [ecx + 0x40]
add eax, 0x10
movaps xmm1, xmm2
pxor xmm1, xmm0
movups xmmword [ecx - 0x60], xmm1
movaps xmm1, xmm2
movups xmm0, xmmword [ecx - 0x50]
pxor xmm1, xmm0
movups xmmword [ecx - 0x50], xmm1
movaps xmm1, xmm2
movups xmm0, xmmword [ecx - 0x40]
pxor xmm1, xmm0
movups xmmword [ecx - 0x40], xmm1
movups xmm0, xmmword [ecx - 0x30]
pxor xmm0, xmm2
movups xmmword [ecx - 0x30], xmm0
cmp eax, edx
jl 0x46e894
cmp eax, edi
jge 0x46e8e9
nop dword [eax + eax]
xor dword [esi + eax*4], 0x38
inc eax
cmp eax, edi
jl 0x46e8e0
xor ecx, ecx
test edi, edi
je 0x46e932
nop
mov eax, dword [esi + ecx*4]
mov al, byte [eax + 0x48c260]
test al, al
jne 0x46e904
inc ecx
cmp ecx, edi
jl 0x46e8f0
jmp 0x46e932
jle 0x46e932
xor eax, eax
cmp byte [ebx + 0x28], al
sete al
add eax, 2
cmp ecx, eax
jge 0x46e932
xor ecx, ecx
nop word [eax + eax]
mov eax, dword [esi + ecx*4]
movzx eax, byte [eax + 0x48c220]
mov dword [esi + ecx*4], eax
inc ecx
cmp ecx, edi
jl 0x46e920
cmp byte [ebx + 0x28], 0
je 0x46e968
mov eax, dword [esi]
mov ebx, 2
mov dword [ebp - 4], ebx
movzx eax, byte [eax + 0x48c968]
shl eax, 6
add eax, dword [esi + 4]
movsx edx, word [eax*2 + 0x48c330]
mov eax, dword [ebp - 8]
mov edi, dword [eax + 4]
imul edi, edx
mov dword [ebp + 0xc], edi
jmp 0x46ed63
mov ecx, dword [esi]
xor eax, eax
mov edx, dword [esi + 4]
cmp edx, ecx
mov edi, dword [esi + 8]
setg al
xor ebx, ebx
cmp edi, edx
mov dword [ebp + 0xc], eax
setg bl
xor eax, eax
cmp edi, ecx
setg al
add ebx, eax
cmp byte [ecx + 0x48c260], 0
je 0x46e9b8
movzx eax, byte [ecx + 0x48c968]
mov ecx, eax
shl ecx, 6
sub ecx, eax
sub ecx, dword [ebp + 0xc]
add ecx, edx
mov edx, ecx
shl edx, 5
sub edx, ecx
add edx, edx
sub edx, ebx
add edx, edi
jmp 0x46ea35
movzx ecx, byte [ecx + 0x48c900]
lea eax, [ecx*8]
sub eax, ecx
cmp byte [edx + 0x48c260], 0
je 0x46e9f0
movzx edx, byte [edx + 0x48c8b0]
lea eax, [eax*4 + 0x17a]
add eax, edx
mov edx, eax
shl edx, 5
sub edx, eax
add edx, edx
sub edx, ebx
add edx, edi
jmp 0x46ea35
movzx edx, byte [edx + 0x48c900]
add edx, eax
sub edx, dword [ebp + 0xc]
cmp byte [edi + 0x48c260], 0
je 0x46ea20
movzx eax, byte [edi + 0x48c8b0]
add edx, 0x43d
lea ecx, [edx*8]
sub ecx, edx
lea edx, [eax + ecx*4]
jmp 0x46ea35
movzx eax, byte [edi + 0x48c900]
add edx, 0x144a
lea ecx, [edx + edx*2]
lea edx, [eax + ecx*2]
sub edx, ebx
mov eax, dword [ebp - 8]
mov ebx, 3
mov dword [ebp - 4], ebx
mov edi, dword [eax + 4]
imul edi, edx
mov dword [ebp + 0xc], edi
jmp 0x46ed63
movzx ebx, byte [ebx + 0x28]
lea eax, [esi + 4]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x18], eax
cmp ebx, 1
jbe 0x46eac0
mov edi, 2
mov dword [ebp - 0xc], eax
lea ecx, [ebx - 1]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], ecx
jmp 0x46ea76
mov edx, dword [ebp + 0xc]
shl edx, 6
mov ecx, edi
cmp edi, ebx
jge 0x46eaae
nop
mov eax, dword [eax]
mov edi, dword [esi + ecx*4]
mov dword [ebp - 0x20], eax
mov al, byte [eax + edx + 0x48c160]
cmp al, byte [edx + edi + 0x48c160]
jae 0x46eaa3
mov eax, dword [ebp - 0xc]
mov dword [eax], edi
mov eax, dword [ebp - 0x20]
mov dword [esi + ecx*4], eax
mov eax, dword [ebp - 0xc]
inc ecx
cmp ecx, ebx
jl 0x46ea80
mov edi, dword [ebp - 0x14]
inc edi
add eax, 4
sub dword [ebp - 0x10], 1
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], eax
jne 0x46ea73
jmp 0x46eac3
shl edx, 6
mov eax, dword [esi]
mov edi, 1
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
movzx ecx, byte [eax + edx + 0x48c270]
mov eax, dword [ebp + 0xc]
lea eax, [eax + eax*2]
lea eax, [eax*2 - 7]
add eax, ebx
lea eax, [eax + eax*2]
lea eax, [ecx + eax*8]
mov ecx, dword [eax*4 + 0x5ba400]
mov dword [ebp + 0xc], ecx
cmp ebx, edi
jbe 0x46eb93
lea eax, [ebx - 1]
mov dword [ebp - 0x20], eax
cmp eax, 2
jl 0x46eb63
mov ecx, ebx
shl ecx, 6
sub ecx, 0x40
xor ebx, ebx
nop dword [eax]
mov eax, dword [esi + edi*4]
movzx eax, byte [eax + edx + 0x48c160]
add eax, ecx
add ebx, dword [eax*4 + 0x5b9d00]
mov eax, dword [esi + edi*4 + 4]
add edi, 2
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp - 0x10]
movzx eax, byte [eax + edx + 0x48c160]
add eax, ecx
add ecx, 0xffffff80
add ebx, dword [eax*4 + 0x5b9c00]
mov dword [ebp - 0x10], ebx
mov ebx, dword [ebp - 0xc]
cmp edi, dword [ebp - 0x20]
jl 0x46eb20
mov ebx, dword [ebp - 4]
cmp edi, ebx
jge 0x46eb88
mov eax, dword [esi + edi*4]
movzx ecx, byte [eax + edx + 0x48c160]
mov eax, ebx
sub eax, edi
shl eax, 6
add ecx, eax
mov eax, dword [ebp + 0xc]
add eax, dword [ecx*4 + 0x5b9d00]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0xc]
add ecx, eax
mov eax, dword [ebp - 8]
mov edi, dword [eax + 4]
mov eax, dword [ebp + 8]
imul edi, ecx
mov al, byte [eax + 0x29]
mov dword [ebp + 0xc], edi
test al, al
je 0x46ed60
movzx edx, al
mov dword [ebp - 0x14], edx
lea eax, [edx + ebx]
mov dword [ebp - 0xc], eax
cmp ebx, eax
lea eax, [ebx*4]
jae 0x46ed42
lea ecx, [ebx + 1]
mov dword [ebp - 0x30], eax
mov ebx, dword [ebp - 0xc]
lea edi, [eax + esi]
mov dword [ebp + 8], ecx
mov eax, ecx
cmp ecx, ebx
jge 0x46ebf9
nop dword [eax]
mov ecx, dword [esi + eax*4]
mov edx, dword [edi]
cmp edx, ecx
jle 0x46ebee
mov dword [edi], ecx
mov dword [esi + eax*4], edx
inc eax
cmp eax, ebx
jl 0x46ebe0
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
inc ecx
add edi, 4
sub edx, 1
mov dword [ebp + 8], ecx
mov dword [ebp - 0x14], edx
jne 0x46ebd7
mov ebx, dword [ebp - 4]
mov eax, ebx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], 0
nop
mov eax, dword [esi + eax*4]
xor ecx, ecx
mov dword [ebp - 0x10], eax
mov dword [ebp + 8], 0
movd xmm0, eax
pshufd xmm5, xmm0, 0
test ebx, ebx
je 0x46eca2
cmp ebx, 8
jb 0x46eca2
movaps xmm4, xmmword [0x494eb0]
mov eax, ebx
and eax, 0xfffffff8
xorps xmm3, xmm3
xorps xmm2, xmm2
movups xmm0, xmmword [esi + ecx*4]
movaps xmm1, xmm5
pcmpgtd xmm1, xmm0
movups xmm0, xmmword [esi + ecx*4 + 0x10]
add ecx, 8
pand xmm1, xmm4
paddd xmm3, xmm1
movaps xmm1, xmm5
pcmpgtd xmm1, xmm0
pand xmm1, xmm4
paddd xmm2, xmm1
cmp ecx, eax
jl 0x46ec53
paddd xmm2, xmm3
movaps xmm0, xmm2
psrldq xmm0, 8
paddd xmm2, xmm0
movups xmm0, xmm2
psrldq xmm0, 4
paddd xmm2, xmm0
movd dword [ebp + 8], xmm2
xor edx, edx
xor edi, edi
cmp ecx, ebx
jge 0x46ed0d
mov eax, ebx
sub eax, ecx
cmp eax, 2
jl 0x46ece9
lea eax, [ebx - 1]
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0x28], eax
nop dword [eax]
xor eax, eax
cmp ebx, dword [esi + ecx*4]
mov esi, dword [ebp - 0x18]
setg al
add edx, eax
xor eax, eax
cmp ebx, dword [esi + ecx*4]
mov esi, dword [ebp - 0x2c]
setg al
add ecx, 2
add edi, eax
cmp ecx, dword [ebp - 0x28]
jl 0x46ecc0
mov ebx, dword [ebp - 4]
cmp ecx, ebx
jge 0x46ed03
mov ebx, dword [ebp - 0x10]
xor eax, eax
cmp ebx, dword [esi + ecx*4]
mov ecx, dword [ebp + 8]
mov ebx, dword [ebp - 4]
setg al
add ecx, eax
lea eax, [edi + edx]
add ecx, eax
jmp 0x46ed10
mov ecx, dword [ebp + 8]
lea eax, [edi + edx]
add ecx, eax
jmp 0x46ed10
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x20]
mov eax, edx
mov edi, dword [ebp - 0x14]
sub eax, ecx
add eax, dword [ebp - 0x10]
add edx, 0x40
mov dword [ebp - 0x20], edx
add edi, dword [eax*4 + 0x5b9de0]
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebp - 0xc]
jl 0x46ec20
mov eax, dword [ebp - 0x30]
jmp 0x46ed44
xor edi, edi
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp - 0xc]
mov dword [ebp - 4], ebx
mov eax, dword [eax + ecx + 4]
imul eax, edi
mov edi, dword [ebp + 0xc]
add edi, eax
mov eax, ecx
mov dword [ebp + 0xc], edi
jmp 0x46ed63
mov eax, dword [ebp - 8]
cmp ebx, dword [ebp - 0x24]
jae 0x46ef46
nop dword [eax]
movzx edx, byte [ebx + eax + 0x27]
lea edi, [ebx*4]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x18], edi
lea eax, [edx + ebx]
mov dword [ebp - 0x1c], eax
cmp ebx, eax
jge 0x46edd9
lea ecx, [ebx + 1]
add edi, esi
mov dword [ebp + 8], ecx
mov ebx, eax
mov eax, ecx
cmp ecx, ebx
jge 0x46edb9
nop dword [eax]
mov ecx, dword [esi + eax*4]
mov edx, dword [edi]
cmp edx, ecx
jle 0x46edae
mov dword [edi], ecx
mov dword [esi + eax*4], edx
inc eax
cmp eax, ebx
jl 0x46eda0
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x20]
inc ecx
add edi, 4
sub edx, 1
mov dword [ebp + 8], ecx
mov dword [ebp - 0x20], edx
jne 0x46ed96
mov ebx, dword [ebp - 4]
mov ecx, ebx
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x14], ecx
jmp 0x46edee
xor edx, edx
mov dword [ebp - 0x18], edi
mov dword [ebp - 0xc], edx
mov ecx, ebx
mov dword [ebp - 0x14], ecx
cmp ebx, eax
jge 0x46ef1a
mov dword [ebp - 0x20], 0
mov edx, dword [esi + ecx*4]
xor eax, eax
xor ecx, ecx
mov dword [ebp + 8], ecx
movd xmm0, edx
pshufd xmm5, xmm0, 0
test ebx, ebx
jle 0x46ee91
cmp ebx, 8
jb 0x46ee91
mov ecx, ebx
and ecx, 0x80000007
jns 0x46ee28
dec ecx
or ecx, 0xfffffff8
inc ecx
movaps xmm4, xmmword [0x494eb0]
mov edi, ebx
sub edi, ecx
xorps xmm3, xmm3
xorps xmm2, xmm2
nop dword [eax]
movups xmm0, xmmword [esi + eax*4]
movaps xmm1, xmm5
pcmpgtd xmm1, xmm0
movups xmm0, xmmword [esi + eax*4 + 0x10]
add eax, 8
pand xmm1, xmm4
paddd xmm3, xmm1
movaps xmm1, xmm5
pcmpgtd xmm1, xmm0
pand xmm1, xmm4
paddd xmm2, xmm1
cmp eax, edi
jl 0x46ee40
paddd xmm2, xmm3
movaps xmm0, xmm2
psrldq xmm0, 8
paddd xmm2, xmm0
movups xmm0, xmm2
psrldq xmm0, 4
paddd xmm2, xmm0
movd ecx, xmm2
mov dword [ebp + 8], ecx
xor edi, edi
mov dword [ebp - 0x10], edi
cmp eax, ebx
jge 0x46eee9
mov ecx, ebx
sub ecx, eax
cmp ecx, 2
jl 0x46eed4
lea ecx, [ebx - 1]
mov dword [ebp - 0x30], ecx
mov ebx, ecx
nop dword [eax + eax]
xor ecx, ecx
cmp edx, dword [esi + eax*4]
setg cl
add edi, ecx
xor ecx, ecx
cmp edx, dword [esi + eax*4 + 4]
setg cl
add eax, 2
add dword [ebp - 0x10], ecx
cmp eax, ebx
jl 0x46eeb0
mov ebx, dword [ebp - 4]
cmp eax, ebx
jge 0x46eedf
xor ecx, ecx
cmp edx, dword [esi + eax*4]
setg cl
add dword [ebp + 8], ecx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
add eax, edi
add ecx, eax
mov edi, dword [ebp - 0x20]
mov eax, edi
sub eax, ecx
add edi, 0x40
mov ecx, dword [ebp - 0x14]
add eax, edx
mov edx, dword [ebp - 0xc]
inc ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x20], edi
add edx, dword [eax*4 + 0x5b9e00]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0xc], edx
cmp ecx, eax
jl 0x46edf5
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 8]
mov ebx, eax
mov dword [ebp - 4], ebx
mov ecx, dword [edi + ecx + 4]
imul ecx, edx
mov edx, dword [ebp + 0xc]
add edx, ecx
cmp eax, dword [ebp - 0x24]
mov eax, dword [ebp - 8]
mov dword [ebp + 0xc], edx
jl 0x46ed70
pop edi
pop esi
mov eax, edx
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret