Function at 0x4ae5d0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x30
mov eax, dword [0x5e4ce0]
xor eax, esp
mov dword [esp + 0x2c], eax
push ebp
mov ebp, dword [esp + 0x38]
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
push edi
mov edi, dword [esp + 0x48]
mov dword [esp + 0x14], esi
je 0x4ae60e
pop edi
pop esi
mov eax, 0xfffffffb
pop ebp
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004d99c4
add esp, 0x30
ret 0xc
mov ecx, dword [esi + 0x3c]
cmp ecx, 2
je 0x4ae635
cmp dword [esi + 0x40], 0
jne 0x4ae635
pop edi
pop esi
mov eax, 0xfffffffa
pop ebp
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004d99c4
add esp, 0x30
ret 0xc
test ebp, ebp
je 0x4ae947
mov eax, dword [esp + 0x44]
test eax, eax
jle 0x4ae947
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
sub ecx, 0
push ebx
mov dword [esp + 0x14], eax
je 0x4ae90f
sub ecx, 1
je 0x4ae857
sub ecx, 1
je 0x4ae686
pop ebx
pop edi
pop esi
or eax, 0xffffffff
pop ebp
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004d99c4
add esp, 0x30
ret 0xc
test eax, eax
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esi + 0x4c]
mov dword [esp + 0x20], edx
mov edx, dword [esi + 0x50]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x10], eax
jle 0x4ae92f
mov edi, edi
xor esi, esi
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
mov bl, byte [esp + 0x1d]
mov dword [esp + 0x30], ecx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x34], edx
push ecx
mov edx, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x2c]
push edx
mov dword [esp + 0x40], eax
call fcn.004ad5f0
movzx ecx, byte [esp + 0x1c]
add cl, cl
mov al, bl
shr al, 7
or al, cl
mov cl, byte [esp + 0x1f]
mov byte [esp + 0x1c], al
mov al, byte [esp + 0x1e]
mov dl, al
shr dl, 7
add al, al
add bl, bl
or dl, bl
mov byte [esp + 0x1d], dl
mov dl, cl
shr dl, 7
or dl, al
mov al, byte [esp + 0x20]
mov byte [esp + 0x1e], dl
mov dl, al
shr dl, 7
add cl, cl
or dl, cl
mov cl, byte [esp + 0x21]
mov byte [esp + 0x1f], dl
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov al, byte [esp + 0x22]
mov byte [esp + 0x20], dl
mov dl, al
shr dl, 7
add cl, cl
or dl, cl
mov cl, byte [esp + 0x23]
mov byte [esp + 0x21], dl
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov al, byte [esp + 0x24]
mov byte [esp + 0x22], dl
mov dl, al
shr dl, 7
add cl, cl
or dl, cl
mov cl, byte [esp + 0x25]
mov byte [esp + 0x23], dl
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov al, byte [esp + 0x26]
mov byte [esp + 0x24], dl
mov dl, al
shr dl, 7
add cl, cl
or dl, cl
mov cl, byte [esp + 0x27]
mov byte [esp + 0x25], dl
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov byte [esp + 0x26], dl
mov al, byte [esp + 0x28]
add cl, cl
mov dl, al
shr dl, 7
or dl, cl
mov cl, byte [esp + 0x29]
mov byte [esp + 0x27], dl
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov al, byte [esp + 0x2a]
add cl, cl
mov byte [esp + 0x28], dl
mov dl, al
shr dl, 7
or dl, cl
movzx ecx, byte [esp + 0x2b]
shr cl, 7
add al, al
or cl, al
mov byte [esp + 0x2a], cl
mov eax, esi
mov byte [esp + 0x29], dl
shr eax, 3
movzx ebx, byte [eax + ebp]
mov edx, esi
and edx, 7
mov cl, 7
sub cl, dl
shr bl, cl
movzx ecx, byte [esp + 0x2b]
and bl, 1
add cl, cl
or bl, cl
mov byte [esp + 0x2b], bl
movzx ebx, byte [esp + 0x2c]
and bl, 0x80
mov cl, dl
shr bl, cl
add esi, 1
xor byte [eax + edi], bl
cmp esi, 0x80
jl 0x4ae6b2
mov eax, dword [esp + 0x10]
sub eax, 1
test eax, eax
mov dword [esp + 0x10], eax
jg 0x4ae6b0
mov eax, dword [esp + 0x14]
pop ebx
pop edi
pop esi
shl eax, 7
pop ebp
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004d99c4
add esp, 0x30
ret 0xc
test eax, eax
mov edx, dword [esi + 0x48]
mov ecx, dword [esi + 0x4c]
mov ebx, dword [esi + 0x44]
mov dword [esp + 0x20], edx
mov edx, dword [esi + 0x50]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x10], eax
jle 0x4ae92f
jmp 0x4ae880
lea eax, [esp + 0x2c]
push eax
push ebp
mov ecx, esi
call fcn.004ad9d0
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
xor ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x34]
xor edx, dword [esp + 0x24]
xor eax, ebx
mov ebx, dword [esp + 0x28]
xor dword [esp + 0x38], ebx
mov ebx, dword [ebp]
mov dword [edi], eax
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 4]
mov dword [edi + 4], ecx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x30], ecx
mov ecx, dword [ebp + 8]
mov dword [edi + 8], edx
mov dword [esp + 0x34], edx
mov edx, dword [ebp + 0xc]
mov dword [edi + 0xc], eax
mov eax, dword [esp + 0x10]
sub eax, 1
add ebp, 0x10
add edi, 0x10
test eax, eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x10], eax
jg 0x4ae880
mov eax, dword [esp + 0x14]
pop ebx
pop edi
pop esi
shl eax, 7
pop ebp
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004d99c4
add esp, 0x30
ret 0xc
test eax, eax
mov ebx, eax
jle 0x4ae92f
push edi
push ebp
mov ecx, esi
call fcn.004ad9d0
sub ebx, 1
add ebp, 0x10
add edi, 0x10
test ebx, ebx
jg 0x4ae915
mov eax, dword [esp + 0x14]
pop ebx
pop edi
pop esi
shl eax, 7
pop ebp
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004d99c4
add esp, 0x30
ret 0xc
mov ecx, dword [esp + 0x38]
pop edi
pop esi
pop ebp
xor ecx, esp
xor eax, eax
call fcn.004d99c4
add esp, 0x30
ret 0xc