Function at 0x4aef50
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x592830]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x24], eax
mov bl, byte [esi]
mov ecx, dword [esi + 0x28]
mov eax, dword [esi + 0x2c]
push edi
mov edi, edx
mov dword [ebp - 0x30], esi
mov byte [ebp - 0x19], bl
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x28], eax
test bl, 0x40
jne 0x4aef99
push eax
lea eax, [esi + 0x10]
push eax
push esi
call ecx
add esp, 0xc
add dword [esi + 0x20], 1
adc dword [esi + 0x24], 0
movzx eax, bl
and eax, 7
mov edx, 0xf
sub edx, eax
xor ecx, ecx
mov byte [esi], al
mov dword [ebp - 0x34], edx
cmp edx, 0xf
jae 0x4aefc5
movzx eax, byte [esi + edx]
or ecx, eax
mov byte [esi + edx], 0
inc edx
shl ecx, 8
cmp edx, 0xf
jb 0x4aefb2
movzx eax, byte [esi + 0xf]
mov ebx, dword [ebp + 0xc]
or ecx, eax
mov byte [esi + 0xf], 1
cmp ecx, ebx
je 0x4aefea
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ebb9e
mov esp, ebp
pop ebp
ret
lea eax, [ebx + 0xf]
or eax, 8
shr eax, 3
add dword [esi + 0x20], eax
adc dword [esi + 0x24], 0
cmp dword [esi + 0x24], 0x20000000
jb 0x4af021
ja 0x4af00b
cmp dword [esi + 0x20], 0
jbe 0x4af021
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ebb9e
mov esp, ebp
pop ebp
ret
cmp ebx, 0x10
jb 0x4af0aa
mov eax, ebx
shr eax, 4
lea ecx, [esi + 0x10]
mov dword [ebp - 0x2c], eax
mov eax, dword [edi]
xor dword [ecx], eax
mov eax, dword [edi + 4]
xor dword [ecx + 4], eax
mov eax, dword [edi + 8]
push dword [ebp - 0x28]
xor dword [esi + 0x18], eax
mov eax, dword [edi + 0xc]
xor dword [esi + 0x1c], eax
push ecx
push ecx
call dword [ebp - 0x20]
push dword [ebp - 0x28]
lea eax, [ebp - 0x18]
push eax
push esi
call dword [ebp - 0x20]
add esp, 0x18
mov ecx, 8
dec ecx
inc byte [esi + ecx + 8]
jne 0x4af071
test ecx, ecx
jne 0x4af066
mov ecx, dword [edi]
mov eax, dword [edi + 4]
mov edx, dword [ebp - 0x24]
xor ecx, dword [ebp - 0x18]
xor eax, dword [ebp - 0x14]
mov dword [edx], ecx
mov ecx, dword [ebp - 0x10]
mov dword [edx + 4], eax
xor ecx, dword [edi + 8]
mov eax, dword [ebp - 0xc]
xor eax, dword [edi + 0xc]
mov dword [edx + 8], ecx
mov dword [edx + 0xc], eax
add edx, 0x10
add edi, 0x10
sub ebx, 0x10
dec dword [ebp - 0x2c]
mov dword [ebp - 0x24], edx
lea ecx, [esi + 0x10]
jne 0x4af035
test ebx, ebx
je 0x4af105
xor ecx, ecx
test ebx, ebx
je 0x4af0c0
mov al, byte [ecx + edi]
xor byte [esi + ecx + 0x10], al
inc ecx
cmp ecx, ebx
jb 0x4af0b4
push dword [ebp - 0x28]
lea eax, [esi + 0x10]
push eax
push eax
call dword [ebp - 0x20]
push dword [ebp - 0x28]
lea eax, [ebp - 0x18]
push eax
push esi
call dword [ebp - 0x20]
add esp, 0x18
xor edx, edx
test ebx, ebx
je 0x4af105
lea eax, [ebp - 0x18]
sub edi, eax
sub dword [ebp - 0x24], eax
mov esi, dword [ebp - 0x24]
lea ebx, [ebx]
lea ecx, [ebp - 0x18]
add ecx, edx
inc edx
mov al, byte [edi + ecx]
xor al, byte [ecx]
mov byte [esi + ecx], al
cmp edx, ebx
jb 0x4af0f0
mov esi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x34]
cmp eax, 0x10
jae 0x4af127
mov ecx, 0x10
sub ecx, eax
mov edx, ecx
shr ecx, 2
lea edi, [esi + eax]
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
push dword [ebp - 0x28]
lea eax, [ebp - 0x18]
push eax
push esi
call dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
xor dword [esi + 0x10], eax
mov eax, dword [ebp - 0x14]
xor dword [esi + 0x14], eax
mov eax, dword [ebp - 0x10]
xor dword [esi + 0x18], eax
mov eax, dword [ebp - 0xc]
xor dword [esi + 0x1c], eax
mov al, byte [ebp - 0x19]
mov ecx, dword [ebp - 4]
add esp, 0xc
mov byte [esi], al
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004ebb9e
mov esp, ebp
pop ebp
ret