Skip to content

Instantly share code, notes, and snippets.

Second pass
Entry point: <class=Symbol, name="_init", value=0x8048298, size=0>
0: push ebp
1: mov ebp,esp
3: push ebx
4: sub esp,0x4
7: call 0xc
12: pop ebx
13: add ebx,0x1d50
19: mov edx,[ebx-0x4]
Entry point: <class=Symbol, name="_init", value=0x8048298, size=0>
0x8048298: push ebp
0x8048299: mov ebp,esp
0x804829b: push ebx
0x804829c: sub esp,0x4
0x804829f: call 0x80482a4
0x80482a4: pop ebx
0x80482a5: add ebx,0x1d50
0x80482ab: mov edx,[ebx-0x4]
0x80482b1: test edx,edx
{
"name" : "QDSUB",
"encoding" : "T1",
"version" : "ARMv6T2, ARMv7",
"format" : "QDSUB<c> <Rd>, <Rm>, <Rn>",
"pattern" : "111110101000 Rn#4 1111 Rd#4 1011 Rm#4",
"decoder" : """d = UInt(Rd); n = UInt(Rn); m = UInt(Rm); if d IN {13,15} || n IN {13,15} || m IN {13,15} then UNPREDICTABLE;"""
}
LC_CODE_SEGMENT_SPLIT_INFO
LC_CODE_SIGNATURE
LC_DATA_IN_CODE
LC_DYLD_ENVIRONMENT
LC_DYLD_INFO
LC_DYLD_INFO_ONLY
LC_DYLIB_CODE_SIGN_DRS
LC_DYSYMTAB
LC_ENCRYPTION_INFO
LC_ENCRYPTION_INFO_64
/*
* libdisassembly.cpp
*
* Created on: Sep 20, 2015
* Author: anon
*/
#include <memory>
#include <boost/python.hpp>
#include <iostream>
bool ARMInterpreter::interpret_ldc_ldc2_immediate(ARMContext& ctx, const ARMInstruction& ins)
{
if (ConditionPassed()) {
EncodingSpecificOperations();
if (!Coproc_Accepted(cp, ThisInstr())) {
GenerateCoprocessorException();
}
else {
NullCheckIfThumbEE(n);
shared_ptr<ARMInstruction> ARMDecoder::decode_adc_register_t2(uint32_t opcode, Disassembler::ARMInstrSize ins_size, ARMEncoding encoding) {
int S = get_bit(opcode, 20);
int Rn = get_bits(opcode, 19, 16);
int imm3 = get_bits(opcode, 14, 12);
int Rd = get_bits(opcode, 11, 8);
int imm2 = get_bits(opcode, 7, 6);
int type = get_bits(opcode, 5, 4);
int Rm = get_bits(opcode, 3, 0);
int shift_t = 0;
int d = 0;
from z3 import *
input_size = BitVec('input_size', 32)
t1 = BitVecVal(0xAAAAAAAAAAAAAAAB, 128) * ZeroExt(128 - 32, input_size)
t2 = LShR(t1, 64)
t3 = LShR(t2, 3)
t4 = Extract(31, 0, t3)
expr1 = t4
expr2 = UDiv(input_size, 12)
solve(expr1 != expr2)
class AbstractMemory {
public:
AbstractMemory() = default;
~AbstractMemory() = default;
template <typename T> size_t read(uintptr_t address, T &value) {
return read(address, reinterpret_cast<void *>(&value), sizeof(T));
}
template <typename T> size_t write(uintptr_t address, T value) {
class AbstractMemory {
public:
AbstractMemory() = default;
~AbstractMemory() = default;
template <typename T> size_t read(uintptr_t address, T &value) {
return read(address, reinterpret_cast<void *>(&value), sizeof(T));
}
template <typename T> size_t write(uintptr_t address, T value) {