Function at 0x4cede1
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x5811a8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x1c]
xor ecx, ecx
push ebx
mov ebx, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], ecx
test edi, edi
je 0x4cefeb
test ebx, ebx
je 0x4cefeb
test eax, eax
je 0x4cefeb
push esi
push dword [ebp + 0x20]
push ecx
push eax
call fcn.004d3200
lea eax, [ebp - 0x38]
push eax
call fcn.004d06f7
lea eax, [ebp - 0x34]
push eax
call fcn.004d06f7
lea eax, [ebp - 0x30]
push eax
call fcn.004d06f7
push 0x14
pop esi
push esi
push dword [ebp - 0x38]
call fcn.004d06e7
push esi
push dword [ebp - 0x34]
call fcn.004d06e7
push esi
push dword [ebp - 0x30]
call fcn.004d06e7
push dword [ebp + 0xc]
push edi
push dword [ebp - 0x38]
call fcn.004d0497
mov esi, eax
add esp, 0x3c
test esi, esi
jne 0x4ceea1
push dword [ebp + 0xc]
push edi
push dword [ebp - 0x34]
call fcn.004d0497
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4ceea1
push dword [ebp + 0x14]
push ebx
push dword [ebp - 0x34]
call fcn.004d05f2
add esp, 0xc
mov esi, eax
mov eax, dword [ebp + 0x20]
xor ebx, ebx
movzx eax, ax
dec eax
mov dword [ebp - 0x40], ebx
cdq
push 0x14
pop ecx
idiv ecx
inc eax
movzx eax, ax
mov dword [ebp - 0x4c], eax
test esi, esi
jne 0x4cefc8
cmp bx, ax
jae 0x4cefc8
push dword [ebp - 0x30]
xor eax, eax
lea edi, [ebp - 0x2c]
push dword [ebp - 0x34]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.004d06a5
mov esi, eax
mov dword [ebp - 0x44], esi
pop ecx
pop ecx
test esi, esi
jne 0x4cefc8
movzx ecx, bx
xor edi, edi
inc ecx
mov eax, ecx
shr eax, 0x18
mov byte [ebp - 0x18], al
mov eax, ecx
shr eax, 0x10
mov byte [ebp - 0x17], al
lea eax, [ebx + 1]
shr ecx, 8
push 4
mov byte [ebp - 0x15], al
mov byte [ebp - 0x16], cl
pop eax
cmp dword [ebp + 0x18], edi
jle 0x4cef89
movzx eax, ax
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x30]
call fcn.004d05f2
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4cefc8
push 0x14
pop eax
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x30]
call fcn.004d0635
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4cefc8
push 0x14
pop eax
xor ecx, ecx
mov dword [ebp - 0x3c], eax
mov edx, eax
mov al, byte [ebp + ecx - 0x18]
xor byte [ebp + ecx - 0x2c], al
inc ecx
sub edx, 1
jne 0x4cef59
push dword [ebp - 0x30]
push dword [ebp - 0x38]
call fcn.004d06a5
mov esi, eax
mov dword [ebp - 0x44], eax
pop ecx
pop ecx
test esi, esi
jne 0x4cefc8
inc edi
movzx eax, di
cmp eax, dword [ebp + 0x18]
mov eax, dword [ebp - 0x3c]
jl 0x4cef19
mov edi, dword [ebp - 0x48]
xor ecx, ecx
mov esi, dword [ebp + 0x20]
imul eax, ebx, 0x14
mov dword [ebp - 0x3c], eax
mov ebx, eax
lea eax, [ebx + ecx]
movzx edx, ax
cmp edx, esi
jge 0x4cefb6
movzx eax, cx
inc ecx
push 0x14
mov al, byte [ebp + eax - 0x2c]
mov byte [edx + edi], al
pop eax
cmp cx, ax
jb 0x4cef99
mov ebx, dword [ebp - 0x40]
mov esi, dword [ebp - 0x44]
inc ebx
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x40], ebx
jmp 0x4ceec2
lea eax, [ebp - 0x30]
push eax
call fcn.004d072b
lea eax, [ebp - 0x38]
push eax
call fcn.004d072b
lea eax, [ebp - 0x34]
push eax
call fcn.004d072b
add esp, 0xc
mov eax, esi
pop esi
jmp 0x4cefee
push 0xffffffffffffff9a
pop eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.004c77a6
mov esp, ebp
pop ebp
ret