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

Disassembly:
sub esp, 0x28
mov al, byte [ecx + 4]
mov dword [esp + 0x10], ecx
test al, al
jne 0x40168b
push 0x418040
lea ecx, [esp + 0x20]
call fcn.00408c2a
lea eax, [esp + 0x1c]
push 0x417358
push eax
call fcn.00408d13
mov eax, dword [esp + 0x2c]
push ebx
push ebp
mov ebp, dword [ecx + 8]
xor ecx, ecx
xor edx, edx
mov cl, byte [eax]
mov dl, byte [eax + 1]
shl ecx, 0x18
inc eax
push esi
shl edx, 0x10
or ecx, edx
inc eax
xor edx, edx
push edi
mov dh, byte [eax]
mov edi, dword [ebp]
or ecx, edx
inc eax
xor edx, edx
mov ebx, dword [edi + 4]
mov dl, byte [eax]
mov dword [esp + 0x28], ebp
or ecx, edx
mov edx, dword [edi]
inc eax
xor ecx, edx
xor edx, edx
mov dword [esp + 0x1c], ecx
mov dl, byte [eax]
mov esi, edx
xor edx, edx
mov dl, byte [eax + 1]
shl esi, 0x18
inc eax
shl edx, 0x10
or esi, edx
inc eax
xor edx, edx
mov dh, byte [eax]
or esi, edx
inc eax
xor edx, edx
mov dl, byte [eax]
or esi, edx
inc eax
xor edx, edx
xor esi, ebx
mov dl, byte [eax]
xor ebx, ebx
mov bl, byte [eax + 1]
mov dword [esp + 0x14], esi
shl edx, 0x18
inc eax
mov esi, dword [edi + 8]
shl ebx, 0x10
or edx, ebx
inc eax
xor ebx, ebx
mov bh, byte [eax]
or edx, ebx
inc eax
xor ebx, ebx
mov bl, byte [eax]
or edx, ebx
inc eax
xor ebx, ebx
xor edx, esi
mov bl, byte [eax]
mov dword [esp + 0x18], edx
mov esi, ebx
xor ebx, ebx
mov bl, byte [eax + 1]
shl esi, 0x18
inc eax
shl ebx, 0x10
or esi, ebx
inc eax
xor ebx, ebx
mov bh, byte [eax]
mov bl, byte [eax + 1]
mov eax, dword [edi + 0xc]
or ebx, esi
mov esi, dword [esp + 0x20]
xor eax, ebx
mov esi, dword [esi + 0x18]
mov dword [esp + 0x10], eax
cmp esi, 1
mov dword [esp + 0x24], esi
jle 0x40189e
add ebp, 4
dec esi
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x20], esi
xor ebx, ebx
mov esi, dword [esp + 0x3c]
mov bl, ah
xor eax, eax
mov al, byte [esp + 0x1a]
mov ebp, dword [esi]
mov esi, dword [ebx*4 + 0x414360]
mov edi, dword [eax*4 + 0x413f60]
xor eax, eax
mov al, byte [esp + 0x17]
xor esi, edi
mov edi, dword [ebp + 4]
mov ebx, dword [eax*4 + 0x413b60]
mov eax, ecx
and eax, 0xff
xor esi, ebx
mov ebx, dword [eax*4 + 0x414760]
xor eax, eax
mov al, byte [esp + 0x12]
xor esi, ebx
xor ebx, ebx
xor esi, edi
mov bl, byte [esp + 0x1b]
mov edi, dword [eax*4 + 0x413f60]
mov eax, dword [ebx*4 + 0x413b60]
xor edi, eax
xor eax, eax
mov al, ch
mov ecx, dword [eax*4 + 0x414360]
mov eax, dword [esp + 0x14]
xor edi, ecx
mov ecx, eax
and ecx, 0xff
mov ebx, dword [ecx*4 + 0x414760]
xor ecx, ecx
mov cl, byte [esp + 0x13]
xor edi, ebx
mov ebx, dword [ebp + 8]
xor edi, ebx
xor ebx, ebx
mov bl, ah
mov eax, dword [ecx*4 + 0x413b60]
mov ecx, dword [ebx*4 + 0x414360]
xor eax, ecx
xor ecx, ecx
mov cl, byte [esp + 0x1e]
mov ebx, dword [ecx*4 + 0x413f60]
mov ecx, edx
and ecx, 0xff
xor eax, ebx
mov ebx, dword [ecx*4 + 0x414760]
mov ecx, dword [ebp + 0xc]
xor eax, ebx
xor eax, ecx
xor ecx, ecx
mov cl, dh
xor edx, edx
mov dl, byte [esp + 0x16]
mov dword [esp + 0x14], esi
mov ecx, dword [ecx*4 + 0x414360]
mov esi, dword [esp + 0x20]
mov ebx, dword [edx*4 + 0x413f60]
xor edx, edx
mov dl, byte [esp + 0x1f]
xor ecx, ebx
mov ebx, dword [edx*4 + 0x413b60]
mov edx, dword [esp + 0x10]
and edx, 0xff
xor ecx, ebx
mov dword [esp + 0x10], eax
mov ebx, dword [edx*4 + 0x414760]
mov edx, edi
mov edi, dword [esp + 0x3c]
xor ecx, ebx
mov ebx, dword [ebp]
add edi, 4
xor ecx, ebx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x3c], edi
dec esi
mov dword [esp + 0x20], esi
jne 0x401763
mov esi, dword [esp + 0x24]
mov ebp, dword [esp + 0x28]
mov edi, dword [ebp + esi*4]
xor eax, eax
mov al, byte [esp + 0x1f]
mov esi, dword [edi]
mov al, byte [eax + str.cw]
mov ebx, esi
mov dword [esp + 0x3c], esi
mov esi, dword [esp + 0x40]
sar ebx, 0x18
xor al, bl
mov ebx, dword [esp + 0x3c]
mov byte [esi], al
xor eax, eax
mov al, byte [esp + 0x16]
sar ebx, 0x10
mov al, byte [eax + str.cw]
xor al, bl
mov ebx, dword [esp + 0x3c]
mov byte [esi + 1], al
xor eax, eax
mov al, dh
sar ebx, 8
mov al, byte [eax + str.cw]
xor al, bl
mov bl, byte [esp + 0x3c]
mov byte [esi + 2], al
mov eax, dword [esp + 0x10]
and eax, 0xff
mov al, byte [eax + str.cw]
xor al, bl
mov byte [esi + 3], al
mov ebp, dword [edi + 4]
xor eax, eax
mov ebx, ebp
mov al, byte [esp + 0x17]
mov dword [esp + 0x3c], ebp
sar ebx, 0x18
mov al, byte [eax + str.cw]
xor al, bl
mov ebx, ebp
mov byte [esi + 4], al
xor eax, eax
mov al, byte [esp + 0x1a]
sar ebx, 0x10
mov al, byte [eax + str.cw]
xor al, bl
mov ebx, ebp
mov byte [esi + 5], al
xor eax, eax
mov al, byte [esp + 0x11]
sar ebx, 8
mov al, byte [eax + str.cw]
xor al, bl
mov bl, byte [esp + 0x3c]
mov byte [esi + 6], al
mov eax, ecx
and eax, 0xff
mov al, byte [eax + str.cw]
xor al, bl
mov byte [esi + 7], al
mov ebp, dword [edi + 8]
xor eax, eax
mov ebx, ebp
mov al, byte [esp + 0x1b]
mov dword [esp + 0x3c], ebp
sar ebx, 0x18
mov al, byte [eax + str.cw]
xor al, bl
mov ebx, ebp
mov byte [esi + 8], al
xor eax, eax
mov al, byte [esp + 0x12]
sar ebx, 0x10
mov al, byte [eax + str.cw]
xor al, bl
xor ebx, ebx
mov byte [esi + 9], al
mov eax, ebp
mov bl, ch
mov ecx, eax
sar ecx, 8
mov bl, byte [ebx + str.cw]
and edx, 0xff
xor bl, cl
mov ecx, dword [esp + 0x14]
and ecx, 0xff
mov byte [esi + 0xa], bl
mov cl, byte [ecx + str.cw]
xor cl, al
mov byte [esi + 0xb], cl
mov eax, dword [edi + 0xc]
xor ecx, ecx
mov ebx, eax
mov cl, byte [esp + 0x13]
pop edi
sar ebx, 0x18
mov cl, byte [ecx + str.cw]
xor cl, bl
mov ebx, eax
mov byte [esi + 0xc], cl
xor ecx, ecx
mov cl, byte [esp + 0x1a]
sar ebx, 0x10
mov cl, byte [ecx + str.cw]
xor cl, bl
mov ebx, eax
mov byte [esi + 0xd], cl
xor ecx, ecx
mov cl, byte [esp + 0x11]
sar ebx, 8
mov cl, byte [ecx + str.cw]
xor cl, bl
mov byte [esi + 0xe], cl
mov dl, byte [edx + str.cw]
xor dl, al
mov byte [esi + 0xf], dl
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 8