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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov ecx, dword [ebp + 8]
push ebx
push esi
push edi
movzx edi, word [eax]
mov edx, edi
add edx, edx
lea esi, [eax + edx*8 + 0x14]
mov dword [ebp - 0x1c], edi
mov edx, 4
lea eax, [ecx + 0xc]
mov ebx, dword [esi - 4]
xor dword [eax], ebx
sub esi, 4
sub eax, 4
dec edx
jne 0x102231a2
mov dword [ebp - 0x18], esi
mov dword [ebp - 0xc], edx
test edi, edi
jle 0x1022338b
lea eax, [ebp - 0x44]
sub eax, ecx
mov dword [ebp - 0x34], eax
jmp 0x102231d0
mov eax, 2
lea esi, [ebp - 0x38]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], esi
mov edi, edi
mov edi, eax
and edi, 3
movzx edi, byte [ecx + edi*4 + 2]
movzx edi, byte [edi + 0x102ad660]
lea ebx, [eax - 2]
and ebx, 3
mov ebx, dword [ecx + ebx*4]
mov dword [ebp - 8], edi
and ebx, 0xff
movzx ebx, byte [ebx + 0x102ad660]
lea edi, [eax - 1]
and edi, 3
movzx edi, byte [ecx + edi*4 + 1]
movzx edi, byte [edi + 0x102ad660]
lea edx, [eax + 1]
and edx, 3
movzx edx, byte [ecx + edx*4 + 3]
movzx edx, byte [edx + 0x102ad660]
mov dword [ebp - 4], ebx
mov ebx, dword [ebp - 0x1c]
dec ebx
mov dword [ebp - 0x28], edi
cmp dword [ebp - 0xc], ebx
jge 0x10223331
mov ecx, dword [ebp - 8]
mov eax, ecx
xor eax, edx
test al, al
jns 0x10223253
add eax, eax
xor eax, 0x1b
jmp 0x10223255
add eax, eax
movzx ebx, al
mov eax, edi
xor eax, ecx
test al, al
jns 0x10223267
add eax, eax
xor eax, 0x1b
jmp 0x10223269
add eax, eax
mov ecx, dword [ebp - 4]
movzx esi, al
mov eax, ecx
xor eax, edi
mov dword [ebp - 0x24], esi
test al, al
jns 0x10223281
add eax, eax
xor eax, 0x1b
jmp 0x10223283
add eax, eax
movzx eax, al
xor ecx, edx
mov dword [ebp - 0x2c], eax
test cl, cl
jns 0x10223296
add ecx, ecx
xor ecx, 0x1b
jmp 0x10223298
add ecx, ecx
movzx ecx, cl
mov dword [ebp - 0x30], ecx
mov ecx, esi
xor ecx, ebx
test cl, cl
jns 0x102232ad
add ecx, ecx
xor ecx, 0x1b
jmp 0x102232af
add ecx, ecx
movzx ecx, cl
xor eax, esi
mov dword [ebp - 0x20], ecx
test al, al
jns 0x102232c2
add eax, eax
xor eax, 0x1b
jmp 0x102232c4
add eax, eax
movzx esi, al
mov eax, esi
xor eax, ecx
test al, al
jns 0x102232d6
add eax, eax
xor eax, 0x1b
jmp 0x102232d8
add eax, eax
movzx ecx, al
mov eax, ecx
xor eax, dword [ebp - 0x20]
xor ecx, esi
mov esi, eax
xor eax, dword [ebp - 0x2c]
xor esi, ebx
xor esi, dword [ebp - 4]
xor eax, dword [ebp - 4]
mov ebx, ecx
xor ebx, dword [ebp - 0x24]
xor ecx, dword [ebp - 0x30]
xor ebx, dword [ebp - 4]
xor esi, edi
xor esi, dword [ebp - 8]
mov edi, dword [ebp - 0x28]
xor ebx, edi
shl esi, 8
xor ebx, edx
or esi, ebx
shl esi, 8
mov ebx, esi
mov esi, dword [ebp - 8]
xor eax, esi
xor ecx, edi
xor eax, edx
xor ecx, esi
mov esi, dword [ebp - 0x14]
or ebx, eax
mov eax, dword [ebp - 0x10]
xor ecx, edx
shl ebx, 8
or ebx, ecx
mov ecx, dword [ebp + 8]
mov dword [esi], ebx
jmp 0x10223344
shl edx, 8
or edx, dword [ebp - 8]
shl edx, 8
or edx, edi
shl edx, 8
or edx, dword [ebp - 4]
mov dword [esi], edx
dec eax
sub esi, 4
lea edx, [eax + 2]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], esi
test edx, edx
jne 0x102231e0
mov esi, dword [ebp - 0x18]
mov edx, 4
lea eax, [ecx + 0xc]
mov edi, dword [ebp - 0x34]
mov edi, dword [edi + eax]
xor edi, dword [esi - 4]
sub esi, 4
mov dword [eax], edi
sub eax, 4
dec edx
jne 0x10223364
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 0xc], eax
cmp eax, dword [ebp - 0x1c]
jl 0x102231d0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret