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

Disassembly:
push ecx
cmp dword [esp + 8], 0
push esi
mov esi, ecx
je 0x419255
mov ecx, dword [esp + 0x14]
cmp ecx, 0x10
je 0x418e66
cmp ecx, 0x18
je 0x418e66
cmp ecx, 0x20
jne 0x419255
mov eax, dword [esp + 0x18]
cmp eax, 0x10
je 0x418e7d
cmp eax, 0x18
je 0x418e7d
cmp eax, 0x20
jne 0x419255
push ebx
push ebp
push edi
mov edi, dword [esp + 0x1c]
push eax
mov dword [esi + 0x3cc], eax
lea eax, [esi + 0x3d4]
push edi
push eax
mov dword [esi + 0x3c8], ecx
call fcn.00449bc0
mov ecx, dword [esi + 0x3cc]
push ecx
lea edx, [esi + 0x3f4]
push edi
push edx
call fcn.00449bc0
mov eax, dword [esi + 0x3c8]
add esp, 0x18
cmp eax, 0x10
je 0x418ee3
cmp eax, 0x18
je 0x418ed1
mov dword [esi + 0x3d0], 0xe
jmp 0x418f09
xor eax, eax
cmp dword [esi + 0x3cc], 0x20
sete al
lea eax, [eax + eax + 0xc]
jmp 0x418f03
mov eax, dword [esi + 0x3cc]
cmp eax, 0x10
jne 0x418ef5
mov eax, 0xa
jmp 0x418f03
xor ecx, ecx
cmp eax, 0x18
setne cl
lea ecx, [ecx + ecx + 0xc]
mov eax, ecx
mov dword [esi + 0x3d0], eax
mov eax, dword [esi + 0x3cc]
cdq
and edx, 3
add eax, edx
mov ebp, eax
sar ebp, 2
xor edx, edx
cmp dword [esi + 0x3d0], edx
mov dword [esp + 0x20], ebp
jl 0x418f48
lea ebx, [esi + 8]
jmp 0x418f30
test ebp, ebp
jle 0x418f3c
mov ecx, ebp
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
inc edx
add ebx, 0x20
cmp edx, dword [esi + 0x3d0]
jle 0x418f30
xor edx, edx
cmp dword [esi + 0x3d0], edx
jl 0x418f70
lea ebx, [esi + 0x1e8]
test ebp, ebp
jle 0x418f64
mov ecx, ebp
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
inc edx
add ebx, 0x20
cmp edx, dword [esi + 0x3d0]
jle 0x418f58
mov eax, dword [esi + 0x3d0]
inc eax
imul eax, ebp
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x3c8]
cdq
and edx, 3
add eax, edx
mov edi, eax
mov eax, dword [esp + 0x18]
sar edi, 2
lea ecx, [esi + 0x414]
test edi, edi
jle 0x418fcc
mov edx, edi
nop
movzx ebx, byte [eax]
shl ebx, 0x18
mov dword [ecx], ebx
movzx ebx, byte [eax + 1]
inc eax
shl ebx, 0x10
or dword [ecx], ebx
movzx ebx, byte [eax + 1]
inc eax
shl ebx, 8
or dword [ecx], ebx
movzx ebx, byte [eax + 1]
or dword [ecx], ebx
inc eax
inc eax
add ecx, 4
sub edx, 1
jne 0x418fa0
xor ebx, ebx
mov dword [esp + 0x18], ebx
test edi, edi
jle 0x419020
lea ecx, [esi + 0x414]
mov dword [esp + 0x18], ecx
cmp ebx, dword [esp + 0x24]
jge 0x41901c
mov eax, ebx
cdq
idiv ebp
mov ecx, dword [ecx]
inc ebx
lea ebp, [edx + eax*8]
mov dword [esi + ebp*4 + 8], ecx
mov ecx, dword [esi + 0x3d0]
mov ebp, dword [esp + 0x20]
sub ecx, eax
lea edx, [edx + ecx*8]
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
add ecx, 4
cmp ebx, edi
mov dword [esi + edx*4 + 0x1e8], eax
mov dword [esp + 0x18], ecx
jl 0x418fe0
mov dword [esp + 0x18], ebx
cmp ebx, dword [esp + 0x24]
jge 0x4191b5
mov dword [esp + 0x1c], 0x473090
mov eax, dword [esi + edi*4 + 0x410]
mov ecx, eax
sar ecx, 0x10
and ecx, 0xff
movsx edx, byte [ecx + str.cw]
mov ecx, dword [esp + 0x1c]
movsx ecx, byte [ecx]
xor edx, ecx
inc dword [esp + 0x1c]
mov ecx, eax
sar ecx, 8
and ecx, 0xff
movzx ecx, byte [ecx + str.cw]
shl edx, 8
xor edx, ecx
mov ecx, eax
and ecx, 0xff
movzx ecx, byte [ecx + str.cw]
sar eax, 0x18
shl edx, 8
and eax, 0xff
movzx eax, byte [eax + str.cw]
xor edx, ecx
shl edx, 8
xor edx, eax
xor dword [esi + 0x414], edx
cmp edi, 8
je 0x4190c6
cmp edi, 1
jle 0x419153
lea eax, [esi + 0x418]
lea ecx, [edi - 1]
mov edx, dword [eax - 4]
xor dword [eax], edx
add eax, 4
sub ecx, 1
jne 0x4190b4
jmp 0x419153
lea eax, [esi + 0x418]
mov ecx, 3
mov edx, dword [eax - 4]
xor dword [eax], edx
add eax, 4
sub ecx, 1
jne 0x4190d1
mov eax, dword [esi + 0x420]
mov ecx, eax
sar ecx, 0x18
and ecx, 0xff
movsx edx, byte [ecx + str.cw]
mov ecx, eax
sar ecx, 0x10
and ecx, 0xff
movzx ecx, byte [ecx + str.cw]
shl edx, 8
xor edx, ecx
mov ecx, eax
sar ecx, 8
and ecx, 0xff
movzx ecx, byte [ecx + str.cw]
shl edx, 8
and eax, 0xff
movzx eax, byte [eax + str.cw]
xor edx, ecx
shl edx, 8
xor edx, eax
xor dword [esi + 0x424], edx
lea eax, [esi + 0x428]
mov ecx, 3
mov edx, dword [eax - 4]
xor dword [eax], edx
add eax, 4
sub ecx, 1
jne 0x419146
mov dword [esp + 0x10], 0
test edi, edi
jle 0x4191ab
lea ecx, [esi + 0x414]
cmp ebx, dword [esp + 0x24]
jge 0x4191b5
mov eax, ebx
cdq
idiv ebp
mov ebp, dword [ecx]
add ecx, 4
lea ebx, [edx + eax*8]
mov dword [esi + ebx*4 + 8], ebp
mov ebx, dword [esi + 0x3d0]
mov ebp, dword [esp + 0x20]
sub ebx, eax
lea eax, [edx + ebx*8]
mov edx, dword [ecx - 4]
mov ebx, dword [esp + 0x18]
mov dword [esi + eax*4 + 0x1e8], edx
mov eax, dword [esp + 0x10]
inc eax
inc ebx
cmp eax, edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], ebx
jl 0x419165
cmp ebx, dword [esp + 0x24]
jl 0x419032
cmp dword [esi + 0x3d0], 1
mov dword [esp + 0x18], 1
jle 0x41924b
lea ecx, [esi + 0x208]
mov dword [esp + 0x20], ecx
test ebp, ebp
jle 0x41922f
mov edx, ebp
lea ebx, [ebx]
mov eax, dword [ecx]
mov edi, eax
sar edi, 0x18
and edi, 0xff
mov edi, dword [edi*4 + 0x472090]
mov ebx, eax
sar ebx, 0x10
and ebx, 0xff
xor edi, dword [ebx*4 + 0x472490]
mov ebx, eax
sar ebx, 8
and ebx, 0xff
xor edi, dword [ebx*4 + 0x472890]
and eax, 0xff
xor edi, dword [eax*4 + 0x472c90]
add ecx, 4
sub edx, 1
mov dword [ecx - 4], edi
jne 0x4191e0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
inc eax
add ecx, 0x20
cmp eax, dword [esi + 0x3d0]
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], ecx
jl 0x4191d4
pop edi
pop ebp
mov dword [esi + 4], 1
pop ebx
pop esi
pop ecx
ret 0x10