Skip to content

Instantly share code, notes, and snippets.

@vient
Last active September 19, 2024 18:52
Show Gist options
  • Save vient/39a705002edaa0ecb9d9463ca4a83874 to your computer and use it in GitHub Desktop.
Save vient/39a705002edaa0ecb9d9463ca4a83874 to your computer and use it in GitHub Desktop.
IDA stuff
////////////////////////
// USER DEFINED RULES //
////////////////////////
// MFC/ATL strings
R9000 : { ptn : "CStringT<char,\\s*StrTraitMFC(_DLL)?<char,\\s*(ATL::)?ChTraits(CRT|OS)<char>>>", rpl : "CStringA" },
R9001 : { ptn : "CStringT<wchar_t,\\s*StrTraitMFC(_DLL)?<wchar_t,\\s*(ATL::)?ChTraits(CRT|OS)<wchar_t>>>", rpl : "CStringW" },
R9002 : { ptn : "CStringT<char,\\s*StrTraitATL(_DLL)?<char,\\s*(ATL::)?ChTraits(CRT|OS)<char>>>", rpl : "CAtlStringA" },
R9003 : { ptn : "CStringT<wchar_t,\\s*StrTraitATL(_DLL)?<wchar_t,\\s*(ATL::)?ChTraits(CRT|OS)<wchar_t>>>", rpl : "CAtlStringW" },
// replace __cxx11 namespace with tag so it won't go in way of other rules
R9010 : { ptn : "std::__cxx11::", rpl : "[abi:cxx11]std::"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment