Skip to content

Instantly share code, notes, and snippets.

@bdash
Last active July 29, 2020 03:09
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bdash/44b57e2c72b0a39e83e8eb40f0415485 to your computer and use it in GitHub Desktop.
Save bdash/44b57e2c72b0a39e83e8eb40f0415485 to your computer and use it in GitHub Desktop.
Excerpt from Hopper pseudocode from __dynamic_cast in libc++abi.dylib
if ((*(int8_t *)guard variable for __dynamic_cast::use_strcmp == 0x0) && (___cxa_guard_acquire(guard variable for __dynamic_cast::use_strcmp, rsi, rdx, rcx, r8, r9) != 0x0)) {
rsi = *_NSGetProgname();
rcx = 0x1;
if (strcmp("Adobe Illustrator", rsi) != 0x0) {
rsi = *_NSGetProgname();
rdx = 0x13;
rcx = strncmp("Adobe Photoshop CS5", rsi, rdx) == 0x0 ? 0x1 : 0x0;
}
*(int8_t *)__dynamic_cast::use_strcmp = rcx;
___cxa_guard_release(guard variable for __dynamic_cast::use_strcmp, rsi, rdx, rcx, r8, r9);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment