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

Disassembly:
sub esp, 0x18
mov ecx, dword [esp + 0x1c]
push ebx
push ebp
push esi
mov esi, dword [ecx + 0x24]
mov eax, esi
shl eax, 4
add ecx, eax
mov ebp, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
push edi
mov dword [esp + 0x18], ebp
mov ebx, dword [ecx + 0x44]
mov edx, dword [eax]
xor ebx, dword [eax + 0xc]
xor edx, dword [ecx + 0x38]
mov dword [esp + 0x14], edx
mov edx, dword [ecx + 0x3c]
xor edx, dword [eax + 4]
mov dword [esp + 0x10], edx
mov edx, dword [ecx + 0x40]
xor edx, dword [eax + 8]
mov eax, ebx
shr eax, 8
movzx ecx, al
mov eax, edx
shr eax, 0x10
movzx eax, al
mov edi, dword [ecx*4 + 0x64e878]
xor edi, dword [eax*4 + 0x64ec78]
mov eax, dword [esp + 0x10]
shr eax, 0x18
xor edi, dword [eax*4 + 0x64f078]
mov eax, dword [esp + 0x14]
movzx eax, al
xor edi, dword [eax*4 + 0x64e478]
mov eax, ebx
shr eax, 0x10
movzx ecx, al
mov eax, dword [esp + 0x14]
shr eax, 8
movzx eax, al
mov dword [ebp], edi
mov ebp, dword [ecx*4 + 0x64ec78]
xor ebp, dword [eax*4 + 0x64e878]
mov eax, edx
shr eax, 0x18
xor ebp, dword [eax*4 + 0x64f078]
mov eax, dword [esp + 0x10]
movzx eax, al
xor ebp, dword [eax*4 + 0x64e478]
mov eax, dword [esp + 0x18]
mov dword [eax + 4], ebp
mov eax, dword [esp + 0x14]
shr eax, 0x10
movzx ecx, al
mov eax, dword [esp + 0x10]
shr eax, 8
movzx eax, al
mov ecx, dword [ecx*4 + 0x64ec78]
xor ecx, dword [eax*4 + 0x64e878]
mov eax, ebx
shr eax, 0x18
xor ecx, dword [eax*4 + 0x64f078]
movzx eax, dl
shr edx, 8
xor ecx, dword [eax*4 + 0x64e478]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], ecx
mov dword [eax + 8], ecx
mov eax, dword [esp + 0x10]
shr eax, 0x10
movzx ecx, dl
movzx eax, al
mov edx, dword [ecx*4 + 0x64e878]
xor edx, dword [eax*4 + 0x64ec78]
mov eax, dword [esp + 0x14]
shr eax, 0x18
xor edx, dword [eax*4 + 0x64f078]
movzx eax, bl
xor edx, dword [eax*4 + 0x64e478]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x10], edx
mov dword [eax + 0xc], edx
lea eax, [esi - 1]
cmp eax, 1
jbe 0x531878
mov ecx, dword [esp + 0x1c]
lea esi, [eax + 4]
shl esi, 4
add esi, dword [esp + 0x2c]
dec eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x20], eax
mov eax, dword [esi - 8]
lea esi, [esi - 0x10]
xor eax, edi
mov ebx, dword [esi + 0x14]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0xc]
xor eax, ebp
xor ebx, dword [esp + 0x10]
mov edx, dword [esi + 0x10]
mov dword [esp + 0x14], eax
xor edx, ecx
mov eax, ebx
shr eax, 8
movzx ecx, al
mov eax, edx
shr eax, 0x10
movzx eax, al
mov edi, dword [ecx*4 + 0x64e878]
mov ecx, dword [esp + 0x24]
xor edi, dword [eax*4 + 0x64ec78]
mov eax, dword [esp + 0x14]
shr eax, 0x18
xor edi, dword [eax*4 + 0x64f078]
movzx eax, cl
xor edi, dword [eax*4 + 0x64e478]
mov eax, dword [esp + 0x18]
mov dword [eax], edi
mov eax, ecx
shr eax, 8
movzx ecx, al
mov eax, ebx
shr eax, 0x10
movzx eax, al
mov ebp, dword [ecx*4 + 0x64e878]
xor ebp, dword [eax*4 + 0x64ec78]
mov eax, edx
shr eax, 0x18
xor ebp, dword [eax*4 + 0x64f078]
mov eax, dword [esp + 0x14]
movzx eax, al
xor ebp, dword [eax*4 + 0x64e478]
mov eax, dword [esp + 0x18]
mov dword [eax + 4], ebp
mov eax, dword [esp + 0x24]
shr eax, 0x10
movzx ecx, al
mov eax, dword [esp + 0x14]
shr eax, 8
movzx eax, al
mov ecx, dword [ecx*4 + 0x64ec78]
xor ecx, dword [eax*4 + 0x64e878]
mov eax, ebx
shr eax, 0x18
xor ecx, dword [eax*4 + 0x64f078]
movzx eax, dl
shr edx, 8
xor ecx, dword [eax*4 + 0x64e478]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], ecx
mov dword [eax + 8], ecx
mov eax, dword [esp + 0x14]
shr eax, 0x10
movzx eax, al
movzx ecx, dl
mov ecx, dword [ecx*4 + 0x64e878]
xor ecx, dword [eax*4 + 0x64ec78]
mov eax, dword [esp + 0x24]
shr eax, 0x18
xor ecx, dword [eax*4 + 0x64f078]
movzx eax, bl
xor ecx, dword [eax*4 + 0x64e478]
sub dword [esp + 0x20], 1
mov eax, dword [esp + 0x18]
mov dword [esp + 0x10], ecx
mov dword [eax + 0xc], ecx
mov ecx, dword [esp + 0x1c]
jne 0x531745
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx + 0x48]
mov ebx, dword [ecx + 0x4c]
xor eax, edi
mov dword [esp + 0x20], eax
xor ebx, ebp
movzx eax, al
mov ebp, ecx
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
movzx eax, byte [eax + 0x64f478]
mov ecx, dword [ebp + 0x54]
mov edx, dword [ebp + 0x50]
mov byte [edi], al
xor ecx, dword [esp + 0x10]
xor edx, dword [esp + 0x1c]
mov eax, ecx
shr eax, 8
movzx eax, al
movzx eax, byte [eax + 0x64f478]
mov byte [edi + 1], al
mov eax, edx
shr eax, 0x10
movzx eax, al
movzx eax, byte [eax + 0x64f478]
mov byte [edi + 2], al
mov eax, ebx
shr eax, 0x18
movzx eax, byte [eax + 0x64f478]
mov byte [edi + 3], al
movzx eax, bl
movzx eax, byte [eax + 0x64f478]
mov byte [edi + 4], al
mov eax, esi
shr eax, 8
movzx eax, al
movzx eax, byte [eax + 0x64f478]
mov byte [edi + 5], al
mov eax, ecx
shr eax, 0x10
movzx eax, al
movzx eax, byte [eax + 0x64f478]
mov byte [edi + 6], al
mov eax, edx
shr eax, 0x18
movzx eax, byte [eax + 0x64f478]
mov byte [edi + 7], al
movzx eax, dl
shr edx, 8
movzx eax, byte [eax + 0x64f478]
mov byte [edi + 8], al
mov eax, ebx
shr eax, 8
movzx eax, al
shr ebx, 0x10
movzx eax, byte [eax + 0x64f478]
mov byte [edi + 9], al
mov eax, esi
shr eax, 0x10
movzx eax, al
shr esi, 0x18
movzx eax, byte [eax + 0x64f478]
mov byte [edi + 0xa], al
mov eax, ecx
shr eax, 0x18
movzx eax, byte [eax + 0x64f478]
mov byte [edi + 0xb], al
movzx eax, cl
movzx eax, byte [eax + 0x64f478]
mov byte [edi + 0xc], al
movzx eax, dl
movzx eax, byte [eax + 0x64f478]
mov byte [edi + 0xd], al
movzx eax, bl
movzx eax, byte [eax + 0x64f478]
mov byte [edi + 0xe], al
movzx eax, byte [esi + 0x64f478]
mov byte [edi + 0xf], al
mov eax, dword [ebp + 0x38]
xor dword [edi], eax
mov eax, dword [ebp + 0x3c]
xor dword [edi + 4], eax
mov eax, dword [ebp + 0x40]
xor dword [edi + 8], eax
mov eax, dword [ebp + 0x44]
xor dword [edi + 0xc], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret