Mixing the sugar and corn starch thoroughly will prevent lumps.
Mix sugar, cocoa powder, corn starch and salt in a large microwave-safe bowl. Whisk in milk and egg yolks until well blended.
Microwave on HIGH (100%) power for about 5 to 7 minutes, stirring every 1 to 2 minutes. Cook until pudding is thick and has boiled at least 1 minute. Remove from microwave. Stir in butter and vanilla. Cover surface with plastic wrap.
Chill 2 hours.
Layer pudding and cookie crumbs in individual clear bowls or stemware, ending with cookie crumbs on top. Garnish with chewy candy worms.