Function at 0x411770
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 eax, dword [ebp + 4]
test eax, eax
je 0x411b09
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 0x41197b
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 + 0x452210]
mov edi, dword [eax*4 + 0x451e10]
xor eax, eax
mov al, byte [esp + 0x17]
xor esi, edi
mov edi, dword [ebp - 0x24]
mov ebx, dword [eax*4 + 0x451a10]
mov eax, edx
and eax, 0xff
xor esi, ebx
mov ebx, dword [eax*4 + 0x452610]
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 + 0x451e10]
mov eax, dword [ebx*4 + 0x451a10]
xor edi, eax
xor eax, eax
mov al, dh
mov edx, dword [eax*4 + 0x452210]
mov eax, dword [esp + 0x14]
xor edi, edx
mov edx, eax
and edx, 0xff
mov ebx, dword [edx*4 + 0x452610]
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 + 0x451a10]
mov edx, dword [ebx*4 + 0x452210]
xor eax, edx
xor edx, edx
mov dl, byte [esp + 0x1a]
mov ebx, dword [edx*4 + 0x451e10]
mov edx, ecx
and edx, 0xff
xor eax, ebx
mov ebx, dword [edx*4 + 0x452610]
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 + 0x452210]
mov esi, dword [esp + 0x2c]
mov ebx, dword [ecx*4 + 0x451e10]
xor ecx, ecx
mov cl, byte [esp + 0x1b]
xor edx, ebx
mov ebx, dword [ecx*4 + 0x451a10]
mov ecx, dword [esp + 0x10]
and ecx, 0xff
xor edx, ebx
mov dword [esp + 0x10], eax
mov ebx, dword [ecx*4 + 0x452610]
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 0x41184e
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