Function at 0x4d7ed5
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, ecx
mov dword [ebp - 4], esi
mov ecx, 0x8000
mov eax, ecx
and dword [edi + 4], 0
and dword [edi], 0
cmp esi, ecx
cmovb eax, esi
push eax
push ebx
push dword [edi + 8]
call fcn.004dd610
xor eax, eax
xor cl, cl
inc eax
mov byte [ebp + 0xf], cl
add esp, 0xc
cmp esi, eax
jbe 0x4d7f1f
xor cl, byte [eax + ebx]
inc eax
cmp eax, esi
jb 0x4d7f14
mov byte [ebp + 0xf], cl
push 8
mov ecx, edi
call fcn.004d6d7f
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov cl, byte [ebp + 0xf]
and dword [ebx + 0x10], 0
cmp cl, byte [eax]
jne 0x4d8165
push esi
push eax
mov ecx, edi
call fcn.004d7d96
mov esi, eax
test esi, esi
je 0x4d7f84
push 1
mov ecx, ebx
call fcn.004d6dca
mov edx, dword [ebx + 0x10]
push 3
lea ecx, [edx + 1]
mov dword [ebx + 0x10], ecx
imul ecx, edx, 0x28
add ecx, dword [ebx]
and dword [ebp - 4], 0
lea eax, [ecx + 0xc]
mov dword [ecx], 0x36
mov dword [eax], esi
mov dword [ecx + 0x14], eax
lea eax, [ecx + 0x1c]
mov dword [ecx + 0x24], eax
pop eax
mov dword [ecx + 0x18], eax
mov dword [ecx + 8], eax
mov ecx, edi
call fcn.004d6d99
push 1
mov ecx, edi
mov esi, eax
call fcn.004d6d7f
test esi, 0x8000
je 0x4d7ffc
push edi
call fcn.004d81e4
mov esi, dword [ebp - 4]
inc eax
pop ecx
xor ecx, ecx
mov dword [ebp + 0xc], eax
mov dword [ebp + 8], ecx
cmp dword [edi], esi
jae 0x4d8165
cmp ecx, eax
jae 0x4d815d
push 1
lea ecx, [ebx + 0x20]
call fcn.004c8759
mov esi, dword [ebx + 0x20]
mov ecx, edi
add esi, dword [ebp + 8]
call fcn.004d6d99
shr eax, 8
mov ecx, edi
push 8
mov byte [esi], al
call fcn.004d6d7f
mov ecx, dword [ebp + 8]
mov esi, dword [ebp - 4]
inc ecx
mov eax, dword [ebp + 0xc]
mov dword [ebp + 8], ecx
cmp dword [edi], esi
jb 0x4d7fb9
jmp 0x4d815d
mov esi, dword [ebp - 4]
jmp 0x4d815d
push 1
mov ecx, ebx
call fcn.004d6dca
imul eax, dword [ebx + 0x10], 0x28
mov ecx, edi
mov dword [ebp + 8], eax
mov eax, dword [ebx]
mov dword [ebp + 0xc], eax
call fcn.004d6d99
mov ecx, eax
and ecx, 0x8000
jne 0x4d802f
shr eax, 0xc
jmp 0x4d8035
shr eax, 0xa
sub eax, 0x18
push 4
mov dword [ebp + 0x10], eax
test ecx, ecx
mov ecx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
pop eax
push 6
pop edx
cmovne eax, edx
mov edx, dword [ebp + 0xc]
push eax
mov dword [ecx + edx], esi
mov ecx, edi
call fcn.004d6d7f
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [ecx + edx]
test byte [eax + 0x667678], 4
je 0x4d8093
mov ecx, edi
call fcn.004d6d99
mov ecx, dword [ebp + 8]
test eax, 0xffff8000
mov edx, dword [ebp + 0xc]
setne al
push 1
mov byte [ecx + edx + 4], al
mov ecx, edi
call fcn.004d6d7f
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
jmp 0x4d8098
mov byte [ecx + edx + 4], 0
push 3
pop esi
lea eax, [ecx + edx]
mov dword [ecx + edx + 0x24], 0
mov dword [eax + 0x18], esi
lea eax, [edx + 8]
add eax, ecx
mov dword [ecx + edx + 0x14], 0
mov dword [ebp - 8], eax
mov dword [eax], esi
mov eax, dword [ecx + edx]
movzx eax, byte [eax + 0x667678]
and eax, esi
mov esi, dword [ebp - 4]
mov dword [ebp + 0x10], eax
jbe 0x4d815a
movzx eax, byte [ecx + edx + 4]
push eax
lea eax, [edx + 8]
add eax, ecx
mov ecx, edi
push eax
call fcn.004d6e16
cmp dword [ebp + 0x10], 2
jne 0x4d8107
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
movzx eax, byte [ecx + edx + 4]
push eax
lea eax, [edx + 0x18]
add eax, ecx
mov ecx, edi
push eax
call fcn.004d6e16
jmp 0x4d815a
mov eax, dword [ebp - 8]
cmp dword [eax], 1
jne 0x4d815a
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [ecx + edx]
test byte [eax + 0x667678], 0x18
je 0x4d815a
mov eax, dword [ecx + edx + 0xc]
cmp eax, 0x100
jl 0x4d8133
sub eax, 0x100
jmp 0x4d8156
cmp eax, 0x88
jl 0x4d8141
sub eax, 0x108
jmp 0x4d8153
cmp eax, 0x10
jl 0x4d814b
sub eax, 8
jmp 0x4d8153
cmp eax, 8
jl 0x4d8153
sub eax, 0x10
add eax, dword [ebx + 0x10]
mov dword [ecx + edx + 0xc], eax
inc dword [ebx + 0x10]
cmp dword [edi], esi
jb 0x4d8004
push 1
mov ecx, ebx
call fcn.004d6dca
mov ecx, dword [ebx + 0x10]
push 3
lea eax, [ecx + 1]
imul ecx, ecx, 0x28
mov dword [ebx + 0x10], eax
add ecx, dword [ebx]
lea eax, [ecx + 0xc]
mov dword [ecx], 0x16
mov dword [ecx + 0x14], eax
lea eax, [ecx + 0x1c]
mov dword [ecx + 0x24], eax
pop eax
mov dword [ecx + 0x18], eax
mov dword [ecx + 8], eax
xor eax, eax
mov dword [ebp + 8], eax
cmp dword [ebx + 0x10], eax
jle 0x4d81d1
xor edx, edx
mov ecx, dword [ebx]
add ecx, edx
cmp dword [ecx + 0x14], 0
jne 0x4d81b6
lea eax, [ecx + 0xc]
mov dword [ecx + 0x14], eax
mov eax, dword [ebp + 8]
cmp dword [ecx + 0x24], 0
jne 0x4d81c5
lea eax, [ecx + 0x1c]
mov dword [ecx + 0x24], eax
mov eax, dword [ebp + 8]
inc eax
add edx, 0x28
mov dword [ebp + 8], eax
cmp eax, dword [ebx + 0x10]
jl 0x4d81a3
test esi, esi
je 0x4d81dd
push ebx
mov ecx, edi
call fcn.004d7ddc
pop edi
pop esi
pop ebx
leave
ret 0xc