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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1ec
mov esi, 0xf1
mov ebp, edx
mov dword [esp], ecx
lea ebx, [esp + 4]
lea edi, [esp + 0xf8]
push esi
push 0
push edi
call fcn.00616db0
add esp, 0xc
mov ecx, ebp
mov edx, edi
call 0x513539
push esi
push 0
push ebx
call fcn.00616db0
add esp, 0xc
mov ecx, ebp
mov edx, ebx
call 0x513539
movzx ecx, byte [ebx + 0xf0]
xor edx, edx
shl ecx, 2
cmp edx, ecx
jae 0x513306
cmp edx, 0x3c
jae 0x5134e2
cmp ecx, 0x3c
jae 0x5134f1
mov esi, dword [esp + ecx*4 + 4]
mov eax, dword [esp + edx*4 + 4]
mov dword [esp + edx*4 + 4], esi
lea esi, [ecx + 1]
mov dword [esp + ecx*4 + 4], eax
cmp esi, 0x3c
jae 0x5134fe
mov eax, dword [esp + edx*4 + 8]
mov esi, dword [esp + ecx*4 + 8]
mov dword [esp + edx*4 + 8], esi
mov dword [esp + ecx*4 + 8], eax
lea eax, [ecx + 2]
cmp eax, 0x3c
jae 0x51350d
mov eax, dword [esp + edx*4 + 0xc]
mov esi, dword [esp + ecx*4 + 0xc]
mov dword [esp + edx*4 + 0xc], esi
mov dword [esp + ecx*4 + 0xc], eax
lea eax, [ecx + 3]
cmp eax, 0x3c
jae 0x51351c
mov eax, dword [esp + edx*4 + 0x10]
mov esi, dword [esp + ecx*4 + 0x10]
mov dword [esp + edx*4 + 0x10], esi
mov dword [esp + ecx*4 + 0x10], eax
add edx, 4
add ecx, 0xfffffffc
jmp 0x51327d
mov al, 1
push 0xffffffffffffffc8
pop ecx
mov ah, byte [esp + 0xf4]
mov ebp, 0x3fc
mov ebx, 0xff
cmp al, ah
jae 0x5134ae
test ecx, ecx
je 0x51352b
mov esi, dword [esp + ecx*4 + 0xf4]
inc al
mov edx, esi
shr edx, 0x18
movzx edi, byte [edx*4 + 0x7628bc]
mov edx, esi
shr edx, 0xe
and edx, ebp
movzx edx, byte [edx + 0x7628bc]
mov edx, dword [edx*4 + 0x7630f4]
xor edx, dword [edi*4 + 0x762ce4]
mov edi, esi
and esi, ebx
shr edi, 8
movzx esi, byte [esi*4 + 0x7628bc]
and edi, ebx
movzx edi, byte [edi*4 + 0x7628bc]
xor edx, dword [edi*4 + 0x7634f4]
mov edi, dword [esp + ecx*4 + 0xf8]
xor edx, dword [esi*4 + 0x7638f4]
mov dword [esp + ecx*4 + 0xf4], edx
mov edx, edi
shr edx, 0x18
movzx esi, byte [edx*4 + 0x7628bc]
mov edx, edi
shr edx, 0xe
and edx, ebp
movzx edx, byte [edx + 0x7628bc]
mov edx, dword [edx*4 + 0x7630f4]
xor edx, dword [esi*4 + 0x762ce4]
mov esi, edi
and edi, ebx
shr esi, 8
and esi, ebx
movzx esi, byte [esi*4 + 0x7628bc]
xor edx, dword [esi*4 + 0x7634f4]
movzx esi, byte [edi*4 + 0x7628bc]
xor edx, dword [esi*4 + 0x7638f4]
mov dword [esp + ecx*4 + 0xf8], edx
mov esi, dword [esp + ecx*4 + 0xfc]
mov edx, esi
shr edx, 0x18
movzx edi, byte [edx*4 + 0x7628bc]
mov edx, esi
shr edx, 0xe
and edx, ebp
movzx edx, byte [edx + 0x7628bc]
mov edx, dword [edx*4 + 0x7630f4]
xor edx, dword [edi*4 + 0x762ce4]
mov edi, esi
and esi, ebx
shr edi, 8
movzx esi, byte [esi*4 + 0x7628bc]
and edi, ebx
movzx edi, byte [edi*4 + 0x7628bc]
xor edx, dword [edi*4 + 0x7634f4]
xor edx, dword [esi*4 + 0x7638f4]
mov dword [esp + ecx*4 + 0xfc], edx
mov esi, dword [esp + ecx*4 + 0x100]
mov edx, esi
shr edx, 0x18
movzx edi, byte [edx*4 + 0x7628bc]
mov edx, esi
shr edx, 0xe
and edx, ebp
movzx edx, byte [edx + 0x7628bc]
mov edx, dword [edx*4 + 0x7630f4]
xor edx, dword [edi*4 + 0x762ce4]
mov edi, esi
and esi, ebx
shr edi, 8
movzx esi, byte [esi*4 + 0x7628bc]
and edi, ebx
movzx edi, byte [edi*4 + 0x7628bc]
xor edx, dword [edi*4 + 0x7634f4]
xor edx, dword [esi*4 + 0x7638f4]
mov dword [esp + ecx*4 + 0x100], edx
add ecx, 4
jmp 0x51331c
mov esi, 0xf4
push esi
lea eax, [esp + 0xfc]
push eax
mov edi, dword [esp + 8]
push edi
call fcn.00616830
add esp, 0xc
add edi, esi
push esi
lea eax, [esp + 8]
push eax
push edi
call fcn.00616830
add esp, 0x1f8
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x3c
pop ecx
mov edx, ecx
push 0x763cf4
call fcn.0062d3f0
push 0x3c
pop edx
push 0x763d04
call fcn.0062d3f0
push 0x3c
pop ecx
mov edx, ecx
push 0x763d14
call fcn.0062d3f0
push 0x3c
pop edx
mov ecx, eax
push 0x763d24
call fcn.0062d3f0
push 0x3c
pop edx
mov ecx, eax
push 0x763d34
call fcn.0062d3f0
xor ecx, ecx
xor edx, edx
push 0x7630e4
call fcn.0062d3f0
push ebp
push ebx
push edi
push esi
mov esi, edx
mov ebx, ecx
mov byte [edx + 0xf0], 0xa
push 4
pop ebp
mov edx, ebp
call fcn.00513614
lea ecx, [ebx + 4]
mov edx, ebp
mov edi, eax
mov dword [esi], eax
call fcn.00513614
lea ecx, [ebx + 8]
mov edx, ebp
mov dword [esi + 4], eax
call fcn.00513614
add ebx, 0xc
mov edx, ebp
mov dword [esi + 8], eax
mov ecx, ebx
call fcn.00513614
mov dword [esi + 0xc], eax
push 0xffffffffffffffd8
pop ecx
mov edx, 0xff
mov ebx, eax
mov ebp, eax
shr ebx, 0xe
and ebp, edx
and ebx, 0x3fc
movzx ebp, byte [ebp*4 + str.cc]
movzx ebx, byte [ebx + 0x761cbf]
shl ebp, 8
shl ebx, 0x18
xor ebx, edi
mov edi, eax
shr edi, 8
and edi, edx
movzx edi, byte [edi*4 + 0x7620be]
shl edi, 0x10
xor ebp, edi
mov edi, eax
shr edi, 0x18
xor ebp, ebx
movzx edi, byte [edi*4 + 0x7628bc]
xor edi, ebp
xor edi, dword [ecx + 0x762ce4]
mov dword [esi + ecx*4 + 0xb0], edi
mov ebx, dword [esi + ecx*4 + 0xa4]
xor ebx, edi
mov dword [esi + ecx*4 + 0xb4], ebx
xor ebx, dword [esi + ecx*4 + 0xa8]
xor eax, ebx
mov dword [esi + ecx*4 + 0xb8], ebx
mov dword [esi + ecx*4 + 0xbc], eax
add ecx, 4
jne 0x513587
pop esi
pop edi
pop ebx
pop ebp
ret