Function at 0x4ae230
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 + 0x40]
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
push edi
mov edi, dword [esp + 0x40]
mov dword [esp + 0x14], esi
je 0x4ae26e
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
cmp dword [esi + 0x40], 0
je 0x4ae28d
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 edi, edi
je 0x4ae5b5
mov eax, dword [esp + 0x44]
test eax, eax
jle 0x4ae5b5
cdq
and edx, 0x7f
add eax, edx
push ebx
mov ebx, eax
mov eax, dword [esi + 0x3c]
sar ebx, 7
sub eax, 0
mov dword [esp + 0x14], ebx
je 0x4ae586
sub eax, 1
je 0x4ae4fe
sub eax, 1
je 0x4ae2e3
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 ebx, ebx
mov eax, dword [esi + 0x44]
mov ecx, dword [esi + 0x48]
mov edx, dword [esi + 0x4c]
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x50]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x10], ebx
jle 0x4ae4e4
xor edi, edi
jmp 0x4ae324
mov esi, dword [esp + 0x18]
xor edi, edi
jmp 0x4ae324
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x30], edx
lea edx, [esp + 0x2c]
mov dword [esp + 0x34], eax
push edx
mov eax, edx
mov dword [esp + 0x3c], ecx
push eax
mov ecx, esi
call fcn.004ad5f0
movzx eax, byte [esp + 0x2c]
movzx ebx, byte [esp + 0x1c]
add bl, bl
mov ecx, edi
shr ecx, 3
lea esi, [ecx + ebp]
mov edx, edi
and edx, 7
and al, 0x80
mov cl, dl
shr al, cl
movzx ecx, byte [esp + 0x1d]
shr cl, 7
or cl, bl
movzx ebx, byte [esp + 0x1d]
mov byte [esp + 0x1c], cl
movzx ecx, byte [esp + 0x1e]
shr cl, 7
add bl, bl
or cl, bl
movzx ebx, byte [esp + 0x1e]
mov byte [esp + 0x1d], cl
movzx ecx, byte [esp + 0x1f]
shr cl, 7
add bl, bl
or cl, bl
movzx ebx, byte [esp + 0x1f]
mov byte [esp + 0x1e], cl
movzx ecx, byte [esp + 0x20]
shr cl, 7
add bl, bl
or cl, bl
movzx ebx, byte [esp + 0x20]
mov byte [esp + 0x1f], cl
movzx ecx, byte [esp + 0x21]
shr cl, 7
add bl, bl
or cl, bl
movzx ebx, byte [esp + 0x21]
mov byte [esp + 0x20], cl
movzx ecx, byte [esp + 0x22]
shr cl, 7
add bl, bl
or cl, bl
movzx ebx, byte [esp + 0x22]
mov byte [esp + 0x21], cl
movzx ecx, byte [esp + 0x23]
shr cl, 7
xor byte [esi], al
mov al, byte [esi]
add bl, bl
or cl, bl
movzx ebx, byte [esp + 0x23]
mov byte [esp + 0x22], cl
movzx ecx, byte [esp + 0x24]
shr cl, 7
add bl, bl
or cl, bl
movzx ebx, byte [esp + 0x24]
mov byte [esp + 0x23], cl
movzx ecx, byte [esp + 0x25]
shr cl, 7
add bl, bl
or cl, bl
mov byte [esp + 0x24], cl
movzx ecx, byte [esp + 0x26]
shr cl, 7
movzx ebx, byte [esp + 0x25]
add bl, bl
or cl, bl
movzx ebx, byte [esp + 0x26]
mov byte [esp + 0x25], cl
movzx ecx, byte [esp + 0x27]
shr cl, 7
add bl, bl
or cl, bl
movzx ebx, byte [esp + 0x27]
mov byte [esp + 0x26], cl
movzx ecx, byte [esp + 0x28]
shr cl, 7
add bl, bl
or cl, bl
movzx ebx, byte [esp + 0x28]
mov byte [esp + 0x27], cl
movzx ecx, byte [esp + 0x29]
shr cl, 7
add bl, bl
or cl, bl
movzx ebx, byte [esp + 0x29]
mov byte [esp + 0x28], cl
movzx ecx, byte [esp + 0x2a]
shr cl, 7
add bl, bl
or cl, bl
movzx ebx, byte [esp + 0x2a]
mov byte [esp + 0x29], cl
movzx ecx, byte [esp + 0x2b]
shr cl, 7
add bl, bl
or cl, bl
mov byte [esp + 0x2a], cl
mov cl, 7
sub cl, dl
mov dl, byte [esp + 0x2b]
shr al, cl
add dl, dl
add edi, 1
and al, 1
or al, dl
cmp edi, 0x80
mov byte [esp + 0x2b], al
jl 0x4ae320
mov eax, dword [esp + 0x10]
sub eax, 1
test eax, eax
mov dword [esp + 0x10], eax
jg 0x4ae310
mov ebx, dword [esp + 0x14]
mov eax, ebx
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 eax, dword [esi + 0x44]
xor eax, dword [edi]
mov ecx, dword [esi + 0x48]
xor ecx, dword [edi + 4]
mov edx, dword [esi + 0x4c]
xor edx, dword [edi + 8]
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0x50]
xor eax, dword [edi + 0xc]
mov dword [esp + 0x30], ecx
push ebp
lea ecx, [esp + 0x30]
push ecx
mov ecx, esi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], eax
call fcn.004ad5f0
add ebx, 0xffffffff
add edi, 0x10
test ebx, ebx
jle 0x4ae4e0
lea esp, [esp]
mov edx, dword [ebp]
xor edx, dword [edi]
mov eax, dword [ebp + 4]
xor eax, dword [edi + 4]
mov ecx, dword [ebp + 8]
xor ecx, dword [edi + 8]
mov dword [esp + 0x2c], edx
mov edx, dword [ebp + 0xc]
xor edx, dword [edi + 0xc]
mov dword [esp + 0x30], eax
add ebp, 0x10
push ebp
lea eax, [esp + 0x30]
mov dword [esp + 0x38], ecx
push eax
mov ecx, esi
mov dword [esp + 0x40], edx
call fcn.004ad5f0
sub ebx, 1
add edi, 0x10
test ebx, ebx
jg 0x4ae540
jmp 0x4ae4e0
test ebx, ebx
mov dword [esp + 0x10], ebx
jle 0x4ae4e4
push ebp
push edi
mov ecx, esi
call fcn.004ad5f0
mov eax, dword [esp + 0x10]
sub eax, 1
add edi, 0x10
add ebp, 0x10
test eax, eax
mov dword [esp + 0x10], eax
jg 0x4ae592
jmp 0x4ae4e4
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