you are applying your patch in territory in padded bytes of "00 00 00 00 00 00 00 00 00 00 00 00" by targeting ret as your validation condition, in most of the firmwares. see:
https://github.com/borntohonk/Switch-Ghidra-Guides/blob/master/scripts/known_patterns.py#L91-L139
using your eyes, and not LLM/AI, you can instantly see a visual pattern, of what im talking about.
that and the way sys-patch functions, requires for the pattern to hit a unique address, without the bytes of the entire length of a patch being applied to be within the pattern itself, otherwise it cannot find a match if someone has patched it by .ips patch or hekate applied patch. (* unless one of the bytes of the patch aligns with the address being patched, if it does, wildcard the ones that doesn't)
example of problematic pattern:
on 21.0.0 + nocntchk is fine with "00..0240F9....E8.....00...00...00"
but on 19.0.0 to 20.5.0 that same pattern produces a whole lot of duplicates. ("00..0240F9....08.....00...00...00")
tuning out the duplicates makes the pattern longer, like this "00..0240F9....08.....00...00...0054", theres now zero duplicates produced.
see this for that example:
( using
https://github.com/borntohonk/Switch-Ghidra-Guides/blob/master/scripts/find_patterns.py )
on unrelated note:
this needs testing, if anyone is willing.
https://github.com/borntohonk/sys-patch/commit/15c84264a6138708cfc84019d3d48b47db5ab118
do the following:
delete /atmosphere/exefs_patches/
reboot
check to see if there's any new files in:
/atmosphere/exefs_patches/es_patches/
make a .zip of /atmosphere/exefs_patches/ and upload it, kindly.