mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 09:49:23 +02:00
GP-7 Added handling of MULTI_EQUAL pcode op while finding constant
resource ids.
This commit is contained in:
parent
772694c13c
commit
09bd2bebe0
2 changed files with 7 additions and 6 deletions
|
@ -694,10 +694,10 @@ public class WindowsResourceReference extends GhidraScript {
|
||||||
followToParam(constUse, defUseList, highFunction, def.getInput(0), doneSet);
|
followToParam(constUse, defUseList, highFunction, def.getInput(0), doneSet);
|
||||||
return;
|
return;
|
||||||
case PcodeOp.MULTIEQUAL:
|
case PcodeOp.MULTIEQUAL:
|
||||||
followToParam(constUse, defUseList, highFunction, def.getInput(0), doneSet);
|
for (int i = 0; i < def.getNumInputs(); i++) {
|
||||||
@SuppressWarnings("unchecked")
|
ArrayList<PcodeOp> splitUseList = new ArrayList<>(defUseList);
|
||||||
ArrayList<PcodeOp> splitUseList = (ArrayList<PcodeOp>) defUseList.clone();
|
followToParam(constUse, splitUseList, highFunction, def.getInput(i), doneSet);
|
||||||
followToParam(constUse, splitUseList, highFunction, def.getInput(1), doneSet);
|
}
|
||||||
return;
|
return;
|
||||||
case PcodeOp.CAST:
|
case PcodeOp.CAST:
|
||||||
// Cast will expose more Pcode, and could be attached to the same address!
|
// Cast will expose more Pcode, and could be attached to the same address!
|
||||||
|
@ -707,7 +707,8 @@ public class WindowsResourceReference extends GhidraScript {
|
||||||
followToParam(constUse, defUseList, highFunction, def.getInput(0), doneSet);
|
followToParam(constUse, defUseList, highFunction, def.getInput(0), doneSet);
|
||||||
return;
|
return;
|
||||||
case PcodeOp.INDIRECT:
|
case PcodeOp.INDIRECT:
|
||||||
if (def.getOutput().getAddress().equals(def.getInput(0).getAddress())) {
|
Varnode output = def.getOutput();
|
||||||
|
if (output.getAddress().equals(def.getInput(0).getAddress())) {
|
||||||
followToParam(constUse, defUseList, highFunction, def.getInput(0), doneSet);
|
followToParam(constUse, defUseList, highFunction, def.getInput(0), doneSet);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,7 +145,7 @@ public class WindowsResourceReferenceScriptTest extends AbstractGhidraHeadedInte
|
||||||
addr(0x01001f3b, pgm), addr(0x0100398f, pgm), addr(0x01003ade, pgm),
|
addr(0x01001f3b, pgm), addr(0x0100398f, pgm), addr(0x01003ade, pgm),
|
||||||
addr(0x01003aec, pgm), addr(0x01003ad0, pgm), addr(0x010039c5, pgm),
|
addr(0x01003aec, pgm), addr(0x01003ad0, pgm), addr(0x010039c5, pgm),
|
||||||
addr(0x01003d45, pgm), addr(0x0100385b, pgm), addr(0x01003d36, pgm),
|
addr(0x01003d45, pgm), addr(0x0100385b, pgm), addr(0x01003d36, pgm),
|
||||||
addr(0x01003920, pgm), addr(0x0100390e, pgm) };
|
addr(0x01003920, pgm), addr(0x0100390e, pgm), addr(0x01003932, pgm) };
|
||||||
|
|
||||||
return winmineTestAddrs;
|
return winmineTestAddrs;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue