-
-
Save Intyre/60c9256b0fe0fc2ab9d0fadbe37d3a53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
onEnter: function (log, args, state) { | |
log(%(log_str)s); | |
this.b = args[1]; | |
}, | |
onLeave: function (log, retval, state) { | |
rlen = Memory.readShort(this.b)/8; | |
uint8arr = new Uint8Array(Memory.readByteArray(this.b.add(0x11), rlen)); | |
var hexStr = ''; | |
for (var i = 0; i < uint8arr.length; i++) { | |
var hex = (uint8arr[i] & 0xff).toString(16); | |
hex = (hex.length === 1) ? '0' + hex : hex; | |
hexStr += hex; | |
} | |
log(hexStr); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment