Function at 0x4d9e09
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, dword [0x5c9040]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push esi
mov esi, dword [ebp + 0x14]
mov ebx, ecx
mov ecx, dword [ebp + 8]
mov eax, ecx
push edi
mov edi, ecx
mov dword [esp + 0x14], edx
mov edx, dword [ebp + 0xc]
and eax, 0xf
shr edi, 4
mov dword [esp + 0x28], ebx
mov dword [esp + 0x1c], eax
cmp ecx, 0x10
jb 0x4da008
cmp ecx, 0x1000000
ja 0x4da008
lea eax, [esp + 0x3c]
push eax
lea ecx, [ebx + 0x118]
call fcn.004d8eb3
pop ecx
test eax, eax
jne 0x4da00b
mov edx, dword [ebp + 0x10]
xor ebx, ebx
test edi, edi
je 0x4d9f31
mov eax, edx
mov dword [esp + 0x18], edx
lea ecx, [esp + 0x3c]
sub eax, ecx
mov dword [esp + 0x10], eax
dec edi
cmp dword [esp + 0x1c], 0
je 0x4d9ebe
cmp dword [esp + 0x14], 0
jne 0x4d9ebe
test edi, edi
jne 0x4d9ebe
push 0x10
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x54]
push eax
call fcn.0051c650
add esp, 0xc
lea edx, [esp + 0x3c]
mov ecx, edx
call fcn.004d9c3f
mov edx, ebx
mov ebx, dword [esp + 0x10]
lea eax, [esp + 0x3c]
add eax, edx
mov cl, byte [ebx + eax]
xor cl, byte [eax]
mov byte [esp + edx + 0x2c], cl
inc edx
cmp edx, 0x10
jb 0x4d9ec4
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x2c]
mov ecx, dword [esp + 0x28]
xor ebx, ebx
push eax
push eax
call fcn.004d9b1a
pop ecx
pop ecx
test eax, eax
jne 0x4da00b
mov ecx, ebx
mov al, byte [esp + ecx + 0x2c]
xor al, byte [esp + ecx + 0x3c]
mov byte [esi + ecx], al
inc ecx
cmp ecx, 0x10
jb 0x4d9efa
lea edx, [esp + 0x3c]
mov ecx, edx
call fcn.004d9c3f
mov edx, dword [esp + 0x18]
add esi, 0x10
add dword [esp + 0x10], 0x10
add edx, 0x10
mov dword [esp + 0x18], edx
test edi, edi
jne 0x4d9e8c
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4da004
cmp dword [esp + 0x14], 0
lea eax, [esp + 0x3c]
lea edi, [esp + 0x4c]
cmovne edi, eax
lea eax, [esi - 0x10]
mov dword [esp + 0x10], eax
mov eax, ebx
mov dword [esp + 0x24], edi
test ecx, ecx
je 0x4d9f9b
sub edi, esi
mov dword [esp + 0x20], ecx
lea eax, [esp + 0x2c]
mov dword [esp + 0x1c], edi
sub edx, esi
mov ebx, edi
sub eax, esi
mov dword [esp + 0x18], eax
mov edi, eax
mov al, byte [esi - 0x10]
mov byte [esi], al
mov al, byte [edx + esi]
xor al, byte [ebx + esi]
mov byte [edi + esi], al
inc esi
sub ecx, 1
jne 0x4d9f78
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
push ecx
pop ebx
cmp eax, 0x10
jae 0x4d9fcb
mov esi, dword [esp + 0x10]
lea ecx, [esp + 0x2c]
sub ecx, edi
lea edx, [eax + edi]
mov dword [esp + 0x20], ecx
sub esi, edi
mov ebx, dword [esp + 0x20]
push 0x10
pop ecx
mov dword [esp + 0x24], esi
sub ecx, eax
mov al, byte [edx + esi]
xor al, byte [edx]
mov byte [ebx + edx], al
inc edx
sub ecx, 1
jne 0x4d9fbb
xor ebx, ebx
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x2c]
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x10]
push eax
push eax
call fcn.004d9b1a
pop ecx
pop ecx
test eax, eax
jne 0x4da00b
lea eax, [esp + 0x2c]
sub edi, eax
sub esi, eax
lea ecx, [esp + 0x2c]
add ecx, ebx
mov al, byte [edi + ecx]
xor al, byte [ecx]
inc ebx
mov byte [ecx + esi], al
cmp ebx, 0x10
jb 0x4d9ff0
xor eax, eax
jmp 0x4da00b
push 0xffffffffffffffde
pop eax
mov ecx, dword [esp + 0x5c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0051b034
mov esp, ebp
pop ebp
ret