Function at 0x4665e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, edx
push esi
mov esi, ecx
mov dword [esp + 8], ebx
mov eax, ebx
mov dword [esp + 0x18], esi
sub eax, esi
and eax, 0xfffffffc
push edi
cmp eax, 0x80
jle 0x466686
mov edx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
test edi, edi
jle 0x4666dc
push edx
push ebx
mov edx, esi
lea ecx, [esp + 0x28]
call fcn.00466bd0
mov edx, dword [esp + 0x28]
mov eax, edi
sar eax, 2
mov ecx, ebx
sub ecx, dword [esp + 0x2c]
add esp, 8
sar edi, 1
and ecx, 0xfffffffc
add edi, eax
mov eax, edx
sub eax, esi
and eax, 0xfffffffc
cmp eax, ecx
mov eax, dword [ebp + 0xc]
push eax
push edi
jge 0x46665f
mov ecx, esi
call fcn.004665e0
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x24], esi
jmp 0x466672
mov ecx, dword [esp + 0x2c]
mov edx, ebx
call fcn.004665e0
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x14], ebx
mov edx, dword [ebp + 0xc]
mov eax, ebx
sub eax, esi
add esp, 8
and eax, 0xfffffffc
cmp eax, 0x80
jg 0x466610
cmp esi, ebx
je 0x46685e
lea ebx, [esi + 4]
mov dword [esp + 0x18], ebx
cmp ebx, dword [esp + 0xc]
je 0x46685e
nop
mov eax, dword [ebx]
mov ecx, eax
push dword [esi]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], eax
call fcn.0044ba90
test al, al
je 0x4667fe
lea edi, [ebx + 4]
mov edx, ebx
push edi
mov ecx, esi
call fcn.004675c0
mov ecx, dword [esp + 0x14]
add esp, 4
mov dword [esi], ecx
mov ebx, edi
mov dword [esp + 0x18], edi
jmp 0x466854
sub ebx, esi
mov eax, ebx
mov dword [esp + 0xc], ebx
sar eax, 2
mov ecx, eax
mov dword [esp + 0x1c], eax
sar ecx, 1
test ecx, ecx
jle 0x4667b3
dec eax
mov edi, eax
mov dword [esp + 0x20], eax
sar edi, 1
mov dword [esp + 0x18], edi
mov eax, dword [esi + ecx*4 - 4]
dec ecx
mov dword [esp + 0x10], ecx
mov ebx, ecx
mov dword [esp + 0x14], eax
mov edx, ecx
cmp ecx, edi
jge 0x46674f
nop dword [eax]
lea edi, [edx + edx]
push dword [esi + edi*4 + 4]
mov ecx, dword [esi + edi*4 + 8]
call fcn.0044ba90
movzx eax, al
lea edx, [edi + 1]
mov edi, dword [esp + 0x18]
xor eax, 1
add edx, eax
mov eax, dword [esi + edx*4]
mov dword [esi + ebx*4], eax
mov ebx, edx
cmp edx, edi
jl 0x466720
mov ecx, dword [esp + 0x10]
cmp ebx, edi
jne 0x466766
mov eax, dword [esp + 0x1c]
test al, 1
jne 0x466766
mov eax, dword [esi + eax*4 - 4]
mov dword [esi + ebx*4], eax
mov ebx, dword [esp + 0x20]
cmp ecx, ebx
jge 0x466799
nop word [eax + eax]
push dword [esp + 0x14]
lea edi, [ebx - 1]
sar edi, 1
mov ecx, dword [esi + edi*4]
call fcn.0044ba90
mov ecx, dword [esp + 0x10]
test al, al
je 0x466795
mov eax, dword [esi + edi*4]
mov dword [esi + ebx*4], eax
mov ebx, edi
cmp ecx, edi
jl 0x466770
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov dword [esi + ebx*4], eax
test ecx, ecx
jg 0x466704
mov ebx, dword [esp + 0xc]
mov edx, dword [ebp + 0xc]
mov eax, dword [esp + 0x1c]
cmp eax, 2
jl 0x46685e
nop dword [eax]
mov eax, dword [esi + ebx - 4]
mov ecx, esi
mov dword [esp + 0x20], eax
mov eax, dword [esi]
mov dword [esi + ebx - 4], eax
lea eax, [esp + 0x20]
push edx
push eax
lea eax, [ebx - 4]
xor edx, edx
sar eax, 2
push eax
call fcn.004671e0
mov edx, dword [ebp + 0xc]
add ebx, 0xfffffffc
mov eax, ebx
add esp, 0xc
and eax, 0xfffffffc
cmp eax, 8
jge 0x4667c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebx - 4]
mov ecx, dword [esp + 0x14]
lea edi, [ebx - 4]
call fcn.0044ba90
test al, al
je 0x466843
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
nop dword [eax]
mov eax, dword [edi]
mov ecx, ebx
mov dword [esi], eax
mov esi, edi
push dword [edi - 4]
sub edi, 4
call fcn.0044ba90
test al, al
jne 0x466820
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
add ebx, 4
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x18], ebx
mov dword [eax], ecx
cmp ebx, dword [esp + 0xc]
jne 0x4666a0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret