Function at 0x4d8890
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x334
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
push ebx
mov ebx, ecx
mov dword [ebp - 0x334], eax
push esi
push edi
mov dword [ebp - 0x328], ebx
xor edi, edi
push dword [ebx + 0x4fa58]
movlpd qword [ebp - 0x330], xmm0
call fcn.005960c7
mov dword [ebp - 0x324], eax
add esp, 4
mov eax, dword [ebp + 0xc]
mov esi, edi
add eax, 3
and eax, 0xfffffffc
mov dword [ebp - 0x31c], eax
jle 0x4d892d
jmp 0x4d88f0
push dword [ebx + 0x4fa58]
call fcn.00597fff
movzx ecx, al
add esp, 4
mov eax, ecx
and eax, 0xf
mov byte [ebp + esi - 0x314], al
cmp al, 0xc
ja 0x4d8975
shr ecx, 4
mov byte [ebp + esi - 0x313], cl
cmp cl, 0xc
ja 0x4d8975
mov eax, dword [ebp - 0x31c]
add esi, 2
cmp esi, eax
jl 0x4d88f0
and al, 7
cmp al, 4
jne 0x4d8a98
push dword [ebx + 0x4fa58]
call fcn.00597fff
shl eax, 8
cdq
mov esi, eax
mov ebx, edx
mov eax, dword [ebp - 0x328]
push dword [eax + 0x4fa58]
call fcn.00597fff
cdq
add esp, 8
add esi, eax
mov edi, 0x10
adc ebx, edx
mov dword [ebp - 0x320], ebx
mov edx, ebx
jmp 0x4d8aaa
push 0
push dword [ebp - 0x324]
push dword [ebx + 0x4fa58]
call fcn.00595cb4
mov eax, dword [ebp - 0x31c]
add esp, 0xc
mov esi, dword [ebp - 0x334]
dec eax
add esi, 4
shr eax, 3
inc eax
mov dword [ebp - 0x318], esi
mov dword [ebp - 0x31c], eax
mov edi, 0xffffff00
push 6
lea eax, [ebp - 0x14]
mov ecx, ebx
push eax
call fcn.004e8cd0
mov ebx, dword [ebp - 0x14]
mov cx, bx
movzx eax, word [ebp - 0x10]
and ebx, 0xfff
mov edx, dword [ebp - 0x12]
shr ax, 8
and ax, 0xfff0
shr cx, 4
and cx, di
or cx, ax
movzx eax, word [ebp - 0xc]
shr ax, 0xc
or cx, ax
mov word [esi - 4], cx
mov cx, dx
mov esi, dword [ebp - 0xe]
and edx, 0xfff
shr cx, 4
mov ax, si
shr ax, 8
and cx, di
mov edi, dword [ebp - 0xa]
and ax, 0xfff0
or cx, ax
and esi, 0xfff
mov ax, di
and edi, 0xfff
shr ax, 0xc
or cx, ax
mov eax, dword [ebp - 0x318]
mov word [eax - 2], cx
mov ecx, eax
mov eax, dword [ebp - 0x10]
and eax, 0xfff
mov word [ecx + 4], ax
mov eax, dword [ebp - 0xc]
and eax, 0xfff
mov word [ecx], bx
mov ebx, dword [ebp - 0x328]
mov word [ecx + 6], si
mov word [ecx + 0xa], di
mov edi, 0xffffff00
mov word [ecx + 2], dx
mov word [ecx + 8], ax
add ecx, 0x10
dec dword [ebp - 0x31c]
mov esi, ecx
mov dword [ebp - 0x318], ecx
jne 0x4d89b0
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret 8
mov edx, dword [ebp - 0x32c]
mov esi, dword [ebp - 0x330]
mov dword [ebp - 0x320], edx
mov eax, dword [ebp - 0x31c]
xor ebx, ebx
mov dword [ebp - 0x318], esi
mov dword [ebp - 0x324], ebx
test eax, eax
jle 0x4d8bb8
jmp 0x4d8ad0
movzx eax, byte [ebp + ebx - 0x314]
mov dword [ebp - 0x32c], eax
cmp edi, eax
jge 0x4d8b3c
mov ebx, dword [ebp - 0x318]
xor esi, esi
lea ebx, [ebx]
mov eax, dword [ebp - 0x328]
push dword [eax + 0x4fa58]
call fcn.00597fff
mov ecx, esi
cdq
add esp, 4
xor ecx, 8
add ecx, edi
call fcn.00599ab0
add ebx, eax
adc dword [ebp - 0x320], edx
add esi, 8
cmp esi, 0x20
jl 0x4d8af0
mov eax, dword [ebp - 0x32c]
add edi, 0x20
mov edx, dword [ebp - 0x320]
mov dword [ebp - 0x318], ebx
mov ebx, dword [ebp - 0x324]
mov ecx, 0x10
mov esi, 0xffff
sub ecx, eax
mov eax, dword [ebp - 0x318]
sar esi, cl
mov ecx, dword [ebp - 0x32c]
and esi, eax
call fcn.00598f40
mov dword [ebp - 0x318], eax
mov eax, dword [ebp - 0x32c]
sub edi, eax
mov dword [ebp - 0x320], edx
lea ecx, [eax - 1]
mov eax, 1
shl eax, cl
test esi, eax
jne 0x4d8b95
mov ecx, dword [ebp - 0x32c]
mov edx, 1
shl edx, cl
mov eax, 1
sub eax, edx
add esi, eax
mov eax, dword [ebp - 0x334]
mov edx, dword [ebp - 0x320]
mov word [eax + ebx*2], si
inc ebx
mov dword [ebp - 0x324], ebx
cmp ebx, dword [ebp - 0x31c]
jl 0x4d8ad0
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret 8