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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
mov ebx, ecx
push esi
push edi
mov edx, dword [ebx + 0x1c]
sub edx, 6
test edx, edx
jle 0x405be7
mov esi, dword [ebp + 8]
mov ecx, edx
lea edi, [ebp - 0x3c]
rep movsd dword es:[edi], dword [esi]
and dword [ebp - 4], 0
and dword [ebp + 8], 0
xor ecx, ecx
push 4
test edx, edx
pop esi
jle 0x405c41
mov dword [ebp - 8], 8
mov eax, dword [ebp - 4]
cmp eax, dword [ebx + 0x1c]
ja 0x405c41
cmp ecx, edx
jge 0x405c2e
lea eax, [ebp + ecx*4 - 0x3c]
cmp dword [ebp + 8], esi
jge 0x405c31
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 8]
add esi, edi
mov edi, dword [eax]
push 4
inc ecx
mov dword [ebx + esi*4], edi
pop esi
add eax, esi
inc dword [ebp + 8]
cmp ecx, edx
jl 0x405c0f
cmp dword [ebp + 8], esi
jne 0x405c3d
inc dword [ebp - 4]
add dword [ebp - 8], esi
and dword [ebp + 8], 0
cmp ecx, edx
jl 0x405bff
mov eax, dword [ebp - 4]
cmp eax, dword [ebx + 0x1c]
ja 0x405d93
mov eax, edx
mov dword [ebp - 0xc], 0x413230
shl eax, 2
lea ecx, [eax + ebp - 0x3f]
mov dword [ebp - 0x10], ecx
lea ecx, [eax + ebp - 0x3e]
mov dword [ebp - 0x14], ecx
lea ecx, [eax + ebp - 0x3d]
lea eax, [eax + ebp - 0x40]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
movzx ecx, byte [eax]
mov al, byte [ebp - 0x3c]
xor al, byte [ecx + str.cw]
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 0x3c], al
movzx ecx, byte [ecx]
mov cl, byte [ecx + str.cw]
xor byte [ebp - 0x3b], cl
mov ecx, dword [ebp - 0x18]
movzx ecx, byte [ecx]
mov cl, byte [ecx + str.cw]
xor byte [ebp - 0x3a], cl
mov ecx, dword [ebp - 0x1c]
movzx ecx, byte [ecx]
mov cl, byte [ecx + str.cw]
xor byte [ebp - 0x39], cl
mov ecx, dword [ebp - 0xc]
add dword [ebp - 0xc], esi
xor al, byte [ecx]
cmp edx, 8
mov byte [ebp - 0x3c], al
je 0x405cdb
cmp edx, 1
jle 0x405d2f
lea eax, [ebp - 0x38]
lea ecx, [edx - 1]
mov edi, dword [eax - 4]
xor dword [eax], edi
add eax, esi
dec ecx
jne 0x405ccf
jmp 0x405d2f
push 3
lea eax, [ebp - 0x38]
pop ecx
mov edi, dword [eax - 4]
xor dword [eax], edi
add eax, esi
dec ecx
jne 0x405ce1
movzx eax, byte [ebp - 0x30]
push 3
mov al, byte [eax + str.cw]
pop ecx
xor byte [ebp - 0x2c], al
movzx eax, byte [ebp - 0x2f]
mov al, byte [eax + str.cw]
xor byte [ebp - 0x2b], al
movzx eax, byte [ebp - 0x2e]
mov al, byte [eax + str.cw]
xor byte [ebp - 0x2a], al
movzx eax, byte [ebp - 0x2d]
mov al, byte [eax + str.cw]
xor byte [ebp - 0x29], al
lea eax, [ebp - 0x28]
mov edi, dword [eax - 4]
xor dword [eax], edi
add eax, esi
dec ecx
jne 0x405d25
and dword [ebp - 8], 0
test edx, edx
jle 0x405d87
mov eax, dword [ebp - 4]
lea ecx, [eax*4 + 8]
mov eax, dword [ebp - 4]
cmp eax, dword [ebx + 0x1c]
ja 0x405d87
cmp dword [ebp - 8], edx
jge 0x405d74
mov eax, dword [ebp - 8]
lea eax, [ebp + eax*4 - 0x3c]
mov edi, dword [ebp + 8]
cmp edi, esi
jge 0x405d74
inc dword [ebp - 8]
lea esi, [edi + ecx]
mov edi, dword [eax]
push 4
mov dword [ebx + esi*4], edi
pop esi
add eax, esi
inc dword [ebp + 8]
cmp dword [ebp - 8], edx
jl 0x405d55
cmp dword [ebp + 8], esi
jne 0x405d82
inc dword [ebp - 4]
add ecx, esi
and dword [ebp + 8], 0
cmp dword [ebp - 8], edx
jl 0x405d41
mov eax, dword [ebp - 4]
cmp eax, dword [ebx + 0x1c]
jbe 0x405c75
pop edi
pop esi
pop ebx
leave
ret 4