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

Disassembly:
sub esp, 0x20
push edi
mov edi, ecx
mov dword [esp + 0x14], edi
cmp byte [edi + 4], 0
je 0x1001efe6
push ebx
push ebp
push esi
mov esi, dword [esp + 0x34]
mov ebp, dword [edi + 0x3d0]
mov dword [esp + 0x1c], ebp
movzx ebx, byte [esi]
movzx eax, byte [esi + 1]
movzx ecx, byte [esi + 5]
shl eax, 0x10
movzx edx, byte [esi + 8]
shl ebx, 0x18
or ebx, eax
shl ecx, 0x10
movzx eax, byte [esi + 2]
shl eax, 8
or ebx, eax
shl edx, 0x18
movzx eax, byte [esi + 3]
or ebx, eax
movzx eax, byte [esi + 4]
shl eax, 0x18
or eax, ecx
xor ebx, dword [edi + 8]
movzx ecx, byte [esi + 6]
shl ecx, 8
or eax, ecx
mov dword [esp + 0x14], ebx
movzx ecx, byte [esi + 7]
or eax, ecx
movzx ecx, byte [esi + 9]
shl ecx, 0x10
or edx, ecx
xor eax, dword [edi + 0xc]
movzx ecx, byte [esi + 0xa]
shl ecx, 8
or edx, ecx
movzx ecx, byte [esi + 0xb]
or edx, ecx
movzx ecx, byte [esi + 0xd]
xor edx, dword [edi + 0x10]
shl ecx, 0x10
mov dword [esp + 0x10], edx
movzx edx, byte [esi + 0xc]
shl edx, 0x18
or edx, ecx
movzx ecx, byte [esi + 0xe]
shl ecx, 8
mov dword [esp + 0x34], ecx
movzx ecx, byte [esi + 0xf]
or dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x34]
or ecx, edx
xor ecx, dword [edi + 0x14]
mov dword [esp + 0x34], ecx
cmp ebp, 1
jle 0x1001ee67
mov edx, dword [esp + 0x1c]
lea ebp, [edi + 0x30]
dec edx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], edx
nop dword [eax + eax]
sar ecx, 8
movzx edx, cl
mov ecx, dword [esp + 0x10]
sar ecx, 0x10
movzx ecx, cl
mov edi, dword [edx*4 + 0x1004dbf8]
xor edi, dword [ecx*4 + 0x1004d7f8]
mov ecx, eax
sar ecx, 0x18
movzx ecx, cl
xor edi, dword [ecx*4 + 0x1004d3f8]
movzx ecx, bl
xor edi, dword [ecx*4 + 0x1004dff8]
mov ecx, dword [esp + 0x34]
sar ecx, 0x10
movzx edx, cl
mov ecx, dword [esp + 0x10]
sar ecx, 0x18
movzx ecx, cl
mov esi, dword [edx*4 + 0x1004d7f8]
xor edi, dword [ebp - 4]
mov ebp, dword [esp + 0x14]
xor esi, dword [ecx*4 + 0x1004d3f8]
mov ecx, ebx
sar ecx, 8
movzx ecx, cl
xor esi, dword [ecx*4 + 0x1004dbf8]
movzx ecx, al
xor esi, dword [ecx*4 + 0x1004dff8]
mov ecx, dword [esp + 0x14]
xor esi, dword [ecx]
mov ecx, dword [esp + 0x34]
sar ecx, 0x18
movzx edx, cl
mov ecx, eax
sar ecx, 8
movzx ecx, cl
sar eax, 0x10
mov edx, dword [edx*4 + 0x1004d3f8]
movzx eax, al
xor edx, dword [ecx*4 + 0x1004dbf8]
mov ecx, ebx
sar ecx, 0x10
movzx ecx, cl
sar ebx, 0x18
xor edx, dword [ecx*4 + 0x1004d7f8]
mov ecx, dword [esp + 0x10]
movzx ecx, cl
xor edx, dword [ecx*4 + 0x1004dff8]
mov ecx, dword [esp + 0x10]
xor edx, dword [ebp + 4]
sar ecx, 8
movzx ecx, cl
mov dword [esp + 0x10], esi
mov ecx, dword [ecx*4 + 0x1004dbf8]
xor ecx, dword [eax*4 + 0x1004d7f8]
movzx eax, bl
xor ecx, dword [eax*4 + 0x1004d3f8]
mov eax, dword [esp + 0x34]
movzx eax, al
xor ecx, dword [eax*4 + 0x1004dff8]
mov eax, edi
xor ecx, dword [ebp - 8]
add ebp, 0x20
sub dword [esp + 0x18], 1
mov ebx, ecx
mov ecx, edx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x34], ecx
jne 0x1001ed40
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x14], ebx
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x14]
sar ecx, 0x18
movzx ecx, cl
shl ebp, 5
mov ebx, dword [edi + ebp + 8]
mov edx, ebx
sar edx, 0x18
xor dl, byte [ecx + str.cw]
mov ecx, eax
sar ecx, 0x10
movzx ecx, cl
mov byte [esi], dl
mov edx, ebx
sar edx, 0x10
xor dl, byte [ecx + str.cw]
mov ecx, dword [esp + 0x10]
sar ecx, 8
movzx ecx, cl
mov byte [esi + 1], dl
mov edx, ebx
sar edx, 8
xor dl, byte [ecx + str.cw]
mov ecx, dword [esp + 0x34]
movzx ecx, cl
mov byte [esi + 2], dl
movzx ecx, byte [ecx + str.cw]
xor cl, bl
mov byte [esi + 3], cl
mov ecx, eax
mov ebx, dword [edi + ebp + 0xc]
mov edx, ebx
sar ecx, 0x18
movzx ecx, cl
sar edx, 0x18
xor dl, byte [ecx + str.cw]
mov ecx, dword [esp + 0x10]
sar ecx, 0x10
movzx ecx, cl
mov byte [esi + 4], dl
mov edx, ebx
sar edx, 0x10
xor dl, byte [ecx + str.cw]
mov ecx, dword [esp + 0x34]
sar ecx, 8
movzx ecx, cl
mov byte [esi + 5], dl
mov edx, ebx
sar edx, 8
xor dl, byte [ecx + str.cw]
mov ecx, dword [esp + 0x14]
movzx ecx, cl
mov byte [esi + 6], dl
movzx ecx, byte [ecx + str.cw]
xor cl, bl
mov byte [esi + 7], cl
mov ebx, dword [edi + ebp + 0x10]
mov edx, ebx
mov ecx, dword [esp + 0x10]
sar ecx, 0x18
movzx ecx, cl
sar edx, 0x18
xor dl, byte [ecx + str.cw]
mov ecx, dword [esp + 0x34]
sar ecx, 0x10
mov byte [esi + 8], dl
mov edx, ebx
movzx ecx, cl
sar edx, 0x10
xor dl, byte [ecx + str.cw]
mov ecx, dword [esp + 0x14]
sar ecx, 8
mov byte [esi + 9], dl
mov edx, ebx
movzx ecx, cl
sar edx, 8
xor dl, byte [ecx + str.cw]
movzx ecx, al
mov byte [esi + 0xa], dl
movzx ecx, byte [ecx + str.cw]
xor cl, bl
mov byte [esi + 0xb], cl
mov ebx, dword [edi + ebp + 0x14]
mov edx, ebx
mov ecx, dword [esp + 0x34]
sar ecx, 0x18
movzx ecx, cl
sar edx, 0x18
sar eax, 8
movzx eax, al
xor dl, byte [ecx + str.cw]
mov ecx, dword [esp + 0x14]
sar ecx, 0x10
mov byte [esi + 0xc], dl
mov edx, ebx
movzx ecx, cl
sar edx, 0x10
xor dl, byte [ecx + str.cw]
mov ecx, ebx
mov byte [esi + 0xd], dl
sar ecx, 8
xor cl, byte [eax + str.cw]
mov eax, dword [esp + 0x10]
movzx eax, al
mov byte [esi + 0xe], cl
mov al, byte [eax + str.cw]
xor al, bl
mov byte [esi + 0xf], al
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x20
ret 8
push dword [0x1012e73c]
lea ecx, [esp + 0x1c]
call fcn.1001fd70
push 0x1005dccc
lea eax, [esp + 0x1c]
push eax
call fcn.1002e455
int3