Thanks for the reply! I think my crashes were because of shared code and I already had an infinite health cheat on. I did some dissecting and so far this is working without a crash:
cmp [esi+00000000],00004811
je exit
mov [esi+000001F8],(float)-19.85407257
jmp exit
And then some enemies have armour as well - decreasing their armour is handled by another instruction. I did try and combine the two so its still a one hit kill, but oddly they end up with a small amount of health still:
cmp [esi+00000000],00004811
je exit
mov [esi+000001FC],(float)-19.85407257
mov [esi+000001F8],(float)-19.85407257
jmp exit
Have not yet noticed any issues by omitting the fstp, but I will bear in mind what you have said.
EDIT: well the answer seems to be: just drop tehir health bar when their armour gets hit. Don't worry about the armour value:
cmp [esi+00000000],00004811
je exit
mov [esi+000001F8],(float)-19.85407257
jmp exit
fstp st(0)
cmp [esi+00000000],00004811 //Main character
je exit
cmp [esi+00000000],00001811 //Eve
je exit
cmp [esi+00000000],00004B91 //Helicopter
je exit
mov [esi+000001F8],(float)-19.85407257
jmp exit
It's working pretty well - I need the one hit kill to exclude the main character, the girl you have to protect, and the helicopter you fly in. The one part where they're shooting at you in the helicopter and the girl went a bit weird - I modified the above code to protect the helicopter, but then the girl was dying. I couldn't figure it out so for that very small part I just disabled the cheat. So far everywhere else, its working.
If you're checking things in this manner, the helicopter check may be overriding Eve if they're both true, although I'm not certain how you would fix that myself. I ran into the same issue today with sharedcode for three resources in another game.. when one was infinite the others weren't anymore. My only guess would be to check a higher function and compare against what's writing to the normal register that writes into esi+1F8