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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov edx, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov ecx, edx
mov eax, edi
sub ecx, edi
mov esi, 0x10
mov bl, byte [ecx + eax]
xor byte [eax], bl
inc eax
dec esi
jne 0x5094ca
add edx, 0x10
mov dword [ebp - 0xc], 9
mov dword [ebp - 8], edx
xor eax, eax
xor ecx, ecx
mov cl, byte [eax + edi]
inc eax
cmp eax, 0x10
mov dl, byte [ecx + 0x45ec90]
mov byte [eax + edi - 1], dl
jl 0x5094e2
xor eax, eax
xor ecx, ecx
mov cl, byte [eax + 0x45eebc]
inc eax
cmp eax, 0x10
mov dl, byte [ecx + edi]
mov byte [ebp + eax - 0x3d], dl
jl 0x5094f9
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x38]
mov eax, edi
mov dword [eax], ecx
mov ecx, dword [ebp - 0x34]
mov dword [eax + 4], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 8], ecx
xor ecx, ecx
mov dword [eax + 0xc], edx
mov eax, edi
lea ebx, [ebp - 0x2c]
lea edx, [ebp + ecx - 0x2c]
sub eax, ebx
mov dword [ebp - 4], edx
mov esi, 0xfffffffe
mov dword [ebp - 0x10], eax
jmp 0x509544
mov eax, dword [ebp - 0x10]
mov dl, byte [eax + edx]
test dl, dl
mov byte [ebp - 0x14], dl
je 0x50957f
mov eax, dword [ebp - 0x14]
xor edx, edx
and eax, 0xff
mov ebx, 0xff
mov dl, byte [eax + 0x45ea90]
mov eax, edx
xor edx, edx
mov dl, byte [0x45ea92]
add eax, edx
cdq
idiv ebx
xor eax, eax
mov al, byte [edx + 0x45eb90]
mov dword [ebp + 0xc], eax
jmp 0x509586
mov dword [ebp + 0xc], 0
lea eax, [esi - 1]
and eax, 3
add eax, ecx
mov al, byte [eax + edi]
test al, al
mov byte [ebp - 0x18], al
je 0x5095c7
mov edx, dword [ebp - 0x18]
xor eax, eax
and edx, 0xff
mov ebx, 0xff
mov al, byte [edx + 0x45ea90]
xor edx, edx
mov dl, byte [0x45ea93]
add eax, edx
cdq
idiv ebx
mov eax, edx
xor edx, edx
mov dl, byte [eax + 0x45eb90]
jmp 0x5095c9
xor edx, edx
lea eax, [esi + 1]
and esi, 3
mov ebx, eax
add esi, ecx
and ebx, 3
add ebx, ecx
mov dword [ebp - 0x1c], ebx
mov bl, byte [esi + edi]
mov esi, dword [ebp - 0x1c]
xor bl, byte [esi + edi]
mov esi, eax
xor bl, dl
mov dl, byte [ebp + 0xc]
xor bl, dl
mov edx, dword [ebp - 4]
lea eax, [esi + 2]
mov byte [edx], bl
inc edx
cmp eax, 4
mov dword [ebp - 4], edx
jl 0x509541
add ecx, 4
cmp ecx, 0x10
jl 0x509529
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
mov ecx, edi
mov dword [ecx], edx
mov edx, dword [ebp - 0x24]
mov dword [ecx + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
mov ecx, dword [ebp - 8]
xor eax, eax
mov dl, byte [ecx + eax]
mov bl, byte [eax + edi]
xor bl, dl
mov byte [eax + edi], bl
inc eax
cmp eax, 0x10
jl 0x50962c
mov eax, dword [ebp - 0xc]
add ecx, 0x10
dec eax
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], eax
jne 0x5094e0
xor eax, eax
xor ecx, ecx
mov cl, byte [eax + edi]
inc eax
cmp eax, 0x10
mov dl, byte [ecx + 0x45ec90]
mov byte [eax + edi - 1], dl
jl 0x509652
xor eax, eax
xor ecx, ecx
mov cl, byte [eax + 0x45eebc]
inc eax
cmp eax, 0x10
mov dl, byte [ecx + edi]
mov byte [ebp + eax - 0x3d], dl
jl 0x509669
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x38]
mov eax, edi
mov dword [eax], ecx
mov ecx, dword [ebp - 0x34]
mov dword [eax + 4], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 8], ecx
mov ecx, dword [ebp + 8]
mov dword [eax + 0xc], edx
xor eax, eax
mov dl, byte [ecx + eax + 0xa0]
mov bl, byte [eax + edi]
xor bl, dl
mov byte [eax + edi], bl
inc eax
cmp eax, 0x10
jl 0x50969c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret