Function at 0x402b5d
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 0x402b7c
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 0x402bd6
mov dword [ebp - 8], 8
mov eax, dword [ebp - 4]
cmp eax, dword [ebx + 0x1c]
ja 0x402bd6
cmp ecx, edx
jge 0x402bc3
lea eax, [ebp + ecx*4 - 0x3c]
cmp dword [ebp + 8], esi
jge 0x402bc6
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 0x402ba4
cmp dword [ebp + 8], esi
jne 0x402bd2
inc dword [ebp - 4]
add dword [ebp - 8], esi
and dword [ebp + 8], 0
cmp ecx, edx
jl 0x402b94
mov eax, dword [ebp - 4]
cmp eax, dword [ebx + 0x1c]
ja 0x402d28
mov eax, edx
mov dword [ebp - 0xc], 0x409738
shl eax, 2
lea ecx, [ebp + eax - 0x3f]
mov dword [ebp - 0x10], ecx
lea ecx, [ebp + eax - 0x3e]
mov dword [ebp - 0x14], ecx
lea ecx, [ebp + eax - 0x3d]
lea eax, [ebp + eax - 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 0x402c70
cmp edx, 1
jle 0x402cc4
lea eax, [ebp - 0x38]
lea ecx, [edx - 1]
mov edi, dword [eax - 4]
xor dword [eax], edi
add eax, esi
dec ecx
jne 0x402c64
jmp 0x402cc4
push 3
lea eax, [ebp - 0x38]
pop ecx
mov edi, dword [eax - 4]
xor dword [eax], edi
add eax, esi
dec ecx
jne 0x402c76
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 0x402cba
and dword [ebp - 8], 0
test edx, edx
jle 0x402d1c
mov eax, dword [ebp - 4]
lea ecx, [eax*4 + 8]
mov eax, dword [ebp - 4]
cmp eax, dword [ebx + 0x1c]
ja 0x402d1c
cmp dword [ebp - 8], edx
jge 0x402d09
mov eax, dword [ebp - 8]
lea eax, [ebp + eax*4 - 0x3c]
mov edi, dword [ebp + 8]
cmp edi, esi
jge 0x402d09
inc dword [ebp - 8]
lea esi, [ecx + edi]
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 0x402cea
cmp dword [ebp + 8], esi
jne 0x402d17
inc dword [ebp - 4]
add ecx, esi
and dword [ebp + 8], 0
cmp dword [ebp - 8], edx
jl 0x402cd6
mov eax, dword [ebp - 4]
cmp eax, dword [ebx + 0x1c]
jbe 0x402c0a
pop edi
pop esi
pop ebx
leave
ret 4