Function at 0x445aa0
Capabilities:
Encode data using xor
Encrypt data using aes
Encrypt data using rc4 ksa
Reference aes constants

Disassembly:
sub esp, 0x2c
push ebp
mov ebp, ecx
mov al, byte [ebp + 4]
test al, al
jne 0x445acb
push 0x542864
lea ecx, [esp + 0x28]
call dword [0x4ef624]
push 0x5221d4
lea eax, [esp + 0x28]
push eax
call fcn.00475534
mov eax, dword [ebp + 0x3cc]
cmp eax, 0x10
jne 0x445aee
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
push ecx
push edx
mov ecx, ebp
call fcn.004453a0
pop ebp
add esp, 0x2c
ret 8
cdq
and edx, 3
add eax, edx
push ebx
mov ebx, eax
sar ebx, 2
xor eax, eax
cmp ebx, 4
je 0x445b08
cmp ebx, 6
setne al
inc eax
shl eax, 5
test ebx, ebx
mov edx, dword [eax + 0x4feb50]
push esi
push edi
mov edi, dword [eax + 0x4feb58]
mov eax, dword [eax + 0x4feb60]
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x14], edi
lea eax, [ebp + 0x454]
jle 0x445b93
mov esi, dword [esp + 0x40]
lea ecx, [ebp + 8]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], ebx
movzx ecx, byte [esi]
shl ecx, 0x18
mov dword [eax], ecx
movzx ecx, byte [esi + 1]
mov edi, dword [eax]
inc esi
shl ecx, 0x10
or edi, ecx
mov dword [eax], edi
xor ecx, ecx
mov ch, byte [esi + 1]
inc esi
or edi, ecx
mov dword [eax], edi
movzx edi, byte [esi + 1]
or dword [eax], edi
mov edi, dword [esp + 0x10]
mov edi, dword [edi]
inc esi
mov ecx, eax
xor dword [ecx], edi
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
add edi, 4
inc esi
add eax, 4
dec ecx
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], ecx
jne 0x445b44
mov edi, dword [esp + 0x14]
mov ecx, dword [ebp + 0x3d0]
mov eax, 1
cmp ecx, eax
mov dword [esp + 0x1c], eax
jle 0x445cab
lea eax, [ebp + 0x28]
mov dword [esp + 0x40], eax
test ebx, ebx
jle 0x445c64
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x20]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
sub eax, edx
sub edi, edx
mov ecx, edx
lea esi, [ebp + 0x434]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x10], ebx
jmp 0x445be7
mov eax, dword [esp + 0x24]
add eax, ecx
cdq
idiv ebx
mov eax, ecx
add esi, 4
movzx edi, byte [ebp + edx*4 + 0x455]
cdq
idiv ebx
mov edi, dword [edi*4 + 0x4fc328]
movsx edx, byte [ebp + edx*4 + 0x456]
and edx, 0xff
xor edi, dword [edx*4 + 0x4fbf28]
mov eax, dword [esp + 0x28]
add eax, ecx
cdq
idiv ebx
mov edx, dword [ebp + edx*4 + 0x454]
and edx, 0xff
xor edi, dword [edx*4 + 0x4fc728]
movzx eax, byte [esi + 0x1f]
mov edx, dword [eax*4 + 0x4fbb28]
mov eax, dword [esp + 0x18]
xor edi, edx
mov edx, dword [eax]
add eax, 4
xor edi, edx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x10]
mov dword [esi - 4], edi
inc ecx
dec eax
mov dword [esp + 0x10], eax
jne 0x445be3
mov edx, dword [esp + 0x2c]
lea ecx, [ebx*4]
mov eax, ecx
shr ecx, 2
lea esi, [ebp + 0x434]
lea edi, [ebp + 0x454]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x40]
mov ecx, dword [ebp + 0x3d0]
inc eax
add esi, 0x20
cmp eax, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x40], esi
jl 0x445bb1
mov edi, dword [esp + 0x14]
test ebx, ebx
mov dword [esp + 0x40], 0
jle 0x445d87
mov esi, dword [esp + 0x44]
lea eax, [ebp + 0x454]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x20]
sub edx, edi
sub eax, edi
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], eax
lea esp, [esp]
mov ecx, dword [ebp + 0x3d0]
mov edx, dword [esp + 0x40]
lea eax, [edx + ecx*8]
mov ecx, dword [ebp + eax*4 + 8]
mov edx, dword [esp + 0x44]
movzx eax, byte [edx + 3]
mov edx, ecx
sar edx, 0x18
xor dl, byte [eax + str.cw]
mov eax, dword [esp + 0x2c]
add eax, edi
mov byte [esi], dl
cdq
idiv ebx
mov eax, ecx
sar eax, 0x10
inc esi
movsx edx, byte [ebp + edx*4 + 0x456]
and edx, 0xff
xor al, byte [edx + str.cw]
inc esi
mov byte [esi - 1], al
mov eax, edi
cdq
idiv ebx
mov eax, ecx
sar eax, 8
movzx edx, byte [ebp + edx*4 + 0x455]
xor al, byte [edx + str.cw]
mov edx, dword [esp + 0x28]
mov byte [esi], al
lea eax, [edi + edx]
cdq
idiv ebx
inc esi
mov eax, dword [ebp + edx*4 + 0x454]
and eax, 0xff
mov dl, byte [eax + str.cw]
mov eax, dword [esp + 0x40]
xor dl, cl
mov ecx, dword [esp + 0x44]
inc esi
mov byte [esi - 1], dl
inc eax
add ecx, 4
inc edi
cmp eax, ebx
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
jl 0x445ce0
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x2c
ret 8