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

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
mov edi, dword [ebp + 0x10]
cmp edi, 0x10
je 0x40f466
cmp edi, 0x18
je 0x40f466
cmp edi, 0x20
je 0x40f466
mov eax, 0xffffff53
jmp 0x40f938
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, edi
push edi
push dword [ebp + 0xc]
shr esi, 2
push ebx
lea eax, [esi + 6]
mov dword [ebx + 0xf0], eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
test esi, esi
jbe 0x40f49e
mov edi, ebx
push dword [edi]
call fcn.0040f93d
mov dword [edi], eax
add edi, 4
dec esi
jne 0x40f48c
mov edi, dword [ebp + 0x10]
cmp edi, 0x10
mov eax, 0xff
je 0x40f66f
cmp edi, 0x18
je 0x40f5c3
cmp edi, 0x20
jne 0x40f707
lea ecx, [ebx + 4]
mov dword [ebp + 0xc], 0x41a704
mov edi, 0xff00
mov edx, dword [ecx + 0x18]
mov ebx, 0xff0000
mov esi, edx
shr edx, 8
movzx edx, dl
shr esi, 0x18
mov edx, dword [edx*4 + str.ccccwwww]
mov esi, dword [esi*4 + str.ccccwwww]
and edx, ebx
and esi, eax
xor esi, edx
mov edx, dword [ecx + 0x18]
shr edx, 0x10
movzx edx, dl
mov edx, dword [edx*4 + str.ccccwwww]
and edx, 0xff000000
xor esi, edx
movzx edx, byte [ecx + 0x18]
mov edx, dword [edx*4 + str.ccccwwww]
and edx, edi
xor esi, edx
mov edx, dword [ebp + 0xc]
xor esi, dword [ecx - 4]
add dword [ebp + 0xc], 4
xor esi, dword [edx]
lea edx, [ecx + 0x20]
mov dword [ebp - 4], edx
mov dword [ecx + 0x1c], esi
xor esi, dword [ecx]
mov dword [edx], esi
mov edx, dword [ecx + 4]
xor edx, esi
mov esi, dword [ecx + 8]
xor esi, edx
cmp dword [ebp + 0xc], 0x41a720
mov dword [ecx + 0x24], edx
mov dword [ecx + 0x28], esi
je 0x40f704
mov edx, esi
mov dword [ebp + 0x10], esi
shr edx, 0x10
movzx edx, dl
mov esi, dword [edx*4 + str.ccccwwww]
mov edx, dword [ebp + 0x10]
shr edx, 0x18
and esi, ebx
mov edx, dword [edx*4 + str.ccccwwww]
and edx, 0xff000000
xor esi, edx
mov edx, dword [ebp + 0x10]
shr edx, 8
movzx edx, dl
mov edx, dword [edx*4 + str.ccccwwww]
and edx, edi
xor esi, edx
movzx edx, byte [ebp + 0x10]
mov edx, dword [edx*4 + str.ccccwwww]
and edx, eax
xor esi, edx
mov edx, dword [ecx + 0x10]
xor esi, dword [ecx + 0xc]
mov dword [ecx + 0x2c], esi
xor edx, esi
mov esi, dword [ecx + 0x14]
mov dword [ecx + 0x30], edx
xor esi, edx
mov edx, dword [ecx + 0x18]
xor edx, esi
mov dword [ecx + 0x34], esi
mov dword [ecx + 0x38], edx
mov ecx, dword [ebp - 4]
jmp 0x40f4cd
lea ecx, [ebx + 4]
mov dword [ebp + 8], 0x41a704
mov edi, 0xff00
mov edx, dword [ecx + 0x10]
mov dword [ebp + 0x10], edx
shr edx, 0x18
mov esi, dword [edx*4 + str.ccccwwww]
mov edx, dword [ebp + 0x10]
shr edx, 8
movzx edx, dl
and esi, eax
mov edx, dword [edx*4 + str.ccccwwww]
and edx, 0xff0000
xor esi, edx
mov edx, dword [ebp + 0x10]
shr edx, 0x10
movzx edx, dl
mov edx, dword [edx*4 + str.ccccwwww]
and edx, 0xff000000
xor esi, edx
movzx edx, byte [ebp + 0x10]
mov edx, dword [edx*4 + str.ccccwwww]
and edx, edi
xor esi, edx
mov edx, dword [ebp + 8]
xor esi, dword [ecx - 4]
add dword [ebp + 8], 4
xor esi, dword [edx]
lea edx, [ecx + 0x18]
mov dword [ebp + 0x10], edx
mov dword [ecx + 0x14], esi
xor esi, dword [ecx]
mov dword [edx], esi
mov edx, dword [ecx + 4]
xor edx, esi
mov esi, dword [ecx + 8]
xor esi, edx
cmp dword [ebp + 8], 0x41a724
mov dword [ecx + 0x1c], edx
mov dword [ecx + 0x20], esi
je 0x40f707
mov edx, dword [ecx + 0xc]
xor edx, esi
mov dword [ecx + 0x24], edx
xor edx, dword [ecx + 0x10]
mov dword [ecx + 0x28], edx
mov ecx, dword [ebp + 0x10]
jmp 0x40f5d2
lea ecx, [ebx + 4]
mov dword [ebp + 0x10], 0x41a704
mov edi, 0xff00
mov edx, dword [ecx + 8]
mov ebx, edx
mov esi, edx
shr ebx, 8
movzx ebx, bl
shr esi, 0x18
mov ebx, dword [ebx*4 + str.ccccwwww]
mov esi, dword [esi*4 + str.ccccwwww]
and ebx, 0xff0000
and esi, eax
xor esi, ebx
mov ebx, edx
shr ebx, 0x10
movzx ebx, bl
mov ebx, dword [ebx*4 + str.ccccwwww]
and ebx, 0xff000000
xor esi, ebx
movzx ebx, dl
mov ebx, dword [ebx*4 + str.ccccwwww]
and ebx, edi
xor esi, ebx
mov ebx, dword [ebp + 0x10]
xor esi, dword [ecx - 4]
add dword [ebp + 0x10], 4
xor esi, dword [ebx]
mov ebx, dword [ecx]
mov dword [ecx + 0xc], esi
xor ebx, esi
lea esi, [ecx + 0x10]
mov dword [ebp + 0xc], esi
mov dword [esi], ebx
mov esi, dword [ecx + 4]
xor esi, ebx
xor edx, esi
cmp dword [ebp + 0x10], 0x41a72c
mov dword [ecx + 0x14], esi
mov dword [ecx + 0x18], edx
je 0x40f704
mov ecx, dword [ebp + 0xc]
jmp 0x40f67e
mov ebx, dword [ebp + 8]
cmp dword [ebp + 0x18], 1
jne 0x40f920
mov esi, dword [ebx + 0xf0]
and dword [ebp + 8], 0
shl esi, 2
je 0x40f77d
lea edx, [ebx + esi*4 + 8]
lea ecx, [ebx + 8]
mov edi, dword [ecx - 8]
add dword [ebp + 8], 4
mov dword [ebp + 0x10], edi
mov edi, dword [edx - 8]
mov dword [ecx - 8], edi
mov edi, dword [ebp + 0x10]
mov dword [edx - 8], edi
mov edi, dword [ecx - 4]
mov dword [ebp + 0x10], edi
mov edi, dword [edx - 4]
mov dword [ecx - 4], edi
mov edi, dword [ebp + 0x10]
mov dword [edx - 4], edi
mov edi, dword [ecx]
mov dword [ebp + 0x10], edi
mov edi, dword [edx]
mov dword [ecx], edi
mov edi, dword [ebp + 0x10]
mov dword [edx], edi
mov edi, dword [ecx + 4]
mov dword [ebp + 0x10], edi
mov edi, dword [edx + 4]
mov dword [ecx + 4], edi
mov edi, dword [ebp + 0x10]
mov dword [edx + 4], edi
sub esi, 4
add ecx, 0x10
sub edx, 0x10
cmp dword [ebp + 8], esi
jb 0x40f727
push 1
pop ecx
cmp dword [ebx + 0xf0], ecx
mov dword [ebp + 8], ecx
jbe 0x40f920
lea ecx, [ebx + 8]
mov esi, dword [ecx + 8]
add ecx, 0x10
mov edx, esi
shr edx, 0x18
mov edi, dword [edx*4 + str.ccccwwww]
mov edx, esi
shr edx, 0x10
movzx edx, dl
and edi, eax
mov edx, dword [edx*4 + str.ccccwwww]
mov edi, dword [edi*4 + 0x41bb2c]
and edx, eax
xor edi, dword [edx*4 + 0x41bf2c]
mov edx, esi
shr edx, 8
movzx edx, dl
mov esi, dword [ecx - 4]
mov edx, dword [edx*4 + str.ccccwwww]
and edx, eax
xor edi, dword [edx*4 + 0x41c32c]
movzx edx, byte [ecx - 8]
mov edx, dword [edx*4 + str.ccccwwww]
and edx, eax
xor edi, dword [edx*4 + 0x41c72c]
mov edx, esi
shr edx, 0x18
mov dword [ecx - 8], edi
mov edi, dword [edx*4 + str.ccccwwww]
mov edx, esi
shr edx, 0x10
movzx edx, dl
and edi, eax
mov edx, dword [edx*4 + str.ccccwwww]
mov edi, dword [edi*4 + 0x41bb2c]
and edx, eax
xor edi, dword [edx*4 + 0x41bf2c]
mov edx, esi
shr edx, 8
movzx edx, dl
mov esi, dword [ecx]
mov edx, dword [edx*4 + str.ccccwwww]
and edx, eax
xor edi, dword [edx*4 + 0x41c32c]
movzx edx, byte [ecx - 4]
mov edx, dword [edx*4 + str.ccccwwww]
and edx, eax
xor edi, dword [edx*4 + 0x41c72c]
mov edx, esi
shr edx, 0x18
mov dword [ecx - 4], edi
mov edi, dword [edx*4 + str.ccccwwww]
mov edx, esi
shr edx, 0x10
movzx edx, dl
and edi, eax
mov edx, dword [edx*4 + str.ccccwwww]
mov edi, dword [edi*4 + 0x41bb2c]
and edx, eax
xor edi, dword [edx*4 + 0x41bf2c]
mov edx, esi
shr edx, 8
movzx edx, dl
mov esi, dword [ecx + 4]
mov edx, dword [edx*4 + str.ccccwwww]
and edx, eax
xor edi, dword [edx*4 + 0x41c32c]
movzx edx, byte [ecx]
mov edx, dword [edx*4 + str.ccccwwww]
and edx, eax
xor edi, dword [edx*4 + 0x41c72c]
mov edx, esi
shr edx, 0x18
mov dword [ecx], edi
mov edi, dword [edx*4 + str.ccccwwww]
mov edx, esi
shr edx, 0x10
movzx edx, dl
and edi, eax
mov edx, dword [edx*4 + str.ccccwwww]
mov edi, dword [edi*4 + 0x41bb2c]
and edx, eax
xor edi, dword [edx*4 + 0x41bf2c]
mov edx, esi
shr edx, 8
movzx edx, dl
mov edx, dword [edx*4 + str.ccccwwww]
and edx, eax
xor edi, dword [edx*4 + 0x41c32c]
movzx edx, byte [ecx + 4]
mov edx, dword [edx*4 + str.ccccwwww]
and edx, eax
xor edi, dword [edx*4 + 0x41c72c]
inc dword [ebp + 8]
mov edx, dword [ebp + 8]
mov dword [ecx + 4], edi
cmp edx, dword [ebx + 0xf0]
jb 0x40f792
push 0x10
add ebx, 0xf4
push dword [ebp + 0x14]
push ebx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
xor eax, eax
pop esi
pop ebx
pop edi
leave
ret 0x14