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

Disassembly:
sub esp, 0x18
push ebp
mov ebp, ecx
mov dword [esp + 0x18], ebp
mov al, byte [ebp + 4]
test al, al
je 0x401429
mov eax, dword [esp + 0x20]
xor edx, edx
xor ecx, ecx
push ebx
mov dl, byte [eax]
mov cl, byte [eax + 1]
shl edx, 0x18
inc eax
mov ebx, dword [ebp + 8]
shl ecx, 0x10
or edx, ecx
inc eax
xor ecx, ecx
push esi
mov ch, byte [eax]
push edi
or edx, ecx
inc eax
xor ecx, ecx
mov edi, dword [ebp + 0xc]
mov cl, byte [eax]
or edx, ecx
inc eax
xor ecx, ecx
xor edx, ebx
mov cl, byte [eax]
xor ebx, ebx
mov esi, ecx
xor ecx, ecx
mov cl, byte [eax + 1]
mov dword [esp + 0x18], edx
shl esi, 0x18
inc eax
shl ecx, 0x10
or esi, ecx
inc eax
xor ecx, ecx
mov ch, byte [eax]
or esi, ecx
inc eax
xor ecx, ecx
mov cl, byte [eax]
or esi, ecx
inc eax
xor ecx, ecx
xor esi, edi
mov cl, byte [eax]
mov bl, byte [eax + 1]
shl ecx, 0x18
inc eax
mov dword [esp + 0x14], esi
shl ebx, 0x10
or ecx, ebx
inc eax
xor ebx, ebx
mov bh, byte [eax]
or ecx, ebx
inc eax
xor ebx, ebx
mov bl, byte [eax]
or ecx, ebx
mov ebx, dword [ebp + 0x10]
inc eax
xor ecx, ebx
xor ebx, ebx
mov dword [esp + 0x1c], ecx
mov bl, byte [eax]
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 [ebp + 0x14]
or ebx, esi
xor eax, ebx
mov esi, dword [ebp + 0x3d0]
mov dword [esp + 0x10], eax
cmp esi, 1
mov dword [esp + 0x20], esi
jle 0x40129b
add ebp, 0x30
dec esi
mov dword [esp + 0x2c], esi
xor ebx, ebx
add ebp, 0x20
mov bl, ah
xor eax, eax
mov al, byte [esp + 0x1e]
mov esi, dword [ebx*4 + 0x4157d8]
mov edi, dword [eax*4 + 0x4153d8]
xor eax, eax
mov al, byte [esp + 0x17]
xor esi, edi
mov edi, dword [ebp - 0x24]
mov ebx, dword [eax*4 + 0x414fd8]
mov eax, edx
and eax, 0xff
xor esi, ebx
mov ebx, dword [eax*4 + 0x415bd8]
xor eax, eax
mov al, byte [esp + 0x12]
xor esi, ebx
xor ebx, ebx
xor esi, edi
mov bl, byte [esp + 0x1f]
mov edi, dword [eax*4 + 0x4153d8]
mov eax, dword [ebx*4 + 0x414fd8]
xor edi, eax
xor eax, eax
mov al, dh
mov edx, dword [eax*4 + 0x4157d8]
mov eax, dword [esp + 0x14]
xor edi, edx
mov edx, eax
and edx, 0xff
mov ebx, dword [edx*4 + 0x415bd8]
xor edx, edx
mov dl, byte [esp + 0x13]
xor edi, ebx
mov ebx, dword [ebp - 0x20]
xor edi, ebx
xor ebx, ebx
mov bl, ah
mov eax, dword [edx*4 + 0x414fd8]
mov edx, dword [ebx*4 + 0x4157d8]
xor eax, edx
xor edx, edx
mov dl, byte [esp + 0x1a]
mov ebx, dword [edx*4 + 0x4153d8]
mov edx, ecx
and edx, 0xff
xor eax, ebx
mov ebx, dword [edx*4 + 0x415bd8]
mov edx, dword [ebp - 0x1c]
xor eax, ebx
xor eax, edx
xor edx, edx
mov dl, ch
xor ecx, ecx
mov cl, byte [esp + 0x16]
mov dword [esp + 0x14], esi
mov edx, dword [edx*4 + 0x4157d8]
mov esi, dword [esp + 0x2c]
mov ebx, dword [ecx*4 + 0x4153d8]
xor ecx, ecx
mov cl, byte [esp + 0x1b]
xor edx, ebx
mov ebx, dword [ecx*4 + 0x414fd8]
mov ecx, dword [esp + 0x10]
and ecx, 0xff
xor edx, ebx
mov dword [esp + 0x10], eax
mov ebx, dword [ecx*4 + 0x415bd8]
mov ecx, edi
xor edx, ebx
mov ebx, dword [ebp - 0x28]
xor edx, ebx
dec esi
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x2c], esi
jne 0x40116e
mov esi, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
shl esi, 5
xor edx, edx
mov edi, dword [esi + ebp + 8]
mov dl, byte [esp + 0x1b]
lea esi, [esi + ebp + 8]
mov eax, edi
mov dl, byte [edx + str.cw]
mov ebx, edi
sar eax, 0x18
xor dl, al
mov eax, dword [esp + 0x30]
sar ebx, 0x10
mov byte [eax], dl
xor edx, edx
mov dl, byte [esp + 0x16]
mov dword [esp + 0x2c], edi
mov dl, byte [edx + str.cw]
xor dl, bl
mov ebx, edi
mov byte [eax + 1], dl
xor edx, edx
mov dl, ch
sar ebx, 8
mov dl, byte [edx + str.cw]
xor dl, bl
mov bl, byte [esp + 0x2c]
mov byte [eax + 2], dl
mov edx, dword [esp + 0x10]
and edx, 0xff
mov dl, byte [edx + str.cw]
xor dl, bl
mov byte [eax + 3], dl
mov edi, dword [esi + 4]
xor edx, edx
mov ebx, edi
mov dl, byte [esp + 0x17]
mov dword [esp + 0x2c], edi
sar ebx, 0x18
mov dl, byte [edx + str.cw]
xor dl, bl
mov ebx, edi
mov byte [eax + 4], dl
xor edx, edx
mov dl, byte [esp + 0x1e]
sar ebx, 0x10
mov dl, byte [edx + str.cw]
xor dl, bl
mov ebx, edi
mov byte [eax + 5], dl
xor edx, edx
mov dl, byte [esp + 0x11]
sar ebx, 8
mov dl, byte [edx + str.cw]
xor dl, bl
mov bl, byte [esp + 0x2c]
mov byte [eax + 6], dl
mov edx, dword [esp + 0x18]
and edx, 0xff
mov dl, byte [edx + str.cw]
xor dl, bl
mov byte [eax + 7], dl
mov edi, dword [esi + 8]
xor edx, edx
mov ebx, edi
mov dl, byte [esp + 0x1f]
mov dword [esp + 0x2c], edi
sar ebx, 0x18
mov dl, byte [edx + str.cw]
xor dl, bl
mov ebx, edi
mov byte [eax + 8], dl
xor edx, edx
mov dl, byte [esp + 0x12]
sar ebx, 0x10
mov dl, byte [edx + str.cw]
xor dl, bl
mov ebx, edi
mov byte [eax + 9], dl
xor edx, edx
mov dl, byte [esp + 0x19]
sar ebx, 8
mov dl, byte [edx + str.cw]
and ecx, 0xff
xor dl, bl
mov bl, byte [esp + 0x2c]
mov byte [eax + 0xa], dl
mov edx, dword [esp + 0x14]
and edx, 0xff
pop edi
mov dl, byte [edx + str.cw]
xor dl, bl
mov byte [eax + 0xb], dl
mov esi, dword [esi + 0xc]
xor edx, edx
mov ebx, esi
mov dl, byte [esp + 0xf]
mov dword [esp + 0x28], esi
sar ebx, 0x18
mov dl, byte [edx + str.cw]
xor dl, bl
mov ebx, esi
mov byte [eax + 0xc], dl
xor edx, edx
mov dl, byte [esp + 0x16]
sar ebx, 0x10
mov dl, byte [edx + str.cw]
xor dl, bl
mov ebx, esi
mov byte [eax + 0xd], dl
xor edx, edx
mov dl, byte [esp + 0x11]
pop esi
sar ebx, 8
mov dl, byte [edx + str.cw]
xor dl, bl
pop ebx
mov byte [eax + 0xe], dl
mov cl, byte [ecx + str.cw]
xor cl, byte [esp + 0x20]
mov byte [eax + 0xf], cl
pop ebp
add esp, 0x18
ret 8