Function at 0x1006ec80
Capabilities:
Encode data using xor
Encrypt data using aes
Encrypt data using rc4 ksa
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
cmp byte [ecx + 4], 0
mov dword [ebp - 0x18], ecx
je 0x1006ef1b
mov eax, dword [ecx + 0x3cc]
cmp eax, 0x10
jne 0x1006ecaf
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.1006e4c0
mov esp, ebp
pop ebp
ret 8
cdq
and edx, 3
push edi
lea edi, [edx + eax]
xor eax, eax
sar edi, 2
mov dword [ebp - 0x1c], edi
cmp edi, 4
je 0x1006eccb
cmp edi, 6
setne al
inc eax
shl eax, 5
push ebx
push esi
mov edx, dword [eax + 0x100be9d8]
mov ebx, dword [eax + 0x100be9e0]
mov eax, dword [eax + 0x100be9e8]
mov dword [ebp - 0xc], eax
lea eax, [ecx + 0x454]
mov dword [ebp - 8], edx
mov esi, eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], eax
test edi, edi
jle 0x1006ed39
mov eax, dword [ebp + 8]
lea ebx, [ecx + 8]
movzx ecx, byte [eax]
lea eax, [eax + 4]
shl ecx, 0x18
lea ebx, [ebx + 4]
mov dword [esi], ecx
mov edx, esi
movzx ecx, byte [eax - 3]
shl ecx, 0x10
or dword [esi], ecx
movzx ecx, byte [eax - 2]
shl ecx, 8
or dword [esi], ecx
movzx ecx, byte [eax - 1]
or dword [esi], ecx
add esi, 4
mov ecx, dword [ebx - 4]
xor dword [edx], ecx
dec edi
jne 0x1006ed00
mov edi, dword [ebp - 0x1c]
mov edx, dword [ebp - 8]
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x1c], 1
cmp dword [esi + 0x3d0], 1
jle 0x1006ee3c
lea ecx, [esi + 0x28]
lea eax, [esi + 0x434]
mov dword [ebp - 0x20], ecx
lea esp, [esp]
test edi, edi
jle 0x1006edff
mov dword [ebp - 0x14], eax
mov ebx, edx
mov eax, dword [ebp - 4]
mov dword [ebp + 8], ecx
sub eax, edx
mov ecx, dword [ebp - 0xc]
sub ecx, edx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x18], edi
add eax, ebx
cdq
idiv edi
mov eax, dword [ebp - 0x24]
add eax, ebx
mov ecx, dword [esi + edx*4 + 0x454]
cdq
idiv edi
sar ecx, 8
and ecx, 0xff
movzx eax, byte [esi + edx*4 + 0x454]
mov ecx, dword [ecx*4 + 0x100be5d0]
xor ecx, dword [eax*4 + 0x100bd9d0]
mov eax, ebx
cdq
inc ebx
idiv edi
movsx eax, word [esi + edx*4 + 0x456]
mov edx, dword [ebp - 0x14]
and eax, 0xff
xor ecx, dword [eax*4 + 0x100bddd0]
movzx eax, byte [edx + 0x23]
xor ecx, dword [eax*4 + 0x100bf430]
mov eax, dword [ebp + 8]
xor ecx, dword [eax]
add eax, 4
mov dword [edx], ecx
add edx, 4
dec dword [ebp - 0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x14], edx
jne 0x1006ed83
lea eax, [esi + 0x434]
lea ecx, [edi*4]
push ecx
push eax
lea eax, [esi + 0x454]
push eax
call sub.MSVCR120.dll_memcpy
mov eax, dword [ebp - 0x1c]
add esp, 0xc
mov ecx, dword [ebp - 0x20]
inc eax
mov edx, dword [ebp - 8]
add ecx, 0x20
cmp eax, dword [esi + 0x3d0]
mov dword [ebp - 0x1c], eax
lea eax, [esi + 0x434]
mov dword [ebp - 0x20], ecx
jl 0x1006ed60
xor ebx, ebx
mov dword [ebp - 0x20], ebx
test edi, edi
jle 0x1006ef12
mov eax, dword [ebp - 4]
sub dword [ebp - 8], eax
mov edx, dword [ebp + 0xc]
sub dword [ebp - 0xc], eax
jmp 0x1006ee60
mov eax, dword [esi + 0x3d0]
lea eax, [ebx + eax*8]
mov ebx, dword [esi + eax*4 + 8]
mov ecx, ebx
mov eax, dword [ebp - 0x10]
sar ecx, 0x18
add dword [ebp - 0x10], 4
movzx eax, byte [eax + 3]
xor cl, byte [eax + 0x100bef30]
mov eax, dword [ebp - 8]
add eax, dword [ebp - 4]
mov byte [edx], cl
inc edx
mov dword [ebp + 8], edx
cdq
idiv edi
mov eax, ebx
sar eax, 0x10
movsx ecx, word [esi + edx*4 + 0x456]
and ecx, 0xff
xor al, byte [ecx + 0x100bef30]
mov ecx, dword [ebp + 8]
mov byte [ecx], al
inc ecx
mov eax, dword [ebp - 4]
cdq
idiv edi
mov dword [ebp + 8], ecx
mov eax, ebx
sar eax, 8
mov ecx, dword [esi + edx*4 + 0x454]
sar ecx, 8
and ecx, 0xff
xor al, byte [ecx + 0x100bef30]
mov ecx, dword [ebp + 8]
mov byte [ecx], al
inc ecx
mov eax, dword [ebp - 0xc]
mov dword [ebp + 8], ecx
mov ecx, dword [ebp - 4]
add eax, ecx
cdq
inc ecx
idiv edi
mov dword [ebp - 4], ecx
movzx eax, byte [esi + edx*4 + 0x454]
mov edx, dword [ebp + 8]
mov al, byte [eax + 0x100bef30]
xor al, bl
mov ebx, dword [ebp - 0x20]
inc ebx
mov byte [edx], al
inc edx
mov dword [ebp - 0x20], ebx
cmp ebx, edi
jl 0x1006ee60
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 8
push 0x100f62fc
lea ecx, [ebp - 0x34]
call dword [sym.imp.MSVCR120.dll_public:_void___thiscall_std::exception::constructor_char_const__const_const__]
push 0x100cc07c
lea eax, [ebp - 0x34]
push eax
call sub.MSVCR120.dll__CxxThrowException
int3