Skip to content
Snippets Groups Projects
Commit 5f33caa2 authored by Matthew McGill's avatar Matthew McGill
Browse files

Removed functions that were only available in p1transform version

Former-commit-id: 2f4f92a53a0e1fa6e86b80eeb0e5258b3cca63a9
parent 4f2f6805
No related branches found
No related tags found
No related merge requests found
......@@ -65,13 +65,5 @@ Instruction_t* allocateNewInstruction(FileIR_t* virp, Instruction_t *template_in
void setInstructionAssembly(FileIR_t* virp,Instruction_t *p_instr, string p_assembly, Instruction_t *p_fallThrough, Instruction_t *p_target);
Instruction_t* getHandlerCode(FileIR_t* virp, Instruction_t* fallthrough, mitigation_policy policy );
string getJumpDataBits();
string getJnsDataBits();
string getJzDataBits();
string getJnzDataBits();
string getJecxzDataBits();
string getRetDataBits();
Relocation_t* createNewRelocation(FileIR_t* firp, Instruction_t* insn, string type, int offset);
}
......@@ -249,82 +249,4 @@ void setInstructionAssembly(FileIR_t* virp,Instruction_t *p_instr, string p_asse
}
string getRetDataBits()
{
string dataBits;
dataBits.resize(1);
dataBits[0] = 0xc3;
return dataBits;
}
string getJumpDataBits()
{
string dataBits;
dataBits.resize(5);
dataBits[0] = 0xe9;
dataBits[1] = 0x00; // value doesn't matter -- we will fill it in later
dataBits[2] = 0x00; // value doesn't matter -- we will fill it in later
dataBits[3] = 0x00; // value doesn't matter -- we will fill it in later
dataBits[4] = 0x00; // value doesn't matter -- we will fill it in later
return dataBits;
}
// jns - jump not signed
string getJnsDataBits()
{
string dataBits;
dataBits.resize(2);
dataBits[0] = 0x79;
dataBits[1] = 0x00; // value doesn't matter -- we will fill it in later
return dataBits;
}
// jz - jump zero
string getJzDataBits()
{
string dataBits;
dataBits.resize(2);
dataBits[0] = 0x74;
dataBits[1] = 0x00; // value doesn't matter -- we will fill it in later
return dataBits;
}
// jnz - jump not zero
string getJnzDataBits()
{
string dataBits;
dataBits.resize(2);
dataBits[0] = 0x75;
dataBits[1] = 0x00; // value doesn't matter -- we will fill it in later
return dataBits;
}
// jecxz - jump ecx zero
string getJecxzDataBits()
{
string dataBits;
dataBits.resize(2);
dataBits[0] = 0xe3;
dataBits[1] = 0x00; // value doesn't matter -- we will fill it in later
return dataBits;
}
Relocation_t* createNewRelocation(FileIR_t* firp, Instruction_t* insn, string type, int offset)
{
Relocation_t* reloc=new Relocation_t;
insn->GetRelocations().insert(reloc);
firp->GetRelocations().insert(reloc);
reloc->SetType(type);
reloc->SetOffset(offset);
return reloc;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment