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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x513010]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, ecx
push edi
push 8
pop ecx
mov ebx, dword [eax + 4]
lea edi, [ebp - 0x24]
rep movsd dword es:[edi], dword [esi]
sub ebx, 6
mov dword [ebp - 0x2c], eax
xor edi, edi
mov dword [ebp - 0x30], ebx
xor edx, edx
xor esi, esi
test ebx, ebx
jle 0x4afe2d
cmp edi, dword [eax + 4]
jg 0x4aff84
cmp esi, ebx
jge 0x4afe11
lea eax, [ebp - 0x24]
lea eax, [eax + esi*4]
mov dword [ebp - 0x28], eax
cmp edx, 4
jge 0x4afe11
mov ebx, dword [ebp - 0x2c]
lea ecx, [edx + edi*4]
mov eax, dword [eax]
inc esi
mov dword [ebx + ecx*4 + 0x18], eax
mov eax, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x30]
add eax, 4
inc edx
mov dword [ebp - 0x28], eax
cmp esi, ebx
jl 0x4afdee
cmp edx, 4
lea eax, [edi + 1]
cmovne eax, edi
mov edi, eax
xor eax, eax
cmp edx, 4
cmovne eax, edx
mov edx, eax
mov eax, dword [ebp - 0x2c]
cmp esi, ebx
jl 0x4afdd8
cmp edi, dword [eax + 4]
jg 0x4aff84
mov esi, 0x4f2d20
movzx eax, byte [ebp + ebx*4 - 0x27]
mov cl, byte [ebp - 0x24]
xor cl, byte [eax + 0x4f2d30]
mov byte [ebp - 0x24], cl
movzx eax, byte [ebp + ebx*4 - 0x26]
mov al, byte [eax + 0x4f2d30]
xor byte [ebp - 0x23], al
movzx eax, byte [ebp + ebx*4 - 0x25]
mov al, byte [eax + 0x4f2d30]
xor byte [ebp - 0x22], al
movzx eax, byte [ebp + ebx*4 - 0x28]
mov al, byte [eax + 0x4f2d30]
xor byte [ebp - 0x21], al
mov al, byte [esi]
xor al, cl
inc esi
mov byte [ebp - 0x24], al
mov dword [ebp - 0x34], esi
cmp ebx, 8
je 0x4afeb4
cmp ebx, 1
jle 0x4afea8
lea eax, [ebx - 1]
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x28], eax
push 4
pop esi
mov al, byte [ecx - 4]
xor byte [ecx], al
inc ecx
sub esi, 1
jne 0x4afe97
sub dword [ebp - 0x28], 1
jne 0x4afe94
xor esi, esi
test ebx, ebx
jle 0x4aff75
jmp 0x4aff24
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x28], 3
push 4
pop esi
mov al, byte [ecx - 4]
xor byte [ecx], al
inc ecx
sub esi, 1
jne 0x4afec1
sub dword [ebp - 0x28], 1
jne 0x4afebe
movzx eax, byte [ebp - 0x18]
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x28], 3
mov al, byte [eax + 0x4f2d30]
xor byte [ebp - 0x14], al
movzx eax, byte [ebp - 0x17]
mov al, byte [eax + 0x4f2d30]
xor byte [ebp - 0x13], al
movzx eax, byte [ebp - 0x16]
mov al, byte [eax + 0x4f2d30]
xor byte [ebp - 0x12], al
movzx eax, byte [ebp - 0x15]
mov al, byte [eax + 0x4f2d30]
xor byte [ebp - 0x11], al
push 4
pop esi
mov al, byte [ecx - 4]
xor byte [ecx], al
inc ecx
sub esi, 1
jne 0x4aff13
sub dword [ebp - 0x28], 1
jne 0x4aff10
mov eax, dword [ebp - 0x2c]
cmp edi, dword [eax + 4]
jg 0x4aff75
cmp esi, ebx
jge 0x4aff5c
lea eax, [ebp - 0x24]
lea eax, [eax + esi*4]
mov dword [ebp - 0x28], eax
cmp edx, 4
jge 0x4aff5c
mov ebx, dword [ebp - 0x2c]
lea ecx, [edx + edi*4]
mov eax, dword [eax]
inc esi
mov dword [ebx + ecx*4 + 0x18], eax
mov eax, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x30]
add eax, 4
inc edx
mov dword [ebp - 0x28], eax
cmp esi, ebx
jl 0x4aff39
cmp edx, 4
lea eax, [edi + 1]
cmovne eax, edi
mov edi, eax
xor eax, eax
cmp edx, 4
cmovne eax, edx
mov edx, eax
cmp esi, ebx
jl 0x4aff24
mov eax, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x34]
cmp edi, dword [eax + 4]
jle 0x4afe3b
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b7879
leave
ret 4