-
-
Save helloobaby/3f6a430d13c580a122f40ecdc99157e7 to your computer and use it in GitHub Desktop.
zydis v4
This file contains hidden or 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
| ZydisDisassembledInstruction insn; | |
| ZydisDisassembleIntel(ZYDIS_MACHINE_MODE_LONG_COMPAT_32, (ZyanU64)ip, ip, | |
| 15, &insn); | |
| ZyanU64 ResultAddress; | |
| if (insn.info.mnemonic == ZYDIS_MNEMONIC_CALL) { | |
| ZydisCalcAbsoluteAddress(&insn.info, insn.operands, (ZyanU64)ip, | |
| &ResultAddress); | |
| TraceFile << hex << "ip : ResultAddress " << ip << "\t" << ResultAddress | |
| << endl; | |
| if (ResultAddress > NtdllModule->start_ && ResultAddress < NtdllModule->end_) { | |
| auto it = kSymbolInfo[NtdllModuleIndex].begin(); | |
| it = kSymbolInfo[NtdllModuleIndex].find(ResultAddress); | |
| if (it != kSymbolInfo[NtdllModuleIndex].end()) { | |
| TraceFile << "Call -> " << it->second << endl; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment