Hi there,
This patch works perfectly (at least with OS X ML and later), but I think there's something wrong, when it's being used with OS X Lion and earlier. Initially, the patch is doing its job under these two OS X versions, but if you run it one more time on the same binary, it will find again something for patching. I've made a test script, which uses this one to patch the AICPM binary 10 times in a row and here are the results:
With vanilla AICPM.kext from OS X SL 10.6.8
With vanilla AICPM.kext from OS X Lion 10.7.5
As you can see, the kexts under these two OS X versions can be patched several times (4 times in SL 10.6.8 and 2 times in Lion 10.7.5). My presumption is the situation will be the same with all kext versions between these two. There is no such issue on ML:
With vanilla AICPM.kext from OS X ML 10.8.1
Such was the result with the kexts from 10.8.5 12F36 and Mavericks DP7. Is there a way for this issue to be fixed?