Function at 0x40ed34
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push dword [ebp + 8]
call fcn.00499bc4
pop ecx
test eax, eax
jne 0x40ed55
mov eax, dword [ebp + 0xc]
mov byte [eax], 0
xor eax, eax
jmp 0x40ef2f
push 0x80
push 0
push dword [ebp + 0xc]
call fcn.00499ab4
add esp, 0xc
cmp byte [ebp + 0x10], 8
jne 0x40ee36
push dword [ebp + 8]
call fcn.00499bc4
pop ecx
shr eax, 1
mov dword [ebp - 0xc], eax
mov dl, byte [ebp - 0xc]
mov ecx, dword [ebp + 0xc]
mov byte [ecx], dl
xor eax, eax
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0xc]
jge 0x40edd1
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 4]
mov dl, byte [ecx + eax*2]
push edx
call fcn.0040ebbc
pop ecx
mov ebx, eax
shl ebx, 4
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 4]
mov cl, byte [eax + edx*2 + 1]
push ecx
call fcn.0040ebbc
pop ecx
add bl, al
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 4]
mov byte [eax + edx + 1], bl
inc dword [ebp - 4]
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0xc]
jl 0x40ed94
xor eax, eax
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0xc]
jge 0x40ee2e
mov byte [ebp - 0xd], 0
xor ecx, ecx
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 8]
mov eax, 1
shl eax, cl
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
movzx edx, byte [edx + ecx + 1]
and eax, edx
je 0x40ee0d
mov ecx, dword [ebp - 8]
mov eax, 0x80
sar eax, cl
or byte [ebp - 0xd], al
inc dword [ebp - 8]
cmp dword [ebp - 8], 8
jl 0x40ede7
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
mov cl, byte [ebp - 0xd]
mov byte [edx + eax + 1], cl
inc dword [ebp - 4]
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0xc]
jl 0x40edde
mov eax, dword [ebp - 0xc]
jmp 0x40ef2f
mov dl, byte [ebp + 0x10]
add dl, 0xfc
sub dl, 2
jb 0x40ee48
sub dl, 2
jb 0x40ee4e
jmp 0x40ee52
mov byte [ebp - 0x10], 0x30
jmp 0x40ee52
mov byte [ebp - 0x10], 0x20
mov ecx, dword [ebp + 0xc]
inc ecx
mov dword [0x4b461c], ecx
push 0x80
push 0
push dword [0x4b461c]
call fcn.00499ab4
add esp, 0xc
mov byte [0x4b4621], 0
mov byte [0x4b4622], 0
push dword [ebp + 8]
call fcn.00499bc4
pop ecx
mov dword [ebp - 0xc], eax
mov byte [ebp - 0xe], 0
mov al, byte [ebp + 0x14]
push eax
mov dl, byte [ebp + 0x10]
push edx
mov cl, byte [ebp + 0x18]
push ecx
call fcn.0040ec00
add esp, 0xc
mov al, byte [ebp + 0x18]
xor byte [ebp - 0xe], al
xor edx, edx
mov dword [ebp - 4], edx
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0xc]
jge 0x40eeed
mov al, byte [ebp + 0x14]
push eax
mov dl, byte [ebp + 0x10]
push edx
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 4]
mov dl, byte [ecx + eax]
sub dl, byte [ebp - 0x10]
push edx
call fcn.0040ec00
add esp, 0xc
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 4]
mov dl, byte [ecx + eax]
sub dl, byte [ebp - 0x10]
xor byte [ebp - 0xe], dl
inc dword [ebp - 4]
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0xc]
jl 0x40eeb6
mov al, byte [ebp + 0x14]
push eax
mov dl, byte [ebp + 0x10]
push edx
mov cl, byte [ebp + 0x1c]
push ecx
call fcn.0040ec00
add esp, 0xc
mov al, byte [ebp + 0x1c]
xor byte [ebp - 0xe], al
mov dl, byte [ebp + 0x14]
push edx
mov cl, byte [ebp + 0x10]
push ecx
mov al, byte [ebp - 0xe]
push eax
call fcn.0040ec00
add esp, 0xc
mov dl, byte [0x4b4621]
add dl, 2
mov ecx, dword [ebp + 0xc]
mov byte [ecx], dl
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax]
pop ebx
mov esp, ebp
pop ebp
ret