I've managed to obtain the Shockwave Flash (SWF) files for the web version of the game (using Chrome dev tools, using the network tool) and used an SWF decompiler to change stats in the game, e.g. making Chomper swallow instantly/ making him immortal, making plants deal instant kill damage, making repeater shoot puffs, etc. If anyone is interested in this kind of stuff, give it a go and see what you can add/change to the game,
Modded files: https://metamaths.000webhostapp.com/PvZ/
Original files available through http://en.gameslol.net/data/pvz/en/index.html
I used JPEXS Free Flash Decompiler and Swiff Player to play the flash game offline. The "pvz.swf" file is responsible for starting up the game.