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

Disassembly:
mov edx, dword [esp + 4]
test edx, edx
je 0x404656
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x404656
movzx eax, byte [edx]
mov byte [ecx + 3], al
movzx eax, byte [edx + 1]
mov byte [ecx + 2], al
movzx eax, byte [edx + 2]
mov byte [ecx + 1], al
movzx eax, byte [edx + 3]
mov byte [ecx], al
movzx eax, byte [edx + 4]
mov byte [ecx + 7], al
movzx eax, byte [edx + 5]
mov byte [ecx + 6], al
movzx eax, byte [edx + 6]
mov byte [ecx + 5], al
movzx eax, byte [edx + 7]
mov byte [ecx + 4], al
movzx eax, byte [edx + 8]
mov byte [ecx + 0xb], al
movzx eax, byte [edx + 9]
mov byte [ecx + 0xa], al
movzx eax, byte [edx + 0xa]
mov byte [ecx + 9], al
movzx eax, byte [edx + 0xb]
mov byte [ecx + 8], al
movzx eax, byte [edx + 0xc]
mov byte [ecx + 0xf], al
movzx eax, byte [edx + 0xd]
mov byte [ecx + 0xe], al
movzx eax, byte [edx + 0xe]
push esi
lea esi, [ecx + 0xd]
mov byte [esi], al
mov dl, byte [edx + 0xf]
mov byte [ecx + 0xc], dl
xor ecx, ecx
mov eax, esi
lea esp, [esp]
movzx edx, byte [eax + 1]
movzx edx, byte [edx + str.cw]
xor dl, byte [ecx + 0x40e2e0]
mov esi, dword [eax - 9]
mov byte [esp + 0xb], dl
movzx edx, byte [eax]
movzx edx, byte [edx + str.cw]
mov byte [esp + 0xa], dl
movzx edx, byte [eax - 1]
movzx edx, byte [edx + str.cw]
mov byte [esp + 9], dl
movzx edx, byte [eax + 2]
movzx edx, byte [edx + str.cw]
mov byte [esp + 8], dl
mov edx, dword [eax - 0xd]
xor edx, dword [esp + 8]
xor esi, edx
mov dword [eax + 3], edx
mov edx, dword [eax - 5]
xor edx, esi
mov dword [eax + 0xb], edx
mov dword [eax + 7], esi
mov esi, dword [eax - 1]
xor esi, edx
mov dword [eax + 0xf], esi
movzx edx, byte [eax + 0x11]
movzx edx, byte [edx + str.cw]
xor dl, byte [ecx + 0x40e2e1]
mov esi, dword [eax + 7]
mov byte [esp + 0xb], dl
movzx edx, byte [eax + 0x10]
movzx edx, byte [edx + str.cw]
mov byte [esp + 0xa], dl
movzx edx, byte [eax + 0xf]
movzx edx, byte [edx + str.cw]
mov byte [esp + 9], dl
movzx edx, byte [eax + 0x12]
movzx edx, byte [edx + str.cw]
mov byte [esp + 8], dl
mov edx, dword [eax + 3]
xor edx, dword [esp + 8]
xor esi, edx
mov dword [eax + 0x13], edx
mov edx, dword [eax + 0xb]
xor edx, esi
mov dword [eax + 0x17], esi
mov esi, dword [eax + 0xf]
xor esi, edx
mov dword [eax + 0x1b], edx
mov dword [eax + 0x1f], esi
movzx edx, byte [eax + 0x21]
movzx edx, byte [edx + str.cw]
xor dl, byte [ecx + 0x40e2e2]
mov esi, dword [eax + 0x17]
mov byte [esp + 0xb], dl
movzx edx, byte [eax + 0x20]
movzx edx, byte [edx + str.cw]
mov byte [esp + 0xa], dl
movzx edx, byte [eax + 0x1f]
movzx edx, byte [edx + str.cw]
mov byte [esp + 9], dl
movzx edx, byte [eax + 0x22]
movzx edx, byte [edx + str.cw]
mov byte [esp + 8], dl
mov edx, dword [eax + 0x13]
xor edx, dword [esp + 8]
xor esi, edx
mov dword [eax + 0x23], edx
mov edx, dword [eax + 0x1b]
xor edx, esi
mov dword [eax + 0x27], esi
mov esi, dword [eax + 0x1f]
xor esi, edx
mov dword [eax + 0x2b], edx
mov dword [eax + 0x2f], esi
movzx edx, byte [eax + 0x31]
movzx edx, byte [edx + str.cw]
xor dl, byte [ecx + 0x40e2e3]
mov byte [esp + 0xb], dl
movzx edx, byte [eax + 0x30]
movzx edx, byte [edx + str.cw]
mov byte [esp + 0xa], dl
movzx edx, byte [eax + 0x2f]
movzx edx, byte [edx + str.cw]
mov esi, dword [eax + 0x27]
mov byte [esp + 9], dl
movzx edx, byte [eax + 0x32]
movzx edx, byte [edx + str.cw]
mov byte [esp + 8], dl
mov edx, dword [eax + 0x23]
xor edx, dword [esp + 8]
add ecx, 5
xor esi, edx
mov dword [eax + 0x33], edx
mov edx, dword [eax + 0x2b]
xor edx, esi
mov dword [eax + 0x37], esi
mov esi, dword [eax + 0x2f]
xor esi, edx
mov dword [eax + 0x3b], edx
mov dword [eax + 0x3f], esi
movzx edx, byte [eax + 0x41]
movzx edx, byte [edx + str.cw]
xor dl, byte [ecx + 0x40e2df]
mov esi, dword [eax + 0x37]
mov byte [esp + 0xb], dl
movzx edx, byte [eax + 0x40]
movzx edx, byte [edx + str.cw]
mov byte [esp + 0xa], dl
movzx edx, byte [eax + 0x3f]
movzx edx, byte [edx + str.cw]
mov byte [esp + 9], dl
movzx edx, byte [eax + 0x42]
movzx edx, byte [edx + str.cw]
mov byte [esp + 8], dl
mov edx, dword [eax + 0x33]
xor edx, dword [esp + 8]
add eax, 0x50
xor esi, edx
mov dword [eax - 0xd], edx
mov edx, dword [eax - 0x15]
xor edx, esi
mov dword [eax - 9], esi
mov esi, dword [eax - 0x11]
xor esi, edx
cmp ecx, 0xa
mov dword [eax - 5], edx
mov dword [eax - 1], esi
jl 0x404450
xor eax, eax
pop esi
ret
or eax, 0xffffffff
ret