Function at 0x4665d6
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
pop ebp
push ecx
mov edx, dword [esp + 0xc]
shr edx, 5
mov eax, ecx
lea ecx, [edx - 4]
cmp ecx, 0xa
ja 0x46696c
push ebx
push ebp
push esi
xor ecx, ecx
push edi
test edx, edx
jbe 0x46660c
mov esi, dword [esp + 0x18]
mov ebx, dword [esi + ecx*4]
mov edi, dword [eax + 0x1c]
mov dword [edi + ecx*4], ebx
inc ecx
cmp ecx, edx
jb 0x4665fe
mov ecx, dword [eax + 0x1c]
mov dword [ecx + edx*4], edx
lea ecx, [edx + 1]
cmp ecx, 0xf
jae 0x46662a
mov edx, dword [eax + 0x1c]
mov dword [edx + ecx*4], 0
inc ecx
cmp ecx, 0xf
jb 0x46661a
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 8
mov dword [esp + 0x10], 0xc
jmp 0x46664a
mov ecx, dword [esp + 0x18]
mov esi, 8
add ecx, esi
jmp 0x46665a
mov edi, dword [eax + 0x1c]
mov ebx, dword [eax + 0xc]
mov ebp, dword [eax + 0x10]
mov edx, dword [esp + 0x1c]
lea edx, [ecx + edx - 0x10]
mov ebx, dword [edx + ebx]
mov ebx, dword [edi + ebx*4]
mov ebp, dword [edx + ebp]
xor ebx, dword [edi + ebp*4]
lea ebp, [ecx - 8]
rol ebx, 3
xor ebx, ebp
xor dword [edx + edi], ebx
mov edi, dword [eax + 0x1c]
mov ebx, dword [eax + 0xc]
mov ebx, dword [edx + ebx + 4]
mov ebx, dword [edi + ebx*4]
mov ebp, dword [eax + 0x10]
mov ebp, dword [edx + ebp + 4]
xor ebx, dword [edi + ebp*4]
lea ebp, [ecx - 4]
rol ebx, 3
xor ebx, ebp
xor dword [edx + edi + 4], ebx
mov edx, dword [eax + 0x1c]
mov edi, dword [eax + 0xc]
mov edi, dword [esi + edi]
mov edi, dword [edx + edi*4]
mov ebx, dword [eax + 0x10]
mov ebx, dword [esi + ebx]
xor edi, dword [edx + ebx*4]
add esi, 0x14
rol edi, 3
xor edi, dword [edx + esi - 0x14]
xor edi, ecx
mov dword [edx + esi - 0x14], edi
mov edx, dword [esp + 0x1c]
mov edi, dword [eax + 0x1c]
mov ebx, dword [eax + 0x10]
mov ebp, dword [eax + 0xc]
lea edx, [ecx + edx - 4]
mov ebx, dword [edx + ebx]
mov ebx, dword [edi + ebx*4]
mov ebp, dword [edx + ebp]
xor ebx, dword [edi + ebp*4]
lea ebp, [ecx + 4]
rol ebx, 3
xor ebx, ebp
xor dword [edx + edi], ebx
mov edx, dword [esp + 0x1c]
mov ebx, dword [eax + 0x10]
mov edi, dword [eax + 0x1c]
mov ebp, dword [eax + 0xc]
add edx, ecx
mov ebx, dword [edx + ebx]
mov ebx, dword [edi + ebx*4]
mov ebp, dword [edx + ebp]
xor ebx, dword [edi + ebp*4]
lea ebp, [ecx + 8]
rol ebx, 3
xor ebx, ebp
xor dword [edx + edi], ebx
add ecx, 0x14
cmp esi, 0x44
jb 0x46665a
mov esi, 4
lea edi, [esi - 3]
mov ecx, 0xc
jmp 0x46673a
mov edx, dword [eax + 0x1c]
mov ebx, dword [eax + 8]
mov ebx, dword [ecx + ebx - 0xc]
mov ebx, dword [edx + ebx*4]
mov ebp, dword [eax]
and ebx, 0x1ff
mov ebx, dword [ebp + ebx*4]
add ebx, dword [ecx + edx - 0xc]
add ecx, 0x14
rol ebx, 9
mov dword [ecx + edx - 0x20], ebx
mov edx, dword [eax + 0x1c]
mov ebx, dword [eax + 8]
mov ebx, dword [ebx + ecx - 0x1c]
mov ebx, dword [edx + ebx*4]
mov ebp, dword [eax]
and ebx, 0x1ff
mov ebx, dword [ebp + ebx*4]
add ebx, dword [ecx + edx - 0x1c]
rol ebx, 9
mov dword [ecx + edx - 0x1c], ebx
mov edx, dword [eax + 0x1c]
mov ebx, dword [eax + 8]
mov ebx, dword [ecx + ebx - 0x18]
mov ebx, dword [edx + ebx*4]
mov ebp, dword [eax]
and ebx, 0x1ff
mov ebx, dword [ebp + ebx*4]
add ebx, dword [ecx + edx - 0x18]
rol ebx, 9
mov dword [ecx + edx - 0x18], ebx
mov edx, dword [eax + 0x1c]
mov ebx, dword [eax + 8]
mov ebx, dword [ecx + ebx - 0x14]
mov ebx, dword [edx + ebx*4]
mov ebp, dword [eax]
and ebx, 0x1ff
mov ebx, dword [ebp + ebx*4]
add ebx, dword [ecx + edx - 0x14]
rol ebx, 9
mov dword [ecx + edx - 0x14], ebx
mov ebx, dword [eax + 8]
mov ebx, dword [ecx + ebx - 0x10]
mov edx, dword [eax + 0x1c]
mov ebx, dword [edx + ebx*4]
mov ebp, dword [eax]
and ebx, 0x1ff
mov ebx, dword [ebp + ebx*4]
add ebx, dword [ecx + edx - 0x10]
rol ebx, 9
mov dword [ecx + edx - 0x10], ebx
cmp ecx, 0x48
jb 0x46673a
sub esi, edi
jne 0x46672c
mov ecx, dword [eax + 0x14]
mov edx, dword [ecx]
mov ecx, dword [eax + 0x1c]
mov edx, dword [ecx + edx*4]
mov ecx, dword [esp + 0x10]
mov esi, dword [eax + 4]
mov dword [ecx + esi - 0xc], edx
mov edx, dword [eax + 0x14]
mov edx, dword [edx + 4]
mov esi, dword [eax + 0x1c]
mov edx, dword [esi + edx*4]
mov ebx, dword [eax + 4]
mov dword [ebx + ecx - 8], edx
mov edx, dword [eax + 0x14]
mov edx, dword [edx + 8]
mov esi, dword [eax + 0x1c]
mov edx, dword [esi + edx*4]
mov ebx, dword [eax + 4]
mov dword [ebx + ecx - 4], edx
mov edx, dword [eax + 0x14]
mov edx, dword [edx + 0xc]
mov esi, dword [eax + 0x1c]
mov edx, dword [esi + edx*4]
mov ebx, dword [eax + 4]
mov dword [ecx + ebx], edx
mov edx, dword [eax + 0x14]
mov edx, dword [edx + 0x10]
mov esi, dword [eax + 0x1c]
mov edx, dword [esi + edx*4]
mov ebx, dword [eax + 4]
mov dword [ebx + ecx + 4], edx
mov edx, dword [eax + 0x14]
mov edx, dword [edx + 0x14]
mov esi, dword [eax + 0x1c]
mov edx, dword [esi + edx*4]
mov ebx, dword [eax + 4]
mov dword [ebx + ecx + 8], edx
mov edx, dword [eax + 0x14]
mov edx, dword [edx + 0x18]
mov esi, dword [eax + 0x1c]
mov edx, dword [esi + edx*4]
mov ebx, dword [eax + 4]
mov dword [ebx + ecx + 0xc], edx
mov edx, dword [eax + 0x14]
mov edx, dword [edx + 0x1c]
mov esi, dword [eax + 0x1c]
mov edx, dword [esi + edx*4]
mov ebx, dword [eax + 4]
add dword [esp + 0x18], edi
sub dword [esp + 0x1c], edi
mov dword [ebx + ecx + 0x10], edx
mov edx, dword [eax + 0x14]
mov edx, dword [edx + 0x20]
mov esi, dword [eax + 0x1c]
mov edx, dword [esi + edx*4]
mov ebx, dword [eax + 4]
mov dword [ebx + ecx + 0x14], edx
mov edx, dword [eax + 0x14]
mov edx, dword [edx + 0x24]
mov esi, dword [eax + 0x1c]
mov ebx, dword [eax + 4]
mov edx, dword [esi + edx*4]
mov dword [ebx + ecx + 0x18], edx
add ecx, 0x28
mov dword [esp + 0x10], ecx
cmp ecx, 0xac
jb 0x46664a
mov edi, 0x14
mov ecx, dword [eax + 4]
mov esi, dword [ecx + edi]
add ecx, edi
or esi, 3
mov edx, esi
shr edx, 1
mov ebx, esi
not ebx
xor edx, ebx
and edx, 0x7fffffff
mov ebx, edx
shr ebx, 2
mov ebp, edx
shr ebp, 1
and ebx, ebp
and edx, ebx
mov ebx, edx
mov ebp, edx
shr ebx, 6
shr ebp, 3
and ebx, ebp
and edx, ebx
mov dword [esp + 0x1c], ecx
je 0x466957
mov ebp, dword [eax + 0x18]
add edx, edx
lea ecx, [edx + edx]
or edx, ecx
lea ecx, [edx*4]
or edx, ecx
mov ecx, dword [eax + 4]
mov ebx, dword [ecx + edi]
add ecx, edi
mov ecx, dword [ecx - 4]
and ebx, 3
mov ebx, dword [ebp + ebx*4]
rol ebx, cl
mov ecx, edx
shl ecx, 4
or ecx, edx
and ebx, ecx
mov ecx, dword [esp + 0x1c]
and ebx, 0xfffffffc
xor esi, ebx
add edi, 8
mov dword [ecx], esi
cmp edi, 0x94
jb 0x4668e2
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 8