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

Disassembly:
mov eax, dword [esp + 0xc]
push ebx
push ebp
push esi
cmp eax, 0x10
push edi
je 0x412e53
cmp eax, 0x18
je 0x412e47
cmp eax, 0x20
jne 0x4130c8
mov edx, dword [esp + 0x14]
mov dword [edx], 0xe
jmp 0x412e5d
mov edx, dword [esp + 0x14]
mov dword [edx], 0xc
jmp 0x412e5d
mov edx, dword [esp + 0x14]
mov dword [edx], 0xa
lea ecx, [eax*8]
lea esi, [edx + 8]
shr ecx, 5
mov dword [edx + 4], esi
je 0x412ea1
mov eax, dword [esp + 0x18]
mov edi, esi
add eax, 2
mov ebp, ecx
xor ecx, ecx
xor ebx, ebx
mov ch, byte [eax + 1]
mov bl, byte [eax - 1]
mov cl, byte [eax]
add eax, 4
shl ecx, 8
or ecx, ebx
xor ebx, ebx
mov bl, byte [eax - 6]
add edi, 4
shl ecx, 8
or ecx, ebx
dec ebp
mov dword [edi - 4], ecx
jne 0x412e7a
mov eax, dword [edx]
sub eax, 0xa
je 0x413049
sub eax, 2
je 0x412faf
sub eax, 2
jne 0x4130c8
mov edi, 0x41ed94
mov eax, dword [esi + 0x1c]
xor ecx, ecx
mov edx, eax
xor ebx, ebx
and edx, 0xff
mov dword [esp + 0x14], eax
mov ebp, dword [esi]
add edi, 4
mov ch, byte [edx + 0x41edbc]
mov edx, eax
shr edx, 0x18
add esi, 0x20
mov bl, byte [edx + 0x41edbc]
xor edx, edx
mov dl, byte [esp + 0x16]
xor ecx, ebx
xor ebx, ebx
mov bl, byte [edx + 0x41edbc]
xor edx, edx
shl ecx, 8
mov dl, ah
xor ecx, ebx
xor eax, eax
xor ebx, ebx
mov al, byte [edx + 0x41edbc]
xor edx, edx
shl ecx, 8
xor ecx, eax
mov eax, dword [edi - 4]
xor eax, ecx
mov ecx, dword [esi - 0x1c]
xor eax, ebp
mov dword [esi], eax
xor ecx, eax
mov eax, dword [esi - 0x18]
mov dword [esi + 4], ecx
xor eax, ecx
mov ecx, dword [esi - 0x14]
xor ecx, eax
mov dword [esi + 8], eax
mov dword [esp + 0x1c], ecx
xor eax, eax
mov dl, byte [esp + 0x1e]
mov dword [esi + 0xc], ecx
mov al, byte [edx + 0x41edbc]
mov edx, ecx
shr edx, 0x18
mov bh, byte [edx + 0x41edbc]
xor edx, edx
xor eax, ebx
mov dl, ch
xor ebx, ebx
and ecx, 0xff
mov bl, byte [edx + 0x41edbc]
xor edx, edx
mov dl, byte [ecx + 0x41edbc]
mov ecx, dword [esi - 0x10]
shl eax, 8
xor eax, ebx
shl eax, 8
xor eax, edx
mov edx, dword [esp + 0x14]
xor eax, ecx
mov ecx, dword [esi - 0xc]
mov dword [esi + 0x10], eax
xor ecx, eax
mov eax, dword [esi - 8]
mov dword [esi + 0x14], ecx
xor eax, ecx
mov dword [esi + 0x18], eax
xor eax, edx
mov dword [esi + 0x1c], eax
cmp edi, 0x41edb0
jb 0x412ec3
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
mov edi, 0x41ed94
mov ecx, dword [esi + 0x14]
xor edx, edx
mov eax, ecx
xor ebx, ebx
and eax, 0xff
mov dword [esp + 0x14], ecx
add edi, 4
add esi, 0x18
mov dh, byte [eax + 0x41edbc]
mov eax, ecx
shr eax, 0x18
mov bl, byte [eax + 0x41edbc]
xor eax, eax
mov al, byte [esp + 0x16]
xor edx, ebx
xor ebx, ebx
mov bl, byte [eax + 0x41edbc]
xor eax, eax
shl edx, 8
xor edx, ebx
mov al, ch
xor ebx, ebx
mov bl, byte [eax + 0x41edbc]
shl edx, 8
xor edx, ebx
mov ebx, dword [esi - 0x18]
xor edx, ebx
mov eax, edx
mov edx, dword [edi - 4]
xor eax, edx
mov edx, dword [esi - 0x14]
mov dword [esi], eax
xor edx, eax
mov eax, dword [esi - 0x10]
mov dword [esi + 4], edx
xor eax, edx
mov edx, dword [esi - 0xc]
mov dword [esi + 8], eax
xor edx, eax
mov eax, dword [esi - 8]
mov dword [esi + 0xc], edx
xor eax, edx
mov dword [esi + 0x10], eax
xor eax, ecx
mov dword [esi + 0x14], eax
cmp edi, 0x41edb4
jb 0x412fb4
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
mov edi, 0x41ed94
mov eax, dword [esi + 0xc]
xor edx, edx
mov ecx, eax
xor ebx, ebx
and ecx, 0xff
mov dword [esp + 0x14], eax
mov ebp, dword [esi]
add edi, 4
mov dh, byte [ecx + 0x41edbc]
mov ecx, eax
shr ecx, 0x18
add esi, 0x10
mov bl, byte [ecx + 0x41edbc]
xor ecx, ecx
mov cl, byte [esp + 0x16]
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 0x41edbc]
xor ecx, ecx
shl edx, 8
xor edx, ebx
mov cl, ah
xor ebx, ebx
mov bl, byte [ecx + 0x41edbc]
shl edx, 8
xor edx, ebx
mov ebx, dword [edi - 4]
xor edx, ebp
mov ecx, edx
mov edx, dword [esi - 0xc]
xor ecx, ebx
mov dword [esi], ecx
xor ecx, edx
mov edx, dword [esi - 8]
mov dword [esi + 4], ecx
xor edx, ecx
xor eax, edx
mov dword [esi + 8], edx
mov dword [esi + 0xc], eax
cmp edi, 0x41edbc
jb 0x41304e
pop edi
pop esi
pop ebp
pop ebx
ret 0xc