How about this anas a radical idea, it would require you to program in python or ArcObjects.
- Convert your grid to a point featureclasss.
- Create XY fields and populate.
- Load the points into a dictionary where key is a string of X,Y and item is cell value..
- Step through your dictionary and for each point work out the 8 surrounding cell XYs.
- Retrieve these from your dictionary and test with your rules, as soon as you find a value that is true you can skip the rest of the tests.
- Write the results to another dictionary and then convert back to a grid by first creating a point FeatureClass and then convert points to a grid.