Skip to content

Instantly share code, notes, and snippets.

{
"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;"""
}
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
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]
while (analisysQueue.empty() == false)
{
// Sacamos un entry point
entry_point = analisysQueue.front();
// Obtenemos una referencia a la seccion qeu contiene el entry point
section = sections->getSectionByAddress(entry_point->getValue());
// symbolo no pertenece a ninguna seccion, skippeamos
if (!section)
#include <string>
#include <ostream>
#include <sstream>
#include <iostream>
using namespace std;
enum SymbolType
{
SYMBOL_TYPE_NONE,
Disassembly of section .init:
{
BBlock_0: <0,29>
{
0: push ebp
1: mov ebp,esp
3: push ebx
4: sub esp,0x4
7: call 0xc
12: pop ebx
BBlock_61: <61,0>
{
}
BBlock_29: <29,47>
{
call 0x40
call 0x108
call 0x208
pop eax
pop ebx
[gr00vy@kenny DisassemblerCPP]$ LD_LIBRARY_PATH=./ ./Debug/DisassemblerCPP /home/gr00vy/Code/for
Disassembly of section .init:
{
OPERAND_TYPE_IMMEDIATE | call 0xc | TARGET = 0xc
OPERAND_TYPE_IMMEDIATE | call 0x40 | TARGET = 0x40
OPERAND_TYPE_IMMEDIATE | call 0x108 | TARGET = 0x108
OPERAND_TYPE_IMMEDIATE | call 0x208 | TARGET = 0x208
}
-- Derivada numerica en x0 con paso h
-- http://en.wikipedia.org/wiki/Numerical_differentiation
derivada :: (Double -> Double) -> Double -> Double -> Double
derivada f x0 h = (f (x0 + h) - f x0) / (2*h)
newton :: (Double -> Double) -> Double -> Double
newton f x0 = do
let x1 = x0 - (f x0 / (derivada f x0 0.01))
if abs (x1 - x0) < 0.001 then x1 else newton f x1
derivada :: (Double -> Double) -> Double -> Double -> Double
derivada f x0 h = (f (x0 + h) - f x0) / (2*h)
newton :: (Double -> Double) -> Double -> Double
mewton f x0 = x0 - (f x0 / (derivada f x0))