Function at 0x46ae40
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, ecx
mov dword [ebp - 8], ebx
push esi
push edi
cmp eax, 9
ja 0x46ae5b
mov dword [0x4da154], eax
mov ecx, dword [ebx + 0xa8]
lea edi, [ebx + 4]
add ecx, 5
mov eax, 0x2aaaaaab
imul ecx
mov ecx, dword [edi + 0x10]
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 4], eax
dec eax
add eax, dword [ebx]
cdq
idiv dword [ebx]
mov edx, eax
mov dword [ebp - 0x10], edx
cmp ecx, 0xb
jb 0x46aead
mov dword [edi + 0x10], 0xb
mov ecx, edi
cmp dword [edi + 0x14], 0xf
jbe 0x46aea5
mov ecx, dword [edi]
lea eax, [ebx + 4]
mov byte [ecx + 0xb], 0
jmp 0x46aec3
mov eax, edi
mov byte [ecx + 0xb], 0
jmp 0x46aec3
mov eax, 0xb
sub eax, ecx
mov ecx, edi
push 0
push eax
call fcn.00461d30
mov edx, dword [ebp - 0x10]
mov eax, edi
cmp dword [edi + 0x14], 0xf
mov ecx, edi
mov esi, edi
jbe 0x46aed1
mov ecx, dword [edi]
mov esi, eax
lea eax, [edx + 0x30]
mov byte [ecx + 7], al
mov eax, esi
cmp dword [edi + 0x14], 0xf
jbe 0x46aee3
mov eax, dword [esi]
mov edi, esi
mov byte [eax + 9], 0x30
cmp edx, 1
jle 0x46af15
mov al, byte [0x4da154]
mov ecx, edi
add al, 0x30
movzx eax, al
push eax
call fcn.00422280
mov eax, dword [0x4da154]
lea esi, [ebx + 4]
inc eax
mov ecx, 0xa
cdq
idiv ecx
mov dword [0x4da154], edx
push 0x2c
mov ecx, edi
call fcn.00422280
mov al, byte [ebx + 0xac]
cmp al, 0x3f
je 0x46af30
push eax
mov ecx, edi
call fcn.00422280
push 0x2c
mov ecx, edi
call fcn.00422280
mov eax, dword [ebx + 0x14]
lea edi, [ebx + 0xb4]
mov ecx, dword [edi]
mov dword [ebp - 0x14], eax
mov eax, dword [edi + 4]
mov dword [ebp - 0x1c], edi
cmp ecx, eax
je 0x46af64
push edi
push eax
push ecx
call fcn.00429a30
mov eax, dword [edi]
lea esi, [ebx + 4]
add esp, 0xc
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x10]
xor edx, edx
mov dword [ebp + 0xc], edx
mov dword [ebp - 0xc], edx
test eax, eax
jle 0x46b123
dec eax
mov dword [ebp - 0x18], eax
nop dword [eax + eax]
mov ecx, dword [esi + 0x10]
mov ebx, dword [ebp - 0x14]
cmp ebx, ecx
ja 0x46af9d
mov dword [esi + 0x10], ebx
mov eax, esi
cmp dword [esi + 0x14], 0xf
jbe 0x46af97
mov eax, dword [esi]
mov byte [eax + ebx], 0
jmp 0x46afae
mov eax, ebx
sub eax, ecx
mov ecx, esi
push 0
push eax
call fcn.00461d30
mov edx, dword [ebp + 0xc]
cmp dword [esi + 0x14], 0xf
mov eax, esi
jbe 0x46afb8
mov eax, dword [esi]
inc byte [eax + 9]
xor ebx, ebx
mov edi, dword [ebp - 4]
cmp edx, edi
jge 0x46b048
lea edi, [edx + edx*2]
add edi, edi
nop dword [eax]
mov ecx, dword [ebp - 8]
cmp ebx, dword [ecx]
jge 0x46b045
mov eax, edi
imul edx, edx, 0xfffe
sar eax, 3
add ecx, eax
and dl, 7
movzx eax, byte [ecx + 0x1c]
movzx ecx, byte [ecx + 0x1d]
shl eax, 8
or eax, ecx
mov ecx, 0xa
sub cl, dl
mov edx, dword [ebp - 8]
shr eax, cl
mov ecx, edi
and eax, 0x3f
sub ecx, dword [edx + 0xa8]
add ecx, 6
test ecx, ecx
jle 0x46b01b
mov edx, 0xff
shl edx, cl
and eax, edx
cmp eax, 0x28
setae cl
lea ecx, [ecx*8 + 0x30]
add cl, al
movzx eax, cl
mov ecx, esi
push eax
call fcn.00422280
mov edx, dword [ebp + 0xc]
inc ebx
inc edx
add edi, 6
mov dword [ebp + 0xc], edx
cmp edx, dword [ebp - 4]
jl 0x46afd0
mov edi, dword [ebp - 4]
push 0x2c
mov ecx, esi
call fcn.00422280
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0xc], eax
jne 0x46b069
mov ecx, dword [ebp - 8]
lea eax, [edi + edi*2]
add eax, eax
sub eax, dword [ecx + 0xa8]
jmp 0x46b06b
xor eax, eax
add al, 0x30
mov ecx, esi
movzx eax, al
push eax
call fcn.00422280
mov edx, dword [esi + 0x10]
xor ebx, ebx
lea ecx, [ebx + 1]
cmp edx, ecx
jbe 0x46b0ab
cmp dword [esi + 0x14], 0xf
jbe 0x46b0a0
mov edi, dword [esi]
nop dword [eax]
movsx eax, byte [edi + ecx]
inc ecx
xor ebx, eax
cmp ecx, edx
jb 0x46b090
jmp 0x46b0ab
movsx eax, byte [esi + ecx]
inc ecx
xor ebx, eax
cmp ecx, edx
jb 0x46b0a0
push 0x2a
mov ecx, esi
call fcn.00422280
mov ecx, ebx
mov edx, 0x37
sar ecx, 4
mov eax, 0x30
cmp ecx, 0xa
cmovge eax, edx
add al, cl
mov ecx, esi
movzx eax, al
push eax
call fcn.00422280
and ebx, 0xf
mov ecx, esi
cmp ebx, 0xa
sbb al, al
and al, 0xf9
add al, 0x37
add al, bl
movzx eax, al
push eax
call fcn.00422280
mov edi, dword [ebp - 0x1c]
push esi
mov eax, dword [edi + 4]
cmp eax, dword [edi + 8]
je 0x46b108
mov ecx, eax
call fcn.00416330
add dword [edi + 4], 0x18
jmp 0x46b110
push eax
mov ecx, edi
call fcn.0046a360
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp + 0xc]
inc eax
mov dword [ebp - 0xc], eax
cmp eax, dword [ebp - 0x10]
jl 0x46af80
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8