Function at 0x4d4a00
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
mov eax, 0x2050
call fcn.0053cae0
mov dword [esp + 0x20], edx
mov dword [esp], ecx
lea eax, [esp + 4]
push dword [ebp + 0xc]
push dword [ebp + 8]
push eax
call fcn.0051a770
add esp, 0xc
mov ebx, dword [esp + 4]
mov ecx, dword [esp + 8]
movzx edx, word [esp + 0xc]
xor edi, edi
mov dword [esp + 0x10], ebx
test dx, dx
jne 0x4d4b40
jmp 0x4d4a61
mov word [esp + edi*2 + 0x4c], dx
inc edi
mov edx, eax
test dx, dx
jne 0x4d4b40
cmp ecx, ebx
je 0x4d4b55
movzx edx, byte [ecx]
test dl, dl
js 0x4d4a80
inc ecx
xor eax, eax
cmp edi, 0x1000
jne 0x4d4a50
jmp 0x4d4b4e
movzx esi, byte [ecx + 1]
mov ebx, edx
and ebx, 0x1f
and esi, 0x3f
cmp dl, 0xdf
jbe 0x4d4ad3
movzx eax, byte [ecx + 2]
shl esi, 6
and eax, 0x3f
or eax, esi
cmp dl, 0xf0
jb 0x4d4af1
movzx edx, byte [ecx + 3]
and ebx, 7
shl eax, 6
shl ebx, 0x12
and edx, 0x3f
or edx, eax
or edx, ebx
mov ebx, dword [esp + 0x10]
cmp edx, 0x110000
je 0x4d4b55
add ecx, 4
cmp edx, 0xffff
jbe 0x4d4b40
jmp 0x4d4b07
shl ebx, 6
add ecx, 2
xor eax, eax
or ebx, esi
mov edx, ebx
mov ebx, dword [esp + 0x10]
cmp edi, 0x1000
jne 0x4d4a50
jmp 0x4d4b4e
shl ebx, 0xc
add ecx, 3
or eax, ebx
mov ebx, dword [esp + 0x10]
mov edx, eax
cmp edx, 0xffff
jbe 0x4d4b40
add edx, 0xffff0000
mov esi, edx
and edx, 0x3ff
shr esi, 0xa
or edx, 0xdc00
or esi, 0xd800
mov eax, edx
mov edx, esi
cmp edi, 0x1000
jne 0x4d4a50
jmp 0x4d4b4e
xor eax, eax
cmp edi, 0x1000
jne 0x4d4a50
mov edi, 0x1000
jmp 0x4d4b61
cmp edi, 0x1001
jae 0x4d4e3c
lea ebx, [esp + 0x4c]
mov dword [esp + 4], 0
push 0
lea eax, [esp + 8]
push eax
push edi
push ebx
push dword [esp + 0x30]
call fcn.005334fc
test eax, eax
je 0x4d4e05
mov esi, dword [esp + 4]
mov edx, dword [ebp + 0xc]
cmp esi, edi
je 0x4d4e1a
jae 0x4d4e2b
movzx eax, word [esp + esi*2 + 0x4c]
add eax, 0x2312
movzx eax, ax
cmp eax, 0x312
jae 0x4d4bd9
lea eax, [esp + esi*2 + 0x4c]
inc esi
mov dword [esp + 4], 0
push 0
lea ecx, [esp + 8]
push ecx
push 1
push eax
push dword [esp + 0x30]
call fcn.005334fc
test eax, eax
jne 0x4d4bd9
call fcn.00533304
cmp esi, edi
ja 0x4d4e49
test esi, esi
je 0x4d4e18
lea eax, [esi - 1]
xor edx, edx
and eax, 0x7fffffff
cmp eax, 7
jb 0x4d4db1
inc eax
mov edi, esi
pxor xmm1, xmm1
lea edx, [esp + 0x54]
pxor xmm2, xmm2
mov ecx, eax
and ecx, 0xfffffff8
lea ebx, [esp + ecx*2 + 0x4c]
mov esi, ecx
nop word cs:[eax + eax]
movq xmm7, qword [edx - 8]
movq xmm4, qword [edx]
movdqa xmmword [esp + 0x10], xmm1
movdqa xmm1, xmmword [0xa4a680]
movdqa xmmword [esp + 0x20], xmm2
movdqa xmm2, xmmword [0xa4a690]
add edx, 0x10
add esi, 0xfffffff8
movdqa xmm0, xmm7
movdqa xmm6, xmm4
movdqa xmm3, xmm7
movdqa xmmword [esp + 0x30], xmm4
paddw xmm0, xmm1
paddw xmm6, xmm1
movdqa xmm1, xmmword [0xa4a660]
movdqa xmm5, xmm1
pxor xmm0, xmm1
movdqa xmm1, xmm2
pxor xmm6, xmm5
pcmpgtw xmm1, xmm0
movdqa xmm5, xmmword [0xa4a6b0]
pcmpgtw xmm2, xmm6
punpcklwd xmm1, xmm1
punpcklwd xmm6, xmm2
movdqa xmm2, xmmword [0xa4a6a0]
psrad xmm1, 0x10
movdqa xmm0, xmm1
psrad xmm6, 0x10
pand xmm1, xmm5
pandn xmm0, xmm2
movdqa xmm2, xmmword [esp + 0x20]
por xmm1, xmm0
movdqa xmm0, xmm6
pand xmm6, xmm5
movdqa xmm5, xmmword [0xa4a660]
pandn xmm0, xmmword [0xa4a6a0]
pxor xmm3, xmm5
por xmm6, xmm0
movdqa xmm0, xmmword [0xa4a6c0]
paddw xmm7, xmm0
paddw xmm4, xmm0
movdqa xmm0, xmmword [0xa4a6d0]
pxor xmm7, xmm5
pxor xmm4, xmm5
movdqa xmm5, xmmword [0xa4a6b0]
pcmpgtw xmm0, xmm7
movdqa xmm7, xmmword [0xa4a6d0]
punpcklwd xmm0, xmm0
pand xmm0, xmm5
pcmpgtw xmm7, xmm4
movdqa xmm4, xmmword [0xa4a670]
pcmpgtw xmm3, xmm4
pcmpeqd xmm4, xmm4
punpcklwd xmm3, xmm3
psubd xmm0, xmm4
psrad xmm3, 0x10
pand xmm1, xmm3
pandn xmm3, xmm0
por xmm3, xmm1
movdqa xmm1, xmmword [esp + 0x10]
paddd xmm1, xmm3
movdqa xmm3, xmmword [esp + 0x30]
pxor xmm3, xmmword [0xa4a660]
pcmpgtw xmm3, xmmword [0xa4a670]
punpcklwd xmm3, xmm3
psrad xmm3, 0x10
punpcklwd xmm7, xmm3
pand xmm6, xmm3
pand xmm7, xmm5
psubd xmm7, xmm4
pandn xmm3, xmm7
por xmm3, xmm6
paddd xmm2, xmm3
jne 0x4d4c20
paddd xmm2, xmm1
cmp eax, ecx
mov esi, edi
pshufd xmm0, xmm2, 0xee
paddd xmm0, xmm2
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd edx, xmm1
je 0x4d4e1a
lea eax, [esp + esi*2 + 0x4c]
jmp 0x4d4dc8
add edi, edx
cmp ebx, eax
mov edx, edi
je 0x4d4e1a
movzx ecx, word [ebx]
mov edi, edx
add ebx, 2
mov edx, 1
cmp cx, 0x7f
jbe 0x4d4dc0
movzx esi, cx
mov edx, 2
cmp esi, 0x800
jb 0x4d4dc0
add ecx, 0x2312
xor edx, edx
movzx ecx, cx
cmp ecx, 0x312
setae dl
lea edx, [edx + edx + 1]
jmp 0x4d4dc0
call fcn.00533304
mov ecx, dword [esp]
mov dword [ecx + 4], eax
mov dword [ecx], 0
jmp 0x4d4e23
xor edx, edx
mov eax, dword [esp]
mov dword [eax + 4], edx
mov byte [eax], 4
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push 0xa4ee10
push edi
push esi
call fcn.00512540
add esp, 0xc
ud2
push 0xa4ee00
push 0x1000
push edi
jmp 0x4d4e50
push 0xa4ee20
push edi
push esi
call fcn.00518320
add esp, 0xc
ud2