Function at 0x5d0380
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
push ebx
push esi
push edi
mov dword [ebp - 0x5c], ecx
call fcn.004b785c
movzx eax, al
test eax, eax
je 0x5d0796
mov ecx, dword [ebp - 0x5c]
add ecx, 0x10
call fcn.004b51ce
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x5c]
mov edx, dword [ecx + 0xc]
shl edx, 2
mov eax, dword [ebp - 4]
lea ecx, [eax + edx*4]
mov dword [ebp - 8], ecx
mov edx, dword [0x6886ac]
mov edi, dword [ebp + 8]
mov esi, dword [ebp - 4]
movd mm5, dword [ebp - 8]
push ebp
lea ebp, [0x6468e0]
mov eax, dword [esi]
xor eax, dword [edi]
movd mm0, eax
mov ebx, dword [esi + 4]
xor ebx, dword [edi + 4]
movd mm1, ebx
and ebx, eax
mov eax, dword [esi + 8]
xor eax, dword [edi + 8]
movd mm2, eax
and ebx, eax
mov ecx, dword [esi + 0xc]
xor ecx, dword [edi + 0xc]
and ebx, ecx
and ebx, 0
mov edi, ebx
and ebx, dword [ebp + edi]
add edi, edx
and ebx, dword [ebp + edi]
add edi, edx
and ebx, dword [ebp + edi]
add edi, edx
and ebx, dword [ebp + edi]
add edi, edx
cmp edi, 0x400
jl 0x5d03fd
and ebx, dword [ebp + 0x3fc]
movd mm6, ebx
pxor mm2, mm6
pxor mm1, mm6
pxor mm0, mm6
xor ecx, ebx
mov edi, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
mov ebx, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
add esi, 0x20
movd mm4, esi
movzx esi, cl
xor edx, dword [ebp + esi*4]
movzx esi, ch
xor ebx, dword [ebp + esi*4 + 0x400]
shr ecx, 0x10
movzx esi, cl
xor eax, dword [ebp + esi*4 + 0x800]
movzx esi, ch
xor edi, dword [ebp + esi*4 + 0xc00]
movd ecx, mm2
movzx esi, cl
xor ebx, dword [ebp + esi*4]
movzx esi, ch
xor eax, dword [ebp + esi*4 + 0x400]
shr ecx, 0x10
movzx esi, cl
xor edi, dword [ebp + esi*4 + 0x800]
movzx esi, ch
xor edx, dword [ebp + esi*4 + 0xc00]
movd ecx, mm1
movzx esi, cl
xor eax, dword [ebp + esi*4]
movzx esi, ch
xor edi, dword [ebp + esi*4 + 0x400]
shr ecx, 0x10
movzx esi, cl
xor edx, dword [ebp + esi*4 + 0x800]
movzx esi, ch
xor ebx, dword [ebp + esi*4 + 0xc00]
movd ecx, mm0
movzx esi, cl
xor edi, dword [ebp + esi*4]
movzx esi, ch
xor edx, dword [ebp + esi*4 + 0x400]
shr ecx, 0x10
movzx esi, cl
xor ebx, dword [ebp + esi*4 + 0x800]
movzx esi, ch
xor eax, dword [ebp + esi*4 + 0xc00]
movd mm2, ebx
movd mm1, eax
movd mm0, edi
movd esi, mm4
mov edi, dword [esi]
mov eax, dword [esi + 4]
mov ebx, dword [esi + 8]
mov ecx, dword [esi + 0xc]
movzx esi, dl
xor edi, dword [ebp + esi*4 + 0xc00]
movzx esi, dh
xor eax, dword [ebp + esi*4 + 0x800]
shr edx, 0x10
movzx esi, dl
xor ebx, dword [ebp + esi*4 + 0x400]
movzx esi, dh
xor ecx, dword [ebp + esi*4]
movd edx, mm2
movzx esi, dl
xor ecx, dword [ebp + esi*4 + 0xc00]
movzx esi, dh
xor edi, dword [ebp + esi*4 + 0x800]
shr edx, 0x10
movzx esi, dl
xor eax, dword [ebp + esi*4 + 0x400]
movzx esi, dh
xor ebx, dword [ebp + esi*4]
movd edx, mm1
movzx esi, dl
xor ebx, dword [ebp + esi*4 + 0xc00]
movzx esi, dh
xor ecx, dword [ebp + esi*4 + 0x800]
shr edx, 0x10
movzx esi, dl
xor edi, dword [ebp + esi*4 + 0x400]
movzx esi, dh
xor eax, dword [ebp + esi*4]
movd edx, mm0
movzx esi, dl
xor eax, dword [ebp + esi*4 + 0xc00]
movzx esi, dh
xor ebx, dword [ebp + esi*4 + 0x800]
shr edx, 0x10
movzx esi, dl
xor ecx, dword [ebp + esi*4 + 0x400]
movzx esi, dh
xor edi, dword [ebp + esi*4]
movd esi, mm4
movd mm2, ebx
movd mm1, eax
movd mm0, edi
mov edi, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
mov ebx, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
movzx esi, cl
xor edi, dword [ebp + esi*4 + 0xc00]
movzx esi, ch
xor eax, dword [ebp + esi*4 + 0x800]
shr ecx, 0x10
movzx esi, cl
xor ebx, dword [ebp + esi*4 + 0x400]
movzx esi, ch
xor edx, dword [ebp + esi*4]
movd ecx, mm2
movzx esi, cl
xor edx, dword [ebp + esi*4 + 0xc00]
movzx esi, ch
xor edi, dword [ebp + esi*4 + 0x800]
shr ecx, 0x10
movzx esi, cl
xor eax, dword [ebp + esi*4 + 0x400]
add al, 0
add byte [edi], cl
mov dh, 0xf5
xor ebx, dword [ebp + esi*4]
movd ecx, mm1
movzx esi, cl
xor ebx, dword [ebp + esi*4 + 0xc00]
movzx esi, ch
xor edx, dword [ebp + esi*4 + 0x800]
shr ecx, 0x10
movzx esi, cl
xor edi, dword [ebp + esi*4 + 0x400]
movzx esi, ch
xor eax, dword [ebp + esi*4]
movd ecx, mm0
movzx esi, cl
xor eax, dword [ebp + esi*4 + 0xc00]
movzx esi, ch
xor ebx, dword [ebp + esi*4 + 0x800]
shr ecx, 0x10
movzx esi, cl
xor edx, dword [ebp + esi*4 + 0x400]
movzx esi, ch
xor edi, dword [ebp + esi*4]
movd mm2, ebx
movd mm1, eax
movd mm0, edi
movd esi, mm4
movd edi, mm5
add esi, 0x20
movd mm4, esi
cmp edi, esi
jne 0x5d04f8
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov esi, dword [edi + 8]
mov edi, dword [edi + 0xc]
movzx ebx, dl
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x18
xor eax, ebx
movzx ebx, dh
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x10
xor ecx, ebx
shr edx, 0x10
movzx ebx, dl
shr edx, 8
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 8
xor esi, ebx
movzx ebx, byte [ebp + edx*4 + 1]
xor edi, ebx
movd edx, mm2
movzx ebx, dl
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x18
xor edi, ebx
movzx ebx, dh
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x10
xor eax, ebx
shr edx, 0x10
movzx ebx, dl
shr edx, 8
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 8
xor ecx, ebx
movzx ebx, byte [ebp + edx*4 + 1]
xor esi, ebx
movd edx, mm1
movzx ebx, dl
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x18
xor esi, ebx
movzx ebx, dh
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x10
xor edi, ebx
shr edx, 0x10
movzx ebx, dl
shr edx, 8
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 8
xor eax, ebx
movzx ebx, byte [ebp + edx*4 + 1]
xor ecx, ebx
movd edx, mm0
movzx ebx, dl
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x18
xor ecx, ebx
movzx ebx, dh
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x10
xor esi, ebx
shr edx, 0x10
movzx ebx, dl
shr edx, 8
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 8
xor edi, ebx
movzx ebx, byte [ebp + edx*4 + 1]
xor eax, ebx
emms
pop ebp
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x5d0783
xor eax, dword [ebx]
xor ecx, dword [ebx + 4]
xor esi, dword [ebx + 8]
xor edi, dword [ebx + 0xc]
mov ebx, dword [ebp + 0x10]
mov dword [ebx], eax
mov dword [ebx + 4], ecx
mov dword [ebx + 8], esi
mov dword [ebx + 0xc], edi
jmp 0x5d103e
mov ecx, dword [ebp - 0x5c]
add ecx, 0x10
call fcn.004b51ce
mov dword [ebp - 0x54], eax
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x54]
mov ecx, dword [edx]
xor ecx, dword [eax]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x54]
mov ecx, dword [edx + 4]
xor ecx, dword [eax + 4]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x54]
mov ecx, dword [edx + 8]
xor ecx, dword [eax + 8]
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x54]
mov ecx, dword [edx + 0xc]
xor ecx, dword [eax + 0xc]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x54]
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x54]
mov edx, dword [ecx + 0x14]
mov dword [ebp - 0x48], edx
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax + 0x18]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x54]
mov eax, dword [edx + 0x1c]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x54]
add ecx, 0x20
mov dword [ebp - 0x54], ecx
call fcn.004b99c2
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x20], 0
jmp 0x5d082c
mov edx, dword [ebp - 0x20]
add edx, dword [ebp - 0x3c]
mov dword [ebp - 0x20], edx
cmp dword [ebp - 0x20], 0x400
jae 0x5d0846
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x28]
and ecx, dword [eax + 0x6468e0]
mov dword [ebp - 0x28], ecx
jmp 0x5d0823
mov edx, dword [ebp - 0x28]
and edx, dword [0x646cdc]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x24]
or eax, dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x44]
or ecx, dword [ebp - 0x28]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x40]
or edx, dword [ebp - 0x28]
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x1c]
or eax, dword [ebp - 0x28]
mov dword [ebp - 0x1c], eax
movzx ecx, byte [ebp - 0x1c]
mov edx, dword [ebp - 0x34]
xor edx, dword [ecx*4 + 0x6468e0]
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 0x1c]
shr eax, 8
mov dword [ebp - 0x1c], eax
push 8
movzx ecx, byte [ebp - 0x1c]
mov edx, dword [ecx*4 + 0x6468e0]
push edx
call fcn.004bab9c
add esp, 8
xor eax, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x1c]
shr eax, 8
mov dword [ebp - 0x1c], eax
push 0x10
movzx ecx, byte [ebp - 0x1c]
mov edx, dword [ecx*4 + 0x6468e0]
push edx
call fcn.004bab9c
add esp, 8
xor eax, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x1c]
shr eax, 8
mov dword [ebp - 0x1c], eax
push 0x18
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx*4 + 0x6468e0]
push edx
call fcn.004bab9c
add esp, 8
xor eax, dword [ebp - 0x58]
mov dword [ebp - 0x58], eax
movzx eax, byte [ebp - 0x40]
mov ecx, dword [ebp - 0x2c]
xor ecx, dword [eax*4 + 0x6468e0]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x40]
shr edx, 8
mov dword [ebp - 0x40], edx
push 8
movzx eax, byte [ebp - 0x40]
mov ecx, dword [eax*4 + 0x6468e0]
push ecx
call fcn.004bab9c
add esp, 8
xor eax, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
mov edx, dword [ebp - 0x40]
shr edx, 8
mov dword [ebp - 0x40], edx
push 0x10
movzx eax, byte [ebp - 0x40]
mov ecx, dword [eax*4 + 0x6468e0]
push ecx
call fcn.004bab9c
add esp, 8
xor eax, dword [ebp - 0x58]
mov dword [ebp - 0x58], eax
mov edx, dword [ebp - 0x40]
shr edx, 8
mov dword [ebp - 0x40], edx
push 0x18
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax*4 + 0x6468e0]
push ecx
call fcn.004bab9c
add esp, 8
xor eax, dword [ebp - 0x34]
mov dword [ebp - 0x34], eax
movzx edx, byte [ebp - 0x44]
mov eax, dword [ebp - 0x48]
xor eax, dword [edx*4 + 0x6468e0]
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x44]
shr ecx, 8
mov dword [ebp - 0x44], ecx
push 8
movzx edx, byte [ebp - 0x44]
mov eax, dword [edx*4 + 0x6468e0]
push eax
call fcn.004bab9c
add esp, 8
xor eax, dword [ebp - 0x58]
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x44]
shr ecx, 8
mov dword [ebp - 0x44], ecx
push 0x10
movzx edx, byte [ebp - 0x44]
mov eax, dword [edx*4 + 0x6468e0]
push eax
call fcn.004bab9c
add esp, 8
xor eax, dword [ebp - 0x34]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x44]
shr ecx, 8
mov dword [ebp - 0x44], ecx
push 0x18
mov edx, dword [ebp - 0x44]
mov eax, dword [edx*4 + 0x6468e0]
push eax
call fcn.004bab9c
add esp, 8
xor eax, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
movzx ecx, byte [ebp - 0x24]
mov edx, dword [ebp - 0x58]
xor edx, dword [ecx*4 + 0x6468e0]
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x24]
shr eax, 8
mov dword [ebp - 0x24], eax
push 8
movzx ecx, byte [ebp - 0x24]
mov edx, dword [ecx*4 + 0x6468e0]
push edx
call fcn.004bab9c
add esp, 8
xor eax, dword [ebp - 0x34]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x24]
shr eax, 8
mov dword [ebp - 0x24], eax
push 0x10
movzx ecx, byte [ebp - 0x24]
mov edx, dword [ecx*4 + 0x6468e0]
push edx
call fcn.004bab9c
add esp, 8
xor eax, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x24]
shr eax, 8
mov dword [ebp - 0x24], eax
push 0x18
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx*4 + 0x6468e0]
push edx
call fcn.004bab9c
add esp, 8
xor eax, dword [ebp - 0x48]
inc ebp
mov eax, 0x8bb84589
inc ebp
movsb byte es:[edi], byte [esi]