first you'd need to decompile terraria.exe (or TAPI.exe if using Tapi) and save the source code, now it's a matter of searching through the code, it's fairly organized, but beware that the vanilla items are not coded the same way as Tapi allows us to code the mod items, even the data stored in our .json files are inside the items.cs file, if looking for a specific item just type in the item's name in the search bar and it show up, you'll see the info stored in tAPI's .json files like this:
this.noUseGraphic = true;
this.damage = 0;
this.knockBack = 7f;
this.useStyle = 5;
this.name = "Diamond Hook";
this.shootSpeed = 12.5f;
this.shoot = 235;
this.width = 18;
this.height = 28;
this.useSound = 1;
this.useAnimation = 20;
this.useTime = 20;
this.rare = 1;
this.noMelee = true;
this.value = 20000;
and tbh i have no idea where to look for specific coding, which we would store in the .cs file...
since a lot of items use projectiles, which have their own AI, which i don't know where to look for, since i think the NPC.cs AI section isn't the same, not sure about this though...