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

Disassembly:
push ecx
push ebx
push esi
push edi
mov esi, eax
call fcn.004050f0
lea edi, [eax*4]
xor ebx, ebx
mov dword [esp + 0xc], eax
test edi, edi
jle 0x405625
lea edx, [esi + edi*4 + 8]
lea ecx, [esi + 8]
push ebp
mov eax, dword [edx - 8]
mov ebp, dword [ecx - 8]
mov dword [ecx - 8], eax
mov dword [edx - 8], ebp
mov ebp, dword [edx - 4]
mov eax, dword [ecx - 4]
mov dword [ecx - 4], ebp
mov ebp, dword [edx]
mov dword [edx - 4], eax
mov eax, dword [ecx]
mov dword [ecx], ebp
mov ebp, dword [edx + 4]
mov dword [edx], eax
mov eax, dword [ecx + 4]
mov dword [ecx + 4], ebp
mov dword [edx + 4], eax
add ebx, 4
sub edi, 4
add ecx, 0x10
sub edx, 0x10
cmp ebx, edi
jl 0x4055e4
mov eax, dword [esp + 0x10]
pop ebp
cmp eax, 1
jle 0x4057e0
lea edx, [eax - 1]
mov ecx, dword [esi + 0x10]
movzx ebx, byte [esi + 0x11]
mov ebx, dword [ebx*4 + str.ccccwwww]
add esi, 0x10
mov edi, ecx
shr edi, 0x18
mov edi, dword [edi*4 + str.ccccwwww]
and edi, 0xff
mov edi, dword [edi*4 + 0x423050]
and ebx, 0xff
xor edi, dword [ebx*4 + 0x423850]
movzx ebx, byte [esi + 2]
mov ebx, dword [ebx*4 + str.ccccwwww]
and ebx, 0xff
xor edi, dword [ebx*4 + 0x423450]
movzx ebx, byte [esi + 5]
and ecx, 0xff
mov ecx, dword [ecx*4 + str.ccccwwww]
and ecx, 0xff
xor edi, dword [ecx*4 + 0x423c50]
mov ecx, dword [esi + 4]
mov dword [esi], edi
mov ebx, dword [ebx*4 + str.ccccwwww]
mov edi, ecx
shr edi, 0x18
mov edi, dword [edi*4 + str.ccccwwww]
and edi, 0xff
mov edi, dword [edi*4 + 0x423050]
and ebx, 0xff
xor edi, dword [ebx*4 + 0x423850]
movzx ebx, byte [esi + 6]
mov ebx, dword [ebx*4 + str.ccccwwww]
and ebx, 0xff
xor edi, dword [ebx*4 + 0x423450]
movzx ebx, byte [esi + 9]
and ecx, 0xff
mov ecx, dword [ecx*4 + str.ccccwwww]
and ecx, 0xff
xor edi, dword [ecx*4 + 0x423c50]
mov ecx, dword [esi + 8]
mov dword [esi + 4], edi
mov ebx, dword [ebx*4 + str.ccccwwww]
mov edi, ecx
shr edi, 0x18
mov edi, dword [edi*4 + str.ccccwwww]
and edi, 0xff
mov edi, dword [edi*4 + 0x423050]
and ebx, 0xff
xor edi, dword [ebx*4 + 0x423850]
movzx ebx, byte [esi + 0xa]
mov ebx, dword [ebx*4 + str.ccccwwww]
and ebx, 0xff
xor edi, dword [ebx*4 + 0x423450]
movzx ebx, byte [esi + 0xd]
and ecx, 0xff
mov ecx, dword [ecx*4 + str.ccccwwww]
and ecx, 0xff
xor edi, dword [ecx*4 + 0x423c50]
mov ecx, dword [esi + 0xc]
mov dword [esi + 8], edi
mov ebx, dword [ebx*4 + str.ccccwwww]
mov edi, ecx
shr edi, 0x18
mov edi, dword [edi*4 + str.ccccwwww]
and edi, 0xff
mov edi, dword [edi*4 + 0x423050]
and ebx, 0xff
xor edi, dword [ebx*4 + 0x423850]
movzx ebx, byte [esi + 0xe]
mov ebx, dword [ebx*4 + str.ccccwwww]
and ecx, 0xff
mov ecx, dword [ecx*4 + str.ccccwwww]
and ebx, 0xff
xor edi, dword [ebx*4 + 0x423450]
and ecx, 0xff
xor edi, dword [ecx*4 + 0x423c50]
sub edx, 1
mov dword [esi + 0xc], edi
jne 0x405631
pop edi
pop esi
pop ebx
pop ecx
ret
xor ecx, ecx
cmp eax, 0x10
je 0x40638e
cmp eax, 0x18
je 0x406387
cmp eax, 0x20
je 0x406378
mov eax, dword [sym.imp.python32.dll_PyExc_ValueError]
mov ecx, dword [eax]
push str.AES_key_must_be_either_16__24__or_32_bytes_long
push ecx
call dword [sym.imp.python32.dll_PyErr_SetString]
add esp, 8
ret
cmp eax, 0x18
je 0x406387
cmp eax, 0x20
jne 0x406393
lea ecx, [eax - 0x12]
jmp 0x406393
mov ecx, 0xc
jmp 0x406393
mov ecx, 0xa
push esi
lea esi, [eax*8]
mov dword [edi + 0x1e0], ecx
mov edx, esi
mov ecx, ebx
mov eax, edi
call fcn.004050f0
mov edx, esi
lea eax, [edi + 0xf0]
mov ecx, ebx
pop esi
jmp 0x4055c0