Function at 0x4d7590
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.004fb290
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov dword [esp + 0x20], edx
xor edx, edx
xor ebx, ebx
lea edi, [eax + ecx]
mov dword [esp + 0x10], edi
test dx, dx
jne 0x4d76c0
jmp 0x4d75e1
mov word [esp + ebx*2 + 0x4c], dx
inc ebx
mov edx, ecx
test dx, dx
jne 0x4d76c0
cmp eax, edi
je 0x4d76d5
movzx edx, byte [eax]
test dl, dl
js 0x4d7600
inc eax
xor ecx, ecx
cmp ebx, 0x1000
jne 0x4d75d0
jmp 0x4d76ce
movzx esi, byte [eax + 1]
mov edi, edx
and edi, 0x1f
and esi, 0x3f
cmp dl, 0xdf
jbe 0x4d7653
movzx ecx, byte [eax + 2]
shl esi, 6
and ecx, 0x3f
or ecx, esi
cmp dl, 0xf0
jb 0x4d7671
movzx edx, byte [eax + 3]
and edi, 7
shl ecx, 6
shl edi, 0x12
and edx, 0x3f
or edx, ecx
or edx, edi
mov edi, dword [esp + 0x10]
cmp edx, 0x110000
je 0x4d76d5
add eax, 4
cmp edx, 0xffff
jbe 0x4d76c0
jmp 0x4d7687
shl edi, 6
add eax, 2
xor ecx, ecx
or edi, esi
mov edx, edi
mov edi, dword [esp + 0x10]
cmp ebx, 0x1000
jne 0x4d75d0
jmp 0x4d76ce
shl edi, 0xc
add eax, 3
or ecx, edi
mov edi, dword [esp + 0x10]
mov edx, ecx
cmp edx, 0xffff
jbe 0x4d76c0
add edx, 0xffff0000
mov esi, edx
and edx, 0x3ff
shr esi, 0xa
or edx, 0xdc00
or esi, 0xd800
mov ecx, edx
mov edx, esi
cmp ebx, 0x1000
jne 0x4d75d0
jmp 0x4d76ce
xor ecx, ecx
cmp ebx, 0x1000
jne 0x4d75d0
mov ebx, 0x1000
jmp 0x4d76e1
cmp ebx, 0x1001
jae 0x4d79c6
lea esi, [esp + 8]
lea edi, [esp + 0x4c]
mov dword [esp + 8], 0
push 0
push esi
push ebx
push edi
push dword [esp + 0x30]
call sub.kernel32.dll_WriteConsoleW
test eax, eax
je 0x4d7933
mov edx, esi
mov esi, dword [esp + 8]
mov ecx, dword [ebp + 0xc]
cmp esi, ebx
je 0x4d7950
jae 0x4d79b5
movzx eax, word [esp + esi*2 + 0x4c]
add eax, 0x2312
movzx eax, ax
cmp eax, 0x312
jae 0x4d7757
lea eax, [esp + esi*2 + 0x4c]
inc esi
mov dword [esp + 8], 0
push 0
push edx
push 1
push eax
push dword [esp + 0x30]
call sub.kernel32.dll_WriteConsoleW
test eax, eax
jne 0x4d7757
call sub.kernel32.dll_GetLastError
cmp esi, ebx
ja 0x4d79d3
test esi, esi
je 0x4d794e
lea eax, [esi - 1]
xor ecx, ecx
and eax, 0x7fffffff
cmp eax, 6
jbe 0x4d796a
inc eax
mov ebx, esi
pxor xmm1, xmm1
lea esi, [esp + 0x54]
pxor xmm2, xmm2
mov edx, eax
and edx, 0xfffffff8
lea ecx, [edx + edx]
mov edi, edx
nop word cs:[eax + eax]
nop dword [eax]
movq xmm7, qword [esi - 8]
movq xmm4, qword [esi]
movdqa xmmword [esp + 0x10], xmm1
movdqa xmm1, xmmword [0x5666d0]
movdqa xmmword [esp + 0x20], xmm2
movdqa xmm2, xmmword [0x5666e0]
add esi, 0x10
add edi, 0xfffffff8
movdqa xmm0, xmm7
movdqa xmm6, xmm4
movdqa xmm3, xmm7
movdqa xmmword [esp + 0x30], xmm4
paddw xmm0, xmm1
paddw xmm6, xmm1
movdqa xmm1, xmmword [0x5666b0]
movdqa xmm5, xmm1
pxor xmm0, xmm1
movdqa xmm1, xmm2
pxor xmm6, xmm5
pcmpgtw xmm1, xmm0
movdqa xmm5, xmmword [0x566700]
pcmpgtw xmm2, xmm6
punpcklwd xmm1, xmm1
punpcklwd xmm6, xmm2
movdqa xmm2, xmmword [0x5666f0]
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 [0x5666b0]
pandn xmm0, xmmword [0x5666f0]
pxor xmm3, xmm5
por xmm6, xmm0
movdqa xmm0, xmmword [0x566710]
paddw xmm7, xmm0
paddw xmm4, xmm0
movdqa xmm0, xmmword [0x566720]
pxor xmm7, xmm5
pxor xmm4, xmm5
movdqa xmm5, xmmword [0x566700]
pcmpgtw xmm0, xmm7
movdqa xmm7, xmmword [0x566720]
punpcklwd xmm0, xmm0
pand xmm0, xmm5
pcmpgtw xmm7, xmm4
movdqa xmm4, xmmword [0x5666c0]
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 [0x5666b0]
pcmpgtw xmm3, xmmword [0x5666c0]
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 0x4d77a0
paddd xmm2, xmm1
cmp eax, edx
pshufd xmm0, xmm2, 0xee
paddd xmm0, xmm2
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd esi, xmm1
jne 0x4d7962
mov ecx, esi
jmp 0x4d7950
call sub.kernel32.dll_GetLastError
mov ecx, dword [esp + 0xc]
mov byte [ecx], 0
mov byte [ecx + 3], 0
mov word [ecx + 1], 0
mov dword [ecx + 4], eax
jmp 0x4d795a
xor ecx, ecx
mov eax, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov byte [eax], 4
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea edi, [esp + ecx + 0x4c]
mov ecx, esi
mov esi, ebx
lea eax, [esp + esi*2 + 0x4c]
jmp 0x4d7978
mov ecx, ebx
add ecx, edx
cmp edi, eax
je 0x4d7950
mov ebx, ecx
movzx ecx, word [edi]
add edi, 2
mov edx, 1
cmp cx, 0x7f
jbe 0x4d7970
movzx esi, cx
mov edx, 2
cmp esi, 0x800
jb 0x4d7970
add ecx, 0x2312
xor edx, edx
movzx ecx, cx
cmp ecx, 0x312
setae dl
lea edx, [edx + edx + 1]
jmp 0x4d7970
push 0x569354
push ebx
push esi
call fcn.00414b90
add esp, 0xc
ud2
push 0x569344
push 0x1000
push ebx
jmp 0x4d79da
push 0x569364
push ebx
push esi
call fcn.00417f20
add esp, 0xc
ud2