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

Disassembly:
sub esp, 0x10
cmp dword [esp + 0x14], 0
push edi
mov edi, eax
je 0x4171e5
push ebx
push ebp
mov ebx, 0x20
push ebx
lea eax, [esi + 0x3d4]
push edi
push eax
mov dword [esi + 0x3c8], ebx
mov dword [esi + 0x3cc], ebx
call fcn.005bcfd0
mov ecx, dword [esi + 0x3cc]
push ecx
lea edx, [esi + 0x3f4]
push edi
push edx
call fcn.005bcfd0
mov eax, dword [esi + 0x3c8]
add esp, 0x18
cmp eax, 0x10
je 0x416e86
cmp eax, 0x18
je 0x416e75
mov dword [esi + 0x3d0], 0xe
jmp 0x416eaa
xor eax, eax
cmp dword [esi + 0x3cc], ebx
sete al
lea eax, [eax + eax + 0xc]
jmp 0x416ea4
mov eax, dword [esi + 0x3cc]
cmp eax, 0x10
jne 0x416e98
mov eax, 0xa
jmp 0x416ea4
xor ecx, ecx
cmp eax, 0x18
setne cl
lea eax, [ecx + ecx + 0xc]
mov dword [esi + 0x3d0], eax
mov eax, dword [esi + 0x3cc]
cdq
and edx, 3
lea ebp, [edx + eax]
sar ebp, 2
xor edx, edx
mov dword [esp + 0xc], ebp
cmp dword [esi + 0x3d0], edx
jl 0x416ee8
lea ebx, [esi + 8]
jmp 0x416ed0
test ebp, ebp
jle 0x416edc
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 0x416ed0
xor edx, edx
cmp dword [esi + 0x3d0], edx
jl 0x416f10
lea ebx, [esi + 0x1e8]
test ebp, ebp
jle 0x416f04
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 0x416ef8
mov eax, dword [esi + 0x3d0]
inc eax
imul eax, ebp
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x3c8]
cdq
and edx, 3
lea edi, [edx + eax]
mov eax, dword [esp + 0x20]
sar edi, 2
lea ecx, [esi + 0x414]
test edi, edi
jle 0x416f69
mov edx, edi
mov edi, edi
movzx ebx, byte [eax]
shl ebx, 0x18
mov dword [ecx], ebx
movzx ebx, byte [eax + 1]
shl ebx, 0x10
or dword [ecx], ebx
movzx ebx, byte [eax + 2]
shl ebx, 8
or dword [ecx], ebx
movzx ebx, byte [eax + 3]
or dword [ecx], ebx
add eax, 4
add ecx, 4
dec edx
jne 0x416f40
xor ebx, ebx
mov dword [esp + 0x20], ebx
test edi, edi
jle 0x416fc0
lea ecx, [esi + 0x414]
mov dword [esp + 0x20], ecx
lea ecx, [ecx]
cmp ebx, dword [esp + 0x10]
jge 0x416fbc
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 + 0xc]
sub ecx, eax
lea edx, [edx + ecx*8]
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx]
add ecx, 4
mov dword [esi + edx*4 + 0x1e8], eax
mov dword [esp + 0x20], ecx
cmp ebx, edi
jl 0x416f80
mov dword [esp + 0x20], ebx
cmp ebx, dword [esp + 0x10]
jge 0x417150
mov dword [esp + 0x14], 0x621398
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 + 0x14]
movsx ecx, byte [ecx]
xor edx, ecx
inc dword [esp + 0x14]
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 0x417064
cmp edi, 1
jle 0x4170ee
lea eax, [esi + 0x418]
lea ecx, [edi - 1]
mov edx, dword [eax - 4]
xor dword [eax], edx
add eax, 4
dec ecx
jne 0x417054
jmp 0x4170ee
lea eax, [esi + 0x418]
mov ecx, 3
nop
mov edx, dword [eax - 4]
xor dword [eax], edx
add eax, 4
dec ecx
jne 0x417070
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
dec ecx
jne 0x4170e3
mov dword [esp + 0x18], 0
test edi, edi
jle 0x417146
lea ecx, [esi + 0x414]
cmp ebx, dword [esp + 0x10]
jge 0x417150
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 + 0xc]
sub ebx, eax
lea eax, [edx + ebx*8]
mov edx, dword [ecx - 4]
mov ebx, dword [esp + 0x20]
mov dword [esi + eax*4 + 0x1e8], edx
mov eax, dword [esp + 0x18]
inc eax
inc ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], ebx
cmp eax, edi
jl 0x417100
cmp ebx, dword [esp + 0x10]
jl 0x416fd2
mov eax, 1
mov dword [esp + 0x20], eax
cmp dword [esi + 0x3d0], eax
jle 0x4171df
lea ecx, [esi + 0x208]
mov dword [esp + 0x18], ecx
jmp 0x417170
test ebp, ebp
jle 0x4171c3
mov edx, ebp
mov eax, dword [ecx]
mov edi, eax
sar edi, 0x18
and edi, 0xff
mov edi, dword [edi*4 + 0x620398]
mov ebx, eax
sar ebx, 0x10
and ebx, 0xff
xor edi, dword [ebx*4 + 0x620798]
mov ebx, eax
sar ebx, 8
and ebx, 0xff
xor edi, dword [ebx*4 + 0x620b98]
and eax, 0xff
xor edi, dword [eax*4 + 0x620f98]
add ecx, 4
dec edx
mov dword [ecx - 4], edi
jne 0x417176
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
inc eax
add ecx, 0x20
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], ecx
cmp eax, dword [esi + 0x3d0]
jl 0x417170
pop ebp
mov byte [esi + 4], 1
pop ebx
pop edi
add esp, 0x10
ret 4