Showing preview only (2,940K chars total). Download the full file or copy to clipboard to get everything.
Repository: buffer/libemu
Branch: master
Commit: bf443cb08546
Files: 180
Total size: 2.8 MB
Directory structure:
gitextract_987r91e3/
├── .gitignore
├── AUTHORS
├── CHANGES
├── Makefile.am
├── README
├── bindings/
│ ├── Makefile.am
│ └── python/
│ ├── Makefile.am
│ ├── libemu_module.c
│ └── setup.py.in
├── configure.ac
├── debian/
│ ├── changelog
│ ├── compat
│ ├── control
│ ├── copyright
│ ├── docs
│ ├── files
│ ├── libemu-dev.install
│ ├── libemu.install
│ └── rules
├── doc/
│ ├── Makefile.am
│ └── libemu.3
├── include/
│ ├── Makefile.am
│ └── emu/
│ ├── Makefile.am
│ ├── emu.h
│ ├── emu_breakpoint.h
│ ├── emu_cpu.h
│ ├── emu_cpu_data.h
│ ├── emu_cpu_functions.h
│ ├── emu_cpu_instruction.h
│ ├── emu_cpu_itables.h
│ ├── emu_cpu_stack.h
│ ├── emu_fpu_instruction.h
│ ├── emu_getpc.h
│ ├── emu_graph.h
│ ├── emu_hashtable.h
│ ├── emu_instruction.h
│ ├── emu_list.h
│ ├── emu_log.h
│ ├── emu_memory.h
│ ├── emu_queue.h
│ ├── emu_shellcode.h
│ ├── emu_source.h
│ ├── emu_stack.h
│ ├── emu_string.h
│ ├── emu_track.h
│ └── environment/
│ ├── Makefile.am
│ ├── emu_env.h
│ ├── emu_profile.h
│ ├── linux/
│ │ ├── Makefile.am
│ │ ├── emu_env_linux.h
│ │ ├── env_linux_syscall_hooks.h
│ │ └── env_linux_syscalls.h
│ └── win32/
│ ├── Makefile.am
│ ├── emu_env_w32.h
│ ├── emu_env_w32_dll.h
│ ├── emu_env_w32_dll_export.h
│ ├── env_w32_dll_export_hooks.h
│ ├── env_w32_dll_export_kernel32_hooks.h
│ ├── env_w32_dll_export_msvcrt_hooks.h
│ ├── env_w32_dll_export_shdocvw_hooks.h
│ ├── env_w32_dll_export_shell32_hooks.h
│ ├── env_w32_dll_export_urlmon_hooks.h
│ └── env_w32_dll_export_ws2_32_hooks.h
├── libemu.doxy
├── libemu.pc.in
├── src/
│ ├── Makefile.am
│ ├── emu.c
│ ├── emu_breakpoint.c
│ ├── emu_cpu.c
│ ├── emu_cpu_data.c
│ ├── emu_getpc.c
│ ├── emu_graph.c
│ ├── emu_hashtable.c
│ ├── emu_list.c
│ ├── emu_log.c
│ ├── emu_memory.c
│ ├── emu_queue.c
│ ├── emu_shellcode.c
│ ├── emu_source.c
│ ├── emu_stack.c
│ ├── emu_string.c
│ ├── emu_track.c
│ ├── environment/
│ │ ├── emu_env.c
│ │ ├── emu_profile.c
│ │ ├── linux/
│ │ │ ├── emu_env_linux.c
│ │ │ └── env_linux_syscall_hooks.c
│ │ └── win32/
│ │ ├── dlls/
│ │ │ ├── advapi32dll.c
│ │ │ ├── kernel32dll.c
│ │ │ ├── msvcrtdll.c
│ │ │ ├── ntdll.c
│ │ │ ├── shdocvwdll.c
│ │ │ ├── shell32dll.c
│ │ │ ├── shlwapidll.c
│ │ │ ├── urlmondll.c
│ │ │ ├── user32dll.c
│ │ │ ├── wininetdll.c
│ │ │ └── ws2_32dll.c
│ │ ├── emu_env_w32.c
│ │ ├── emu_env_w32_dll.c
│ │ ├── emu_env_w32_dll_export.c
│ │ ├── env_w32_dll_export_kernel32_hooks.c
│ │ ├── env_w32_dll_export_msvcrt_hooks.c
│ │ ├── env_w32_dll_export_shdocvw_hooks.c
│ │ ├── env_w32_dll_export_shell32_hooks.c
│ │ ├── env_w32_dll_export_urlmon_hooks.c
│ │ └── env_w32_dll_export_ws2_32_hooks.c
│ ├── functions/
│ │ ├── Makefile.am
│ │ ├── aaa.c
│ │ ├── adc.c
│ │ ├── add.c
│ │ ├── and.c
│ │ ├── call.c
│ │ ├── cmp.c
│ │ ├── cmps.c
│ │ ├── dec.c
│ │ ├── div.c
│ │ ├── group_1.c
│ │ ├── group_10.c
│ │ ├── group_2.c
│ │ ├── group_3.c
│ │ ├── group_4.c
│ │ ├── group_5.c
│ │ ├── idiv.c
│ │ ├── imul.c
│ │ ├── inc.c
│ │ ├── int.c
│ │ ├── jcc.c
│ │ ├── jmp.c
│ │ ├── lodscc.c
│ │ ├── loopcc.c
│ │ ├── misc.c
│ │ ├── mov.c
│ │ ├── movsx.c
│ │ ├── movzx.c
│ │ ├── mul.c
│ │ ├── neg.c
│ │ ├── not.c
│ │ ├── or.c
│ │ ├── pop.c
│ │ ├── push.c
│ │ ├── rcl.c
│ │ ├── rcr.c
│ │ ├── repcc.c
│ │ ├── ret.c
│ │ ├── rol.c
│ │ ├── ror.c
│ │ ├── sal.c
│ │ ├── sar.c
│ │ ├── sbb.c
│ │ ├── scas.c
│ │ ├── shr.c
│ │ ├── stoscc.c
│ │ ├── sub.c
│ │ ├── test.c
│ │ ├── xchg.c
│ │ └── xor.c
│ ├── libdasm.c
│ ├── libdasm.h
│ └── opcode_tables.h
├── testsuite/
│ ├── Makefile.am
│ ├── cpu_run.c
│ ├── emunids.c
│ ├── hashtest.c
│ ├── instrtest.c
│ ├── instrtree.c
│ ├── main.c
│ ├── memtest.c
│ └── scprofiler.c
└── tools/
├── Makefile.am
└── sctest/
├── Makefile.am
├── dot.c
├── dot.h
├── nanny.c
├── nanny.h
├── options.h
├── sctestmain.c
├── tests.c
├── tests.h
├── userhooks.c
└── userhooks.h
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided this notice is
# preserved. This file is offered as-is, without any warranty.
# Names of contributors must not be used to endorse or promote products
# derived from this file without specific prior written permission.
# Generated files
*.o
*.lo
*.la
================================================
FILE: AUTHORS
================================================
libemu was designed and written by:
* Paul Baecher
* Markus Koetter
special thanks go to:
* jt / nologin.org for libdasm
* Tony Finch for http://dotat.at/prog/lists/list.h
================================================
FILE: CHANGES
================================================
Changelog for libemu
30.11.2008 libemu 0.2.0
( created with svn log -r HEAD:1385 | grep -v -- "----" | grep -v ^r | grep -v ^libemu | grep -v "^$")
- stubs for
- instr_daa_27
- instr_das_2f
- instr_aas_3f
- instr_wait_9b
- instr_pushf_9c
- instr_popf_9d
- instr_sahf_9e
- instr_lahf_9f
- instr_mov_8c
- instr_mov_8e
to support obfuscated nop slides (ADMmutate)
- changed sctest verbosity
-v be verbose, print level info
-vv print info & instructions
-vvv print info, instructions & cpu state
- gcc 4.3.2 enforces return value checks for (v)asprintf, system, f(read|write), in most cases (ran out of memory) we can just bail out with exit(-1)
- there is no sctestmain.h
- fix sctest's append()
- accept using sane socklen_t value
- rename the INT(bits) and UINT(bits) macros to INTOF(bits) and UINTOF(bits) as INT collides on windows
- fixed off by one for dumping the tests
- added _NO_TESTS #define check for sctest to not compile any test cases into the library
this is required by Malzilla to include a Windows libemu binary in their distribution
that is not flagged by A/V (Bojan Spasic)
- nanny shadowed a local parameter
- createprocess did not work on x86_64 as the structs got different sizes, now we do not copy the structs, but only the values we want
- emu_env_w32 hook setup: status messages disabled, logging should be managed by the application
- emt64 fixes to allow compiling on x86_64 plattforms
maybe it is a bad habbit to store integer values on pointers to save some bytes
in this case I stored eip in a hashmap, using the hashmaps key pointer of type void * as store
compiling the code on a 64bit plattform .. made the cast invalid, as sizeof(void *) != sizeof(uint32_t)
therefore I had to cast to uintptr_t before casting to uint32_t in some places.
another thing is printing memory addresses, %08x works fine on 32bit plattforms, to be portable one should use %p, which does not prepend leading zeros.
- sctest, for interactive cmd prompt sessions, allow recording the cmd prompt session
creates a 'spy' process with socketpairs, duping the filedescriptors, and multiplexing using select
basically, the spy reads from the sockets, and writes the data to the cmd prompt process using socketpairs
the cmd prompts stdout and stderr is written to a socketpair, which is read by the spy process, and gets written to the connection
the process id returned by CreateProcess(cmd) is the spy's process id, so WaitForSingleObject waits for the spy process to exit
the spy process exists if the cmd prompt ends (the socketpair gets closed), the connection gets closed, or we hit a timeout
- fix bug introduced by making profiles optional, env->env.win->loaded_dlls[i]->baseaddr is invalid if we found it, as the loop does not stop
- hook URLDownloadToFile in sctest
- allow hooking URLDwnloadToFile
- sctest, use the optional profiling
- win32/linux env: profiling is optional
- allow hooking WinExec
- improved backtracking: 64A1... mov eax,[fs:...] now inits eax
- sctest
- implement hooks for fopen fwrite fclose CreateFile WriteFile CloseHandle
implement a nanny to make sure we do not use invalid filehandles
add the nanny to the Makefile
now sctest can emulate shellcodes which download files themselves, it will store the file in /tmp/<filename>-XXXXXX
- use emu_profile_argument_add_sockaddr_ptr where possible to save some lines
- move win32 fopen fclose fwrite hooks from env_w32_dll_export_kernel32_hooks to env_w32_dll_export_msvcrt_hooks
- profile GetProcAddress and WriteFile
- allow hooking for CreateFile WriteFile and CloseHandle
- to simplify profiling, create emu_profile_argument_add_sockaddr_ptr for use in connect&bind hooks
- implement default logger as callback
- porting to big endian broke cmp for lil endian, as endian.h was not included, and the big endian code did not honor argumentsizes for cmp reg{16,32} , imm8
fixed
- profile win32 sendto()
- introduce emu_hashmap_{ptr,string}_{hash,cmp} functions, to avoid further duplicated code, remove duplicate hashtable hash and cmp functions
- fix sctest Makefile
- split sctest in different files and move to tools/sctest/
- add hooks for win32 ExitProcess and ExitThread
- add profile information for ExitProcess, ExitThread and SetUnhandledExceptionFilter
- basic big endian support
- main problem is unaligned memory access leading to SIGBUS
- imm16 is unaligned by default. all operations using imm16 have/had to be sanatized
- emu_memory access, reading/writing dwords and words requires inverting the byte order on big endian
- emu_memory has use bcopy to create aligned copies of vars
- emu_memory has to use bcopy instead of memcpy to access the memory, as memcpy sigbusses on unaligned memory
- the INSTR_CALC macro's have to use aligned copies of the values, I ported the required macros for sctest and instrtest, a some are left 'todo'
- instrtest uses nasm to create binary code from asm, nasm does not work correctly on sparc64, therefore the binary data for the test which failed on sparc64 due to nasm failure got added
- adc instr_group_1_83_adc used imm16 for 'ADC r/m16,imm8' instead of imm8, fixed
- sctest (void)va_arg calls, so gcc does not complain
- host is optional for --bind and --connect
- remove interactive-hooks from configure and README
- install profile and env headers to proper location
- emu_log_set_logcb introduced: void my_emu_logcb)(struct emu *e, enum emu_log_level level, const char *msg){ printf("%s", msg); emu_log_set_logcb(emu_logging_get(emu), my_emu_logcb);
- for the win32 environment s/printf/logDebug/g
- add emu_env.h to include_HEADERS
- sctest, introduce --cmd to allow overriding commands
example sctest --cmd cmd="/bin/sh -c \"cd ~/.wine/drive_c/; wine 'c:\windows\system32\cmd_orig.exe' \"" will execute a real windows shell using wine if cmd is executed by shellcode
- sctest, opts orderd by name,
introduced --connect/-c and --bind/-b to override connect/binds when run --interactive
- Michal Spadlinski pointed out that instr_group_1_82 is an alias for instr_group_1_80
and the instr_group_3_f6 used instr_group_3_f7 instead of instr_group_3_f6
- restructured the process environment
now we have emu_env as the holder for linux and win32 as well as emu_env_hook for the api hooks.
env functions take emu_env and emu_env_hook as args, and access the required *thing* themselves
furthermore I introduced a different kind of hooking api calls using variadic callbackfunctions
the benefit is easy, the interactive hooks do not have to be part of libemu itself any longer
and hooking calls does not require access to the emu/cpu/memory
all you have to do is retrieve the arguments for the function to be hooked from the va_list using va_arg
- sctest got -i --interactive, using the interactive hooks from sctest itself
- scprofiler, more code
- profiling for socket in w32 env
- adjust sctest
- small list attail fix in run_and_track
init the env in run_and_track
- slightly smarter traversal
if traversal fails due to stack operations which are not track(ed|able), or something different
bruteforce the instructions 'infront' of the known, taking the static tree as input
from the result, take the first offset doing 256 steps
one might be able to speed this up, caching already tested positions using the hashtable which is given as parameter to run_and_track
- emu_profile_function_argument_get arg0 is return value
- instrtest tests for special cases of sib/modrm
- void *emu_profile_function_argument_get(struct emu_profile_function *function, int argc);
added, expected to work
- emu_profile supports shorts
- sctest, minor changes, try to reestablisch getpctest()
- scprofiler, testdummy for emu_profile_function_argument_get()
- env win32
- add msvcrt export section
- hook _execv
- emu_profile_{dump,parse} added
- emu_profile_function has returnvalue now
- sctest -p FILENAME dumps the profile
- profiling for recv fopen fwrite fclose added
- introduce render_array, required for arrays (used in execve() on linux), emu_profile_argument_array_start & emu_profile_argument_array_end
- profile alle required calls on linux
- some minor fixes in sctest
- auto* libcargos with --enable-cargos --with-cargos-lib= --with-cargos-inc=
sctest uses per-program specific CPPFLAGS and LDFLAGS to link libcargos if avalible
- sctest runs leakfree in graphmode
- emu_profile rename *_ref to *_ptr
- rename emu_profile_argument_{start,end} to emu_profile_argument_struct_{start,end}
- introduce render_none, usefull for refs where the actual value is uninteresting
- free the mallocs, emu_profile properly cleans up now
- sctest runs leakfree
- emu_profile introduces an api for storing function calls and parameters
storing return values is todo, as well as dumping/rereading the profiles
- improve sctest codequalitity, split profiling process into prepare() and test, allow reading shellcodes from argos csi files (prepare_argos(struct emu *e))
using the argos csi profiling will require proper linking with libcargos, which is not done by now.
- this change will introduce memory leaks
- python bindings auto*
- python bindings, set library_dirs according to @libdir@, create setup.py via configure from setup.py.in
- sctest, hook linux syscall exit()
- linux env, add exit(), reorder fork
- env linux hook fork(), return 4711
- environments allow providing userdata now, accessing the userdata within a callback is possible using emu_env_linux_syscall->userdata or emu_env_w32_dll_export->userdata
- move python binding to bindings/python, integrate in autoconf using conditional dirs
- preliminary libemu python interface, currently only supports testing for shellcodes
- linux env, header Makefile.am
- fpu backwards traversal was dodgy, comparing fpu state with eflags does not make any sense
look at the src/emu_track.c diff to see the mess
when fixing, the size of the fpu state got shrinked to one bit, we don't need the others anyway
TRACK_FPU_LAST_INSTRUCTION had to be adjusted to comply with one bit vars
- sub reg32_a,reg32_b inits reg32_a if reg32_a == reg32_b
- proper linux syscall hooking, removed the int_cd code and created a linux environment
- lookup the syscalls name from a struct, in case of syscall groups like socketcall for accept,socket,connect,... provide a helper fn within the struct which returns the proper syscall name
- provide default syscall hooks for socketcall, dup2 and execve, stored in a struct
- for each environment, copy the struct, create a hashtable on (syscall_name, syscall_hook)
- use emu_env_linux_syscall_hook to overwrite default syscall hooks
- added the linux environment to sctest
- drawing graphs from linux shellcode is possible now
- first functional api hooks for int
- drafting int hooking for a linux env, the switch structure is way too long, structs are preferable, and the code should move to environment/linux, but at least it shows some basic actions for now
'sctest -t 24 -s 100
verbose = 0
testing (#24) 'linux bindshell' sys_socket(2)
sys_bind(2)
sys_listen(2)
sys_accept(2)
sys_dup2
sys_dup2
sys_dup2
sys_dup2
sys_dup2
sys_execve
cpu error error accessing 0x0000000b not mapped
stepcount 73
'
- add group3 to itables
- pkg-config support, now 'pkg-config --libs --cflags libemu' allows proper linking
- sctest -o for manual offset, understands hex and decimal
- instruction group, return -1 if group[i->modrm.opc] is NULL instead of calling NULL
- add emunids.c to testsuite, won't be build, is EXTRA_DIST
19.09.2007 libemu 0.1.0
- initial release
================================================
FILE: Makefile.am
================================================
# $Id$
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src include testsuite doc bindings tools
EXTRA_DIST = configure.ac CHANGES libemu.pc.in
pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = libemu.pc
================================================
FILE: README
================================================
_______________
| |
| |
| libemu |
| x86 emulation |
| |
| |
| |
\ O |
\______________|
homepage: http://libemu.mwcollect.org
building from svn:
autoreconf -v -i
./configure --prefix=/opt/libemu; make install
building from tarball:
tar xvfz libemu-VERSION.tar.gz
cd libemu-VERSION
./configure --prefix=/opt/libemu; make install
specific configure options:
--enable-debug enable debug code generation [default=yes]
debug messages, instruction strings, nothing one wants to miss, even if it takes a lot of cpu cycles.
================================================
FILE: bindings/Makefile.am
================================================
# $Id$
AUTOMAKE_OPTIONS = foreign
if ENABLE_PYTHON_BINDINGS
python_dir = python
endif
SUBDIRS = $(python_dir)
================================================
FILE: bindings/python/Makefile.am
================================================
# $Id$
AUTOMAKE_OPTIONS = foreign
all:
python setup.py build
install: all
python setup.py install
clean:
python setup.py clean
dist-clean: clean
EXTRA_DIST = setup.py libemu_module.c
================================================
FILE: bindings/python/libemu_module.c
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Georg Wicherski
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact gw@mwcollect.org
*
*******************************************************************************/
#include <Python.h>
#include <emu/emu.h>
#include <emu/emu_shellcode.h>
#include <stdio.h>
typedef struct
{
PyObject_HEAD
struct emu * emulator;
} libemu_EmulatorObject;
static PyObject * libemu_Emulator_new(PyTypeObject * type, PyObject * args,
PyObject * kwds)
{
libemu_EmulatorObject * self;
self = (libemu_EmulatorObject *) type->tp_alloc(type, 0);
if(self)
{
self->emulator = emu_new();
if(!self->emulator)
{
Py_DECREF(self);
return NULL;
}
}
return (PyObject *) self;
}
static void libemu_Emulator_dealloc(libemu_EmulatorObject * self)
{
if(self->emulator)
{
emu_free(self->emulator);
self->emulator = 0;
}
self->ob_type->tp_free((PyObject*) self);
}
static PyObject * libemu_Emulator_test(libemu_EmulatorObject * self,
PyObject * args, PyObject * kwds)
{
int length, result;
const char * buffer;
if(!PyArg_ParseTuple(args, "s#", &buffer, &length))
return NULL;
if(!self->emulator)
return NULL;
result = emu_shellcode_test(self->emulator, (uint8_t *) buffer, length);
if(result == -1)
Py_RETURN_NONE;
return Py_BuildValue("i", result);
}
static PyMethodDef libemu_EmulatorMethods[] = {
{ "test", (PyCFunction) libemu_Emulator_test, METH_VARARGS,
"Test a given buffer for presenced of a shellcode." },
{ NULL, NULL, 0, NULL },
};
static PyTypeObject libemu_EmulatorType =
{
PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"libemu.Emulator", /*tp_name*/
sizeof(libemu_EmulatorObject), /*tp_basicsize*/
0, /*tp_itemsize*/
(destructor) libemu_Emulator_dealloc, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_compare*/
0, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash */
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT, /*tp_flags*/
"libemu x86 emulator wrapper object", /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
0, /* tp_iter */
0, /* tp_iternext */
libemu_EmulatorMethods, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */
0, /* tp_descr_set */
0, /* tp_dictoffset */
0, /* tp_init */
0, /* tp_alloc */
libemu_Emulator_new, /* tp_new */
};
static PyMethodDef LibemuMethods[] = {
{ NULL, NULL, 0, NULL }
};
PyMODINIT_FUNC initlibemu()
{
PyObject * module;
if(PyType_Ready(&libemu_EmulatorType) < 0)
return;
module = Py_InitModule3("libemu", LibemuMethods,
"libemu x86 emulator wrapper module");
Py_INCREF(&libemu_EmulatorType);
PyModule_AddObject(module, "Emulator", (PyObject *) &libemu_EmulatorType);
}
================================================
FILE: bindings/python/setup.py.in
================================================
#!/usr/bin/python
from distutils.core import setup, Extension
libemu = Extension('libemu',
sources = ['libemu_module.c'],
include_dirs = ['../../include'],
library_dirs = ['../../src/.libs'],
extra_link_args=['-Wl,-rpath=@LIBDIR@'],
libraries = ['emu'],
)
setup (name = 'libemu',
version = '@VERSION@',
description = 'Python interface to the libemu x86 emulator.',
author = 'Georg Wicherski',
author_email = 'gw@mwcollect.org',
url = 'http://libemu.mwcollect.org/',
ext_modules = [libemu])
================================================
FILE: configure.ac
================================================
# -*- mode: m4; -*-
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# $Id$
AC_PREREQ([2.59])
AC_INIT([libemu],[0.2.0],[nepenthesdev@gmail.com])
AM_INIT_AUTOMAKE
AC_REVISION([$Id$])
# AC_PREFIX_DEFAULT(/opt/libemu)
AC_CONFIG_SRCDIR([include/emu/emu.h])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIRS([m4])
# AM_MAINTAINER_MODE
AC_CANONICAL_HOST
AC_C_CONST
AC_C_BIGENDIAN
dnl Check for some target-specific stuff
case "$host" in
*-*-freebsd*)
CPPFLAGS="$CPPFLAGS -I/usr/local/include -I/usr/src/contrib/file/ -Wno-unused-local-typedefs"
LDFLAGS="$LDFLAGS -L/usr/local/lib -Wl,-rpath,/usr/local/lib"
pkgconfigdir="/usr/lib/pkgconfig"
;;
*-*-linux*)
CC=clang
CFLAGS="-Wno-unused-local-typedefs"
CPPFLAGS="$CPPFLAGS -D _GNU_SOURCE -I/usr/local/include -Wno-unused-local-typedefs"
LDFLAGS="$LDFLAGS -L/usr/local/lib -Wl,-rpath,/usr/local/lib"
pkgconfigdir="/usr/lib/pkgconfig"
;;
*-*-darwin*)
CPPFLAGS="$CPPFLAGS -I/opt/local/include -Wno-unused-local-typedefs"
LDFLAGS="$LDFLAGS -L/opt/local/lib"
pkgconfigdir="/usr/local/lib/pkgconfig"
if test "$GCC" = "yes"; then
CFLAGS="$CFLAGS -Wno-unused-local-typedefs -Wno-tautological-compare"
fi
;;
esac
AC_SUBST([pkgconfigdir])
# Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
LT_INIT
AC_CHECK_HEADERS([stdint.h stdlib.h string.h strings.h unistd.h])
dnl We ought not to have to worry about getopt.h, getopt{,1}.c,
dnl since they can always be unconditionally compiled and linked. See
dnl http://mail.gnu.org/archive/html/autoconf/2000-12/msg00049.html
dnl and surrounding thread for discussion. However that doesn't
dnl appear to work in fact, and the function in getopt_long.c has
dnl different magic to avoid getting horribly tangled up.
AC_CHECK_FUNCS(getopt)
AC_CHECK_DECLS([getopt,getsubopt,getopt_long,setenv,putenv])
AC_REPLACE_FUNCS(getopt_long getsubopt)
dnl getopt_long.c uses (and provides a replacement for)
dnl this glibc utility function
AC_CHECK_FUNCS(__strchrnul)
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_UID_T
AC_STRUCT_TM
AC_TYPE_SIZE_T
AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
(`int' or `void').])
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(off_t)
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
(`int' or `void').])
AC_CHECK_FUNCS([strndup inet_ntoa memmove memset strdup strerror])
# library soname
# check http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91
libemu_current=2
libemu_revision=0
libemu_age=0
libemu_soname=$libemu_current:$libemu_revision:$libemu_age
AC_SUBST(libemu_soname)
AM_PROG_CC_C_O
dnl **************************************************
dnl * large filesystem Support *
dnl **************************************************
AC_MSG_CHECKING(for Large File System support)
AC_ARG_ENABLE(lfs,
AS_HELP_STRING([--enable-lfs],[Turn on Large File System (default)]),
[case "$host" in
*-*-linux*)
case "${enableval}" in
yes) CPPFLAGS="${CPPFLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES" ;;
no) ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-lfs) ;;
esac
;;
esac],[
CPPFLAGS="${CPPFLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES"
enable_lfs=yes]
,enable_lfs=no,)
AC_MSG_RESULT($enableval)
dnl **************************************************
dnl * debug code & debug messages *
dnl **************************************************
AC_MSG_CHECKING(whether debug code generation should be enabled)
AC_ARG_ENABLE([debug],
[AS_HELP_STRING(--enable-debug, enable debug code generation [[default=yes]])],
[enable_debug=${enableval}], [enable_debug="yes"])
if test x"$enable_debug" = "xyes"; then
AC_DEFINE([DEBUG], 1, [enable debug code generation])
fi
AC_MSG_RESULT($enable_debug)
#dnl **************************************************
#dnl * interactive hooks *
#dnl **************************************************
#
#AC_MSG_CHECKING(if hooks should be interactive)
#AC_ARG_ENABLE([interactive-hooks],
# [AS_HELP_STRING(--enable-interactive-hooks, enable interactive hooks (dangerous!)[[default=no]])],
# [enable_interactive_hooks=${enableval}], [enable_interactive_hooks="yes"])
#if test x"$enable_interactive_hooks" = "xyes"; then
# AC_DEFINE([HAVE_INTERACTIVE_HOOKS], 1, [enable interactive hooks])
#fi
#AC_MSG_RESULT($enable_interactive_hooks)
dnl **************************************************
dnl * python bindings *
dnl **************************************************
AC_ARG_ENABLE([python-bindings],
[ --enable-python-bindings Compile bindings for Python],
[enable_python="$enableval"],[enable_python="no"])
AM_CONDITIONAL([ENABLE_PYTHON_BINDINGS], [test x$enable_python = xyes])
dnl **************************************************
dnl * libcargos *
dnl **************************************************
AC_SUBST([LIB_CARGOS])
AC_SUBST([LIB_CARGOS_LIBDIR])
AC_SUBST([LIB_CARGOS_INCDIR])
enable_cargos="yes"
AC_ARG_ENABLE(cargos, [ --enable-cargos enable support for libcargos],
[enable_cargos="$enableval"],[enable_cargos="yes"])
AC_ARG_WITH(cargos-include,
[ --with-cargos-include=DIR libcargos include dir],
[cargos_inc="$withval"],[cargos_inc=no])
AC_ARG_WITH(cargos-lib,
[ --with-cargos-lib=DIR libcargos library dir],
[cargos_lib="$withval"],[cargos_lib=no])
if test x$enable_cargos = "xyes" ; then
OLD_CPPFLAGS=${CPPFLAGS};
if test x$cargos_inc != "xno"; then
CPPFLAGS="${CPPFLAGS} -I${cargos_inc}"
fi
AC_CHECK_HEADER(cargos-lib.h,[enable_cargos=yes],[enable_cargos=no])
if test x$enable_cargos = "xyes" ; then
OLD_LDFLAGS=${LDFLAGS}
if test x$cargos_lib != "xno"; then
LDFLAGS="${LDFLAGS} -L${cargos_lib}"
fi
AC_CHECK_LIB([cargos],[cargos_lib_create],enable_cargos="yes", enable_cargos="no")
if test x$enable_cargos = "xyes" ; then
LIB_CARGOS="-lcargos"
LIB_CARGOS_LIBDIR="-L$cargos_lib"
LIB_CARGOS_INCDIR="-I$cargos_inc"
AC_DEFINE([HAVE_LIBCARGOS], [1], [Define to 1 to compile with cargos support])
fi
fi
CPPFLAGS=${OLD_CPPFLAGS}
LDFLAGS=${OLD_LDFLAGS}
fi
AC_DEFUN([AC_DEFINE_DIR], [
prefix_NONE=
exec_prefix_NONE=
test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
dnl refers to ${prefix}. Thus we have to use `eval' twice.
eval ac_define_dir="\"[$]$2\""
eval ac_define_dir="\"$ac_define_dir\""
AC_SUBST($1, "$ac_define_dir")
AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
test "$prefix_NONE" && prefix=NONE
test "$exec_prefix_NONE" && exec_prefix=NONE
])
AC_DEFINE_DIR(PREFIX, prefix, [default working directory])
AC_DEFINE_DIR(LOCALESTATEDIR, localstatedir, [where to put logs etc])
AC_DEFINE_DIR(LIBDIR, libdir, [where to look for plugins])
AC_DEFINE_DIR(SYSCONFDIR, [sysconfdir], [System configuration dir])
AC_DEFINE_DIR(DATADIR, [datadir], [The directory for installing idiosyncratic read-only architecture-independent data.])
AC_DEFINE_DIR(DATAROOTDIR, [datarootdir], [The root of the directory tree for read-only architecture-independent data files.])
emu_data_dir=$datadir/emu
AC_SUBST(emu_data_dir)
CFLAGS="${CFLAGS} -Wstrict-prototypes"
AC_CONFIG_FILES([Makefile
src/Makefile
src/functions/Makefile
include/Makefile
include/emu/Makefile
include/emu/environment/Makefile
include/emu/environment/win32/Makefile
include/emu/environment/linux/Makefile
testsuite/Makefile
doc/Makefile
libemu.pc
bindings/Makefile
bindings/python/Makefile
bindings/python/setup.py
tools/Makefile
tools/sctest/Makefile])
AC_OUTPUT
echo
echo "*** libemu configuration ***"
echo ""
echo "debug : $enable_debug"
echo ""
echo "bindings"
echo " - python : $enable_python"
echo ""
echo "support"
echo " - cargos : $enable_cargos"
================================================
FILE: debian/changelog
================================================
libemu (0.2.0-1) unstable; urgency=low
* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
-- common <common@unknown> Mon, 17 May 2010 22:14:41 +0200
================================================
FILE: debian/compat
================================================
7
================================================
FILE: debian/control
================================================
Source: libemu
Priority: extra
Maintainer: Nepenthes Development Team <nepenthesdev@gmail.com>
Build-Depends: debhelper (>= 7), autotools-dev
Standards-Version: 3.8.1
Section: libs
Homepage: http://libemu.carnivore.it
Package: libemu-dev
Section: libdevel
Architecture: any
Depends: libemu (= ${binary:Version})
Description: libemu development files
Package: libemu
Section: libs
Architecture: any
Description: libemu library
================================================
FILE: debian/copyright
================================================
This package was debianized by Nepenthes Development Team <nepenthesdev@gmail.com> on
Mon, 17 May 2010 22:14:41 +0200.
It was downloaded from http://libemu.carnivore.it
Upstream Author(s):
<nepenthesdev@gmail.com>
Copyright:
<Copyright (C) 2010 Paul Bächer>
<Copyright (c) 2010 Markus Kötter>
License:
GPL
The Debian packaging is:
Copyright (C) 2010 Markus Kötter <nepenthesdev@gmail.com>
and is licensed under the GPL version 3,
see `/usr/share/common-licenses/GPL-3'.
# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.
================================================
FILE: debian/docs
================================================
README
================================================
FILE: debian/files
================================================
libemu-dev_0.2.0-1_amd64.deb libdevel extra
libemu_0.2.0-1_amd64.deb libs extra
================================================
FILE: debian/libemu-dev.install
================================================
usr/include/emu/*
================================================
FILE: debian/libemu.install
================================================
usr/lib/libemu.so.*
usr/lib/libemu.so
usr/lib/libemu.a
================================================
FILE: debian/rules
================================================
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@
================================================
FILE: doc/Makefile.am
================================================
# $Id$
AUTOMAKE_OPTIONS = foreign
man_MANS = libemu.3
EXTRA_DIST = $(man_MANS)
================================================
FILE: doc/libemu.3
================================================
.TH EMU 3 "04 September 2007"
.SH NAME
libemu - emulate x86 shellcodes
.SH SYNOPSIS
.nf
.ft B
#include <emu/emu.h>
#include <emu/emu_memory.h>
#include <emu/emu_cpu.h>
.ft
.LP
.nf
.LP
.ft B
struct emu * emu_new ()
void emu_free (struct emu *e)
struct emu_memory * emu_memory_get (struct emu *e)
struct emu_logging * emu_logging_get (struct emu *e)
struct emu_cpu * emu_cpu_get (struct emu *e)
void emu_errno_set (struct emu *e, int err)
int emu_errno (struct emu *c)
void emu_strerror_set (struct emu *e,
.ti +8
const char *format,...)
const char * emu_strerror (struct emu *e)
.ft
.LP
.ft B
void emu_memory_clear (struct emu_memory *em)
int32_t emu_memory_read_byte (struct emu_memory *m,
.ti +8
uint32_t addr, uint8_t *byte)
int32_t emu_memory_read_word (struct emu_memory *m,
.ti +8
uint32_t addr, uint16_t *word)
int32_t emu_memory_read_dword (struct emu_memory *m,
.ti +8
uint32_t addr, uint32_t *dword)
int32_t emu_memory_read_block (struct emu_memory *m,
.ti +8
uint32_t addr, void *dest, size_t len)
int32_t emu_memory_read_string (struct emu_memory *m,
.ti +8
uint32_t addr, struct emu_string *s, uint32_t maxsize)
int32_t emu_memory_write_byte (struct emu_memory *m,
.ti +8
uint32_t addr, uint8_t byte)
int32_t emu_memory_write_word (struct emu_memory *m,
.ti +8
uint32_t addr, uint16_t word)
int32_t emu_memory_write_dword (struct emu_memory *m,
.ti +8
uint32_t addr, uint32_t dword)
int32_t emu_memory_write_block (struct emu_memory *m,
.ti +8
uint32_t addr, void *src, size_t len)
void emu_memory_segment_select (struct emu_memory *m,
.ti +8
enum emu_segment s)
enum emu_segment emu_memory_segment_get (struct emu_memory *m)
int32_t emu_memory_alloc (struct emu_memory *m,
.ti +8
uint32_t *addr, size_t len)
uint32_t emu_memory_get_usage (struct emu_memory *m)
void emu_memory_mode_ro (struct emu_memory *m)
void emu_memory_mode_rw (struct emu_memory *m)
.ft
.LP
.ft B
uint32_t emu_cpu_reg32_get (struct emu_cpu *cpu_p, enum emu_reg32 reg)
uint16_t emu_cpu_reg16_get (struct emu_cpu *cpu_p, enum emu_reg16 reg)
uint8_t emu_cpu_reg8_get (struct emu_cpu *cpu_p, enum emu_reg8 reg)
void emu_cpu_reg16_set (struct emu_cpu *cpu_p, enum emu_reg16 reg, uint16_t val)
void emu_cpu_reg32_set (struct emu_cpu *cpu_p, enum emu_reg32 reg, uint32_t val)
void emu_cpu_reg8_set (struct emu_cpu *cpu_p, enum emu_reg8 reg, uint8_t val)
uint32_t emu_cpu_eflags_get (struct emu_cpu *c)
void emu_cpu_eflags_set (struct emu_cpu *c, uint32_t val)
void emu_cpu_eip_set (struct emu_cpu *c, uint32_t eip)
uint32_t emu_cpu_eip_get (struct emu_cpu *c)
int32_t emu_cpu_parse (struct emu_cpu *c)
int32_t emu_cpu_step (struct emu_cpu *c)
int32_t emu_cpu_run (struct emu_cpu *c)
void emu_cpu_debug_print (struct emu_cpu *c)
.ft
.LP
.ft B
int32_t emu_shellcode_test(struct emu *e, uint8_t *data, uint16_t size)
.ft
.LP
.ft B
struct emu_env_w32 *emu_env_w32_new(struct emu *e)
void emu_env_w32_free(struct emu_env_w32 *env)
struct emu_env_w32_dll_export *emu_env_w32_eip_check(struct emu_env_w32 *env)
int32_t emu_env_w32_export_hook(struct emu_env_w32 *env,
.ti +8
const char *dllname,
.ti +8
const char *exportname,
.ti +8
int32_t (*fnhook) (struct emu_env_w32 *env, struct emu_env_w32_dll_export *ex)
.ti +8
);
.ft
.fi
.SH DESCRIPTION
libemu provides basic x86 emulation including memory access and registers.
.PP
.SH ROUTINES
.B emu_new()
is used to create a new emulation entity, use
.B emu_free()
to free all associated memory.
.B emu_memory_get()
,
.B emu_logging_get()
and
.B emu_cpu_get()
can be used to obtain pointers to different parts of the emulation.
For errorhandling, use
.B emu_errno()
or
.B emu_strerror()
returning either a POSIX errno or a string describing the error.
When writing extensions
.B emu_errno_set()
and
.B emu_strerror_set()
will come handy too.
.PP
The
.B emu_memory
is split up in pages, therefore there are functions to access the memory without taking care of page borders.
.B emu_memory_read_byte()
,
.B emu_memory_read_word()
,
.B emu_memory_read_dword()
,
.B emu_memory_read_string()
and
.B emu_memory_read_block()
can be used to read values from the emu memory.
.B emu_memory_read_string()
will allocate the required memory for the string within the
.B emu_string
provided by itself, as you won't be able to know the strings length,
in all other cases, the pointer to the location has to provide enough space
to write the data.
.PP
Once the emulation is created, code is written to the memory,
we need to set the registers to the initial values, the cpuflags to the start values
and EIP to the point where to start code execution.
.B emu_cpu
provides functions to access all registers, the flags and EIP for read and write.
To access the 32bit registers use
.B emu_cpu_reg32_get()
and
.B emu_cpu_reg32_set()
where
.I reg
is one of eax, ecx, edx, ebx, esp, ebp, esi, edi.
To access the 16bit registers use
.B emu_cpu_reg16_get()
and
.B emu_cpu_reg16_set()
with ax, cx, dx, bx, sp, bp, si, di as valid values for
.IR reg.
In case of 8bit register access use
.B emu_cpu_reg8_get()
and
.B emu_cpu_reg8_set()
with al, cl, dl, bl, ah, ch, dh, bh as values for
.IR reg .
Accessing the cpu's flags is possible using
.B emu_cpu_eflags_get()
and
.BR emu_cpu_eflags_set() .
Accessing EIP can be done using
.B emu_cpu_eip_set()
and
.BR emu_cpu_eip_get() .
Once everything is setup, parse the first instruction using
.B emu_cpu_parse()
, on success it will return 0, on failure use
.B emu_strerror()
to get a description of the error.
If parsing was successfull, step the first instruction using
.BR emu_cpu_step() .
.PP
If you want to detect shellcodes in buffers, use
.B emu_shellcode_test()
, the emu will copy the buffer to it's pages and try to detect a shellcode.
If a possible shellcode gets detected, the guessed starting offset is returned, else -1.
.PP
To be able to run shellcodes using windows api, one has to provide parts of the
windows process environment to the emulation, as well as some kind of emulation for the used api calls.
.B emu_env_w32_new()
will created a minimalistic process environment in
.I e
and using
.B emu_env_w32_eip_check()
after step allows you intercepting calls to exported api.
If the return value of
.B emu_env_w32_eip_check()
is not NULL, the dll exports information is returned, including the calls name and hook.
If you want to hook calls to api exports, use
.BR emu_env_w32_export_hook() .
.SH AUTHOR
Markus Koetter <nepenthesdev@gmail.com>
================================================
FILE: include/Makefile.am
================================================
# $Id$
AUTOMAKE_OPTIONS = foreign
SUBDIRS = emu
================================================
FILE: include/emu/Makefile.am
================================================
# $Id$
AUTOMAKE_OPTIONS = foreign
SUBDIRS = environment
includedir = $(prefix)/include/emu
include_HEADERS = emu.h
include_HEADERS += emu_cpu_data.h
include_HEADERS += emu_cpu_functions.h
include_HEADERS += emu_cpu.h
include_HEADERS += emu_cpu_instruction.h
include_HEADERS += emu_cpu_itables.h
include_HEADERS += emu_cpu_stack.h
include_HEADERS += emu_fpu_instruction.h
include_HEADERS += emu_getpc.h
include_HEADERS += emu_graph.h
include_HEADERS += emu_hashtable.h
include_HEADERS += emu_instruction.h
include_HEADERS += emu_list.h
include_HEADERS += emu_log.h
include_HEADERS += emu_memory.h
include_HEADERS += emu_queue.h
include_HEADERS += emu_shellcode.h
include_HEADERS += emu_source.h
include_HEADERS += emu_stack.h
include_HEADERS += emu_string.h
include_HEADERS += emu_track.h
include_HEADERS += emu_breakpoint.h
#include_HEADERS = emu.h
#include_HEADERS += emu_log.h
#include_HEADERS += emu_cpu.h
#include_HEADERS += emu_memory.h
#noinst_HEADERS = emu_cpu_data.h
#noinst_HEADERS += emu_cpu_functions.h
#noinst_HEADERS += emu_cpu_itables.h
#noinst_HEADERS += emu_cpu_stack.h
================================================
FILE: include/emu/emu.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef HAVE_EMU_H
#define HAVE_EMU_H
#include <stdio.h>
#include <stdint.h>
#ifndef MIN
#define MIN(a,b) (((a)<(b))?(a):(b))
#endif
#ifndef MAX
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif
struct emu;
struct emu_logging;
struct emu_cpu;
struct emu_fpu;
/**
* Create a new emu.
*
* @return on success: the new emu
* on failure: NULL
*/
struct emu *emu_new(void);
/**
* Free the emu
*
* @param e the emu to free
*/
void emu_free(struct emu *e);
/**
* Retrieve a pointer to the emu's emu_memory.
*
* @param e the emu
*
* @return The pointer to the emu's emu_memory.
*/
struct emu_memory *emu_memory_get(struct emu *e);
/**
* Retrieve a pointer to the emu's logging facility.
*
* @param e the emu
*
* @return pointer to the emu's emu_logging.
*/
struct emu_logging *emu_logging_get(struct emu *e);
/**
* Retrieve a pointer to the emu's emu_cpu
*
* @param e the emu
*
* @return pointer to the emu's emu_cpu.
*/
struct emu_cpu *emu_cpu_get(struct emu *e);
/**
* Set the emu's internal errno
*
* @param e the emu
* @param err
*/
void emu_errno_set(struct emu *e, int err);
/**
* Retrieve the emu's errno
*
* @param c the emu
*
* @return the emu's errno
*/
int emu_errno(struct emu *c);
/**
* Set the emu's strerror message.
*
* @param e the emu
* @param format the errormessage format
*/
void emu_strerror_set(struct emu *e, const char *format, ...);
/**
* Retrieve the emu's strerror
*
* @param e the emu
*
* @return the strerror
*/
const char *emu_strerror(struct emu *e);
/*int32_t emu_parse(struct emu *e);
int32_t emu_step(struct emu *e);*/
#endif // HAVE_EMU_H
================================================
FILE: include/emu/emu_breakpoint.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef HAVE_EMU_BREAKPOINT_H
#define HAVE_EMU_BREAKPOINT_H
#include <inttypes.h>
#include <stdbool.h>
struct emu;
struct emu_memory;
struct emu_breakpoint;
#define EMU_ACCESS_READ (4)
#define EMU_ACCESS_WRITE (2)
/* NOTYET SUPPORTED */
#define EMU_ACCESS_EXECUTE (1)
/* Argument Function Pointers */
typedef void (*emu_bp_resp)(struct emu *e);
typedef bool (*emu_bp_cond)(struct emu *e);
/* Memory Management */
struct emu_breakpoint *emu_breakpoint_alloc(struct emu_memory *mem);
void emu_breakpoint_free(struct emu_breakpoint *bp);
/* Set / Get */
void emu_breakpoint_set(struct emu_memory *m, uint32_t addr, uint8_t access, emu_bp_resp response);
void emu_breakpoint_conditional_set(struct emu_memory *m, uint32_t addr, uint8_t access, emu_bp_resp response, emu_bp_cond condition);
struct emu_breakpoint *emu_breakpoint_get(struct emu_memory *m, uint32_t addr);
void emu_breakpoint_check(struct emu_memory *m, uint32_t addr, uint8_t access);
void emu_breakpoint_remove(struct emu_memory *m, uint32_t addr);
#endif /* HAVE_EMU_BREAKPOINT_H */
================================================
FILE: include/emu/emu_cpu.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef HAVE_EMU_CPU_H
#define HAVE_EMU_CPU_H
#include <inttypes.h>
struct emu;
struct emu_cpu;
enum emu_reg32 {
eax = 0, ecx, edx, ebx, esp, ebp, esi, edi
};
enum emu_reg16
{
ax = 0,/* eax */
cx, /* ecx */
dx, /* edx */
bx, /* ebx */
sp, /* esp */
bp, /* ebp */
si, /* esp */
di /* edi */
};
enum emu_reg8
{
al=0, /* eax */
cl, /* ecx */
dl, /* edx */
bl, /* ebx */
ah, /* eax */
ch, /* ecx */
dh, /* edx */
bh /* ebx */
};
struct emu_cpu *emu_cpu_new(struct emu *e);
uint32_t emu_cpu_reg32_get(struct emu_cpu *cpu_p, enum emu_reg32 reg);
void emu_cpu_reg32_set(struct emu_cpu *cpu_p, enum emu_reg32 reg, uint32_t val);
uint16_t emu_cpu_reg16_get(struct emu_cpu *cpu_p, enum emu_reg16 reg);
void emu_cpu_reg16_set(struct emu_cpu *cpu_p, enum emu_reg16 reg, uint16_t val);
uint8_t emu_cpu_reg8_get(struct emu_cpu *cpu_p, enum emu_reg8 reg);
void emu_cpu_reg8_set(struct emu_cpu *cpu_p, enum emu_reg8 reg, uint8_t val);
uint32_t emu_cpu_eflags_get(struct emu_cpu *c);
void emu_cpu_eflags_set(struct emu_cpu *c, uint32_t val);
/**
* Set the cpu's EIP
*
* @param c the cpu
* @param eip eip
*/
void emu_cpu_eip_set(struct emu_cpu *c, uint32_t eip);
/**
* get the cpu's EIP
*
* @param c the cpu
*
* @return EIP
*/
uint32_t emu_cpu_eip_get(struct emu_cpu *c);
/**
* parse a instruction at EIP
*
* @param c the cpu
*
* @return on success: 0
* on errror : -1, check emu_errno and emu_strerror
*/
int32_t emu_cpu_parse(struct emu_cpu *c);
/**
* step the last instruction
*
* @param c the cpu
*
* @return on success: 0
* on errror : -1, check emu_errno and emu_strerror
*/
int32_t emu_cpu_step(struct emu_cpu *c);
int32_t emu_cpu_run(struct emu_cpu *c);
void emu_cpu_free(struct emu_cpu *c);
void emu_cpu_debug_print(struct emu_cpu *c);
void emu_cpu_debugflag_set(struct emu_cpu *c, uint8_t flag);
void emu_cpu_debugflag_unset(struct emu_cpu *c, uint8_t flag);
#endif /* HAVEEMU_CPU_H */
================================================
FILE: include/emu/emu_cpu_data.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef EMU_CPU_DATA_H_
#define EMU_CPU_DATA_H_
#include <stdint.h>
#include <stdbool.h>
#include <emu/emu.h>
#include <emu/emu_cpu_instruction.h>
#include <emu/emu_instruction.h>
enum emu_cpu_flag {
f_cf = 0, f_pf = 2, f_af = 4, f_zf = 6, f_sf = 7, f_tf = 8, f_if = 9,
f_df = 10, f_of = 11
};
#define CPU_FLAG_SET(cpu_p, fl) (cpu_p)->eflags |= 1 << (fl)
#define CPU_FLAG_UNSET(cpu_p, fl) (cpu_p)->eflags &= ~(1 << (fl))
#define CPU_FLAG_TOGGLE(cpu_p, fl) (cpu_p)->eflags ^= 1 << (fl)
#define CPU_FLAG_ISSET(cpu_p, fl) ((cpu_p)->eflags & (1 << (fl)))
struct emu_track_and_source;
#define CPU_DEBUG_FLAG_SET(cpu_p, fl) (cpu_p)->debugflags |= 1 << (fl)
#define CPU_DEBUG_FLAG_UNSET(cpu_p, fl) (cpu_p)->debugflags &= ~(1 << (fl))
#define CPU_DEBUG_FLAG_TOGGLE(cpu_p, fl) (cpu_p)->debugflags ^= 1 << (fl)
#define CPU_DEBUG_FLAG_ISSET(cpu_p, fl) ((cpu_p)->debugflags & (1 << (fl)))
enum emu_cpu_debug_flag {
instruction_string = 0,
instruction_size = 1,
};
struct emu_cpu
{
struct emu *emu;
struct emu_memory *mem;
uint32_t debugflags;
uint32_t eip;
uint32_t eflags;
uint32_t reg[8];
uint16_t *reg16[8];
uint8_t *reg8[8];
struct emu_instruction instr;
struct emu_cpu_instruction_info *cpu_instr_info;
uint32_t last_fpu_instr[2];
char *instr_string;
bool repeat_current_instr;
struct emu_track_and_source *tracking;
};
#define MODRM_MOD(x) (((x) >> 6) & 3)
#define MODRM_REGOPC(x) (((x) >> 3) & 7)
#define MODRM_RM(x) ((x) & 7)
#define SIB_SCALE(x) (((x) >> 6) & 3)
#define SIB_INDEX(x) (((x) >> 3) & 7)
#define SIB_BASE(x) ((x) & 7)
#define PREFIX_ADSIZE (1 << 0)
#define PREFIX_OPSIZE (1 << 1)
#define PREFIX_LOCK (1 << 2)
#define PREFIX_CS_OVR (1 << 3)
#define PREFIX_DS_OVR (1 << 4)
#define PREFIX_ES_OVR (1 << 5)
#define PREFIX_FS_OVR (1 << 6)
#define PREFIX_GS_OVR (1 << 7)
#define PREFIX_SS_OVR (1 << 8)
#define PREFIX_F2 (1 << 9)
#define PREFIX_F3 (1 << 10)
#define OPSIZE_8 1
#define OPSIZE_16 2
#define OPSIZE_32 3
#define MAX_INT8 127
#define MIN_INT8 -128
#define MAX_UINT8 255
#define MIN_UINT8 0
#define MAX_INT16 32767
#define MIN_INT16 -MAX_INT16 -1
#define MAX_UINT16 65535
#define MIN_UINT16 0
#define MAX_INT32 2147483647
#define MIN_INT32 -MAX_INT32 -1
#define MAX_UINT32 4294967295U
#define MIN_UINT32 0
extern int64_t max_inttype_borders[][2][2];
#define INTOF(bits) int##bits##_t
#define UINTOF(bits) uint##bits##_t
#if !defined(INSTR_CALC)
#if BYTE_ORDER == BIG_ENDIAN
#define INSTR_CALC(bits, a, b, c, operation) \
UINTOF(bits) operand_a; \
UINTOF(bits) operand_b; \
bcopy(&(a), &operand_a, bits/8); \
bcopy(&(b), &operand_b, bits/8); \
UINTOF(bits) operation_result = operand_a operation operand_b; \
bcopy(&operation_result, &(c), bits/8);
#else // ENDIAN
#define INSTR_CALC(bits, a, b, c, operation) \
UINTOF(bits) operand_a = a; \
UINTOF(bits) operand_b = b; \
UINTOF(bits) operation_result = operand_a operation operand_b; \
c = operation_result;
#endif // ENDIAN
#endif // INSTR_CALC
#if !defined(INSTR_SET_FLAG_ZF)
#define INSTR_SET_FLAG_ZF(cpu) \
{ \
if (operation_result == 0) \
CPU_FLAG_SET(cpu, f_zf); \
else \
CPU_FLAG_UNSET(cpu, f_zf); \
}
#endif // INSTR_SET_FLAG_ZF
#if !defined(INSTR_SET_FLAG_PF)
#define INSTR_SET_FLAG_PF(cpu) \
{ \
int num_p_bits=0; \
int i; \
for ( i=0;i<8;i++ ) \
if (operation_result & (1 << i) ) \
num_p_bits++; \
\
if ((num_p_bits % 2) == 0) \
CPU_FLAG_SET(cpu, f_pf); \
else \
CPU_FLAG_UNSET(cpu, f_pf); \
}
#endif // INSTR_SET_FLAG_PF
#if !defined(INSTR_SET_FLAG_SF)
#define INSTR_SET_FLAG_SF(cpu) \
{ \
if (operation_result & (1 << (sizeof(operation_result)*8 - 1))) \
CPU_FLAG_SET(cpu, f_sf); \
else \
CPU_FLAG_UNSET(cpu, f_sf); \
}
#endif // INSTR_SET_FLAG_SF
#if !defined(INSTR_SET_FLAG_OF)
#define INSTR_SET_FLAG_OF(cpu, operand, bits) \
{ \
int64_t sx = (INTOF(bits))operand_a; \
int64_t sy = (INTOF(bits))operand_b; \
int64_t sz = 0; \
\
sz = sx operand sy; \
\
if (sz < max_inttype_borders[sizeof(operation_result)][0][0] || sz > max_inttype_borders[sizeof(operation_result)][0][1] \
|| sz != (INTOF(bits))operation_result ) \
{ \
CPU_FLAG_SET(cpu, f_of); \
}else \
{ \
CPU_FLAG_UNSET(cpu, f_of); \
} \
}
#endif // INSTR_SET_FLAG_OF
#if !defined(INSTR_SET_FLAG_CF)
#define INSTR_SET_FLAG_CF(cpu, operand) \
{ \
uint64_t ux = (uint64_t)operand_a; \
uint64_t uy = (uint64_t)operand_b; \
uint64_t uz = 0; \
\
uz = ux operand uy; \
\
if (uz < max_inttype_borders[sizeof(operation_result)][1][0] || uz > max_inttype_borders[sizeof(operation_result)][1][1] \
|| uz != (uint64_t)operation_result ) \
{ \
CPU_FLAG_SET(cpu, f_cf); \
}else \
{ \
CPU_FLAG_UNSET(cpu, f_cf); \
} \
}
#endif // INSTR_SET_FLAG_CF
#include <string.h>
#define WORD_UPPER_TO_BYTE(to,from) \
memcpy(&(to),((uint8_t *)&(from))+1,1);
#define WORD_LOWER_TO_BYTE(to,from) \
memcpy(&(to),&(from),1);
#define DWORD_UPPER_TO_WORD(to,from) \
memcpy(&(to),((uint8_t *)&(from))+2,2);
#define DWORD_LOWER_TO_WORD(to,from) \
memcpy(&(to),&(from),2);
#define QWORD_UPPER_TO_DWORD(to,from) \
memcpy(&(to),((uint8_t *)&(from))+4,4);
#define QWORD_LOWER_TO_DWORD(to,from) \
memcpy(&(to),&(from),4);
#define DWORD_FROM_WORDS(to, upper, lower) \
memcpy(&to,&lower,2); \
memcpy(((char *)&to)+2,&upper,2);
#define QWORD_FROM_DWORDS(to, upper, lower) \
memcpy(&to,&lower,4); \
memcpy(((char *)&to)+4,&upper,4);
#define TRACK_INIT_REG32(instruction, reg32) (instruction).track.init.reg[reg32] = 0xffffffff;
#define TRACK_NEED_REG32(instruction, reg32) (instruction).track.need.reg[reg32] = 0xffffffff;
#define TRACK_INIT_REG16(instruction, reg16) (instruction).track.init.reg[reg16] |= 0xffff << 16;
#define TRACK_NEED_REG16(instruction, reg16) (instruction).track.need.reg[reg16] |= 0xffff << 16;
#define TRACK_INIT_REG8(instruction, reg8) (instruction).track.init.reg[reg8] |= 0xff << 24;
#define TRACK_NEED_REG8(instruction, reg8) (instruction).track.need.reg[reg8] |= 0xff << 24;
#define TRACK_INIT_EFLAG(instruction, fl) (instruction).track.init.eflags |= 1 << (fl)
#define TRACK_NEED_EFLAG(instruction, fl) (instruction).track.need.eflags |= 1 << (fl)
#define SOURCE_NORM_POS(instruction, pos) (instruction).source.norm_pos = pos;
#define SOURCE_COND_POS(instruction, pos) (instruction).source.has_cond_pos = 1; (instruction).source.cond_pos = pos;
#define TRACK_FPU_LAST_INSTRUCTION 0x0
#define TRACK_INIT_FPU(instruction, what) (instruction).track.init.fpu |= 1 << (what);
#define TRACK_NEED_FPU(instruction, what) (instruction).track.need.fpu |= 1 << (what);
#define NNY "no need yet"
#define SST "16bit memory access is unsupported"
#define UNIMPLEMENTED(cpu_p, reason) \
emu_strerror_set((cpu_p)->emu, "The following function is unimplemented %s %s:%i (%s)", __PRETTY_FUNCTION__, __FILE__, __LINE__, reason); \
return -1;
#define STUB(cpu_p) \
emu_log((cpu_p)->emu, EMU_LOG_INFO, "The following function is a stub %s %s:%i \n", __PRETTY_FUNCTION__, __FILE__, __LINE__);
#endif /*EMU_CPU_DATA_H_*/
================================================
FILE: include/emu/emu_cpu_functions.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef HAVE_EMU_CPU_FUNCTIONS_H
#define HAVE_EMU_CPU_FUNCTIONS_H
/* misc */
int32_t prefix_fn(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_cpuid_0fa2(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_salc_d6(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* add */
int32_t instr_add_00(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_add_01(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_add_02(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_add_03(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_add_04(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_add_05(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* or */
int32_t instr_or_08(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_or_09(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_or_0a(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_or_0b(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_or_0c(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_or_0d(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* adc */
int32_t instr_adc_10(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_adc_11(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_adc_12(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_adc_13(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_adc_14(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_adc_15(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* sbb */
int32_t instr_sbb_18(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_sbb_19(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_sbb_1a(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_sbb_1b(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_sbb_1c(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_sbb_1d(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* and */
int32_t instr_and_20(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_and_21(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_and_22(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_and_23(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_and_24(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_and_25(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* sub */
int32_t instr_sub_28(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_sub_29(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_sub_2a(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_sub_2b(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_sub_2c(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_sub_2d(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* xor */
int32_t instr_xor_30(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_xor_31(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_xor_32(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_xor_33(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_xor_34(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_xor_35(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* cmp */
int32_t instr_cmp_38(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_cmp_39(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_cmp_3a(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_cmp_3b(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_cmp_3c(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_cmp_3d(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* group 1 */
int32_t instr_group_1_80(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_80_add(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_80_or (struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_80_adc(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_80_sbb(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_80_and(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_80_sub(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_80_xor(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_80_cmp(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_81(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_81_add(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_81_or(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_81_adc(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_81_sbb(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_81_and(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_81_sub(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_81_xor(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_81_cmp(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_83(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_83_add(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_83_or(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_83_adc(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_83_sbb(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_83_and(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_83_sub(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_83_xor(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_1_83_cmp(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* group 3 */
int32_t instr_group_3_f6(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_3_f6_test(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_3_f6_test(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_3_f6_not(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_3_f6_neg(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_3_f6_mul(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_3_f6_imul(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_3_f6_div(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_3_f6_idiv(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_3_f7(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_3_f7_test(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_3_f7_test(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_3_f7_not(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_3_f7_neg(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_3_f7_mul(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_3_f7_imul(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_3_f7_div(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_3_f7_idiv(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* group 4 */
int32_t instr_group_4_fe(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_4_fe_inc(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_4_fe_dec(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* group 5 */
int32_t instr_group_5_ff(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_5_ff_inc(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_5_ff_dec(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_5_ff_call(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_5_ff_jmp(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_5_ff_push(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* group 10 */
int32_t instr_group_10_8f(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_10_8f_pop(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* inc */
int32_t instr_inc_4x(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* dec */
int32_t instr_dec_4x(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* jcc */
int32_t instr_jcc_70(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_71(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_72(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_73(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_74(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_75(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_76(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_77(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_78(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_79(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_7a(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_7b(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_7c(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_7d(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_7e(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_7f(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_e3(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_0f80(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_0f81(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_0f82(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_0f83(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_0f84(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_0f85(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_0f86(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_0f87(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_0f88(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_0f89(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_0f8a(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_0f8b(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_0f8c(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_0f8d(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_0f8e(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_jcc_0f8f(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_setcc_0f94(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_setcc_0f95(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* jump */
int32_t instr_jmp_e9(struct emu_cpu *c, struct emu_cpu_instruction *i);
/*int32_t instr_jmp_ea(struct emu_cpu *c, struct instruction *i);*/
int32_t instr_jmp_eb(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* mov */
int32_t instr_mov_88(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_mov_89(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_mov_8a(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_mov_8b(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_mov_8c(struct emu_cpu *c, struct emu_cpu_instruction *i);
/*int32_t instr_mov_8e(struct emu_cpu *c, struct instruction *i);*/
int32_t instr_mov_a0(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_mov_a1(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_mov_a2(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_mov_a3(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_movsb(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_mov_bx_1(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_mov_bx_2(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_mov_c6(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_mov_c7(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_leave(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* pop */
/*int32_t instr_pop_07(struct emu_cpu *c, struct instruction *i);
int32_t instr_pop_17(struct emu_cpu *c, struct instruction *i);
int32_t instr_pop_1f(struct emu_cpu *c, struct instruction *i);*/
int32_t instr_pop_5x(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_popad_61(struct emu_cpu *c, struct emu_cpu_instruction *i);
/*int32_t instr_pop_0fa1(struct emu_cpu *c, struct instruction *i);
int32_t instr_pop_0fa9(struct emu_cpu *c, struct instruction *i);*/
/* push */
/*int32_t instr_push_06(struct emu_cpu *c, struct instruction *i);
int32_t instr_push_0e(struct emu_cpu *c, struct instruction *i);
int32_t instr_push_16(struct emu_cpu *c, struct instruction *i);
int32_t instr_push_1e(struct emu_cpu *c, struct instruction *i);*/
int32_t instr_push_5x(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_pushad_60(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_push_68(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_push_6a(struct emu_cpu *c, struct emu_cpu_instruction *i);
/*int32_t instr_push_0fa0(struct emu_cpu *c, struct instruction *i);
int32_t instr_push_0f08(struct emu_cpu *c, struct instruction *i);*/
/* call */
/*int32_t instr_call_9a(struct emu_cpu *c, struct instruction *i);*/
int32_t instr_call_e8(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* loop/loopcc*/
int32_t instr_loopcc_e0(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_loopcc_e1(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_loop_e2(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* ret */
int32_t instr_ret_c2(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_ret_c3(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* stos/stoscc*/
int32_t instr_stos_aa(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_stos_ab(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* lods/lodscc*/
int32_t instr_lods_ac(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_lods_ad(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* aaa */
int32_t instr_aaa_37(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* imul */
/*int32_t instr_imul_69(struct emu_cpu *c, struct instruction *i);*/
int32_t instr_imul_6b(struct emu_cpu *c, struct emu_cpu_instruction *i);
/*int32_t instr_imul_0f_af(struct emu_cpu *c, struct instruction *i);*/
/* misc */
int32_t instr_daa_27(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_das_2f(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_aas_3f(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_lea_8d(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_cbw_98(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_cwd_99(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_wait_9b(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_pushf_9c(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_popf_9d(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_sahf_9e(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_lahf_9f(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_cmc_f5(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_clc_f8(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_stc_f9(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_cld_fc(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_std_fd(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_sldt_0f00(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* group 2*/
int32_t instr_group_2_c0(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_c0_ror(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_c0_rol(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_c0_rcr(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_c0_rcl(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_c0_sal(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_c0_sar(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_c0_shr(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_c1(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_c1_ror(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_c1_rol(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_c1_rcr(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_c1_rcl(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_c1_sal(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_c1_sar(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_c1_shr(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d0(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d0_ror(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d0_rol(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d0_rcr(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d0_rcl(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d0_sal(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d0_sar(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d0_shr(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d1(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d1_ror(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d1_rol(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d1_rcr(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d1_rcl(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d1_sal(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d1_sar(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d1_shr(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d2(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d2_ror(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d2_rol(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d2_rcr(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d2_rcl(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d2_sal(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d2_sar(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d2_shr(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d3(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d3_ror(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d3_rol(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d3_rcr(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d3_rcl(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d3_sal(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d3_sar(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_group_2_d3_shr(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* repcc */
/*int32_t instr_repcc_f2a6(struct emu_cpu *c, struct instruction *i);
int32_t instr_repcc_f2a7(struct emu_cpu *c, struct instruction *i);
int32_t instr_repcc_f2ae(struct emu_cpu *c, struct instruction *i);
int32_t instr_repcc_f2af(struct emu_cpu *c, struct instruction *i);
int32_t instr_repcc_f36c(struct emu_cpu *c, struct instruction *i);
int32_t instr_repcc_f36d(struct emu_cpu *c, struct instruction *i);
int32_t instr_repcc_f36e(struct emu_cpu *c, struct instruction *i);
int32_t instr_repcc_f36f(struct emu_cpu *c, struct instruction *i);
int32_t instr_repcc_f3a4(struct emu_cpu *c, struct instruction *i);
int32_t instr_repcc_f3a5(struct emu_cpu *c, struct instruction *i);
int32_t instr_repcc_f3aa(struct emu_cpu *c, struct instruction *i);
int32_t instr_repcc_f3ab(struct emu_cpu *c, struct instruction *i);
int32_t instr_repcc_f3ac(struct emu_cpu *c, struct instruction *i);
int32_t instr_repcc_f3ad(struct emu_cpu *c, struct instruction *i);
int32_t instr_repcc_f3a6(struct emu_cpu *c, struct instruction *i);
int32_t instr_repcc_f3a7(struct emu_cpu *c, struct instruction *i);
int32_t instr_repcc_f3ae(struct emu_cpu *c, struct instruction *i);
int32_t instr_repcc_f3af(struct emu_cpu *c, struct instruction *i); */
/* test */
int32_t instr_test_84(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_test_85(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_test_a8(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_test_a9(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* scas */
int32_t instr_scas_ae(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_scas_af(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* cmps */
int32_t instr_cmps_a6(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_cmps_a7(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* xchg */
int32_t instr_xchg_86(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_xchg_87(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_xchg_9x(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* movsx */
int32_t instr_movsx_0fbe(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_movsx_0fbf(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* movzx */
int32_t instr_movzx_0fb6(struct emu_cpu *c, struct emu_cpu_instruction *i);
int32_t instr_movzx_0fb7(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* fpu esc */
int32_t instr_esc_fpu_dx(struct emu_cpu *c, struct emu_cpu_instruction *i);
/* int */
int32_t instr_int_cd(struct emu_cpu *c, struct emu_cpu_instruction *i);
#endif /*HAVE_EMU_CPU_FUNCTIONS_H*/
================================================
FILE: include/emu/emu_cpu_instruction.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef HAVE_EMU_CPU_INSTRUCTION
#define HAVE_EMU_CPU_INSTRUCTION
#include <stdint.h>
struct emu_cpu_instruction;
struct emu_cpu;
struct emu_cpu_instruction_info
{
int32_t (*function)(struct emu_cpu *, struct emu_cpu_instruction *);
const char *name;
struct
{
uint8_t s_bit : 1;
uint8_t w_bit : 1;
uint8_t modrm_byte : 4;
uint8_t imm_data : 3;
uint8_t disp_data : 3;
uint8_t level : 2;
uint8_t type : 2;
uint8_t fpu_info : 1;
} format;
};
struct emu_cpu_instruction
{
uint8_t opc;
uint8_t opc_2nd;
uint16_t prefixes;
uint8_t s_bit : 1;
uint8_t w_bit : 1;
uint8_t operand_size : 2;
struct /* mod r/m data */
{
union
{
uint8_t mod : 2;
uint8_t x : 2;
};
union
{
uint8_t reg1 : 3;
uint8_t opc : 3;
uint8_t sreg3 : 3;
uint8_t y : 3;
};
union
{
uint8_t reg : 3;
uint8_t reg2 : 3;
uint8_t rm : 3;
uint8_t z : 3;
};
struct
{
uint8_t scale : 2;
uint8_t index : 3;
uint8_t base : 3;
} sib;
union
{
uint8_t s8;
uint16_t s16;
uint32_t s32;
} disp;
uint32_t ea;
} modrm;
uint32_t imm;
uint16_t *imm16;
uint8_t *imm8;
int32_t disp;
};
#endif
================================================
FILE: include/emu/emu_cpu_itables.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef HAVE_EMU_CPU_ITABLES_H
#define HAVE_EMU_CPU_ITABLES_H
// for i in $(seq 0 255); do printf "\t/* %02x */ {0, 0, {0, 0, 0, 0, 0, 0, 0}},\n" $i; done >> emu_cpu_itables.h */
#include <emu/emu_cpu_functions.h>
#include <emu/emu_cpu_instruction.h>
#define II_SBIT 1
#define II_WBIT 1
#define II_XX_REG1_REG2 1
#define II_MOD_REG_RM 2
#define II_XX_YYY_REG 3
#define II_MOD_YYY_RM 4
#define II_UUUU_TTTN 5
#define II_XX_SREG3_ZZ 6
#define II_IMM 1
#define II_IMM8 2
#define II_IMM16 3
#define II_IMM32 4
#define II_DISPF 1
#define II_DISP8 2
#define II_DISP16 3
#define II_DISP32 4
/*#define II_LEVEL8 1 -- implementation pending
#define II_TYPE 1 -- impementation pending*/
#define II_FPU_INSTR 1
struct emu_cpu_instruction_info ii_onebyte[0x100] = {
/* 00 */ {instr_add_00, "add", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* 01 */ {instr_add_01, "add", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* 02 */ {instr_add_02, "add", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* 03 */ {instr_add_03, "add", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* 04 */ {instr_add_04, "add", {0, 0, 0, II_IMM8, 0, 0, 0, 0}},
/* 05 */ {instr_add_05, "add", {0, 0, 0, II_IMM, 0, 0, 0, 0}},
/* 06 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 07 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 08 */ {instr_or_08 , "or" , {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 09 */ {instr_or_09 , "or" , {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 0a */ {instr_or_0a , "or" , {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 0b */ {instr_or_0b , "or" , {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 0c */ {instr_or_0c , "or" , {0, 0, 0, II_IMM8, 0, 0, 0}},
/* 0d */ {instr_or_0d , "or" , {0, 0, 0, II_IMM, 0, 0, 0}},
/* 0e */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 0f */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 10 */ {instr_adc_10, "adc", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 11 */ {instr_adc_11, "adc", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 12 */ {instr_adc_12, "adc", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 13 */ {instr_adc_13, "adc", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 14 */ {instr_adc_14, "adc", {0, 0, 0, II_IMM8, 0, 0, 0}},
/* 15 */ {instr_adc_15, "adc", {0, 0, 0, II_IMM, 0, 0, 0}},
/* 16 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 17 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 18 */ {instr_sbb_18, "sbb", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 19 */ {instr_sbb_19, "sbb", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 1a */ {instr_sbb_1a, "sbb", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 1b */ {instr_sbb_1b, "sbb", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 1c */ {instr_sbb_1c, "sbb", {0, 0, 0, II_IMM8, 0, 0, 0}},
/* 1d */ {instr_sbb_1d, "sbb", {0, 0, 0, II_IMM, 0, 0, 0}},
/* 1e */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 1f */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 20 */ {instr_and_20, "and", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 21 */ {instr_and_21, "and", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 22 */ {instr_and_22, "and", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 23 */ {instr_and_23, "and", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 24 */ {instr_and_24, "and", {0, 0, 0, II_IMM8, 0, 0, 0}},
/* 25 */ {instr_and_25, "and", {0, 0, 0, II_IMM, 0, 0, 0}},
/* 26 */ {prefix_fn, "ES:", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 27 */ {instr_daa_27, "daa", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 28 */ {instr_sub_28, "sub", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 29 */ {instr_sub_29, "sub", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 2a */ {instr_sub_2a, "sub", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 2b */ {instr_sub_2b, "sub", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 2c */ {instr_sub_2c, "sub", {0, 0, 0, II_IMM8, 0, 0, 0}},
/* 2d */ {instr_sub_2d, "sub", {0, 0, 0, II_IMM, 0, 0, 0}},
/* 2e */ {prefix_fn, "CS:", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 2f */ {instr_das_2f, "das", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 30 */ {instr_xor_30, "xor", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 31 */ {instr_xor_31, "xor", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 32 */ {instr_xor_32, "xor", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 33 */ {instr_xor_33, "xor", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 34 */ {instr_xor_34, "xor", {0, 0, 0, II_IMM8, 0, 0, 0}},
/* 35 */ {instr_xor_35, "xor", {0, 0, 0, II_IMM, 0, 0, 0}},
/* 36 */ {prefix_fn, "SS:", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 37 */ {instr_aaa_37, "aaa", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 38 */ {instr_cmp_38, "cmp", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 39 */ {instr_cmp_39, "cmp", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 3a */ {instr_cmp_3a, "cmp", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 3b */ {instr_cmp_3b, "cmp", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0}},
/* 3c */ {instr_cmp_3c, "cmp", {0, 0, 0, II_IMM8, 0, 0, 0}},
/* 3d */ {instr_cmp_3d, "cmp", {0, 0, 0, II_IMM, 0, 0, 0}},
/* 3e */ {prefix_fn, "DS:", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 3f */ {instr_aas_3f, "aas", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 40 */ {instr_inc_4x, "inc", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 41 */ {instr_inc_4x, "inc", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 42 */ {instr_inc_4x, "inc", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 43 */ {instr_inc_4x, "inc", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 44 */ {instr_inc_4x, "inc", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 45 */ {instr_inc_4x, "inc", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 46 */ {instr_inc_4x, "inc", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 47 */ {instr_inc_4x, "inc", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 48 */ {instr_dec_4x, "dec", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 49 */ {instr_dec_4x, "dec", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 4a */ {instr_dec_4x, "dec", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 4b */ {instr_dec_4x, "dec", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 4c */ {instr_dec_4x, "dec", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 4d */ {instr_dec_4x, "dec", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 4e */ {instr_dec_4x, "dec", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 4f */ {instr_dec_4x, "dec", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 50 */ {instr_push_5x, "push", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 51 */ {instr_push_5x, "push", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 52 */ {instr_push_5x, "push", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 53 */ {instr_push_5x, "push", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 54 */ {instr_push_5x, "push", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 55 */ {instr_push_5x, "push", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 56 */ {instr_push_5x, "push", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 57 */ {instr_push_5x, "push", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 58 */ {instr_pop_5x, "pop", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 59 */ {instr_pop_5x, "pop", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 5a */ {instr_pop_5x, "pop", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 5b */ {instr_pop_5x, "pop", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 5c */ {instr_pop_5x, "pop", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 5d */ {instr_pop_5x, "pop", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 5e */ {instr_pop_5x, "pop", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 5f */ {instr_pop_5x, "pop", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 60 */ {instr_pushad_60, "pushad", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 61 */ {instr_popad_61, "popad", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 62 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 63 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 64 */ {prefix_fn, "FS:", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 65 */ {prefix_fn, "GS:", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 66 */ {prefix_fn, "OPSIZE:", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 67 */ {prefix_fn, "ADSIZE:", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 68 */ {instr_push_68, "push", {0, 0, 0, II_IMM, 0, 0, 0, 0}},
/* 69 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 6a */ {instr_push_6a, "push", {0, 0, 0, II_IMM8, 0, 0, 0, 0}},
/* 6b */ {instr_imul_6b, "imul", {0, 0, II_MOD_REG_RM, II_IMM8, 0, 0, 0, 0}},
/* 6c */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 6d */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 6e */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 6f */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 70 */ {instr_jcc_70, "jcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* 71 */ {instr_jcc_71, "jcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* 72 */ {instr_jcc_72, "jcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* 73 */ {instr_jcc_73, "jcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* 74 */ {instr_jcc_74, "jcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* 75 */ {instr_jcc_75, "jcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* 76 */ {instr_jcc_76, "jcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* 77 */ {instr_jcc_77, "jcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* 78 */ {instr_jcc_78, "jcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* 79 */ {instr_jcc_79, "jcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* 7a */ {instr_jcc_7a, "jcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* 7b */ {instr_jcc_7b, "jcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* 7c */ {instr_jcc_7c, "jcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* 7d */ {instr_jcc_7d, "jcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* 7e */ {instr_jcc_7e, "jcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* 7f */ {instr_jcc_7f, "jcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* 80 */ {instr_group_1_80, "group1", {0, 0, II_MOD_REG_RM, II_IMM8, 0, 0, 0, 0}},
/* 81 */ {instr_group_1_81, "group1", {0, 0, II_MOD_REG_RM, II_IMM, 0, 0, 0, 0}},
/* 82 */ {instr_group_1_80, "group1", {0, 0, II_MOD_REG_RM, II_IMM8, 0, 0, 0, 0}},
/* 83 */ {instr_group_1_83, "group1", {0, 0, II_MOD_REG_RM, II_IMM8, 0, 0, 0, 0}},
/* 84 */ {instr_test_84, "test", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* 85 */ {instr_test_85, "test", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* 86 */ {instr_xchg_86, "xchg", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* 87 */ {instr_xchg_87, "xchg", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* 88 */ {instr_mov_88, "mov", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* 89 */ {instr_mov_89, "mov", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* 8a */ {instr_mov_8a, "mov", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* 8b */ {instr_mov_8b, "mov", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* 8c */ {instr_mov_8c, "mov", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* 8d */ {instr_lea_8d, "lea", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* 8e */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 8f */ {instr_group_10_8f, "group10", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* 90 */ {instr_xchg_9x, "xchg", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 91 */ {instr_xchg_9x, "xchg", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 92 */ {instr_xchg_9x, "xchg", {0, 0, 0, 0, 0, 0, 0}},
/* 93 */ {instr_xchg_9x, "xchg", {0, 0, 0, 0, 0, 0, 0}},
/* 94 */ {instr_xchg_9x, "xchg", {0, 0, 0, 0, 0, 0, 0}},
/* 95 */ {instr_xchg_9x, "xchg", {0, 0, 0, 0, 0, 0, 0}},
/* 96 */ {instr_xchg_9x, "xchg", {0, 0, 0, 0, 0, 0, 0}},
/* 97 */ {instr_xchg_9x, "xchg", {0, 0, 0, 0, 0, 0, 0}},
/* 98 */ {instr_cbw_98, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 99 */ {instr_cwd_99, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 9a */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 9b */ {instr_wait_9b, "wait", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 9c */ {instr_pushf_9c, "pushf", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 9d */ {instr_popf_9d, "popf", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 9e */ {instr_sahf_9e, "sahf", {0, 0, 0, 0, 0, 0, 0, 0}},
/* 9f */ {instr_lahf_9f, "lahf", {0, 0, 0, 0, 0, 0, 0, 0}},
/* a0 */ {instr_mov_a0, "mov", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* a1 */ {instr_mov_a1, "mov", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* a2 */ {instr_mov_a2, "mov", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* a3 */ {instr_mov_a3, "mov", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* a4 */ {instr_movsb, "movsb", {0, 0, 0, 0, 0, 0, 0, 0}},
/* a5 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* a6 */ {instr_cmps_a6, "cmps", {0, 0, 0, 0, 0, 0, 0, 0}},
/* a7 */ {instr_cmps_a7, "cmps", {0, 0, 0, 0, 0, 0, 0, 0}},
/* a8 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* a9 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* aa */ {instr_stos_aa, "stos", {0, 0, 0, 0, 0, 0, 0, 0}},
/* ab */ {instr_stos_ab, "stos", {0, 0, 0, 0, 0, 0, 0, 0}},
/* ac */ {instr_lods_ac, "lods", {0, 0, 0, 0, 0, 0, 0, 0}},
/* ad */ {instr_lods_ad, "lods", {0, 0, 0, 0, 0, 0, 0, 0}},
/* ae */ {instr_scas_ae, "scas", {0, 0, 0, 0, 0, 0, 0, 0}},
/* af */ {instr_scas_af, "scas", {0, 0, 0, 0, 0, 0, 0, 0}},
/* b0 */ {instr_mov_bx_1, "mov", {0, 0, 0, II_IMM8, 0, 0, 0, 0}},
/* b1 */ {instr_mov_bx_1, "mov", {0, 0, 0, II_IMM8, 0, 0, 0, 0}},
/* b2 */ {instr_mov_bx_1, "mov", {0, 0, 0, II_IMM8, 0, 0, 0, 0}},
/* b3 */ {instr_mov_bx_1, "mov", {0, 0, 0, II_IMM8, 0, 0, 0, 0}},
/* b4 */ {instr_mov_bx_1, "mov", {0, 0, 0, II_IMM8, 0, 0, 0, 0}},
/* b5 */ {instr_mov_bx_1, "mov", {0, 0, 0, II_IMM8, 0, 0, 0, 0}},
/* b6 */ {instr_mov_bx_1, "mov", {0, 0, 0, II_IMM8, 0, 0, 0, 0}},
/* b7 */ {instr_mov_bx_1, "mov", {0, 0, 0, II_IMM8, 0, 0, 0, 0}},
/* b8 */ {instr_mov_bx_2, "mov", {0, 0, 0, II_IMM, 0, 0, 0, 0}},
/* b9 */ {instr_mov_bx_2, "mov", {0, 0, 0, II_IMM, 0, 0, 0, 0}},
/* ba */ {instr_mov_bx_2, "mov", {0, 0, 0, II_IMM, 0, 0, 0, 0}},
/* bb */ {instr_mov_bx_2, "mov", {0, 0, 0, II_IMM, 0, 0, 0, 0}},
/* bc */ {instr_mov_bx_2, "mov", {0, 0, 0, II_IMM, 0, 0, 0, 0}},
/* bd */ {instr_mov_bx_2, "mov", {0, 0, 0, II_IMM, 0, 0, 0, 0}},
/* be */ {instr_mov_bx_2, "mov", {0, 0, 0, II_IMM, 0, 0, 0, 0}},
/* bf */ {instr_mov_bx_2, "mov", {0, 0, 0, II_IMM, 0, 0, 0, 0}},
/* c0 */ {instr_group_2_c0, "group2", {0, 0, II_MOD_YYY_RM, II_IMM8, 0, 0, 0, 0}},
/* c1 */ {instr_group_2_c1, "group2", {0, 0, II_MOD_YYY_RM, II_IMM8, 0, 0, 0, 0}},
/* c2 */ {instr_ret_c2, "ret", {0, 0, 0, II_IMM16, 0, 0, 0, 0}},
/* c3 */ {instr_ret_c3, "ret", {0, 0, 0, 0, 0, 0, 0, 0}},
/* c4 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* c5 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* c6 */ {instr_mov_c6, "mov", {0, 0, II_MOD_REG_RM, II_IMM8, 0, 0, 0, 0}},
/* c7 */ {instr_mov_c7, "mov", {0, 0, II_MOD_REG_RM, II_IMM, 0, 0, 0, 0}},
/* c8 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* c9 */ {instr_leave, "leave", {0, 0, 0, 0, 0, 0, 0, 0}},
/* ca */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* cb */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* cc */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* cd */ {instr_int_cd, "int", {0, 0, 0, II_IMM8, 0, 0, 0, 0}},
/* ce */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* cf */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* d0 */ {instr_group_2_d0, "group2", {0, 0, II_MOD_YYY_RM, 0, 0, 0, 0, 0}},
/* d1 */ {instr_group_2_d1, "group2", {0, 0, II_MOD_YYY_RM, 0, 0, 0, 0, 0}},
/* d2 */ {instr_group_2_d2, "group2", {0, 0, II_MOD_YYY_RM, 0, 0, 0, 0, 0}},
/* d3 */ {instr_group_2_d3, "group2", {0, 0, II_MOD_YYY_RM, 0, 0, 0, 0, 0}},
/* d4 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* d5 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* d6 */ {instr_salc_d6, "salc", {0, 0, 0, 0, 0, 0, 0, 0}},
/* d7 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* d8 */ {instr_esc_fpu_dx, 0, {0, 0, 0, 0, 0, 0, 0, II_FPU_INSTR}},
/* d9 */ {instr_esc_fpu_dx, 0, {0, 0, 0, 0, 0, 0, 0, II_FPU_INSTR}},
/* da */ {instr_esc_fpu_dx, 0, {0, 0, 0, 0, 0, 0, 0, II_FPU_INSTR}},
/* db */ {instr_esc_fpu_dx, 0, {0, 0, 0, 0, 0, 0, 0, II_FPU_INSTR}},
/* dc */ {instr_esc_fpu_dx, 0, {0, 0, 0, 0, 0, 0, 0, II_FPU_INSTR}},
/* dd */ {instr_esc_fpu_dx, 0, {0, 0, 0, 0, 0, 0, 0, II_FPU_INSTR}},
/* de */ {instr_esc_fpu_dx, 0, {0, 0, 0, 0, 0, 0, 0, II_FPU_INSTR}},
/* df */ {instr_esc_fpu_dx, 0, {0, 0, 0, 0, 0, 0, 0, II_FPU_INSTR}},
/* e0 */ {instr_loopcc_e0, "loopcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* e1 */ {instr_loopcc_e1, "loopcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* e2 */ {instr_loop_e2 , "loop", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* e3 */ {instr_jcc_e3, "jcc", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* e4 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* e5 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* e6 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* e7 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* e8 */ {instr_call_e8, "call", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* e9 */ {instr_jmp_e9, "jmp", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* ea */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* eb */ {instr_jmp_eb, "jmp", {0, 0, 0, 0, II_DISP8, 0, 0, 0}},
/* ec */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* ed */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* ee */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* ef */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* f0 */ {prefix_fn, "LOCK:", {0, 0, 0, 0, 0, 0, 0, 0}},
/* f1 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* f2 */ {prefix_fn, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* f3 */ {prefix_fn, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* f4 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* f5 */ {instr_cmc_f5, "cmc", {0, 0, 0, 0, 0, 0, 0, 0}},
/* f6 */ {instr_group_3_f6, "group3", {0, 0, II_MOD_REG_RM, 0, 0, 0, 1, 0}},
/* f7 */ {instr_group_3_f7, "group3", {0, 0, II_MOD_REG_RM, 0, 0, 0, 1, 0}},
/* f8 */ {instr_clc_f8, "clc", {0, 0, 0, 0, 0, 0, 0, 0}},
/* f9 */ {instr_stc_f9, "stc", {0, 0, 0, 0, 0, 0, 0, 0}},
/* fa */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* fb */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* fc */ {instr_cld_fc, "cld", {0, 0, 0, 0, 0, 0, 0, 0}},
/* fd */ {instr_std_fd, "std", {0, 0, 0, 0, 0, 0, 0, 0}},
/* fe */ {instr_group_4_fe, "group4", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* ff */ {instr_group_5_ff, "group5", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
};
struct emu_cpu_instruction_info ii_twobyte[0x100] = {
/* 00 */ {instr_sldt_0f00, "sldt", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* 01 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 02 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 03 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 04 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 05 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 06 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 07 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 08 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 09 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 0a */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 0b */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 0c */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 0d */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 0e */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 0f */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 10 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 11 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 12 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 13 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 14 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 15 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 16 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 17 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 18 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 19 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 1a */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 1b */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 1c */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 1d */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 1e */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 1f */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 20 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 21 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 22 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 23 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 24 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 25 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 26 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 27 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 28 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 29 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 2a */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 2b */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 2c */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 2d */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 2e */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 2f */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 30 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 31 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 32 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 33 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 34 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 35 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 36 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 37 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 38 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 39 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 3a */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 3b */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 3c */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 3d */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 3e */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 3f */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 40 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 41 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 42 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 43 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 44 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 45 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 46 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 47 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 48 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 49 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 4a */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 4b */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 4c */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 4d */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 4e */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 4f */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 50 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 51 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 52 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 53 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 54 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 55 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 56 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 57 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 58 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 59 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 5a */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 5b */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 5c */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 5d */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 5e */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 5f */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 60 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 61 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 62 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 63 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 64 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 65 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 66 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 67 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 68 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 69 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 6a */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 6b */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 6c */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 6d */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 6e */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 6f */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 70 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 71 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 72 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 73 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 74 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 75 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 76 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 77 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 78 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 79 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 7a */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 7b */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 7c */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 7d */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 7e */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 7f */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 80 */ {instr_jcc_0f80, "jcc", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* 81 */ {instr_jcc_0f81, "jcc", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* 82 */ {instr_jcc_0f82, "jcc", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* 83 */ {instr_jcc_0f83, "jcc", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* 84 */ {instr_jcc_0f84, "jcc", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* 85 */ {instr_jcc_0f85, "jcc", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* 86 */ {instr_jcc_0f86, "jcc", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* 87 */ {instr_jcc_0f87, "jcc", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* 88 */ {instr_jcc_0f88, "jcc", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* 89 */ {instr_jcc_0f89, "jcc", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* 8a */ {instr_jcc_0f8a, "jcc", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* 8b */ {instr_jcc_0f8b, "jcc", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* 8c */ {instr_jcc_0f8c, "jcc", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* 8d */ {instr_jcc_0f8d, "jcc", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* 8e */ {instr_jcc_0f8e, "jcc", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* 8f */ {instr_jcc_0f8f, "jcc", {0, 0, 0, 0, II_DISPF, 0, 0, 0}},
/* 90 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 91 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 92 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 93 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 94 */ {instr_setcc_0f94, "setz", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* 95 */ {instr_setcc_0f95, "setnz", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* 96 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 97 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 98 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 99 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 9a */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 9b */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 9c */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 9d */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 9e */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* 9f */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* a0 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* a1 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* a2 */ {instr_cpuid_0fa2, "cpuid", {0, 0, 0, 0, 0, 0, 0, 0}},
/* a3 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* a4 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* a5 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* a6 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* a7 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* a8 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* a9 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* aa */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* ab */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* ac */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* ad */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* ae */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* af */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* b0 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* b1 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* b2 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* b3 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* b4 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* b5 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* b6 */ {instr_movzx_0fb6, "movzx", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* b7 */ {instr_movzx_0fb7, "movzx", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* b8 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* b9 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* ba */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* bb */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* bc */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* bd */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* be */ {instr_movsx_0fbe, "movsx", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* bf */ {instr_movsx_0fbf, "movsx", {0, 0, II_MOD_REG_RM, 0, 0, 0, 0, 0}},
/* c0 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* c1 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* c2 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* c3 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* c4 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* c5 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* c6 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* c7 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* c8 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* c9 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* ca */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* cb */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* cc */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* cd */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* ce */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* cf */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* d0 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* d1 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* d2 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* d3 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* d4 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* d5 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* d6 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* d7 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* d8 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* d9 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* da */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* db */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* dc */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* dd */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* de */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* df */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* e0 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* e1 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* e2 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* e3 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* e4 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* e5 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* e6 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* e7 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* e8 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* e9 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* ea */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* eb */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* ec */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* ed */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* ee */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* ef */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* f0 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* f1 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* f2 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* f3 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* f4 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* f5 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* f6 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* f7 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* f8 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* f9 */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* fa */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* fb */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* fc */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* fd */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* fe */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
/* ff */ {0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
};
#endif
================================================
FILE: include/emu/emu_cpu_stack.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef EMU_CPU_STACK_H_
#define EMU_CPU_STACK_H_
#define PUSH_DWORD(cpu, arg) \
{ \
uint32_t pushme; \
bcopy(&(arg), &pushme, 4); \
if (cpu->reg[esp] < 4) \
{ \
emu_errno_set((cpu)->emu, ENOMEM); \
emu_strerror_set((cpu)->emu, \
"ran out of stack space writing a dword\n"); \
return -1; \
} \
cpu->reg[esp]-=4; \
{ \
int32_t memret = emu_memory_write_dword(cpu->mem, cpu->reg[esp], pushme); \
if (memret != 0) \
return memret; \
} \
}
#define PUSH_WORD(cpu, arg) \
{ \
uint16_t pushme; \
bcopy(&(arg), &pushme, 2); \
if (cpu->reg[esp] < 2) \
{ \
emu_errno_set((cpu)->emu, ENOMEM); \
emu_strerror_set((cpu)->emu, \
"ran out of stack space writing a word\n"); \
return -1; \
} \
cpu->reg[esp]-=2; \
{ \
int32_t memret = emu_memory_write_word(cpu->mem, cpu->reg[esp], pushme);\
if (memret != 0) \
return memret; \
} \
}
#define PUSH_BYTE(cpu, arg) \
{ \
uint8_t pushme = arg; \
if (cpu->reg[esp] < 1) \
{ \
emu_errno_set((cpu)->emu, ENOMEM); \
emu_strerror_set((cpu)->emu, \
"ran out of stack space writing a byte\n"); \
return -1; \
} \
cpu->reg[esp]-=1; \
{ \
int32_t memret = emu_memory_write_byte(cpu->mem, cpu->reg[esp], pushme); \
if (memret != 0) \
return memret; \
} \
}
#define POP_DWORD(cpu, dst_p) \
{ int32_t ret = emu_memory_read_dword(cpu->mem, cpu->reg[esp], dst_p); \
if( ret != 0 ) \
return ret; \
else \
if ( dst_p != &cpu->reg[esp] ) \
cpu->reg[esp] += 4; }
#define POP_WORD(cpu, dst_p) \
{ int32_t ret = emu_memory_read_word(cpu->mem, cpu->reg[esp], dst_p); \
if( ret != 0 ) \
return ret; \
else \
cpu->reg[esp] += 2; }
#define POP_BYTE(cpu, dst_p) \
{ int32_t ret = emu_memory_read_byte(cpu->mem, cpu->reg[esp], dst_p); \
if( ret != 0 ) \
return ret; \
else \
cpu->reg[esp] += 1; }
#endif /*EMU_CPU_STACK_H_*/
================================================
FILE: include/emu/emu_fpu_instruction.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef HAVE_EMU_FPU_INSTRUCTION_H
#define HAVE_EMU_FPU_INSTRUCTION_H
#define FPU_MOD(fpu) (fpu[1] >> 6)
#define FPU_RM(fpu) (fpu[1] & 7)
#define FPU_MF(fpu) ((fpu[0] >> 1) & 3)
struct emu_fpu_instruction
{
uint16_t prefixes;
uint8_t fpu_data[2]; /* TODO: split into correct fields */
uint32_t ea;
uint32_t last_instr;
};
#endif
================================================
FILE: include/emu/emu_getpc.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#include <stdint.h>
/**
*
* @param e
* @param data
* @param size
* @param offset
*
* @return 1 for getpc via call or fnstenv
* 2 for mov withing fs: segment
*/
uint8_t emu_getpc_check(struct emu *e, uint8_t *data, uint32_t size, uint32_t offset);
================================================
FILE: include/emu/emu_graph.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include "emu/emu_list.h"
struct emu_vertex;
header_list_typedefs(emu_edge_root,emu_edge,emu_edge_link);
/**
* The edge connects two vertexes.
*
* The following fields of a emu_vertex are to your own purpose:
* - data, attach your own data.
*
* @see emu_vertex
* @see emu_graph
*/
struct emu_edge
{
struct emu_vertex *destination;
emu_edge_link link;
uint32_t count;
void *data;
};
header_list_functions(emu_edges,emu_edge_root, emu_edge, link);
struct emu_edge *emu_edge_new(void);
void emu_edge_free(struct emu_edge *ee);
header_list_typedefs(emu_vertex_root,emu_vertex,emu_vertex_link);
header_list_functions(emu_vertexes,emu_vertex_root, emu_vertex, link);
enum emu_color { black, blue, cyan, green, grey, magenta, red, white, yellow };
/**
* The vertex is a vertex in a graph.
* It can have edges to other vertexes,
* and has backedges from the vertexes where it has edges too.
* The following fields of the emu_vertex are for your own purposes:
* - color, usefull for bfs & dfs
* - distance, usefull for distance measurement
* - data, attach your own data
*
* @see emu_edge
* @see emu_graph
*/
struct emu_vertex
{
void *data;
emu_edge_root *edges;
emu_vertex_link link;
enum emu_color color;
emu_edge_root *backedges;
uint32_t backlinks;
uint32_t distance;
};
struct emu_vertex *emu_vertex_new(void);
void emu_vertex_free(struct emu_vertex *ev);
void emu_vertex_data_set(struct emu_vertex *ev, void *data);
void *emu_vertex_data_get(struct emu_vertex *ev);
struct emu_edge *emu_vertex_edge_add(struct emu_vertex *ev, struct emu_vertex *to);
typedef void (*emu_graph_destructor)(void *data);
struct emu_graph
{
emu_vertex_root *vertexes;
emu_graph_destructor vertex_destructor;
};
struct emu_graph *emu_graph_new(void);
void emu_graph_free(struct emu_graph *eg);
void emu_graph_vertex_add(struct emu_graph *eg, struct emu_vertex *ev);
bool emu_graph_path_exists(struct emu_graph *eg, struct emu_vertex *from, struct emu_vertex *to);
bool emu_graph_loop_detect(struct emu_graph *eg, struct emu_vertex *from);
int32_t emu_graph_distance(struct emu_graph *eg, struct emu_vertex *from, struct emu_vertex *to);
================================================
FILE: include/emu/emu_hashtable.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef EMU_HASHTABLE_H
#define EMU_HASHTABLE_H
#include <stdint.h>
#include <emu/emu_list.h>
/**
* The emu_hashtable_item stores the key/value pair.
*
* @see emu_hashtable
* @see emu_hashtable_bucket_item
*/
struct emu_hashtable_item
{
void *key;
void *value;
};
typedef bool (*emu_hashtable_cmp_cb)(void *a, void *b);
typedef uint32_t (*emu_hashtable_hash_cb)(void *key);
typedef void (*emu_hashtable_destructor)(void *data);
header_list_typedefs(emu_hashtable_bucket_item_root,emu_hashtable_bucket_item,emu_hashtable_bucket_link);
struct emu_hashtable_bucket_item
{
struct emu_hashtable_item item;
emu_hashtable_bucket_link link;
};
header_list_functions(emu_hashtable_bucket_items,emu_hashtable_bucket_item_root, emu_hashtable_bucket_item, link);
struct emu_hashtable_bucket_item *emu_hashtable_bucket_item_new(void *key, void *value);
void emu_hashtable_bucket_item_free(struct emu_hashtable_bucket_item *ehbi);
struct emu_hashtable_bucket
{
emu_hashtable_bucket_item_root *items;
};
struct emu_hashtable_bucket *emu_hashtable_bucket_new(void);
void emu_hashtable_bucket_free(struct emu_hashtable_bucket *ehb);
void emu_hashtable_bucket_item_add(struct emu_hashtable_bucket *ehb, struct emu_hashtable_bucket_item *ehbi);
/**
* the hashtable
*
* @see emu_hashtable_new
* @see emu_hashtable_free
* @see emu_hashtable_insert
* @see emu_hashtable_delete
* @see emu_hashtable_search
*/
struct emu_hashtable
{
uint32_t size;
uint32_t filled;
uint32_t item_count;
struct emu_hashtable_bucket **buckets;
emu_hashtable_hash_cb hash;
emu_hashtable_cmp_cb cmp;
emu_hashtable_destructor key_destructor;
emu_hashtable_destructor value_destructor;
};
/**
* Create a bucket hashtable
* Due to the problems of double hashing when it comes to deleting
* elements we choose bucket hashtables.
* If used wrong, as slow als linked lists, if used right, as fast as a
* real (doublehash) hashtable.
*
* @param size the size
* @param hash pointer to the hash function
* @param cmp pointer to the compare function
*
* @return on success, pointer to the hashtable
* on failure, NULL
*/
struct emu_hashtable *emu_hashtable_new(uint32_t size,
emu_hashtable_hash_cb hash,
emu_hashtable_cmp_cb cmp);
/**
* Free the hashtable,
* if the emu_hashtable_destructors key_/value_destructor
* within the emu_hashtable are set, freeing the hashtable will free the
* data too, if not, only the hashtable itself is free'd.
*
* @param eh the hashtable
*/
void emu_hashtable_free(struct emu_hashtable *eh);
/**
* Search the hashtable for a key
*
* @param eh the hashtable
* @param key the key to look for
*
* @return on success, pointer to the emu_hashtable_item holding the data
* on failure (key not found), NULL
*/
struct emu_hashtable_item *emu_hashtable_search(struct emu_hashtable *eh, void *key);
/**
* Insert a key/data pair into the hashtable
*
* @param eh the hashtable
* @param key the key
* @param data the data
*
* @return on success: pointer to the emu_hashtable_item
* on failure: NULL
*/
struct emu_hashtable_item *emu_hashtable_insert(struct emu_hashtable *eh, void *key, void *data);
/**
* delete a key/data pair from the hashtable
*
* @param eh the hashtable
* @param key the key to the key/data pair to remove
*
* @return on success: true
* on failure: false
*/
bool emu_hashtable_delete(struct emu_hashtable *eh, void *key);
uint32_t emu_hashtable_string_hash(void *data);
bool emu_hashtable_string_cmp(void *a, void *b);
uint32_t emu_hashtable_ptr_hash(void *data);
bool emu_hashtable_ptr_cmp(void *a, void *b);
#endif // EMU_HASHTABLE_H
================================================
FILE: include/emu/emu_instruction.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef EMU_INSTRUCTION_H
#define EMU_INSTRUCTION_H
#include <emu/emu_cpu_instruction.h>
#include <emu/emu_fpu_instruction.h>
#include "emu/emu_track.h"
/**
* The emu_instruction is the dummy struct for fpu/cpu instructions
* The track & source information is used to
* create the static instruction graph and run the binary
* backwards traversal.
*
* @see emu_tracking_info
*/
struct emu_instruction
{
uint16_t prefixes;
uint8_t opc;
uint8_t is_fpu : 1;
union
{
struct emu_cpu_instruction cpu;
struct emu_fpu_instruction fpu;
};
struct
{
struct emu_tracking_info init;
struct emu_tracking_info need;
} track;
struct
{
uint8_t has_cond_pos : 1;
uint32_t norm_pos;
uint32_t cond_pos;
} source;
};
#endif
================================================
FILE: include/emu/emu_list.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef HAVE_EMU_LIST_H
#define HAVE_EMU_LIST_H
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdint.h>
/* credit http://dotat.at/prog/lists/list.h
* $Copyright: (C) 2001, 2002 Tony Finch <dot@dotat.at> $
*/
#define xalloc malloc
#define xfree(ptr, size) free(ptr)
#define list__magic(ptr, t_src, src_field, t_dst, dst_field) \
((t_dst *)( (char *)(ptr) \
+ offsetof(t_src, src_field) \
- offsetof(t_dst, dst_field) ))
#define header_list_types(root_tag, elem_tag, link_tag) \
\
struct link_tag { struct elem_tag *next, *prev; }; \
struct root_tag { struct link_tag head, tail; }; \
\
struct list__hack
#define header_list_typedefs(t_root, t_elem, t_link) \
\
header_list_types(t_root, t_elem, t_link); \
\
typedef struct t_root t_root; \
typedef struct t_elem t_elem; \
typedef struct t_link t_link; \
\
struct list__hack
#define header_list_functions(name, t_root, t_elem, link) \
\
/* internal pointer magic utilities */ \
/* static inline */ t_elem *name##__head2elem(t_root *root); \
/* static inline */ t_elem *name##__tail2elem(t_root *root); \
/* static inline */ t_root *name##__elem2head(t_elem *elem); \
/* static inline */ t_root *name##__elem2tail(t_elem *elem); \
\
/* initializers */ \
/* static inline */ void name##_init(t_root *root); \
/* static inline */ void name##_init_link(t_elem *elem); \
\
/* accessor functions */ \
/* static inline */ t_elem *name##_first(t_root *root); \
/* static inline */ t_elem *name##_last(t_root *root); \
/* static inline */ t_elem *name##_next(t_elem *elem); \
/* static inline */ t_elem *name##_prev(t_elem *elem); \
\
/* predicates */ \
/* static inline */ bool name##_empty(t_root *root); \
/* static inline */ bool name##_iselem(t_elem *elem); \
/* static inline */ bool name##_ishead(t_elem *elem); \
/* static inline */ bool name##_istail(t_elem *elem); \
/* static inline */ bool name##_isunlinked(t_elem *elem); \
\
/* faster but less safe predicates for looping */ \
/* static inline */ bool name##_athead(t_elem *elem); \
/* static inline */ bool name##_attail(t_elem *elem); \
\
/* slightly more complicated predicates */ \
/* static inline */ bool name##_isfirst(t_elem *elem); \
/* static inline */ bool name##_islast(t_elem *elem); \
\
/* internal list manipulation */ \
/* static inline */ void name##__splice_before(t_elem *elem, t_elem *newX0, t_elem *newXN); \
/* static inline */ void name##__splice_after(t_elem *elem, t_elem *newX0, t_elem *newXN); \
/* static inline */ void name##__unsplice(t_elem *old0, t_elem *oldN); \
\
/* single element manipulation */ \
/* static inline */ void name##_insert_before(t_elem *elem, t_elem *newX); \
/* static inline */ void name##_insert_after(t_elem *elem, t_elem *newX); \
/* static inline */ void name##_insert_first(t_root *root, t_elem *newX); \
/* static inline */ void name##_insert_last(t_root *root, t_elem *newX); \
/* static inline */ void name##_remove(t_elem *elem); \
/* static inline */ t_elem *name##_remove_first(t_root *root); \
/* static inline */ t_elem *name##_remove_last(t_root *root); \
/* static inline */ void name##_remove_next(t_elem *elem); \
/* static inline */ void name##_remove_prev(t_elem *elem); \
\
/* concatenation etc. */ \
/* static inline */ void name##_concat(t_root *dst, t_root *src); \
\
/* safe magic for the user */ \
/* static inline */ t_root *name##_getroot(t_elem *elem); \
\
/* looping operations */ \
/* static inline */ t_root *name##_findroot_fwd(t_elem *elem); \
/* static inline */ t_root *name##_findroot_rev(t_elem *elem); \
/* static inline */ int name##_length(t_root *root); \
/* static */ void name##_qsort_r(t_root *root, void *arg, int (*cmp)(void *, t_elem *, t_elem *)); \
/* static */ int name##_qsort_cmp(void *a, t_elem *e1, t_elem *e2); \
/* static inline */ void name##_qsort(t_root *root, int (*cmp)(t_elem *, t_elem *)); \
/* static inline */ t_root *name##_create(void); \
/* static inline */ void name##_destroy(t_root *root); \
struct list__hack
/*!
* \brief Define a list's operations.
*
* \param name The name of the list
* (written NAME in the function documentation).
* \param t_root The name of the type of the list's root.
* \param t_elem The name of the type of the list's elements.
* \param link The name of the link structure in each element.
*
* \hideinitializer
*/
#define source_list_functions(name, t_root, t_elem, link) \
\
/* internal pointer magic utilities */ \
/* static inline */ t_elem *name##__head2elem(t_root *root) { \
return(list__magic(root, t_root, head, t_elem, link)); \
} \
/* static inline */ t_elem *name##__tail2elem(t_root *root) { \
return(list__magic(root, t_root, tail, t_elem, link)); \
} \
/* static inline */ t_root *name##__elem2head(t_elem *elem) { \
return(list__magic(elem, t_elem, link, t_root, head)); \
} \
/* static inline */ t_root *name##__elem2tail(t_elem *elem) { \
return(list__magic(elem, t_elem, link, t_root, tail)); \
} \
\
/* initializers */ \
/* static inline */ void name##_init(t_root *root) { \
root->head.next = name##__tail2elem(root); \
root->head.prev = root->tail.next = NULL; \
root->tail.prev = name##__head2elem(root); \
} \
/* static inline */ void name##_init_link(t_elem *elem) { \
elem->link.next = elem->link.prev = NULL; \
} \
\
/* accessor functions */ \
/* static inline */ t_elem *name##_first(t_root *root) { \
return(root->head.next); \
} \
/* static inline */ t_elem *name##_last(t_root *root) { \
return(root->tail.prev); \
} \
/* static inline */ t_elem *name##_next(t_elem *elem) { \
return(elem->link.next); \
} \
/* static inline */ t_elem *name##_prev(t_elem *elem) { \
return(elem->link.prev); \
} \
\
/* predicates */ \
/* static inline */ bool name##_empty(t_root *root) { \
return(root->head.next->link.next == NULL); \
} \
/* static inline */ bool name##_iselem(t_elem *elem) { \
return(elem->link.next != NULL && elem->link.prev != NULL); \
} \
/* static inline */ bool name##_ishead(t_elem *elem) { \
return(elem->link.next != NULL && elem->link.prev == NULL); \
} \
/* static inline */ bool name##_istail(t_elem *elem) { \
return(elem->link.next == NULL && elem->link.prev != NULL); \
} \
/* static inline */ bool name##_isunlinked(t_elem *elem) { \
return(elem->link.next == NULL && elem->link.prev == NULL); \
} \
/* faster but less safe predicates for looping */ \
/* static inline */ bool name##_athead(t_elem *elem) { \
return(elem->link.prev == NULL); \
} \
/* static inline */ bool name##_attail(t_elem *elem) { \
return(elem->link.next == NULL); \
} \
/* slightly more complicated predicates */ \
/* static inline */ bool name##_isfirst(t_elem *elem) { \
return(name##_athead(name##_prev(elem))); \
} \
/* static inline */ bool name##_islast(t_elem *elem) { \
return(name##_attail(name##_next(elem))); \
} \
\
/* internal list manipulation */ \
/* static inline */ void name##__splice_before \
(t_elem *elem, t_elem *newX0, t_elem *newXN) { \
newX0->link.prev = elem->link.prev; \
newXN->link.next = elem; \
elem->link.prev->link.next = newX0; \
elem->link.prev = newXN; \
} \
/* static inline */ void name##__splice_after \
(t_elem *elem, t_elem *newX0, t_elem *newXN) { \
newXN->link.next = elem->link.next; \
newX0->link.prev = elem; \
elem->link.next->link.prev = newXN; \
elem->link.next = newX0; \
} \
/* static inline */ void name##__unsplice(t_elem *old0, t_elem *oldN) { \
old0->link.prev->link.next = oldN->link.next; \
oldN->link.next->link.prev = old0->link.prev; \
} \
\
/* single element manipulation */ \
/* static inline */ void name##_insert_before(t_elem *elem, t_elem *newX) { \
name##__splice_before(elem, newX, newX); \
} \
/* static inline */ void name##_insert_after(t_elem *elem, t_elem *newX) { \
name##__splice_after(elem, newX, newX); \
} \
/* static inline */ void name##_insert_first(t_root *root, t_elem *newX) { \
name##_insert_before(root->head.next, newX); \
/* or name##_insert_after(name##__head2elem(root), newX); */ \
} \
/* static inline */ void name##_insert_last(t_root *root, t_elem *newX) { \
name##_insert_after(root->tail.prev, newX); \
/* or name##_insert_before(name##__tail2elem(root), newX); */ \
} \
/* static inline */ void name##_remove(t_elem *elem) { \
name##__unsplice(elem, elem); \
name##_init_link(elem); \
} \
/* static inline */ t_elem *name##_remove_first(t_root *root) { \
t_elem *elem = name##_first(root); \
if(name##_attail(elem)) return(NULL); \
name##_remove(elem); \
return(elem); \
} \
/* static inline */ t_elem *name##_remove_last(t_root *root) { \
t_elem *elem = name##_last(root); \
if(name##_athead(elem)) return(NULL); \
name##_remove(elem); \
return(elem); \
} \
/* static inline */ void name##_remove_next(t_elem *elem) { \
elem = name##_next(elem); \
if(!name##_attail(elem)) name##_remove(elem); \
} \
/* static inline */ void name##_remove_prev(t_elem *elem) { \
elem = name##_prev(elem); \
if(!name##_athead(elem)) name##_remove(elem); \
} \
\
/* concatenation etc. */ \
/* static inline */ void name##_concat(t_root *dst, t_root *src) { \
t_elem *elem0 = name##_first(src); \
t_elem *elemN = name##_last(src); \
if(name##_attail(elem0)) return; \
name##__unsplice(elem0, elemN); \
name##__splice_after(dst->tail.prev, elem0, elemN); \
} \
\
/* safe magic for the user */ \
/* static inline */ t_root *name##_getroot(t_elem *elem) { \
if(name##_ishead(elem)) return(name##__elem2head(elem)); \
if(name##_istail(elem)) return(name##__elem2tail(elem)); \
return(NULL); \
} \
\
/* looping operations */ \
/* static inline */ t_root *name##_findroot_fwd(t_elem *elem) { \
while(!name##_attail(elem)) \
elem = name##_next(elem); \
return(name##__elem2tail(elem)); \
} \
/* static inline */ t_root *name##_findroot_rev(t_elem *elem) { \
while(!name##_athead(elem)) \
elem = name##_prev(elem); \
return(name##__elem2head(elem)); \
} \
/* static inline */ int name##_length(t_root *root) { \
t_elem *elem; int i; \
for(elem = name##_first(root), i = 0; \
!name##_attail(elem); \
elem = name##_next(elem), i++); \
return(i); \
} \
/* static */ void name##_qsort_r(t_root *root, void *arg, \
int (*cmp)(void *, t_elem *, t_elem *)) { \
t_elem *pivot, *elem; \
t_root one, two, three; \
int c; \
\
name##_init(&one); \
name##_init(&two); \
name##_init(&three); \
\
pivot = name##_remove_first(root); \
if(pivot == NULL) return; \
name##_insert_last(&two, pivot); \
\
while(elem = name##_remove_first(root), elem != NULL) { \
c = cmp(arg, pivot, elem); \
if(c > 0) \
name##_insert_last(&one, elem); \
else \
if(c < 0) \
name##_insert_last(&three, elem); \
else \
name##_insert_last(&two, elem); \
} \
name##_qsort_r(&one, arg, cmp); \
name##_qsort_r(&three, arg, cmp); \
name##_concat(root, &one); \
name##_concat(root, &two); \
name##_concat(root, &three); \
} \
/* static */ int name##_qsort_cmp(void *a, t_elem *e1, t_elem *e2) { \
/* function pointers can't be portably cast to void pointers */ \
int (**arg)(t_elem *, t_elem *) = a; \
int (*cmp)(t_elem *, t_elem *) = *arg; \
return(cmp(e1,e2)); \
} \
/* static inline */ void name##_qsort \
(t_root *root, int (*cmp)(t_elem *, t_elem *)) { \
name##_qsort_r(root, &cmp, name##_qsort_cmp); \
} \
\
/* memory handling */ \
/* static inline */ t_root *name##_create(void) { \
t_root *root = xalloc(sizeof(*root)); \
name##_init(root); \
return(root); \
} \
/* static inline */ void name##_destroy(t_root *root) { \
t_elem *elem; \
if(root == NULL) return; \
while(elem = name##_remove_first(root), elem != NULL) \
xfree(elem, sizeof(*elem)); \
xfree(root, sizeof(*root)); \
} \
\
struct list__hack
/* emu_list_* */
header_list_typedefs(emu_list_root,emu_list_item,emu_list_link);
struct emu_list_item
{
union
{
void *data;
uint32_t uint32;
int32_t int32;
char *str;
};
emu_list_link link;
};
header_list_functions(emu_list, emu_list_root, emu_list_item, link);
struct emu_list_item *emu_list_item_create(void);
#endif // HAVE_EMU_LIST_H
================================================
FILE: include/emu/emu_log.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef HAVE_EMU_LOG_H
#define HAVE_EMU_LOG_H
struct emu;
enum emu_log_level
{
EMU_LOG_NONE,
EMU_LOG_INFO,
EMU_LOG_DEBUG
};
typedef void (*emu_log_logcb)(struct emu *e, enum emu_log_level level, const char *msg);
struct emu_logging *emu_log_new(void);
void emu_log_free(struct emu_logging *el);
void emu_log_level_set(struct emu_logging *el, enum emu_log_level level);
void emu_log(struct emu *e, enum emu_log_level level, const char *format, ...);
void emu_log_set_logcb(struct emu_logging *el, emu_log_logcb logcb);
void emu_log_default_logcb(struct emu *e, enum emu_log_level level, const char *msg);
#define logInfo(e, format...) emu_log(e, EMU_LOG_INFO, format)
#ifdef DEBUG
#define logDebug(e, format...) emu_log(e, EMU_LOG_DEBUG, format)
#else
#define logDebug(e, format...)
#endif // DEBUG
#define logPF(e) logDebug(e, "in <%s> %s:%i>\n", __PRETTY_FUNCTION__, __FILE__, __LINE__)
#endif // HAVE_EMU_LOG_H
================================================
FILE: include/emu/emu_memory.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef HAVE_EMU_MEMORY_H
#define HAVE_EMU_MEMORY_H
#include <inttypes.h>
#include <sys/types.h>
enum emu_segment {
s_cs = 0, s_ss, s_ds, s_es, s_fs, s_gs
};
struct emu;
struct emu_memory;
struct emu_string;
struct emu_breakpoint;
struct emu_memory *emu_memory_new(struct emu *e);
void emu_memory_clear(struct emu_memory *em);
void emu_memory_free(struct emu_memory *em);
/* read access, these functions return -1 on error */
int32_t emu_memory_read_byte(struct emu_memory *m, uint32_t addr, uint8_t *byte);
int32_t emu_memory_read_word(struct emu_memory *m, uint32_t addr, uint16_t *word);
int32_t emu_memory_read_dword(struct emu_memory *m, uint32_t addr, uint32_t *dword);
int32_t emu_memory_read_block(struct emu_memory *m, uint32_t addr, void *dest, size_t len);
int32_t emu_memory_read_string(struct emu_memory *m, uint32_t addr, struct emu_string *s, uint32_t maxsize);
/* write access */
int32_t emu_memory_write_byte(struct emu_memory *m, uint32_t addr, uint8_t byte);
int32_t emu_memory_write_word(struct emu_memory *m, uint32_t addr, uint16_t word);
int32_t emu_memory_write_dword(struct emu_memory *m, uint32_t addr, uint32_t dword);
int32_t emu_memory_write_block(struct emu_memory *m, uint32_t addr, const void *src, size_t len);
/* segment selection */
void emu_memory_segment_select(struct emu_memory *m, enum emu_segment s);
enum emu_segment emu_memory_segment_get(struct emu_memory *m);
/* alloc */
int32_t emu_memory_alloc(struct emu_memory *m, uint32_t *addr, size_t len);
/*int32_t emu_memory_alloc_at(struct emu_memory *m, uint32_t addr, size_t len);*/
/* information */
uint32_t emu_memory_get_usage(struct emu_memory *m);
void emu_memory_mode_ro(struct emu_memory *m);
void emu_memory_mode_rw(struct emu_memory *m);
struct emu_breakpoint *emu_memory_get_breakpoint(struct emu_memory *m);
struct emu *emu_memory_get_emu(struct emu_memory *m);
#define MEM_BYTE_READ(cpu_p, addr, data_p) \
{ int32_t ret = emu_memory_read_byte((cpu_p)->mem, addr, data_p); \
if( ret != 0 ) \
return ret; }
#define MEM_BYTE_WRITE(cpu_p, addr, data) \
{ int32_t ret = emu_memory_write_byte((cpu_p)->mem, addr, data); \
if( ret != 0 ) \
return ret; }
#define MEM_WORD_READ(cpu_p, addr, data_p) \
{ int32_t ret = emu_memory_read_word((cpu_p)->mem, addr, data_p); \
if( ret != 0 ) \
return ret; }
#define MEM_WORD_WRITE(cpu_p, addr, data) \
{ uint16_t val; \
bcopy(&(data), &val, 2); \
int32_t ret = emu_memory_write_word((cpu_p)->mem, addr, val); \
if( ret != 0 ) \
return ret; }
#define MEM_DWORD_READ(cpu_p, addr, data_p) \
{ int32_t ret = emu_memory_read_dword((cpu_p)->mem, addr, data_p); \
if( ret != 0 ) \
return ret; }
#define MEM_DWORD_WRITE(cpu_p, addr, data) \
{ uint32_t val; \
bcopy(&(data), &val, 4); \
int32_t ret = emu_memory_write_dword((cpu_p)->mem, addr, val); \
if( ret != 0 ) \
return ret; }
#endif // HAVE_EMU_MEMORY_H
================================================
FILE: include/emu/emu_queue.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef HAVE_EMU_QUEUE_H
#define HAVE_EMU_QUEUE_H
struct emu_queue_item
{
struct emu_queue_item *next;
void *data;
};
struct emu_queue_item *emu_queue_item_new(void);
void emu_queue_item_free(struct emu_queue_item *eqi);
struct emu_queue
{
struct emu_queue_item *front;
struct emu_queue_item *back;
};
/**
* Create a new queue
*
* @return on success: pointer to the new queue
* on failure: NULL
*/
struct emu_queue *emu_queue_new(void);
void emu_queue_free(struct emu_queue *eq);
/**
* Retrieve the pointer to the first element
*
* @param eq the queue
*
* @return returns the pointer to the first element
*/
void *emu_queue_front(struct emu_queue *eq);
/**
* Enqueue data into the queue.
*
* @param eq the queue
* @param data the data to enqueue
*/
void emu_queue_enqueue(struct emu_queue *eq, void *data);
/**
* Dequeue the first element from the queue
*
* @param eq the queue
*
* @return pointer to the data of the first element
*/
void *emu_queue_dequeue(struct emu_queue *eq);
/**
* Check if the queue is empty
*
* @param eq the queue
*
* @return true if the queue is empty, else false
*/
bool emu_queue_empty(struct emu_queue *eq);
#endif
================================================
FILE: include/emu/emu_shellcode.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef HAVE_EMU_SHELLCODE_H
#define HAVE_EMU_SHELLCODE_H
#include <stdint.h>
struct emu;
/**
* Tests a given buffer for possible shellcodes
*
* @param e the emu
* @param data the buffer to test
* @param size the size of the buffer
*
* @return on success, the offset within the buffer where the shellcode is suspected
* on failure (no shellcode detected), -1
*/
int32_t emu_shellcode_test(struct emu *e, uint8_t *data, uint16_t size);
struct emu_stats
{
uint32_t eip;
struct
{
uint32_t read_access;
uint32_t write_access;
} memory;
struct
{
uint32_t steps;
}cpu;
};
struct emu_stats *emu_stats_new(void);
void emu_stats_free(struct emu_stats *es);
#endif
================================================
FILE: include/emu/emu_source.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef HAVE_EMU_SOURCE_H
#define HAVE_EMU_SOURCE_H
struct emu_track_and_source;
struct emu_vertex;
/**
* Create the callgraph of the shellcode being stored in the emu memory.
*
* @param e the emu
* @param es the emu_source_and_track struct which stores the graph
* @param datastart where to start
* @param datasize where to stop
*
* @return
*/
uint32_t emu_source_instruction_graph_create(struct emu *e, struct emu_track_and_source *es, uint32_t datastart, uint32_t datasize);
void emu_source_forward_bfs(struct emu_track_and_source *et, struct emu_vertex *from);
void emu_source_backward_bfs(struct emu_track_and_source *et, struct emu_vertex *ev);
#endif
================================================
FILE: include/emu/emu_stack.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2008 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef HAVE_EMU_STACK_H
#define HAVE_EMU_STACK_H
struct emu_stack_item
{
struct emu_stack_item *next;
void *data;
};
struct emu_stack
{
struct emu_stack_item *front;
struct emu_stack_item *back;
};
struct emu_stack *emu_stack_new(void);
void emu_stack_free(struct emu_stack *es);
void *emu_stack_front(struct emu_stack *es);
void emu_stack_push(struct emu_stack *es, void *data);
void *emu_stack_pop(struct emu_stack *es);
bool emu_stack_empty(struct emu_stack *es);
#endif
================================================
FILE: include/emu/emu_string.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef HAVE_EMU_STRING_H
#define HAVE_EMU_STRING_H
#include <inttypes.h>
#include <sys/types.h>
/**
* The struct used for the string implementation.
*/
struct emu_string
{
uint32_t size;
void *data;
uint32_t allocated;
};
/**
* Create a new, empty string.
*
* @return on success, pointer to the new and empty string, on failure NULL
*/
struct emu_string *emu_string_new(void);
/**
* Free the string, free the bytes which got allocated.
*
* @param s the string to free
*/
void emu_string_free(struct emu_string *s);
/**
* cast the string to char *
*
* @param s the string
*
* @return char * of the string
*/
char *emu_string_char(struct emu_string *s);
/**
* append the string by some data
*
* @param s the string
* @param data the data to append
*/
void emu_string_append_char(struct emu_string *s, const char *data);
/**
* append the string by some formatted string
*
* @param s the string
* @param format the format
*/
void emu_string_append_format(struct emu_string *s, const char *format, ...);
#endif
================================================
FILE: include/emu/emu_track.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef HAVE_EMU_TRACK_H
#define HAVE_EMU_TRACK_H
#include <stdint.h>
#include <stdbool.h>
struct emu;
struct emu_cpu;
struct emu_graph;
struct emu_instruction;
/**
* The emu_tracking_info struct is used within the
* binary backwards traversal.
* The required informations about which registers
* need to get initialized are stored in the struct together with the
* eip value where we need to start searching.
*
* @see emu_shellcode_run_and_track
* @see emu_source_and_track_instr_info
*/
struct emu_tracking_info
{
uint32_t eip;
uint32_t eflags;
uint32_t reg[8];
uint8_t fpu:1; // used to store the last_instruction information required for fnstenv
};
/**
* The emu_source_and_track_instr_info struct stores the register/fpu
* tracking information as well as the source information
* for a instruction.
* Additionally the disassembly of the instruction can be stored
* for debugging purposes.
*
* @see emu_shellcode_run_and_track
*/
struct emu_source_and_track_instr_info
{
uint32_t eip;
char *instrstring;
struct
{
struct emu_tracking_info init;
struct emu_tracking_info need;
} track;
struct
{
uint8_t has_cond_pos : 1;
uint32_t norm_pos;
uint32_t cond_pos;
} source;
};
struct emu_source_and_track_instr_info *emu_source_and_track_instr_info_new(struct emu_cpu *cpu, uint32_t eip_before_instruction);
void emu_source_and_track_instr_info_free(struct emu_source_and_track_instr_info *esantii);
void emu_source_and_track_instr_info_free_void(void *x);
bool emu_source_and_track_instr_info_cmp(void *a, void *b);
uint32_t emu_source_and_track_instr_info_hash(void *key);
struct emu_track_and_source
{
struct emu_tracking_info track;
struct emu_graph *static_instr_graph;
struct emu_hashtable *static_instr_table;
struct emu_graph *run_instr_graph;
struct emu_hashtable *run_instr_table;
};
struct emu_track_and_source *emu_track_and_source_new(void);
void emu_track_and_source_free(struct emu_track_and_source *et);
int32_t emu_track_instruction_check(struct emu *e, struct emu_track_and_source *et);
struct emu_tracking_info *emu_tracking_info_new(void);
void emu_tracking_info_free(struct emu_tracking_info *eti);
void emu_tracking_info_clear(struct emu_tracking_info *eti);
/**
* Calculate the logic difference between two instruction_infos
* and store the result.
*
* @param a
* @param b
* @param result
*/
void emu_tracking_info_diff(struct emu_tracking_info *a, struct emu_tracking_info *b, struct emu_tracking_info *result);
void emu_tracking_info_copy(struct emu_tracking_info *from, struct emu_tracking_info *to);
/**
* Check if a instruction can satisfy
* the requirements of another instruction.
*
* @param a
* @param b
*
* @return returns true if a covers the requirements of b
* else false
*/
bool emu_tracking_info_covers(struct emu_tracking_info *a, struct emu_tracking_info *b);
void emu_tracking_info_debug_print(struct emu_tracking_info *a);
#endif
================================================
FILE: include/emu/environment/Makefile.am
================================================
# $Id$
AUTOMAKE_OPTIONS = foreign
SUBDIRS = win32 linux
includedir = $(prefix)/include/emu/environment
include_HEADERS = emu_profile.h emu_env.h
================================================
FILE: include/emu/environment/emu_env.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2008 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
struct emu_env_linux;
struct emu_env_linux_syscall;
struct emu_env_w32;
struct emu_env_w32_dll_export;
/*
typedef void *(*new_env)(struct emu *e);
typedef void (*free_env)(void *env);
typedef int32_t (*env_hook)(void *env, const char *syscallname,
int (*userhook)(void *env, void *syscall, ...),
void *userdata);
typedef int32_t (*env_pre_check)(void *env);
typedef int32_t (*env_post_check)(void *env);
struct env_helper
{
void *env;
void *(*new_env)(struct emu *e);
void (*free_env)(void *env);
int32_t (*env_hook)(void *env, const char *syscallname,
int (*userhook)(void *env, void *syscall, ...),
void *userdata);
int32_t (*env_pre_check)(void *env);
int32_t (*env_post_check)(void *env);
};
struct env_helper envs[] =
{
{
NULL,
(new_env)emu_env_w32_new,
(free_env)emu_env_w32_free,
(env_hook)NULL,
(env_pre_check) NULL,
(env_post_check) NULL
},
{
NULL,
(new_env)emu_env_linux_new,
(free_env)emu_env_linux_free,
(env_hook)emu_env_linux_syscall_hook,
(env_pre_check) NULL,
(env_post_check) NULL
}
};
*/
enum emu_env_type
{
emu_env_type_win32,
emu_env_type_linux,
};
struct emu_env_hook
{
enum emu_env_type type;
union
{
struct emu_env_w32_dll_export *win;
struct emu_env_linux_syscall *lin;
} hook;
};
struct emu_env
{
struct
{
struct emu_env_w32 *win;
struct emu_env_linux *lin;
} env;
struct emu *emu;
// struct env_helper *envs;
struct emu_profile *profile;
void *userdata;
};
struct emu_env *emu_env_new(struct emu *e);
void emu_env_free(struct emu_env *env);
================================================
FILE: include/emu/environment/emu_profile.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2008 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "emu/emu_list.h"
#include "emu/emu_stack.h"
#ifndef HAVE_EMU_PROFILE_H
#define HAVE_EMU_PROFILE_H
enum emu_profile_argument_render
{
render_none,
render_ptr,
render_int,
render_short,
render_struct,
render_string,
render_bytea,
render_ip,
render_port,
render_array
};
header_list_typedefs(emu_profile_argument_root,emu_profile_argument,emu_profile_argument_link);
struct emu_profile_argument
{
enum emu_profile_argument_render render;
char *argname;
char *argtype;
union
{
int32_t tint;
int16_t tshort;
char *tchar;
struct
{
unsigned char *data;
uint32_t size;
} bytea;
struct
{
emu_profile_argument_root *arguments;
} tstruct;
struct
{
struct emu_profile_argument *ptr;
uint32_t addr;
}tptr;
} value;
emu_profile_argument_link link;
};
header_list_functions(emu_profile_arguments,emu_profile_argument_root, emu_profile_argument, link);
header_list_typedefs(emu_profile_function_root,emu_profile_function,emu_profile_function_link);
struct emu_profile_function
{
enum emu_profile_argument_render retval;
char *fnname;
emu_profile_argument_root *arguments;
emu_profile_function_link link;
struct emu_profile_argument *return_value;
};
header_list_functions(emu_profile_functions,emu_profile_function_root, emu_profile_function, link);
struct emu_profile
{
emu_profile_function_root *functions;
struct emu_stack *argument_stack;
struct emu_profile_argument *last_ref;
};
struct emu_profile *emu_profile_new(void);
void emu_profile_free(struct emu_profile *profile);
struct emu_profile_function *emu_profile_function_new(void);
void emu_profile_function_free(struct emu_profile_function *function);
struct emu_profile_argument *emu_profile_argument_new(enum emu_profile_argument_render render, const char *type, const char *name);
void emu_profile_argument_free(struct emu_profile_argument *argument);
void emu_profile_debug(struct emu_profile *profile);
int emu_profile_dump(struct emu_profile *profile, const char *path);
int emu_profile_parse(struct emu_profile *profile, const char *path);
void emu_profile_function_debug(struct emu_profile_function *function);
void emu_profile_argument_debug(struct emu_profile_argument *argument, int indent);
void emu_profile_argument_add_none(struct emu_profile *profile);
void emu_profile_argument_add_int(struct emu_profile *profile, char *argtype, char *argname, int32_t value);
void emu_profile_argument_add_short(struct emu_profile *profile, char *argtype, char *argname, int16_t value);
void emu_profile_argument_add_string(struct emu_profile *profile, char *argtype, char *argname, char *value);
void emu_profile_argument_add_ptr(struct emu_profile *profile, char *argtype, char *argname, uint32_t value);
void emu_profile_argument_add_ip(struct emu_profile *profile, char *argtype, char *argname, uint32_t value);
void emu_profile_argument_add_port(struct emu_profile *profile, char *argtype, char *argname, uint32_t value);
void emu_profile_argument_add_bytea(struct emu_profile *profile, char *argtype, char *argname, unsigned char *data, uint32_t size);
void emu_profile_argument_array_start(struct emu_profile* profile, const char* arraytype, const char* arrayname);
void emu_profile_argument_array_end(struct emu_profile *profile);
void emu_profile_function_add(struct emu_profile *profile, char *fnname);
void emu_profile_argument_struct_start(struct emu_profile* profile, const char* structtype, const char* structname);
void emu_profile_argument_struct_end(struct emu_profile *profile);
void emu_profile_function_returnvalue_int_set(struct emu_profile *profile, const char *type, int value);
void emu_profile_function_returnvalue_ptr_set(struct emu_profile *profile, const char *type, int value);
void *emu_profile_function_argument_get(struct emu_profile_function *function, int argc);
void emu_profile_argument_add_sockaddr_ptr(struct emu_profile *profile, const char *name, uint32_t ptr, struct sockaddr sa);
#endif
================================================
FILE: include/emu/environment/linux/Makefile.am
================================================
# $Id$
includedir = $(prefix)/include/emu/environment/linux
include_HEADERS = emu_env_linux.h
include_HEADERS += env_linux_syscalls.h
include_HEADERS += env_linux_syscall_hooks.h
================================================
FILE: include/emu/environment/linux/emu_env_linux.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#ifndef HAVE_EMU_ENV_LINUX_H
#define HAVE_EMU_ENV_LINUX_H
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "emu/emu.h"
#include "emu/emu_cpu.h"
#include "emu/emu_cpu_data.h"
#include "emu/emu_memory.h"
#include "emu/emu_hashtable.h"
struct emu_profile;
struct emu_env;
struct emu_env_linux
{
struct emu *emu;
struct emu_hashtable *syscall_hooks_by_name;
struct emu_env_linux_syscall *syscall_hookx;
struct emu_env_hook *hooks;
// struct emu_profile *profile;
};
struct emu_env_linux *emu_env_linux_new(struct emu *e);
void emu_env_linux_free(struct emu_env_linux *eel);
struct emu_env_hook *emu_env_linux_syscall_check(struct emu_env *env);
struct emu_env_linux_syscall_entry
{
const char *name;
const char *(*fnhook)(struct emu_env_linux *env);
};
typedef uint32_t (*userhook)(struct emu_env_linux *env, struct emu_env_linux_syscall *syscall, ...);
struct emu_env_linux_syscall
{
const char *name;
int32_t (*fnhook)(struct emu_env *env, struct emu_env_hook *hook);
void *userdata;
uint32_t (*userhook)(struct emu_env *env, struct emu_env_hook *hook, ...);
};
int32_t emu_env_linux_syscall_hook(struct emu_env *env, const char *syscallname,
uint32_t (*userhook)(struct emu_env *env, struct emu_env_hook *hook, ...),
void *userdata);
const char *env_linux_socketcall(struct emu_env_linux *env);
#endif
================================================
FILE: include/emu/environment/linux/env_linux_syscall_hooks.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
/* 1 exit */
int32_t env_linux_hook_exit(struct emu_env *env, struct emu_env_hook *hook);
/* 2 fork */
int32_t env_linux_hook_fork(struct emu_env *env, struct emu_env_hook *hook);
/* 11 execve */
int32_t env_linux_hook_execve(struct emu_env *env, struct emu_env_hook *hook);
/* 15 chmod */
int32_t env_linux_hook_chmod(struct emu_env *env, struct emu_env_hook *hook);
/* 63 dup2 */
int32_t env_linux_hook_dup2(struct emu_env *env, struct emu_env_hook *hook);
/* 102 socketcall */
/*
accept
bind
connect
getpeername - missing
getsockname - missing
getsockopt - missing
listen
recv - missing
recvfrom - missing
recvmsg - missing
send - missing
sendmsg - missing
sendto - missing
setsockopt - missing
shutdown - missing
socket
socketpair - missing
*/
int32_t env_linux_hook_socketcall(struct emu_env *env, struct emu_env_hook *hook);
================================================
FILE: include/emu/environment/linux/env_linux_syscalls.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C) 2007 Paul Baecher & Markus Koetter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* contact nepenthesdev@users.sourceforge.net
*
*******************************************************************************/
#include "emu/environment/linux/emu_env_linux.h"
#include "emu/environment/linux/env_linux_syscall_hooks.h"
struct emu_env_linux_syscall_entry env_linux_syscalls[] =
{
/* 0*/ { NULL , NULL},
/* 1*/ { "exit" , NULL},
/* 2*/ { "fork" , NULL},
/* 3*/ { "read" , NULL},
/* 4*/ { "write" , NULL},
/* 5*/ { "open" , NULL},
/* 6*/ { "close" , NULL},
/* 7*/ { "waitpid" , NULL},
/* 8*/ { "creat" , NULL},
/* 9*/ { "link" , NULL},
/* 10*/ { "unlink" , NULL},
/* 11*/ { "execve" , NULL},
/* 12*/ { "chdir" , NULL},
/* 13*/ { "time" , NULL},
/* 14*/ { "mknod" , NULL},
/* 15*/ { "chmod" , NULL},
/* 16*/ { "lchown" , NULL},
/* 17*/ { NULL , NULL},
/* 18*/ { "stat" , NULL},
/* 19*/ { "lseek" , NULL},
/* 20*/ { "getpid" , NULL},
/* 21*/ { "mount" , NULL},
/* 22*/ { "oldumount" , NULL},
/* 23*/ { "setuid" , NULL},
/* 24*/ { "getuid" , NULL},
/* 25*/ { "stime" , NULL},
/* 26*/ { "ptrace" , NULL},
/* 27*/ { "alarm" , NULL},
/* 28*/ { "fstat" , NULL},
/* 29*/ { "pause" , NULL},
/* 30*/ { "utime" , NULL},
/* 31*/ { NULL , NULL},
/* 32*/ { NULL , NULL},
/* 33*/ { "access" , NULL},
/* 34*/ { "nice" , NULL},
/* 35*/ { NULL , NULL},
/* 36*/ { "sync" , NULL},
/* 37*/ { "kill" , NULL},
/* 38*/ { "rename" , NULL},
/* 39*/ { "mkdir" , NULL},
/* 40*/ { "rmdir" , NULL},
/* 41*/ { "dup" , NULL},
/* 42*/ { "pipe" , NULL},
/* 43*/ { "times" , NULL},
/* 44*/ { NULL , NULL},
/* 45*/ { "brk" , NULL},
/* 46*/ { "setgid" , NULL},
/* 47*/ { "getgid" , NULL},
/* 48*/ { "signal" , NULL},
/* 49*/ { "geteuid" , NULL},
/* 50*/ { "getegid" , NULL},
/* 51*/ { "acct" , NULL},
/* 52*/ { "umount" , NULL},
/* 53*/ { NULL , NULL},
/* 54*/ { "ioctl" , NULL},
/* 55*/ { "fcntl" , NULL},
/* 56*/ { NULL , NULL},
/* 57*/ { "setpgid" , NULL},
/* 58*/ { NULL , NULL},
/* 59*/ { "olduname" , NULL},
/* 60*/ { "umask" , NULL},
/* 61*/ { "chroot" , NULL},
/* 62*/ { "ustat" , NULL},
/* 63*/ { "dup2" , NULL},
/* 64*/ { "getppid" , NULL},
/* 65*/ { "getpgrp" , NULL},
/* 66*/ { "setsid" , NULL},
/* 67*/ { "sigaction" , NULL},
/* 68*/ { "sgetmask" , NULL},
/* 69*/ { "ssetmask" , NULL},
/* 70*/ { "setreuid" , NULL},
/* 71*/ { "setregid" , NULL},
/* 72*/ { "sigsuspend" , NULL},
/* 73*/ { "sigpending" , NULL},
/* 74*/ { "sethostname" , NULL},
/* 75*/ { "setrlimit" , NULL},
/* 76*/ { "getrlimit" , NULL},
/* 77*/ { "getrusage" , NULL},
/* 78*/ { "gettimeofday" , NULL},
/* 79*/ { "settimeofday" , NULL},
/* 80*/ { "getgroups" , NULL},
/* 81*/ { "setgroups" , NULL},
/* 82*/ { "old_select" , NULL},
/* 83*/ { "symlink" , NULL},
/* 84*/ { "lstat" , NULL},
/* 85*/ { "readlink" , NULL},
/* 86*/ { "uselib" , NULL},
/* 87*/ { "swapon" , NULL},
/* 88*/ { "reboot" , NULL},
/* 89*/ { "old_readdir" , NULL},
/* 90*/ { "old_mmap" , NULL},
/* 91*/ { "munmap" , NULL},
/* 92*/ { "truncate" , NULL},
/* 93*/ { "ftruncate" , NULL},
/* 94*/ { "fchmod" , NULL},
/* 95*/ { "fchown" , NULL},
/* 96*/ { "getpriority" , NULL},
/* 97*/ { "setpriority" , NULL},
/* 98*/ { NULL , NULL},
/* 99*/ { "statfs" , NULL},
/* 100*/ { "fstatfs" , NULL},
/* 101*/ { "ioperm" , NULL},
/* 102*/ { NULL , env_linux_socketcall},
/* 103*/ { "syslog" , NULL},
/* 104*/ { "setitimer" , NULL},
/* 105*/ { "getitimer" , NULL},
/* 106*/ { "newstat" , NULL},
/* 107*/ { "newlstat" , NULL},
/* 108*/ { "newfstat" , NULL},
/* 109*/ { "uname" , NULL},
/* 110*/ { "iopl" , NULL},
/* 111*/ { "vhangup" , NULL},
/* 112*/ { "idle" , NULL},
/* 113*/ { "vm86old" , NULL},
/* 114*/ { "wait4" , NULL},
/* 115*/ { "swapoff" , NULL},
/* 116*/ { "sysinfo" , NULL},
/* 117*/ { "ipc" , NULL},
/* 118*/ { "fsync" , NULL},
/* 119*/ { "sigreturn" , NULL},
/* 120*/ { "clone" , NULL},
/* 121*/ { "setdomainname" , NULL},
/* 122*/ { "newuname" , NULL},
/* 123*/ { "modify_ldt" , NULL},
/* 124*/ { "adjtimex" , NULL},
/* 125*/ { "mprotect" , NULL},
/* 126*/ { "sigprocmask" , NULL},
/* 127*/ { "create_module" , NULL},
/* 128*/ { "init_module" , NULL},
/* 129*/ { "delete_module" , NULL},
/* 130*/ { "get_kernel_syms" , NULL},
/* 131*/ { "quotactl" , NULL},
/* 132*/ { "getpgid" , NULL},
/* 133*/ { "fchdir" , NULL},
/* 134*/ { "bdflush" , NULL},
/* 135*/ { "sysfs" , NULL},
/* 136*/ { "personality" , NULL},
/* 137*/ { NULL , NULL},
/* 138*/ { "setfsuid" , NULL},
/* 139*/ { "setfsgid" , NULL},
/* 140*/ { "llseek" , NULL},
/* 141*/ { "getdents" , NULL},
/* 142*/ { "select" , NULL},
/* 143*/ { "flock" , NULL},
/* 144*/ { "msync" , NULL},
/* 145*/ { "readv" , NULL},
/* 146*/ { "writev" , NULL},
/* 147*/ { "getsid" , NULL},
/* 148*/ { "fdatasync" , NULL},
/* 149*/ { "sysctl" , NULL},
/* 150*/ { "mlock" , NULL},
/* 151*/ { "munlock" , NULL},
/* 152*/ { "mlockall" , NULL},
/* 153*/ { "munlockall" , NULL},
/* 154*/ { "sched_setparam" , NULL},
/* 155*/ { "sched_getparam" , NULL},
/* 156*/ { "sched_setscheduler" , NULL},
/* 157*/ { "sched_getscheduler" , NULL},
/* 158*/ { "sched_yield" , NULL},
/* 159*/ { "sched_get_priority_max" , NULL},
/* 160*/ { "sched_get_priority_min" , NULL},
/* 161*/ { "sched_rr_get_interval" , NULL},
/* 162*/ { "nanosleep" , NULL},
/* 163*/ { "mremap" , NULL},
/* 164*/ { "setresuid" , NULL},
/* 165*/ { "getresuid" , NULL},
/* 166*/ { "vm86" , NULL},
/* 167*/ { "query_module" , NULL},
/* 168*/ { "poll" , NULL},
/* 169*/ { "nfsservctl" , NULL},
/* 170*/ { "setresgid" , NULL},
/* 171*/ { "getresgid" , NULL},
/* 172*/ { "prctl" , NULL},
/* 173*/ { "rt_sigreturn" , NULL},
/* 174*/ { "rt_sigaction" , NULL},
/* 175*/ { "rt_sigprocmask" , NULL},
/* 176*/ { "rt_sigpending" , NULL},
/* 177*/ { "rt_sigtimedwait" , NULL},
/* 178*/ { "rt_sigqueueinfo" , NULL},
/* 179*/ { "rt_sigsuspend" , NULL},
/* 180*/ { "pread" , NULL},
/* 181*/ { "pwrite" , NULL},
/* 182*/ { "chown" , NULL},
/* 183*/ { "getcwd" , NULL},
/* 184*/ { "capget" , NULL},
/* 185*/ { "capset" , NULL},
/* 186*/ { "sigaltstack" , NULL},
/* 187*/ { "sendfile" , NULL},
/* 188*/ { NULL , NULL},
/* 189*/ { NULL , NULL},
/* 190*/ { "vfork" , NULL},
};
struct emu_env_linux_syscall syscall_hooks[] =
{
{ "accept" , env_linux_hook_socketcall},
{ "access" , NULL},
{ "acct" , NULL},
{ "adjtimex" , NULL},
{ "alarm" , NULL},
{ "bdflush" , NULL},
{ "bind" , env_linux_hook_socketcall},
{ "brk" , NULL},
{ "capget" , NULL},
{ "capset" , NULL},
{ "chdir" , NULL},
{ "chmod" , env_linux_hook_chmod},
{ "chown" , NULL},
{ "chroot" , NULL},
{ "clone" , NULL},
{ "close" , NULL},
{ "connect" , env_linux_hook_socketcall},
{ "creat" , NULL},
{ "create_module" , NULL},
{ "delete_module" , NULL},
{ "dup" , NULL},
{ "dup2" , env_linux_hook_dup2},
{ "execve" , env_linux_hook_execve},
{ "exit" , env_linux_hook_exit},
{ "fchdir" , NULL},
{ "fchmod" , NULL},
{ "fchown" , NULL},
{ "fcntl" , NULL},
{ "fdatasync" , NULL},
{ "flock" , NULL},
{ "fork" , env_linux_hook_fork},
{ "fstat" , NULL},
{ "fstatfs" , NULL},
{ "fsync" , NULL},
{ "ftruncate" , NULL},
{ "getcwd" , NULL},
{ "getdents" , NULL},
{ "getegid" , NULL},
{ "geteuid" , NULL},
{ "getgid" , NULL},
{ "getgroups" , NULL},
{ "getitimer" , NULL},
{ "get_kernel_syms" , NULL},
{ "getpeername" , env_linux_hook_socketcall},
{ "getpgid" , NULL},
{ "getpgrp" , NULL},
{ "getpid" , NULL},
{ "getppid" , NULL},
{ "getpriority" , NULL},
{ "getresgid" , NULL},
{ "getresuid" , NULL},
{ "getrlimit" , NULL},
{ "getrusage" , NULL},
{ "getsid" , NULL},
{ "getsockname" , env_linux_hook_socketcall},
{ "getsockopt" , env_linux_hook_socketcall},
{ "gettimeofday" , NULL},
{ "getuid" , NULL},
{ "idle" , NULL},
{ "init_module" , NULL},
{ "ioctl" , NULL},
{ "ioperm" , NULL},
{ "iopl" , NULL},
{ "ipc" , NULL},
{ "kill" , NULL},
{ "lchown" , NULL},
{ "link" , NULL},
{ "listen" , env_linux_hook_socketcall},
{ "llseek" , NULL},
{ "lseek" , NULL},
{ "lstat" , NULL},
{ "mkdir" , NULL},
{ "mknod" , NULL},
{ "mlock" , NULL},
{ "mlockall" , NULL},
{ "modify_ldt" , NULL},
{ "mount" , NULL},
{ "mprotect" , NULL},
{ "mremap" , NULL},
{ "msync" , NULL},
{ "munlock" , NULL},
{ "munlockall" , NULL},
{ "munmap" , NULL},
{ "nanosleep" , NULL},
{ "newfstat" , NULL},
{ "newlstat" , NULL},
{ "newstat" , NULL},
{ "newuname" , NULL},
{ "nfsservctl" , NULL},
{ "nice" , NULL},
{ "old_mmap" , NULL},
{ "old_readdir" , NULL},
{ "old_select" , NULL},
{ "oldumount" , NULL},
{ "olduname" , NULL},
{ "open" , NULL},
{ "pause" , NULL},
{ "personality" , NULL},
{ "pipe" , NULL},
{ "poll" , NULL},
{ "prctl" , NULL},
{ "pread" , NULL},
{ "ptrace" , NULL},
{ "pwrite" , NULL},
{ "query_module" , NULL},
{ "quotactl" , NULL},
{ "read" , NULL},
{ "readlink" , NULL},
{ "readv" , NULL},
{ "reboot" , NULL},
{ "recv" , env_linux_hook_socketcall},
{ "recvfrom" , env_linux_hook_socketcall},
{ "recvmsg" , env_linux_hook_socketcall},
{ "rename" , NULL},
{ "rmdir" , NULL},
{ "rt_sigaction" , NULL},
{ "rt_sigpending" , NULL},
{ "rt_sigprocmask" , NULL},
{ "rt_sigqueueinfo" , NULL},
{ "rt_sigreturn" , NULL},
{ "rt_sigsuspend" , NULL},
{ "rt_sigtimedwait" , NULL},
{ "sched_getparam" , NULL},
{ "sched_get_priority_max" , NULL},
{ "sched_get_priority_min" , NULL},
{ "sched_getscheduler" , NULL},
{ "sched_rr_get_interval" , NULL},
{ "sched_setparam" , NULL},
{ "sched_setscheduler" , NULL},
{ "sched_yield" , NULL},
{ "select" , NULL},
{ "send" , env_linux_hook_socketcall},
{ "sendfile" , NULL},
{ "sendmsg" , env_linux_hook_socketcall},
{ "sendto" , env_linux_hook_socketcall},
{ "setdomainname" , NULL},
{ "setfsgid" , NULL},
{ "setfsuid" , NULL},
{ "setgid" , NULL},
{ "setgroups" , NULL},
{ "sethostname" , NULL},
{ "setitimer" , NULL},
{ "setpgid" , NULL},
{ "setpriority" , NULL},
{ "setregid" , NULL},
{ "setresgid" , NULL},
{ "setresuid" , NULL},
{ "setreuid" , NULL},
{ "setrlimit" , NULL},
{ "setsid" , NULL},
{ "setsockopt" , NULL},
{ "settimeofday" , NULL},
{ "setuid" , NULL},
{ "sgetmask" , NULL},
{ "shutdown" , env_linux_hook_socketcall},
{ "sigaction" , NULL},
{ "sigaltstack" , NULL},
{ "signal" , NULL},
{ "sigpending" , NULL},
{ "sigprocmask" , NULL},
{ "sigreturn" , NULL},
{ "sigsuspend" , NULL},
{ "socket" , env_linux_hook_socketcall},
{ "socketpair" , env_linux_hook_socketcall},
{ "ssetmask" , NULL},
{ "stat" , NULL},
{ "statfs" , NULL},
{ "stime" , NULL},
{ "swapoff" , NULL},
{ "swapon" , NULL},
{ "symlink" , NULL},
{ "sync" , NULL},
{ "sysctl" , NULL},
{ "sysfs" , NULL},
{ "sysinfo" , NULL},
{ "syslog" , NULL},
{ "time" , NULL},
{ "times" , NULL},
{ "truncate" , NULL},
{ "umask" , NULL},
{ "umount" , NULL},
{ "uname" , NULL},
{ "unlink" , NULL},
{ "uselib" , NULL},
{ "ustat" , NULL},
{ "utime" , NULL},
{ "vfork" , NULL},
{ "vhangup" , NULL},
{ "vm86" , NULL},
{ "vm86old" , NULL},
{ "wait4" , NULL},
{ "waitpid" , NULL},
{ "write" , NULL},
{ "writev" , NULL},
};
================================================
FILE: include/emu/environment/win32/Makefile.am
================================================
# $Id$
includedir = $(prefix)/include/emu/environment/win32
include_HEADERS = emu_env_w32.h
include_HEADERS += emu_env_w32_dll.h
include_HEADERS += env_w32_dll_export_hooks.h
include_HEADERS += emu_env_w32_dll_export.h
include_HEADERS += env_w32_dll_export_kernel32_hooks.h
include_HEADERS += env_w32_dll_export_urlmon_hooks.h
include_HEADERS += env_w32_dll_export_ws2_32_hooks.h
include_HEADERS += env_w32_dll_export_msvcrt_hooks.h
include_HEADERS += env_w32_dll_export_shell32_hooks.h
include_HEADERS += env_w32_dll_export_shdocvw_hooks.h
================================================
FILE: include/emu/environment/win32/emu_env_w32.h
================================================
/********************************************************************************
* libemu
*
* - x86 shellcode emulation -
*
*
* Copyright (C)
gitextract_987r91e3/
├── .gitignore
├── AUTHORS
├── CHANGES
├── Makefile.am
├── README
├── bindings/
│ ├── Makefile.am
│ └── python/
│ ├── Makefile.am
│ ├── libemu_module.c
│ └── setup.py.in
├── configure.ac
├── debian/
│ ├── changelog
│ ├── compat
│ ├── control
│ ├── copyright
│ ├── docs
│ ├── files
│ ├── libemu-dev.install
│ ├── libemu.install
│ └── rules
├── doc/
│ ├── Makefile.am
│ └── libemu.3
├── include/
│ ├── Makefile.am
│ └── emu/
│ ├── Makefile.am
│ ├── emu.h
│ ├── emu_breakpoint.h
│ ├── emu_cpu.h
│ ├── emu_cpu_data.h
│ ├── emu_cpu_functions.h
│ ├── emu_cpu_instruction.h
│ ├── emu_cpu_itables.h
│ ├── emu_cpu_stack.h
│ ├── emu_fpu_instruction.h
│ ├── emu_getpc.h
│ ├── emu_graph.h
│ ├── emu_hashtable.h
│ ├── emu_instruction.h
│ ├── emu_list.h
│ ├── emu_log.h
│ ├── emu_memory.h
│ ├── emu_queue.h
│ ├── emu_shellcode.h
│ ├── emu_source.h
│ ├── emu_stack.h
│ ├── emu_string.h
│ ├── emu_track.h
│ └── environment/
│ ├── Makefile.am
│ ├── emu_env.h
│ ├── emu_profile.h
│ ├── linux/
│ │ ├── Makefile.am
│ │ ├── emu_env_linux.h
│ │ ├── env_linux_syscall_hooks.h
│ │ └── env_linux_syscalls.h
│ └── win32/
│ ├── Makefile.am
│ ├── emu_env_w32.h
│ ├── emu_env_w32_dll.h
│ ├── emu_env_w32_dll_export.h
│ ├── env_w32_dll_export_hooks.h
│ ├── env_w32_dll_export_kernel32_hooks.h
│ ├── env_w32_dll_export_msvcrt_hooks.h
│ ├── env_w32_dll_export_shdocvw_hooks.h
│ ├── env_w32_dll_export_shell32_hooks.h
│ ├── env_w32_dll_export_urlmon_hooks.h
│ └── env_w32_dll_export_ws2_32_hooks.h
├── libemu.doxy
├── libemu.pc.in
├── src/
│ ├── Makefile.am
│ ├── emu.c
│ ├── emu_breakpoint.c
│ ├── emu_cpu.c
│ ├── emu_cpu_data.c
│ ├── emu_getpc.c
│ ├── emu_graph.c
│ ├── emu_hashtable.c
│ ├── emu_list.c
│ ├── emu_log.c
│ ├── emu_memory.c
│ ├── emu_queue.c
│ ├── emu_shellcode.c
│ ├── emu_source.c
│ ├── emu_stack.c
│ ├── emu_string.c
│ ├── emu_track.c
│ ├── environment/
│ │ ├── emu_env.c
│ │ ├── emu_profile.c
│ │ ├── linux/
│ │ │ ├── emu_env_linux.c
│ │ │ └── env_linux_syscall_hooks.c
│ │ └── win32/
│ │ ├── dlls/
│ │ │ ├── advapi32dll.c
│ │ │ ├── kernel32dll.c
│ │ │ ├── msvcrtdll.c
│ │ │ ├── ntdll.c
│ │ │ ├── shdocvwdll.c
│ │ │ ├── shell32dll.c
│ │ │ ├── shlwapidll.c
│ │ │ ├── urlmondll.c
│ │ │ ├── user32dll.c
│ │ │ ├── wininetdll.c
│ │ │ └── ws2_32dll.c
│ │ ├── emu_env_w32.c
│ │ ├── emu_env_w32_dll.c
│ │ ├── emu_env_w32_dll_export.c
│ │ ├── env_w32_dll_export_kernel32_hooks.c
│ │ ├── env_w32_dll_export_msvcrt_hooks.c
│ │ ├── env_w32_dll_export_shdocvw_hooks.c
│ │ ├── env_w32_dll_export_shell32_hooks.c
│ │ ├── env_w32_dll_export_urlmon_hooks.c
│ │ └── env_w32_dll_export_ws2_32_hooks.c
│ ├── functions/
│ │ ├── Makefile.am
│ │ ├── aaa.c
│ │ ├── adc.c
│ │ ├── add.c
│ │ ├── and.c
│ │ ├── call.c
│ │ ├── cmp.c
│ │ ├── cmps.c
│ │ ├── dec.c
│ │ ├── div.c
│ │ ├── group_1.c
│ │ ├── group_10.c
│ │ ├── group_2.c
│ │ ├── group_3.c
│ │ ├── group_4.c
│ │ ├── group_5.c
│ │ ├── idiv.c
│ │ ├── imul.c
│ │ ├── inc.c
│ │ ├── int.c
│ │ ├── jcc.c
│ │ ├── jmp.c
│ │ ├── lodscc.c
│ │ ├── loopcc.c
│ │ ├── misc.c
│ │ ├── mov.c
│ │ ├── movsx.c
│ │ ├── movzx.c
│ │ ├── mul.c
│ │ ├── neg.c
│ │ ├── not.c
│ │ ├── or.c
│ │ ├── pop.c
│ │ ├── push.c
│ │ ├── rcl.c
│ │ ├── rcr.c
│ │ ├── repcc.c
│ │ ├── ret.c
│ │ ├── rol.c
│ │ ├── ror.c
│ │ ├── sal.c
│ │ ├── sar.c
│ │ ├── sbb.c
│ │ ├── scas.c
│ │ ├── shr.c
│ │ ├── stoscc.c
│ │ ├── sub.c
│ │ ├── test.c
│ │ ├── xchg.c
│ │ └── xor.c
│ ├── libdasm.c
│ ├── libdasm.h
│ └── opcode_tables.h
├── testsuite/
│ ├── Makefile.am
│ ├── cpu_run.c
│ ├── emunids.c
│ ├── hashtest.c
│ ├── instrtest.c
│ ├── instrtree.c
│ ├── main.c
│ ├── memtest.c
│ └── scprofiler.c
└── tools/
├── Makefile.am
└── sctest/
├── Makefile.am
├── dot.c
├── dot.h
├── nanny.c
├── nanny.h
├── options.h
├── sctestmain.c
├── tests.c
├── tests.h
├── userhooks.c
└── userhooks.h
SYMBOL INDEX (1959 symbols across 134 files)
FILE: bindings/python/libemu_module.c
type libemu_EmulatorObject (line 36) | typedef struct
function PyObject (line 45) | static PyObject * libemu_Emulator_new(PyTypeObject * type, PyObject * args,
function libemu_Emulator_dealloc (line 66) | static void libemu_Emulator_dealloc(libemu_EmulatorObject * self)
function PyObject (line 77) | static PyObject * libemu_Emulator_test(libemu_EmulatorObject * self,
function PyMODINIT_FUNC (line 152) | PyMODINIT_FUNC initlibemu()
FILE: include/emu/emu.h
type emu (line 43) | struct emu
type emu_logging (line 44) | struct emu_logging
type emu_cpu (line 45) | struct emu_cpu
type emu_fpu (line 46) | struct emu_fpu
type emu (line 55) | struct emu
type emu (line 62) | struct emu
type emu_memory (line 71) | struct emu_memory
type emu (line 71) | struct emu
type emu_logging (line 80) | struct emu_logging
type emu (line 80) | struct emu
type emu_cpu (line 89) | struct emu_cpu
type emu (line 89) | struct emu
type emu (line 97) | struct emu
type emu (line 106) | struct emu
type emu (line 114) | struct emu
type emu (line 123) | struct emu
FILE: include/emu/emu_breakpoint.h
type emu (line 34) | struct emu
type emu_memory (line 35) | struct emu_memory
type emu_breakpoint (line 36) | struct emu_breakpoint
type emu (line 44) | struct emu
type emu (line 45) | struct emu
type emu_breakpoint (line 48) | struct emu_breakpoint
type emu_memory (line 48) | struct emu_memory
type emu_breakpoint (line 49) | struct emu_breakpoint
type emu_memory (line 52) | struct emu_memory
type emu_memory (line 53) | struct emu_memory
type emu_breakpoint (line 54) | struct emu_breakpoint
type emu_memory (line 54) | struct emu_memory
type emu_memory (line 55) | struct emu_memory
type emu_memory (line 57) | struct emu_memory
FILE: include/emu/emu_cpu.h
type emu (line 33) | struct emu
type emu_cpu (line 34) | struct emu_cpu
type emu_reg32 (line 36) | enum emu_reg32 {
type emu_reg16 (line 41) | enum emu_reg16
type emu_reg8 (line 55) | enum emu_reg8
type emu_cpu (line 68) | struct emu_cpu
type emu (line 68) | struct emu
type emu_cpu (line 70) | struct emu_cpu
type emu_reg32 (line 70) | enum emu_reg32
type emu_cpu (line 71) | struct emu_cpu
type emu_reg32 (line 71) | enum emu_reg32
type emu_cpu (line 73) | struct emu_cpu
type emu_reg16 (line 73) | enum emu_reg16
type emu_cpu (line 74) | struct emu_cpu
type emu_reg16 (line 74) | enum emu_reg16
type emu_cpu (line 76) | struct emu_cpu
type emu_reg8 (line 76) | enum emu_reg8
type emu_cpu (line 77) | struct emu_cpu
type emu_reg8 (line 77) | enum emu_reg8
type emu_cpu (line 79) | struct emu_cpu
type emu_cpu (line 80) | struct emu_cpu
type emu_cpu (line 88) | struct emu_cpu
type emu_cpu (line 97) | struct emu_cpu
type emu_cpu (line 108) | struct emu_cpu
type emu_cpu (line 118) | struct emu_cpu
type emu_cpu (line 120) | struct emu_cpu
type emu_cpu (line 122) | struct emu_cpu
type emu_cpu (line 124) | struct emu_cpu
type emu_cpu (line 126) | struct emu_cpu
type emu_cpu (line 127) | struct emu_cpu
FILE: include/emu/emu_cpu_data.h
type emu_cpu_flag (line 39) | enum emu_cpu_flag {
type emu_track_and_source (line 49) | struct emu_track_and_source
type emu_cpu_debug_flag (line 57) | enum emu_cpu_debug_flag {
type emu_cpu (line 62) | struct emu_cpu
FILE: include/emu/emu_cpu_functions.h
type emu_cpu (line 33) | struct emu_cpu
type emu_cpu_instruction (line 33) | struct emu_cpu_instruction
type emu_cpu (line 34) | struct emu_cpu
type emu_cpu_instruction (line 34) | struct emu_cpu_instruction
type emu_cpu (line 35) | struct emu_cpu
type emu_cpu_instruction (line 35) | struct emu_cpu_instruction
type emu_cpu (line 38) | struct emu_cpu
type emu_cpu_instruction (line 38) | struct emu_cpu_instruction
type emu_cpu (line 39) | struct emu_cpu
type emu_cpu_instruction (line 39) | struct emu_cpu_instruction
type emu_cpu (line 40) | struct emu_cpu
type emu_cpu_instruction (line 40) | struct emu_cpu_instruction
type emu_cpu (line 41) | struct emu_cpu
type emu_cpu_instruction (line 41) | struct emu_cpu_instruction
type emu_cpu (line 42) | struct emu_cpu
type emu_cpu_instruction (line 42) | struct emu_cpu_instruction
type emu_cpu (line 43) | struct emu_cpu
type emu_cpu_instruction (line 43) | struct emu_cpu_instruction
type emu_cpu (line 46) | struct emu_cpu
type emu_cpu_instruction (line 46) | struct emu_cpu_instruction
type emu_cpu (line 47) | struct emu_cpu
type emu_cpu_instruction (line 47) | struct emu_cpu_instruction
type emu_cpu (line 48) | struct emu_cpu
type emu_cpu_instruction (line 48) | struct emu_cpu_instruction
type emu_cpu (line 49) | struct emu_cpu
type emu_cpu_instruction (line 49) | struct emu_cpu_instruction
type emu_cpu (line 50) | struct emu_cpu
type emu_cpu_instruction (line 50) | struct emu_cpu_instruction
type emu_cpu (line 51) | struct emu_cpu
type emu_cpu_instruction (line 51) | struct emu_cpu_instruction
type emu_cpu (line 55) | struct emu_cpu
type emu_cpu_instruction (line 55) | struct emu_cpu_instruction
type emu_cpu (line 56) | struct emu_cpu
type emu_cpu_instruction (line 56) | struct emu_cpu_instruction
type emu_cpu (line 57) | struct emu_cpu
type emu_cpu_instruction (line 57) | struct emu_cpu_instruction
type emu_cpu (line 58) | struct emu_cpu
type emu_cpu_instruction (line 58) | struct emu_cpu_instruction
type emu_cpu (line 59) | struct emu_cpu
type emu_cpu_instruction (line 59) | struct emu_cpu_instruction
type emu_cpu (line 60) | struct emu_cpu
type emu_cpu_instruction (line 60) | struct emu_cpu_instruction
type emu_cpu (line 63) | struct emu_cpu
type emu_cpu_instruction (line 63) | struct emu_cpu_instruction
type emu_cpu (line 64) | struct emu_cpu
type emu_cpu_instruction (line 64) | struct emu_cpu_instruction
type emu_cpu (line 65) | struct emu_cpu
type emu_cpu_instruction (line 65) | struct emu_cpu_instruction
type emu_cpu (line 66) | struct emu_cpu
type emu_cpu_instruction (line 66) | struct emu_cpu_instruction
type emu_cpu (line 67) | struct emu_cpu
type emu_cpu_instruction (line 67) | struct emu_cpu_instruction
type emu_cpu (line 68) | struct emu_cpu
type emu_cpu_instruction (line 68) | struct emu_cpu_instruction
type emu_cpu (line 72) | struct emu_cpu
type emu_cpu_instruction (line 72) | struct emu_cpu_instruction
type emu_cpu (line 73) | struct emu_cpu
type emu_cpu_instruction (line 73) | struct emu_cpu_instruction
type emu_cpu (line 74) | struct emu_cpu
type emu_cpu_instruction (line 74) | struct emu_cpu_instruction
type emu_cpu (line 75) | struct emu_cpu
type emu_cpu_instruction (line 75) | struct emu_cpu_instruction
type emu_cpu (line 76) | struct emu_cpu
type emu_cpu_instruction (line 76) | struct emu_cpu_instruction
type emu_cpu (line 77) | struct emu_cpu
type emu_cpu_instruction (line 77) | struct emu_cpu_instruction
type emu_cpu (line 80) | struct emu_cpu
type emu_cpu_instruction (line 80) | struct emu_cpu_instruction
type emu_cpu (line 81) | struct emu_cpu
type emu_cpu_instruction (line 81) | struct emu_cpu_instruction
type emu_cpu (line 82) | struct emu_cpu
type emu_cpu_instruction (line 82) | struct emu_cpu_instruction
type emu_cpu (line 83) | struct emu_cpu
type emu_cpu_instruction (line 83) | struct emu_cpu_instruction
type emu_cpu (line 84) | struct emu_cpu
type emu_cpu_instruction (line 84) | struct emu_cpu_instruction
type emu_cpu (line 85) | struct emu_cpu
type emu_cpu_instruction (line 85) | struct emu_cpu_instruction
type emu_cpu (line 89) | struct emu_cpu
type emu_cpu_instruction (line 89) | struct emu_cpu_instruction
type emu_cpu (line 90) | struct emu_cpu
type emu_cpu_instruction (line 90) | struct emu_cpu_instruction
type emu_cpu (line 91) | struct emu_cpu
type emu_cpu_instruction (line 91) | struct emu_cpu_instruction
type emu_cpu (line 92) | struct emu_cpu
type emu_cpu_instruction (line 92) | struct emu_cpu_instruction
type emu_cpu (line 93) | struct emu_cpu
type emu_cpu_instruction (line 93) | struct emu_cpu_instruction
type emu_cpu (line 94) | struct emu_cpu
type emu_cpu_instruction (line 94) | struct emu_cpu_instruction
type emu_cpu (line 97) | struct emu_cpu
type emu_cpu_instruction (line 97) | struct emu_cpu_instruction
type emu_cpu (line 98) | struct emu_cpu
type emu_cpu_instruction (line 98) | struct emu_cpu_instruction
type emu_cpu (line 99) | struct emu_cpu
type emu_cpu_instruction (line 99) | struct emu_cpu_instruction
type emu_cpu (line 100) | struct emu_cpu
type emu_cpu_instruction (line 100) | struct emu_cpu_instruction
type emu_cpu (line 101) | struct emu_cpu
type emu_cpu_instruction (line 101) | struct emu_cpu_instruction
type emu_cpu (line 102) | struct emu_cpu
type emu_cpu_instruction (line 102) | struct emu_cpu_instruction
type emu_cpu (line 105) | struct emu_cpu
type emu_cpu_instruction (line 105) | struct emu_cpu_instruction
type emu_cpu (line 106) | struct emu_cpu
type emu_cpu_instruction (line 106) | struct emu_cpu_instruction
type emu_cpu (line 107) | struct emu_cpu
type emu_cpu_instruction (line 107) | struct emu_cpu_instruction
type emu_cpu (line 108) | struct emu_cpu
type emu_cpu_instruction (line 108) | struct emu_cpu_instruction
type emu_cpu (line 109) | struct emu_cpu
type emu_cpu_instruction (line 109) | struct emu_cpu_instruction
type emu_cpu (line 110) | struct emu_cpu
type emu_cpu_instruction (line 110) | struct emu_cpu_instruction
type emu_cpu (line 111) | struct emu_cpu
type emu_cpu_instruction (line 111) | struct emu_cpu_instruction
type emu_cpu (line 112) | struct emu_cpu
type emu_cpu_instruction (line 112) | struct emu_cpu_instruction
type emu_cpu (line 113) | struct emu_cpu
type emu_cpu_instruction (line 113) | struct emu_cpu_instruction
type emu_cpu (line 115) | struct emu_cpu
type emu_cpu_instruction (line 115) | struct emu_cpu_instruction
type emu_cpu (line 116) | struct emu_cpu
type emu_cpu_instruction (line 116) | struct emu_cpu_instruction
type emu_cpu (line 117) | struct emu_cpu
type emu_cpu_instruction (line 117) | struct emu_cpu_instruction
type emu_cpu (line 118) | struct emu_cpu
type emu_cpu_instruction (line 118) | struct emu_cpu_instruction
type emu_cpu (line 119) | struct emu_cpu
type emu_cpu_instruction (line 119) | struct emu_cpu_instruction
type emu_cpu (line 120) | struct emu_cpu
type emu_cpu_instruction (line 120) | struct emu_cpu_instruction
type emu_cpu (line 121) | struct emu_cpu
type emu_cpu_instruction (line 121) | struct emu_cpu_instruction
type emu_cpu (line 122) | struct emu_cpu
type emu_cpu_instruction (line 122) | struct emu_cpu_instruction
type emu_cpu (line 123) | struct emu_cpu
type emu_cpu_instruction (line 123) | struct emu_cpu_instruction
type emu_cpu (line 125) | struct emu_cpu
type emu_cpu_instruction (line 125) | struct emu_cpu_instruction
type emu_cpu (line 126) | struct emu_cpu
type emu_cpu_instruction (line 126) | struct emu_cpu_instruction
type emu_cpu (line 127) | struct emu_cpu
type emu_cpu_instruction (line 127) | struct emu_cpu_instruction
type emu_cpu (line 128) | struct emu_cpu
type emu_cpu_instruction (line 128) | struct emu_cpu_instruction
type emu_cpu (line 129) | struct emu_cpu
type emu_cpu_instruction (line 129) | struct emu_cpu_instruction
type emu_cpu (line 130) | struct emu_cpu
type emu_cpu_instruction (line 130) | struct emu_cpu_instruction
type emu_cpu (line 131) | struct emu_cpu
type emu_cpu_instruction (line 131) | struct emu_cpu_instruction
type emu_cpu (line 132) | struct emu_cpu
type emu_cpu_instruction (line 132) | struct emu_cpu_instruction
type emu_cpu (line 133) | struct emu_cpu
type emu_cpu_instruction (line 133) | struct emu_cpu_instruction
type emu_cpu (line 136) | struct emu_cpu
type emu_cpu_instruction (line 136) | struct emu_cpu_instruction
type emu_cpu (line 137) | struct emu_cpu
type emu_cpu_instruction (line 137) | struct emu_cpu_instruction
type emu_cpu (line 138) | struct emu_cpu
type emu_cpu_instruction (line 138) | struct emu_cpu_instruction
type emu_cpu (line 139) | struct emu_cpu
type emu_cpu_instruction (line 139) | struct emu_cpu_instruction
type emu_cpu (line 140) | struct emu_cpu
type emu_cpu_instruction (line 140) | struct emu_cpu_instruction
type emu_cpu (line 141) | struct emu_cpu
type emu_cpu_instruction (line 141) | struct emu_cpu_instruction
type emu_cpu (line 142) | struct emu_cpu
type emu_cpu_instruction (line 142) | struct emu_cpu_instruction
type emu_cpu (line 143) | struct emu_cpu
type emu_cpu_instruction (line 143) | struct emu_cpu_instruction
type emu_cpu (line 144) | struct emu_cpu
type emu_cpu_instruction (line 144) | struct emu_cpu_instruction
type emu_cpu (line 146) | struct emu_cpu
type emu_cpu_instruction (line 146) | struct emu_cpu_instruction
type emu_cpu (line 147) | struct emu_cpu
type emu_cpu_instruction (line 147) | struct emu_cpu_instruction
type emu_cpu (line 148) | struct emu_cpu
type emu_cpu_instruction (line 148) | struct emu_cpu_instruction
type emu_cpu (line 149) | struct emu_cpu
type emu_cpu_instruction (line 149) | struct emu_cpu_instruction
type emu_cpu (line 150) | struct emu_cpu
type emu_cpu_instruction (line 150) | struct emu_cpu_instruction
type emu_cpu (line 151) | struct emu_cpu
type emu_cpu_instruction (line 151) | struct emu_cpu_instruction
type emu_cpu (line 152) | struct emu_cpu
type emu_cpu_instruction (line 152) | struct emu_cpu_instruction
type emu_cpu (line 153) | struct emu_cpu
type emu_cpu_instruction (line 153) | struct emu_cpu_instruction
type emu_cpu (line 154) | struct emu_cpu
type emu_cpu_instruction (line 154) | struct emu_cpu_instruction
type emu_cpu (line 157) | struct emu_cpu
type emu_cpu_instruction (line 157) | struct emu_cpu_instruction
type emu_cpu (line 158) | struct emu_cpu
type emu_cpu_instruction (line 158) | struct emu_cpu_instruction
type emu_cpu (line 159) | struct emu_cpu
type emu_cpu_instruction (line 159) | struct emu_cpu_instruction
type emu_cpu (line 165) | struct emu_cpu
type emu_cpu_instruction (line 165) | struct emu_cpu_instruction
type emu_cpu (line 166) | struct emu_cpu
type emu_cpu_instruction (line 166) | struct emu_cpu_instruction
type emu_cpu (line 167) | struct emu_cpu
type emu_cpu_instruction (line 167) | struct emu_cpu_instruction
type emu_cpu (line 168) | struct emu_cpu
type emu_cpu_instruction (line 168) | struct emu_cpu_instruction
type emu_cpu (line 169) | struct emu_cpu
type emu_cpu_instruction (line 169) | struct emu_cpu_instruction
type emu_cpu (line 170) | struct emu_cpu
type emu_cpu_instruction (line 170) | struct emu_cpu_instruction
type emu_cpu (line 173) | struct emu_cpu
type emu_cpu_instruction (line 173) | struct emu_cpu_instruction
type emu_cpu (line 174) | struct emu_cpu
type emu_cpu_instruction (line 174) | struct emu_cpu_instruction
type emu_cpu (line 177) | struct emu_cpu
type emu_cpu_instruction (line 177) | struct emu_cpu_instruction
type emu_cpu (line 180) | struct emu_cpu
type emu_cpu_instruction (line 180) | struct emu_cpu_instruction
type emu_cpu (line 183) | struct emu_cpu
type emu_cpu_instruction (line 183) | struct emu_cpu_instruction
type emu_cpu (line 184) | struct emu_cpu
type emu_cpu_instruction (line 184) | struct emu_cpu_instruction
type emu_cpu (line 185) | struct emu_cpu
type emu_cpu_instruction (line 185) | struct emu_cpu_instruction
type emu_cpu (line 186) | struct emu_cpu
type emu_cpu_instruction (line 186) | struct emu_cpu_instruction
type emu_cpu (line 187) | struct emu_cpu
type emu_cpu_instruction (line 187) | struct emu_cpu_instruction
type emu_cpu (line 188) | struct emu_cpu
type emu_cpu_instruction (line 188) | struct emu_cpu_instruction
type emu_cpu (line 189) | struct emu_cpu
type emu_cpu_instruction (line 189) | struct emu_cpu_instruction
type emu_cpu (line 190) | struct emu_cpu
type emu_cpu_instruction (line 190) | struct emu_cpu_instruction
type emu_cpu (line 191) | struct emu_cpu
type emu_cpu_instruction (line 191) | struct emu_cpu_instruction
type emu_cpu (line 192) | struct emu_cpu
type emu_cpu_instruction (line 192) | struct emu_cpu_instruction
type emu_cpu (line 193) | struct emu_cpu
type emu_cpu_instruction (line 193) | struct emu_cpu_instruction
type emu_cpu (line 194) | struct emu_cpu
type emu_cpu_instruction (line 194) | struct emu_cpu_instruction
type emu_cpu (line 195) | struct emu_cpu
type emu_cpu_instruction (line 195) | struct emu_cpu_instruction
type emu_cpu (line 196) | struct emu_cpu
type emu_cpu_instruction (line 196) | struct emu_cpu_instruction
type emu_cpu (line 197) | struct emu_cpu
type emu_cpu_instruction (line 197) | struct emu_cpu_instruction
type emu_cpu (line 198) | struct emu_cpu
type emu_cpu_instruction (line 198) | struct emu_cpu_instruction
type emu_cpu (line 199) | struct emu_cpu
type emu_cpu_instruction (line 199) | struct emu_cpu_instruction
type emu_cpu (line 200) | struct emu_cpu
type emu_cpu_instruction (line 200) | struct emu_cpu_instruction
type emu_cpu (line 201) | struct emu_cpu
type emu_cpu_instruction (line 201) | struct emu_cpu_instruction
type emu_cpu (line 202) | struct emu_cpu
type emu_cpu_instruction (line 202) | struct emu_cpu_instruction
type emu_cpu (line 203) | struct emu_cpu
type emu_cpu_instruction (line 203) | struct emu_cpu_instruction
type emu_cpu (line 204) | struct emu_cpu
type emu_cpu_instruction (line 204) | struct emu_cpu_instruction
type emu_cpu (line 205) | struct emu_cpu
type emu_cpu_instruction (line 205) | struct emu_cpu_instruction
type emu_cpu (line 206) | struct emu_cpu
type emu_cpu_instruction (line 206) | struct emu_cpu_instruction
type emu_cpu (line 207) | struct emu_cpu
type emu_cpu_instruction (line 207) | struct emu_cpu_instruction
type emu_cpu (line 208) | struct emu_cpu
type emu_cpu_instruction (line 208) | struct emu_cpu_instruction
type emu_cpu (line 209) | struct emu_cpu
type emu_cpu_instruction (line 209) | struct emu_cpu_instruction
type emu_cpu (line 210) | struct emu_cpu
type emu_cpu_instruction (line 210) | struct emu_cpu_instruction
type emu_cpu (line 211) | struct emu_cpu
type emu_cpu_instruction (line 211) | struct emu_cpu_instruction
type emu_cpu (line 212) | struct emu_cpu
type emu_cpu_instruction (line 212) | struct emu_cpu_instruction
type emu_cpu (line 213) | struct emu_cpu
type emu_cpu_instruction (line 213) | struct emu_cpu_instruction
type emu_cpu (line 214) | struct emu_cpu
type emu_cpu_instruction (line 214) | struct emu_cpu_instruction
type emu_cpu (line 215) | struct emu_cpu
type emu_cpu_instruction (line 215) | struct emu_cpu_instruction
type emu_cpu (line 217) | struct emu_cpu
type emu_cpu_instruction (line 217) | struct emu_cpu_instruction
type emu_cpu (line 218) | struct emu_cpu
type emu_cpu_instruction (line 218) | struct emu_cpu_instruction
type emu_cpu (line 221) | struct emu_cpu
type emu_cpu_instruction (line 221) | struct emu_cpu_instruction
type emu_cpu (line 223) | struct emu_cpu
type emu_cpu_instruction (line 223) | struct emu_cpu_instruction
type emu_cpu (line 226) | struct emu_cpu
type emu_cpu_instruction (line 226) | struct emu_cpu_instruction
type emu_cpu (line 227) | struct emu_cpu
type emu_cpu_instruction (line 227) | struct emu_cpu_instruction
type emu_cpu (line 228) | struct emu_cpu
type emu_cpu_instruction (line 228) | struct emu_cpu_instruction
type emu_cpu (line 229) | struct emu_cpu
type emu_cpu_instruction (line 229) | struct emu_cpu_instruction
type emu_cpu (line 230) | struct emu_cpu
type emu_cpu_instruction (line 230) | struct emu_cpu_instruction
type emu_cpu (line 232) | struct emu_cpu
type emu_cpu_instruction (line 232) | struct emu_cpu_instruction
type emu_cpu (line 233) | struct emu_cpu
type emu_cpu_instruction (line 233) | struct emu_cpu_instruction
type emu_cpu (line 234) | struct emu_cpu
type emu_cpu_instruction (line 234) | struct emu_cpu_instruction
type emu_cpu (line 235) | struct emu_cpu
type emu_cpu_instruction (line 235) | struct emu_cpu_instruction
type emu_cpu (line 236) | struct emu_cpu
type emu_cpu_instruction (line 236) | struct emu_cpu_instruction
type emu_cpu (line 237) | struct emu_cpu
type emu_cpu_instruction (line 237) | struct emu_cpu_instruction
type emu_cpu (line 238) | struct emu_cpu
type emu_cpu_instruction (line 238) | struct emu_cpu_instruction
type emu_cpu (line 239) | struct emu_cpu
type emu_cpu_instruction (line 239) | struct emu_cpu_instruction
type emu_cpu (line 240) | struct emu_cpu
type emu_cpu_instruction (line 240) | struct emu_cpu_instruction
type emu_cpu (line 242) | struct emu_cpu
type emu_cpu_instruction (line 242) | struct emu_cpu_instruction
type emu_cpu (line 248) | struct emu_cpu
type emu_cpu_instruction (line 248) | struct emu_cpu_instruction
type emu_cpu (line 249) | struct emu_cpu
type emu_cpu_instruction (line 249) | struct emu_cpu_instruction
type emu_cpu (line 258) | struct emu_cpu
type emu_cpu_instruction (line 258) | struct emu_cpu_instruction
type emu_cpu (line 259) | struct emu_cpu
type emu_cpu_instruction (line 259) | struct emu_cpu_instruction
type emu_cpu (line 260) | struct emu_cpu
type emu_cpu_instruction (line 260) | struct emu_cpu_instruction
type emu_cpu (line 261) | struct emu_cpu
type emu_cpu_instruction (line 261) | struct emu_cpu_instruction
type emu_cpu (line 267) | struct emu_cpu
type emu_cpu_instruction (line 267) | struct emu_cpu_instruction
type emu_cpu (line 271) | struct emu_cpu
type emu_cpu_instruction (line 271) | struct emu_cpu_instruction
type emu_cpu (line 272) | struct emu_cpu
type emu_cpu_instruction (line 272) | struct emu_cpu_instruction
type emu_cpu (line 273) | struct emu_cpu
type emu_cpu_instruction (line 273) | struct emu_cpu_instruction
type emu_cpu (line 276) | struct emu_cpu
type emu_cpu_instruction (line 276) | struct emu_cpu_instruction
type emu_cpu (line 277) | struct emu_cpu
type emu_cpu_instruction (line 277) | struct emu_cpu_instruction
type emu_cpu (line 280) | struct emu_cpu
type emu_cpu_instruction (line 280) | struct emu_cpu_instruction
type emu_cpu (line 281) | struct emu_cpu
type emu_cpu_instruction (line 281) | struct emu_cpu_instruction
type emu_cpu (line 284) | struct emu_cpu
type emu_cpu_instruction (line 284) | struct emu_cpu_instruction
type emu_cpu (line 285) | struct emu_cpu
type emu_cpu_instruction (line 285) | struct emu_cpu_instruction
type emu_cpu (line 288) | struct emu_cpu
type emu_cpu_instruction (line 288) | struct emu_cpu_instruction
type emu_cpu (line 293) | struct emu_cpu
type emu_cpu_instruction (line 293) | struct emu_cpu_instruction
type emu_cpu (line 297) | struct emu_cpu
type emu_cpu_instruction (line 297) | struct emu_cpu_instruction
type emu_cpu (line 298) | struct emu_cpu
type emu_cpu_instruction (line 298) | struct emu_cpu_instruction
type emu_cpu (line 299) | struct emu_cpu
type emu_cpu_instruction (line 299) | struct emu_cpu_instruction
type emu_cpu (line 300) | struct emu_cpu
type emu_cpu_instruction (line 300) | struct emu_cpu_instruction
type emu_cpu (line 301) | struct emu_cpu
type emu_cpu_instruction (line 301) | struct emu_cpu_instruction
type emu_cpu (line 302) | struct emu_cpu
type emu_cpu_instruction (line 302) | struct emu_cpu_instruction
type emu_cpu (line 303) | struct emu_cpu
type emu_cpu_instruction (line 303) | struct emu_cpu_instruction
type emu_cpu (line 304) | struct emu_cpu
type emu_cpu_instruction (line 304) | struct emu_cpu_instruction
type emu_cpu (line 305) | struct emu_cpu
type emu_cpu_instruction (line 305) | struct emu_cpu_instruction
type emu_cpu (line 306) | struct emu_cpu
type emu_cpu_instruction (line 306) | struct emu_cpu_instruction
type emu_cpu (line 307) | struct emu_cpu
type emu_cpu_instruction (line 307) | struct emu_cpu_instruction
type emu_cpu (line 308) | struct emu_cpu
type emu_cpu_instruction (line 308) | struct emu_cpu_instruction
type emu_cpu (line 309) | struct emu_cpu
type emu_cpu_instruction (line 309) | struct emu_cpu_instruction
type emu_cpu (line 310) | struct emu_cpu
type emu_cpu_instruction (line 310) | struct emu_cpu_instruction
type emu_cpu (line 311) | struct emu_cpu
type emu_cpu_instruction (line 311) | struct emu_cpu_instruction
type emu_cpu (line 312) | struct emu_cpu
type emu_cpu_instruction (line 312) | struct emu_cpu_instruction
type emu_cpu (line 313) | struct emu_cpu
type emu_cpu_instruction (line 313) | struct emu_cpu_instruction
type emu_cpu (line 316) | struct emu_cpu
type emu_cpu_instruction (line 316) | struct emu_cpu_instruction
type emu_cpu (line 317) | struct emu_cpu
type emu_cpu_instruction (line 317) | struct emu_cpu_instruction
type emu_cpu (line 318) | struct emu_cpu
type emu_cpu_instruction (line 318) | struct emu_cpu_instruction
type emu_cpu (line 319) | struct emu_cpu
type emu_cpu_instruction (line 319) | struct emu_cpu_instruction
type emu_cpu (line 320) | struct emu_cpu
type emu_cpu_instruction (line 320) | struct emu_cpu_instruction
type emu_cpu (line 321) | struct emu_cpu
type emu_cpu_instruction (line 321) | struct emu_cpu_instruction
type emu_cpu (line 322) | struct emu_cpu
type emu_cpu_instruction (line 322) | struct emu_cpu_instruction
type emu_cpu (line 323) | struct emu_cpu
type emu_cpu_instruction (line 323) | struct emu_cpu_instruction
type emu_cpu (line 326) | struct emu_cpu
type emu_cpu_instruction (line 326) | struct emu_cpu_instruction
type emu_cpu (line 327) | struct emu_cpu
type emu_cpu_instruction (line 327) | struct emu_cpu_instruction
type emu_cpu (line 328) | struct emu_cpu
type emu_cpu_instruction (line 328) | struct emu_cpu_instruction
type emu_cpu (line 329) | struct emu_cpu
type emu_cpu_instruction (line 329) | struct emu_cpu_instruction
type emu_cpu (line 330) | struct emu_cpu
type emu_cpu_instruction (line 330) | struct emu_cpu_instruction
type emu_cpu (line 331) | struct emu_cpu
type emu_cpu_instruction (line 331) | struct emu_cpu_instruction
type emu_cpu (line 332) | struct emu_cpu
type emu_cpu_instruction (line 332) | struct emu_cpu_instruction
type emu_cpu (line 333) | struct emu_cpu
type emu_cpu_instruction (line 333) | struct emu_cpu_instruction
type emu_cpu (line 336) | struct emu_cpu
type emu_cpu_instruction (line 336) | struct emu_cpu_instruction
type emu_cpu (line 337) | struct emu_cpu
type emu_cpu_instruction (line 337) | struct emu_cpu_instruction
type emu_cpu (line 338) | struct emu_cpu
type emu_cpu_instruction (line 338) | struct emu_cpu_instruction
type emu_cpu (line 339) | struct emu_cpu
type emu_cpu_instruction (line 339) | struct emu_cpu_instruction
type emu_cpu (line 340) | struct emu_cpu
type emu_cpu_instruction (line 340) | struct emu_cpu_instruction
type emu_cpu (line 341) | struct emu_cpu
type emu_cpu_instruction (line 341) | struct emu_cpu_instruction
type emu_cpu (line 342) | struct emu_cpu
type emu_cpu_instruction (line 342) | struct emu_cpu_instruction
type emu_cpu (line 343) | struct emu_cpu
type emu_cpu_instruction (line 343) | struct emu_cpu_instruction
type emu_cpu (line 346) | struct emu_cpu
type emu_cpu_instruction (line 346) | struct emu_cpu_instruction
type emu_cpu (line 347) | struct emu_cpu
type emu_cpu_instruction (line 347) | struct emu_cpu_instruction
type emu_cpu (line 348) | struct emu_cpu
type emu_cpu_instruction (line 348) | struct emu_cpu_instruction
type emu_cpu (line 349) | struct emu_cpu
type emu_cpu_instruction (line 349) | struct emu_cpu_instruction
type emu_cpu (line 350) | struct emu_cpu
type emu_cpu_instruction (line 350) | struct emu_cpu_instruction
type emu_cpu (line 351) | struct emu_cpu
type emu_cpu_instruction (line 351) | struct emu_cpu_instruction
type emu_cpu (line 352) | struct emu_cpu
type emu_cpu_instruction (line 352) | struct emu_cpu_instruction
type emu_cpu (line 353) | struct emu_cpu
type emu_cpu_instruction (line 353) | struct emu_cpu_instruction
type emu_cpu (line 356) | struct emu_cpu
type emu_cpu_instruction (line 356) | struct emu_cpu_instruction
type emu_cpu (line 357) | struct emu_cpu
type emu_cpu_instruction (line 357) | struct emu_cpu_instruction
type emu_cpu (line 358) | struct emu_cpu
type emu_cpu_instruction (line 358) | struct emu_cpu_instruction
type emu_cpu (line 359) | struct emu_cpu
type emu_cpu_instruction (line 359) | struct emu_cpu_instruction
type emu_cpu (line 360) | struct emu_cpu
type emu_cpu_instruction (line 360) | struct emu_cpu_instruction
type emu_cpu (line 361) | struct emu_cpu
type emu_cpu_instruction (line 361) | struct emu_cpu_instruction
type emu_cpu (line 362) | struct emu_cpu
type emu_cpu_instruction (line 362) | struct emu_cpu_instruction
type emu_cpu (line 363) | struct emu_cpu
type emu_cpu_instruction (line 363) | struct emu_cpu_instruction
type emu_cpu (line 366) | struct emu_cpu
type emu_cpu_instruction (line 366) | struct emu_cpu_instruction
type emu_cpu (line 367) | struct emu_cpu
type emu_cpu_instruction (line 367) | struct emu_cpu_instruction
type emu_cpu (line 368) | struct emu_cpu
type emu_cpu_instruction (line 368) | struct emu_cpu_instruction
type emu_cpu (line 369) | struct emu_cpu
type emu_cpu_instruction (line 369) | struct emu_cpu_instruction
type emu_cpu (line 370) | struct emu_cpu
type emu_cpu_instruction (line 370) | struct emu_cpu_instruction
type emu_cpu (line 371) | struct emu_cpu
type emu_cpu_instruction (line 371) | struct emu_cpu_instruction
type emu_cpu (line 372) | struct emu_cpu
type emu_cpu_instruction (line 372) | struct emu_cpu_instruction
type emu_cpu (line 373) | struct emu_cpu
type emu_cpu_instruction (line 373) | struct emu_cpu_instruction
type emu_cpu (line 397) | struct emu_cpu
type emu_cpu_instruction (line 397) | struct emu_cpu_instruction
type emu_cpu (line 398) | struct emu_cpu
type emu_cpu_instruction (line 398) | struct emu_cpu_instruction
type emu_cpu (line 399) | struct emu_cpu
type emu_cpu_instruction (line 399) | struct emu_cpu_instruction
type emu_cpu (line 400) | struct emu_cpu
type emu_cpu_instruction (line 400) | struct emu_cpu_instruction
type emu_cpu (line 403) | struct emu_cpu
type emu_cpu_instruction (line 403) | struct emu_cpu_instruction
type emu_cpu (line 404) | struct emu_cpu
type emu_cpu_instruction (line 404) | struct emu_cpu_instruction
type emu_cpu (line 407) | struct emu_cpu
type emu_cpu_instruction (line 407) | struct emu_cpu_instruction
type emu_cpu (line 408) | struct emu_cpu
type emu_cpu_instruction (line 408) | struct emu_cpu_instruction
type emu_cpu (line 411) | struct emu_cpu
type emu_cpu_instruction (line 411) | struct emu_cpu_instruction
type emu_cpu (line 412) | struct emu_cpu
type emu_cpu_instruction (line 412) | struct emu_cpu_instruction
type emu_cpu (line 413) | struct emu_cpu
type emu_cpu_instruction (line 413) | struct emu_cpu_instruction
type emu_cpu (line 416) | struct emu_cpu
type emu_cpu_instruction (line 416) | struct emu_cpu_instruction
type emu_cpu (line 417) | struct emu_cpu
type emu_cpu_instruction (line 417) | struct emu_cpu_instruction
type emu_cpu (line 420) | struct emu_cpu
type emu_cpu_instruction (line 420) | struct emu_cpu_instruction
type emu_cpu (line 421) | struct emu_cpu
type emu_cpu_instruction (line 421) | struct emu_cpu_instruction
type emu_cpu (line 424) | struct emu_cpu
type emu_cpu_instruction (line 424) | struct emu_cpu_instruction
type emu_cpu (line 427) | struct emu_cpu
type emu_cpu_instruction (line 427) | struct emu_cpu_instruction
FILE: include/emu/emu_cpu_instruction.h
type emu_cpu_instruction (line 37) | struct emu_cpu_instruction
type emu_cpu (line 38) | struct emu_cpu
type emu_cpu_instruction_info (line 40) | struct emu_cpu_instruction_info
type emu_cpu_instruction (line 58) | struct emu_cpu_instruction
FILE: include/emu/emu_cpu_itables.h
type emu_cpu_instruction_info (line 64) | struct emu_cpu_instruction_info
type emu_cpu_instruction_info (line 323) | struct emu_cpu_instruction_info
FILE: include/emu/emu_fpu_instruction.h
type emu_fpu_instruction (line 36) | struct emu_fpu_instruction
FILE: include/emu/emu_getpc.h
type emu (line 42) | struct emu
FILE: include/emu/emu_graph.h
type emu_vertex (line 34) | struct emu_vertex
type emu_edge (line 47) | struct emu_edge
type emu_edge (line 57) | struct emu_edge
type emu_edge (line 58) | struct emu_edge
type emu_color (line 67) | enum emu_color { black, blue, cyan, green, grey, magenta, red, white, ye...
type emu_vertex (line 81) | struct emu_vertex
type emu_vertex (line 96) | struct emu_vertex
type emu_vertex (line 97) | struct emu_vertex
type emu_vertex (line 98) | struct emu_vertex
type emu_vertex (line 99) | struct emu_vertex
type emu_edge (line 100) | struct emu_edge
type emu_vertex (line 100) | struct emu_vertex
type emu_vertex (line 100) | struct emu_vertex
type emu_graph (line 103) | struct emu_graph
type emu_graph (line 109) | struct emu_graph
type emu_graph (line 110) | struct emu_graph
type emu_graph (line 111) | struct emu_graph
type emu_vertex (line 111) | struct emu_vertex
type emu_graph (line 113) | struct emu_graph
type emu_vertex (line 113) | struct emu_vertex
type emu_vertex (line 113) | struct emu_vertex
type emu_graph (line 114) | struct emu_graph
type emu_vertex (line 114) | struct emu_vertex
type emu_graph (line 115) | struct emu_graph
type emu_vertex (line 115) | struct emu_vertex
type emu_vertex (line 115) | struct emu_vertex
FILE: include/emu/emu_hashtable.h
type emu_hashtable_item (line 41) | struct emu_hashtable_item
type emu_hashtable_bucket_item (line 55) | struct emu_hashtable_bucket_item
type emu_hashtable_bucket_item (line 62) | struct emu_hashtable_bucket_item
type emu_hashtable_bucket_item (line 63) | struct emu_hashtable_bucket_item
type emu_hashtable_bucket (line 65) | struct emu_hashtable_bucket
type emu_hashtable_bucket (line 70) | struct emu_hashtable_bucket
type emu_hashtable_bucket (line 71) | struct emu_hashtable_bucket
type emu_hashtable_bucket (line 72) | struct emu_hashtable_bucket
type emu_hashtable_bucket_item (line 72) | struct emu_hashtable_bucket_item
type emu_hashtable (line 84) | struct emu_hashtable
type emu_hashtable (line 114) | struct emu_hashtable
type emu_hashtable (line 126) | struct emu_hashtable
type emu_hashtable_item (line 138) | struct emu_hashtable_item
type emu_hashtable (line 138) | struct emu_hashtable
type emu_hashtable_item (line 150) | struct emu_hashtable_item
type emu_hashtable (line 150) | struct emu_hashtable
type emu_hashtable (line 161) | struct emu_hashtable
FILE: include/emu/emu_instruction.h
type emu_instruction (line 45) | struct emu_instruction
FILE: include/emu/emu_list.h
type list__hack (line 137) | struct list__hack
function _init (line 172) | void name##_init(t_root *root) { \
function _init_link (line 177) | void name##_init_link(t_elem *elem) { \
function _empty (line 196) | bool name##_empty(t_root *root) { \
function _iselem (line 199) | bool name##_iselem(t_elem *elem) { \
function _ishead (line 202) | bool name##_ishead(t_elem *elem) { \
function _istail (line 205) | bool name##_istail(t_elem *elem) { \
function _isunlinked (line 208) | bool name##_isunlinked(t_elem *elem) { \
function _athead (line 212) | bool name##_athead(t_elem *elem) { \
function _attail (line 215) | bool name##_attail(t_elem *elem) { \
function _isfirst (line 219) | bool name##_isfirst(t_elem *elem) { \
function _islast (line 222) | bool name##_islast(t_elem *elem) { \
function __splice_before (line 227) | void name##__splice_before \
function __splice_after (line 234) | void name##__splice_after \
function __unsplice (line 241) | void name##__unsplice(t_elem *old0, t_elem *oldN) { \
function _insert_before (line 247) | void name##_insert_before(t_elem *elem, t_elem *newX) { \
function _insert_after (line 250) | void name##_insert_after(t_elem *elem, t_elem *newX) { \
function _insert_first (line 253) | void name##_insert_first(t_root *root, t_elem *newX) { \
function _insert_last (line 257) | void name##_insert_last(t_root *root, t_elem *newX) { \
function _remove (line 261) | void name##_remove(t_elem *elem) { \
function _remove_next (line 277) | void name##_remove_next(t_elem *elem) { \
function _remove_prev (line 281) | void name##_remove_prev(t_elem *elem) { \
function _concat (line 287) | void name##_concat(t_root *dst, t_root *src) { \
function _length (line 313) | int name##_length(t_root *root) { \
function name (line 346) | name##_concat(root, &one); \
function _qsort (line 356) | void name##_qsort \
function _destroy (line 367) | void name##_destroy(t_root *root) { \
type list__hack (line 375) | struct list__hack
type emu_list_item (line 383) | struct emu_list_item
type emu_list_item (line 397) | struct emu_list_item
FILE: include/emu/emu_log.h
type emu (line 31) | struct emu
type emu_log_level (line 33) | enum emu_log_level
type emu (line 40) | struct emu
type emu_log_level (line 40) | enum emu_log_level
type emu_logging (line 42) | struct emu_logging
type emu_logging (line 43) | struct emu_logging
type emu_logging (line 45) | struct emu_logging
type emu_log_level (line 45) | enum emu_log_level
type emu (line 47) | struct emu
type emu_log_level (line 47) | enum emu_log_level
type emu_logging (line 49) | struct emu_logging
type emu (line 51) | struct emu
type emu_log_level (line 51) | enum emu_log_level
FILE: include/emu/emu_memory.h
type emu_segment (line 34) | enum emu_segment {
type emu (line 38) | struct emu
type emu_memory (line 39) | struct emu_memory
type emu_string (line 40) | struct emu_string
type emu_breakpoint (line 41) | struct emu_breakpoint
type emu_memory (line 43) | struct emu_memory
type emu (line 43) | struct emu
type emu_memory (line 44) | struct emu_memory
type emu_memory (line 45) | struct emu_memory
type emu_memory (line 48) | struct emu_memory
type emu_memory (line 49) | struct emu_memory
type emu_memory (line 50) | struct emu_memory
type emu_memory (line 51) | struct emu_memory
type emu_memory (line 52) | struct emu_memory
type emu_string (line 52) | struct emu_string
type emu_memory (line 55) | struct emu_memory
type emu_memory (line 56) | struct emu_memory
type emu_memory (line 57) | struct emu_memory
type emu_memory (line 58) | struct emu_memory
type emu_memory (line 61) | struct emu_memory
type emu_segment (line 61) | enum emu_segment
type emu_segment (line 62) | enum emu_segment
type emu_memory (line 62) | struct emu_memory
type emu_memory (line 65) | struct emu_memory
type emu_memory (line 69) | struct emu_memory
type emu_memory (line 71) | struct emu_memory
type emu_memory (line 72) | struct emu_memory
type emu_breakpoint (line 74) | struct emu_breakpoint
type emu_memory (line 74) | struct emu_memory
type emu (line 75) | struct emu
type emu_memory (line 75) | struct emu_memory
FILE: include/emu/emu_queue.h
type emu_queue_item (line 33) | struct emu_queue_item
type emu_queue_item (line 39) | struct emu_queue_item
type emu_queue_item (line 40) | struct emu_queue_item
type emu_queue (line 42) | struct emu_queue
type emu_queue (line 54) | struct emu_queue
type emu_queue (line 55) | struct emu_queue
type emu_queue (line 64) | struct emu_queue
type emu_queue (line 72) | struct emu_queue
type emu_queue (line 81) | struct emu_queue
type emu_queue (line 90) | struct emu_queue
FILE: include/emu/emu_shellcode.h
type emu (line 34) | struct emu
type emu (line 46) | struct emu
type emu_stats (line 49) | struct emu_stats
type emu_stats (line 68) | struct emu_stats
type emu_stats (line 69) | struct emu_stats
FILE: include/emu/emu_source.h
type emu_track_and_source (line 32) | struct emu_track_and_source
type emu_vertex (line 33) | struct emu_vertex
type emu (line 46) | struct emu
type emu_track_and_source (line 46) | struct emu_track_and_source
type emu_track_and_source (line 49) | struct emu_track_and_source
type emu_vertex (line 49) | struct emu_vertex
type emu_track_and_source (line 50) | struct emu_track_and_source
type emu_vertex (line 50) | struct emu_vertex
FILE: include/emu/emu_stack.h
type emu_stack_item (line 32) | struct emu_stack_item
type emu_stack (line 38) | struct emu_stack
type emu_stack (line 44) | struct emu_stack
type emu_stack (line 45) | struct emu_stack
type emu_stack (line 46) | struct emu_stack
type emu_stack (line 47) | struct emu_stack
type emu_stack (line 48) | struct emu_stack
type emu_stack (line 49) | struct emu_stack
FILE: include/emu/emu_string.h
type emu_string (line 37) | struct emu_string
type emu_string (line 50) | struct emu_string
type emu_string (line 57) | struct emu_string
type emu_string (line 67) | struct emu_string
type emu_string (line 75) | struct emu_string
type emu_string (line 84) | struct emu_string
FILE: include/emu/emu_track.h
type emu (line 35) | struct emu
type emu_cpu (line 36) | struct emu_cpu
type emu_graph (line 37) | struct emu_graph
type emu_instruction (line 38) | struct emu_instruction
type emu_tracking_info (line 52) | struct emu_tracking_info
type emu_source_and_track_instr_info (line 72) | struct emu_source_and_track_instr_info
type emu_source_and_track_instr_info (line 91) | struct emu_source_and_track_instr_info
type emu_cpu (line 91) | struct emu_cpu
type emu_source_and_track_instr_info (line 92) | struct emu_source_and_track_instr_info
type emu_track_and_source (line 99) | struct emu_track_and_source
type emu_track_and_source (line 112) | struct emu_track_and_source
type emu_track_and_source (line 113) | struct emu_track_and_source
type emu (line 115) | struct emu
type emu_track_and_source (line 115) | struct emu_track_and_source
type emu_tracking_info (line 119) | struct emu_tracking_info
type emu_tracking_info (line 120) | struct emu_tracking_info
type emu_tracking_info (line 122) | struct emu_tracking_info
type emu_tracking_info (line 133) | struct emu_tracking_info
type emu_tracking_info (line 133) | struct emu_tracking_info
type emu_tracking_info (line 133) | struct emu_tracking_info
type emu_tracking_info (line 135) | struct emu_tracking_info
type emu_tracking_info (line 135) | struct emu_tracking_info
type emu_tracking_info (line 147) | struct emu_tracking_info
type emu_tracking_info (line 147) | struct emu_tracking_info
type emu_tracking_info (line 149) | struct emu_tracking_info
FILE: include/emu/environment/emu_env.h
type emu_env_linux (line 28) | struct emu_env_linux
type emu_env_linux_syscall (line 29) | struct emu_env_linux_syscall
type emu_env_w32 (line 30) | struct emu_env_w32
type emu_env_w32_dll_export (line 31) | struct emu_env_w32_dll_export
type emu_env_type (line 83) | enum emu_env_type
type emu_env_hook (line 89) | struct emu_env_hook
type emu_env (line 100) | struct emu_env
type emu_env (line 115) | struct emu_env
type emu (line 115) | struct emu
type emu_env (line 116) | struct emu_env
FILE: include/emu/environment/emu_profile.h
type emu_profile_argument_render (line 40) | enum emu_profile_argument_render
type emu_profile_argument (line 58) | struct emu_profile_argument
type emu_profile_function (line 96) | struct emu_profile_function
type emu_profile (line 108) | struct emu_profile
type emu_profile (line 117) | struct emu_profile
type emu_profile (line 118) | struct emu_profile
type emu_profile_function (line 121) | struct emu_profile_function
type emu_profile_function (line 122) | struct emu_profile_function
type emu_profile_argument (line 125) | struct emu_profile_argument
type emu_profile_argument_render (line 125) | enum emu_profile_argument_render
type emu_profile_argument (line 126) | struct emu_profile_argument
type emu_profile (line 130) | struct emu_profile
type emu_profile (line 132) | struct emu_profile
type emu_profile (line 133) | struct emu_profile
type emu_profile_function (line 135) | struct emu_profile_function
type emu_profile_argument (line 137) | struct emu_profile_argument
type emu_profile (line 139) | struct emu_profile
type emu_profile (line 140) | struct emu_profile
type emu_profile (line 141) | struct emu_profile
type emu_profile (line 142) | struct emu_profile
type emu_profile (line 143) | struct emu_profile
type emu_profile (line 144) | struct emu_profile
type emu_profile (line 145) | struct emu_profile
type emu_profile (line 146) | struct emu_profile
type emu_profile (line 147) | struct emu_profile
type emu_profile (line 148) | struct emu_profile
type emu_profile (line 151) | struct emu_profile
type emu_profile (line 152) | struct emu_profile
type emu_profile (line 153) | struct emu_profile
type emu_profile (line 155) | struct emu_profile
type emu_profile (line 156) | struct emu_profile
type emu_profile_function (line 159) | struct emu_profile_function
type emu_profile (line 161) | struct emu_profile
type sockaddr (line 161) | struct sockaddr
FILE: include/emu/environment/linux/emu_env_linux.h
type emu_profile (line 41) | struct emu_profile
type emu_env (line 42) | struct emu_env
type emu_env_linux (line 44) | struct emu_env_linux
type emu_env_linux (line 53) | struct emu_env_linux
type emu (line 53) | struct emu
type emu_env_linux (line 54) | struct emu_env_linux
type emu_env_hook (line 56) | struct emu_env_hook
type emu_env (line 56) | struct emu_env
type emu_env_linux_syscall_entry (line 59) | struct emu_env_linux_syscall_entry
type emu_env_linux (line 66) | struct emu_env_linux
type emu_env_linux_syscall (line 66) | struct emu_env_linux_syscall
type emu_env_linux_syscall (line 68) | struct emu_env_linux_syscall
type emu_env (line 76) | struct emu_env
type emu_env (line 77) | struct emu_env
type emu_env_hook (line 77) | struct emu_env_hook
type emu_env_linux (line 80) | struct emu_env_linux
FILE: include/emu/environment/linux/env_linux_syscall_hooks.h
type emu_env (line 29) | struct emu_env
type emu_env_hook (line 29) | struct emu_env_hook
type emu_env (line 32) | struct emu_env
type emu_env_hook (line 32) | struct emu_env_hook
type emu_env (line 35) | struct emu_env
type emu_env_hook (line 35) | struct emu_env_hook
type emu_env (line 38) | struct emu_env
type emu_env_hook (line 38) | struct emu_env_hook
type emu_env (line 41) | struct emu_env
type emu_env_hook (line 41) | struct emu_env_hook
type emu_env (line 63) | struct emu_env
type emu_env_hook (line 63) | struct emu_env_hook
FILE: include/emu/environment/linux/env_linux_syscalls.h
type emu_env_linux_syscall_entry (line 32) | struct emu_env_linux_syscall_entry
type emu_env_linux_syscall (line 228) | struct emu_env_linux_syscall
FILE: include/emu/environment/win32/emu_env_w32.h
type emu (line 33) | struct emu
type emu_env_w32_dll (line 34) | struct emu_env_w32_dll
type emu_env_w32_dll_export (line 35) | struct emu_env_w32_dll_export
type emu_profile (line 36) | struct emu_profile
type emu_env (line 37) | struct emu_env
type emu_env_hook (line 38) | struct emu_env_hook
type emu_env_w32 (line 45) | struct emu_env_w32
type emu_env_w32 (line 76) | struct emu_env_w32
type emu (line 76) | struct emu
type emu_env_w32 (line 83) | struct emu_env_w32
type emu_env_w32 (line 85) | struct emu_env_w32
type emu_env (line 97) | struct emu_env
type emu_env (line 99) | struct emu_env
type emu_env_hook (line 99) | struct emu_env_hook
type emu_env_hook (line 113) | struct emu_env_hook
type emu_env (line 113) | struct emu_env
type emu_env (line 116) | struct emu_env
FILE: include/emu/environment/win32/emu_env_w32_dll.h
type emu_env_hook (line 33) | struct emu_env_hook
type emu_env_w32_dll_export (line 34) | struct emu_env_w32_dll_export
type emu_env_w32_dll (line 36) | struct emu_env_w32_dll
type emu_env_w32_dll (line 51) | struct emu_env_w32_dll
type emu_env_w32_dll (line 52) | struct emu_env_w32_dll
type emu_env_w32_dll (line 53) | struct emu_env_w32_dll
type emu_env_w32_dll_export (line 53) | struct emu_env_w32_dll_export
type emu_env_w32_known_dll_segment (line 56) | struct emu_env_w32_known_dll_segment
type emu_env_w32_known_dll (line 63) | struct emu_env_w32_known_dll
FILE: include/emu/environment/win32/emu_env_w32_dll_export.h
type emu (line 34) | struct emu
type emu_env_w32 (line 35) | struct emu_env_w32
type emu_env (line 36) | struct emu_env
type emu_env_hook (line 37) | struct emu_env_hook
type emu_env_w32 (line 39) | struct emu_env_w32
type emu_env_w32_dll_export (line 39) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 41) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 51) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 52) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 52) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 53) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 55) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 56) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 57) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 58) | struct emu_env_w32_dll_export
FILE: include/emu/environment/win32/env_w32_dll_export_hooks.h
type emu_env_w32_dll_export (line 40) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 994) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 1116) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 1346) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 2183) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 2275) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 3012) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 3326) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 4648) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 4968) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 5650) | struct emu_env_w32_dll_export
FILE: include/emu/environment/win32/env_w32_dll_export_kernel32_hooks.h
type emu_env (line 30) | struct emu_env
type emu_env_hook (line 30) | struct emu_env_hook
type emu_env (line 31) | struct emu_env
type emu_env_hook (line 31) | struct emu_env_hook
type emu_env (line 32) | struct emu_env
type emu_env_hook (line 32) | struct emu_env_hook
type emu_env (line 33) | struct emu_env
type emu_env_hook (line 33) | struct emu_env_hook
type emu_env (line 34) | struct emu_env
type emu_env_hook (line 34) | struct emu_env_hook
type emu_env (line 35) | struct emu_env
type emu_env_hook (line 35) | struct emu_env_hook
type emu_env (line 36) | struct emu_env
type emu_env_hook (line 36) | struct emu_env_hook
type emu_env (line 37) | struct emu_env
type emu_env_hook (line 37) | struct emu_env_hook
type emu_env (line 38) | struct emu_env
type emu_env_hook (line 38) | struct emu_env_hook
type emu_env (line 39) | struct emu_env
type emu_env_hook (line 39) | struct emu_env_hook
type emu_env (line 40) | struct emu_env
type emu_env_hook (line 40) | struct emu_env_hook
type emu_env (line 41) | struct emu_env
type emu_env_hook (line 41) | struct emu_env_hook
type emu_env (line 42) | struct emu_env
type emu_env_hook (line 42) | struct emu_env_hook
type emu_env (line 43) | struct emu_env
type emu_env_hook (line 43) | struct emu_env_hook
type emu_env (line 44) | struct emu_env
type emu_env_hook (line 44) | struct emu_env_hook
type emu_env (line 45) | struct emu_env
type emu_env_hook (line 45) | struct emu_env_hook
type emu_env (line 46) | struct emu_env
type emu_env_hook (line 46) | struct emu_env_hook
type emu_env (line 47) | struct emu_env
type emu_env_hook (line 47) | struct emu_env_hook
type emu_env (line 48) | struct emu_env
type emu_env_hook (line 48) | struct emu_env_hook
type emu_env (line 49) | struct emu_env
type emu_env_hook (line 49) | struct emu_env_hook
type emu_env (line 50) | struct emu_env
type emu_env_hook (line 50) | struct emu_env_hook
type emu_env (line 51) | struct emu_env
type emu_env_hook (line 51) | struct emu_env_hook
type emu_env (line 52) | struct emu_env
type emu_env_hook (line 52) | struct emu_env_hook
type emu_env (line 53) | struct emu_env
type emu_env_hook (line 53) | struct emu_env_hook
type emu_env (line 54) | struct emu_env
type emu_env_hook (line 54) | struct emu_env_hook
type emu_env (line 55) | struct emu_env
type emu_env_hook (line 55) | struct emu_env_hook
type emu_env (line 56) | struct emu_env
type emu_env_hook (line 56) | struct emu_env_hook
type emu_env (line 57) | struct emu_env
type emu_env_hook (line 57) | struct emu_env_hook
type emu_env (line 58) | struct emu_env
type emu_env_hook (line 58) | struct emu_env_hook
type emu_env (line 59) | struct emu_env
type emu_env_hook (line 59) | struct emu_env_hook
type emu_env (line 60) | struct emu_env
type emu_env_hook (line 60) | struct emu_env_hook
type emu_env (line 61) | struct emu_env
type emu_env_hook (line 61) | struct emu_env_hook
type emu_env (line 62) | struct emu_env
type emu_env_hook (line 62) | struct emu_env_hook
type PROCESS_INFORMATION (line 71) | typedef struct _PROCESS_INFORMATION
type STARTUPINFO (line 80) | typedef struct _STARTUPINFO
FILE: include/emu/environment/win32/env_w32_dll_export_msvcrt_hooks.h
type emu_env (line 30) | struct emu_env
type emu_env_hook (line 30) | struct emu_env_hook
type emu_env (line 31) | struct emu_env
type emu_env_hook (line 31) | struct emu_env_hook
type emu_env (line 32) | struct emu_env
type emu_env_hook (line 32) | struct emu_env_hook
type emu_env (line 33) | struct emu_env
type emu_env_hook (line 33) | struct emu_env_hook
FILE: include/emu/environment/win32/env_w32_dll_export_shdocvw_hooks.h
type emu_env (line 30) | struct emu_env
type emu_env_hook (line 30) | struct emu_env_hook
FILE: include/emu/environment/win32/env_w32_dll_export_shell32_hooks.h
type emu_env (line 30) | struct emu_env
type emu_env_hook (line 30) | struct emu_env_hook
FILE: include/emu/environment/win32/env_w32_dll_export_urlmon_hooks.h
type emu_env (line 30) | struct emu_env
type emu_env_hook (line 30) | struct emu_env_hook
FILE: include/emu/environment/win32/env_w32_dll_export_ws2_32_hooks.h
type emu_env (line 30) | struct emu_env
type emu_env_hook (line 30) | struct emu_env_hook
type emu_env (line 31) | struct emu_env
type emu_env_hook (line 31) | struct emu_env_hook
type emu_env (line 32) | struct emu_env
type emu_env_hook (line 32) | struct emu_env_hook
type emu_env (line 33) | struct emu_env
type emu_env_hook (line 33) | struct emu_env_hook
type emu_env (line 34) | struct emu_env
type emu_env_hook (line 34) | struct emu_env_hook
type emu_env (line 35) | struct emu_env
type emu_env_hook (line 35) | struct emu_env_hook
type emu_env (line 36) | struct emu_env
type emu_env_hook (line 36) | struct emu_env_hook
type emu_env (line 37) | struct emu_env
type emu_env_hook (line 37) | struct emu_env_hook
type emu_env (line 38) | struct emu_env
type emu_env_hook (line 38) | struct emu_env_hook
type emu_env (line 39) | struct emu_env
type emu_env_hook (line 39) | struct emu_env_hook
type emu_env (line 40) | struct emu_env
type emu_env_hook (line 40) | struct emu_env_hook
FILE: src/emu.c
type emu (line 38) | struct emu
type emu (line 49) | struct emu
type emu (line 51) | struct emu
type emu (line 51) | struct emu
type emu (line 51) | struct emu
type emu (line 56) | struct emu
function emu_free (line 69) | void emu_free(struct emu *e)
type emu_memory (line 81) | struct emu_memory
type emu (line 81) | struct emu
type emu_logging (line 86) | struct emu_logging
type emu (line 86) | struct emu
type emu_cpu (line 91) | struct emu_cpu
type emu (line 91) | struct emu
function emu_errno_set (line 98) | void emu_errno_set(struct emu *e, int err)
function emu_errno (line 103) | int emu_errno(struct emu *c)
function emu_strerror_set (line 108) | void emu_strerror_set(struct emu *e, const char *format, ...)
type emu (line 125) | struct emu
FILE: src/emu_breakpoint.c
type emu_breakpoint (line 35) | struct emu_breakpoint
type emu_breakpoint (line 46) | struct emu_breakpoint
type emu_memory (line 46) | struct emu_memory
type emu_breakpoint (line 48) | struct emu_breakpoint
type emu_breakpoint (line 48) | struct emu_breakpoint
type emu_breakpoint (line 53) | struct emu_breakpoint
function emu_breakpoint_free (line 59) | void emu_breakpoint_free(struct emu_breakpoint *bp)
function emu_breakpoint_set (line 67) | void emu_breakpoint_set(struct emu_memory *m, uint32_t addr, uint8_t acc...
function emu_breakpoint_conditional_set (line 74) | void emu_breakpoint_conditional_set(struct emu_memory *m, uint32_t addr,...
type emu_breakpoint (line 97) | struct emu_breakpoint
type emu_memory (line 97) | struct emu_memory
type emu_breakpoint (line 99) | struct emu_breakpoint
function emu_breakpoint_check (line 110) | void emu_breakpoint_check(struct emu_memory *m, uint32_t addr, uint8_t a...
function emu_breakpoint_remove (line 131) | void emu_breakpoint_remove(struct emu_memory *m, uint32_t addr)
FILE: src/emu_cpu.c
function init_prefix_map (line 62) | static void init_prefix_map(void)
type emu_cpu (line 77) | struct emu_cpu
type emu (line 77) | struct emu
type emu_cpu (line 79) | struct emu_cpu
type emu_cpu (line 79) | struct emu_cpu
type emu_cpu (line 79) | struct emu_cpu
type emu_cpu (line 86) | struct emu_cpu
function emu_cpu_reg32_get (line 145) | inline uint32_t emu_cpu_reg32_get(struct emu_cpu *cpu_p, enum emu_reg32 ...
function emu_cpu_reg32_set (line 150) | inline void emu_cpu_reg32_set(struct emu_cpu *cpu_p, enum emu_reg32 reg...
function emu_cpu_reg16_get (line 155) | inline uint16_t emu_cpu_reg16_get(struct emu_cpu *cpu_p, enum emu_reg16 ...
function emu_cpu_reg16_set (line 160) | inline void emu_cpu_reg16_set(struct emu_cpu *cpu_p, enum emu_reg16 reg,...
function emu_cpu_reg8_get (line 165) | inline uint8_t emu_cpu_reg8_get(struct emu_cpu *cpu_p, enum emu_reg8 reg)
function emu_cpu_reg8_set (line 171) | inline void emu_cpu_reg8_set(struct emu_cpu *cpu_p, enum emu_reg8 reg, u...
function emu_cpu_eflags_get (line 176) | uint32_t emu_cpu_eflags_get(struct emu_cpu *c)
function emu_cpu_eflags_set (line 181) | void emu_cpu_eflags_set(struct emu_cpu *c, uint32_t val)
function emu_cpu_eip_set (line 186) | void emu_cpu_eip_set(struct emu_cpu *c, uint32_t val)
function emu_cpu_eip_get (line 192) | uint32_t emu_cpu_eip_get(struct emu_cpu *c)
function emu_cpu_free (line 197) | void emu_cpu_free(struct emu_cpu *c)
function emu_cpu_debug_print (line 203) | void emu_cpu_debug_print(struct emu_cpu *c)
function debug_instruction (line 246) | void debug_instruction(struct emu_instruction *ei)
function dasm_print_instruction (line 436) | uint32_t dasm_print_instruction(uint32_t eip, uint8_t *data, uint32_t si...
function emu_cpu_parse (line 468) | int32_t emu_cpu_parse(struct emu_cpu *c)
function emu_cpu_step (line 829) | int32_t emu_cpu_step(struct emu_cpu *c)
function emu_cpu_run (line 897) | int32_t emu_cpu_run(struct emu_cpu *c)
function emu_cpu_debugflag_set (line 913) | void emu_cpu_debugflag_set(struct emu_cpu *c, uint8_t flag)
function emu_cpu_debugflag_unset (line 918) | void emu_cpu_debugflag_unset(struct emu_cpu *c, uint8_t flag)
FILE: src/emu_getpc.c
function emu_getpc_check (line 46) | uint8_t emu_getpc_check(struct emu *e, uint8_t *data, uint32_t size, uin...
FILE: src/emu_graph.c
type emu_edge (line 40) | struct emu_edge
type emu_edge (line 42) | struct emu_edge
type emu_edge (line 42) | struct emu_edge
type emu_edge (line 42) | struct emu_edge
type emu_edge (line 47) | struct emu_edge
function emu_edge_free (line 52) | void emu_edge_free(struct emu_edge *ee)
type emu_vertex (line 58) | struct emu_vertex
type emu_vertex (line 60) | struct emu_vertex
type emu_vertex (line 60) | struct emu_vertex
type emu_vertex (line 60) | struct emu_vertex
type emu_vertex (line 65) | struct emu_vertex
function emu_vertex_free (line 71) | void emu_vertex_free(struct emu_vertex *ev)
function emu_vertex_data_set (line 76) | void emu_vertex_data_set(struct emu_vertex *ev, void *data)
type emu_vertex (line 81) | struct emu_vertex
type emu_edge (line 87) | struct emu_edge
type emu_vertex (line 87) | struct emu_vertex
type emu_vertex (line 87) | struct emu_vertex
type emu_edge (line 90) | struct emu_edge
type emu_edge (line 106) | struct emu_edge
type emu_graph (line 128) | struct emu_graph
type emu_graph (line 130) | struct emu_graph
type emu_graph (line 130) | struct emu_graph
type emu_graph (line 130) | struct emu_graph
type emu_graph (line 135) | struct emu_graph
function emu_graph_free (line 141) | void emu_graph_free(struct emu_graph *eg)
function emu_graph_vertex_add (line 155) | void emu_graph_vertex_add(struct emu_graph *eg, struct emu_vertex *ev)
function emu_graph_path_exists (line 162) | bool emu_graph_path_exists(struct emu_graph *eg, struct emu_vertex *from...
function emu_graph_loop_detect (line 213) | bool emu_graph_loop_detect(struct emu_graph *eg, struct emu_vertex *from)
function emu_graph_distance (line 285) | int32_t emu_graph_distance(struct emu_graph *eg, struct emu_vertex *from...
FILE: src/emu_hashtable.c
type emu_hashtable (line 40) | struct emu_hashtable
type emu_hashtable (line 45) | struct emu_hashtable
type emu_hashtable (line 45) | struct emu_hashtable
type emu_hashtable (line 45) | struct emu_hashtable
type emu_hashtable (line 50) | struct emu_hashtable
type emu_hashtable_bucket (line 56) | struct emu_hashtable_bucket
type emu_hashtable_bucket (line 56) | struct emu_hashtable_bucket
type emu_hashtable_bucket (line 57) | struct emu_hashtable_bucket
function emu_hashtable_free (line 62) | void emu_hashtable_free(struct emu_hashtable *eh)
type emu_hashtable_item (line 94) | struct emu_hashtable_item
type emu_hashtable (line 94) | struct emu_hashtable
type emu_hashtable_bucket (line 98) | struct emu_hashtable_bucket
type emu_hashtable_item (line 102) | struct emu_hashtable_item
type emu_hashtable_bucket_item (line 103) | struct emu_hashtable_bucket_item
type emu_hashtable_item (line 115) | struct emu_hashtable_item
type emu_hashtable (line 115) | struct emu_hashtable
type emu_hashtable_item (line 117) | struct emu_hashtable_item
type emu_hashtable_bucket_item (line 120) | struct emu_hashtable_bucket_item
type emu_hashtable_bucket (line 125) | struct emu_hashtable_bucket
function emu_hashtable_delete (line 141) | bool emu_hashtable_delete(struct emu_hashtable *eh, void *key)
type emu_hashtable_bucket (line 173) | struct emu_hashtable_bucket
type emu_hashtable_bucket (line 175) | struct emu_hashtable_bucket
type emu_hashtable_bucket (line 175) | struct emu_hashtable_bucket
type emu_hashtable_bucket (line 175) | struct emu_hashtable_bucket
type emu_hashtable_bucket (line 180) | struct emu_hashtable_bucket
function emu_hashtable_bucket_free (line 185) | void emu_hashtable_bucket_free(struct emu_hashtable_bucket *ehb)
type emu_hashtable_bucket_item (line 191) | struct emu_hashtable_bucket_item
type emu_hashtable_bucket_item (line 193) | struct emu_hashtable_bucket_item
type emu_hashtable_bucket_item (line 193) | struct emu_hashtable_bucket_item
type emu_hashtable_bucket_item (line 193) | struct emu_hashtable_bucket_item
type emu_hashtable_bucket_item (line 198) | struct emu_hashtable_bucket_item
function emu_hashtable_bucket_item_free (line 209) | void emu_hashtable_bucket_item_free(struct emu_hashtable_bucket_item *ehbi)
function emu_hashtable_string_hash (line 224) | uint32_t emu_hashtable_string_hash(void *key)
function emu_hashtable_string_cmp (line 250) | bool emu_hashtable_string_cmp(void *a, void *b)
function emu_hashtable_ptr_hash (line 258) | uint32_t emu_hashtable_ptr_hash(void *key)
function emu_hashtable_ptr_cmp (line 265) | bool emu_hashtable_ptr_cmp(void *a, void *b)
FILE: src/emu_list.c
type emu_list_item (line 35) | struct emu_list_item
type emu_list_item (line 37) | struct emu_list_item
type emu_list_item (line 37) | struct emu_list_item
type emu_list_item (line 38) | struct emu_list_item
FILE: src/emu_log.c
type emu_logging (line 38) | struct emu_logging
type emu_logging (line 46) | struct emu_logging
type emu_logging (line 48) | struct emu_logging
type emu_logging (line 48) | struct emu_logging
type emu_logging (line 48) | struct emu_logging
type emu_logging (line 53) | struct emu_logging
function emu_log_free (line 60) | void emu_log_free(struct emu_logging *el)
function emu_log_level_set (line 65) | void emu_log_level_set(struct emu_logging *el, enum emu_log_level level)
function emu_log (line 70) | void emu_log(struct emu *e, enum emu_log_level level, const char *format...
function emu_log_set_logcb (line 96) | void emu_log_set_logcb(struct emu_logging *el, emu_log_logcb logcb)
function emu_log_default_logcb (line 101) | void emu_log_default_logcb(struct emu *e, enum emu_log_level level, cons...
FILE: src/emu_memory.c
type emu_memory (line 57) | struct emu_memory
function emu_memory_get_usage (line 116) | uint32_t emu_memory_get_usage(struct emu_memory *m)
type emu_memory (line 139) | struct emu_memory
type emu (line 139) | struct emu
type emu_memory (line 141) | struct emu_memory
type emu_memory (line 141) | struct emu_memory
type emu_memory (line 141) | struct emu_memory
type emu_memory (line 146) | struct emu_memory
function emu_memory_free (line 171) | void emu_memory_free(struct emu_memory *m)
function emu_memory_clear (line 198) | void emu_memory_clear(struct emu_memory *m)
function page_is_alloc (line 221) | static inline int page_is_alloc(struct emu_memory *em, uint32_t addr)
function page_alloc (line 234) | static inline int page_alloc(struct emu_memory *em, uint32_t addr)
type emu_memory (line 266) | struct emu_memory
function emu_memory_read_byte (line 279) | int32_t emu_memory_read_byte(struct emu_memory *m, uint32_t addr, uint8_...
function emu_memory_read_word (line 296) | int32_t emu_memory_read_word(struct emu_memory *m, uint32_t addr, uint16...
function emu_memory_read_dword (line 310) | int32_t emu_memory_read_dword(struct emu_memory *m, uint32_t addr, uint3...
function emu_memory_read_block (line 326) | int32_t emu_memory_read_block(struct emu_memory *m, uint32_t addr, void ...
function emu_memory_read_string (line 355) | int32_t emu_memory_read_string(struct emu_memory *m, uint32_t addr, stru...
function emu_memory_write_byte (line 385) | int32_t emu_memory_write_byte(struct emu_memory *m, uint32_t addr, uint8...
function emu_memory_write_word (line 408) | int32_t emu_memory_write_word(struct emu_memory *m, uint32_t addr, uint1...
function emu_memory_write_dword (line 424) | int32_t emu_memory_write_dword(struct emu_memory *m, uint32_t addr, uint...
function emu_memory_write_block (line 442) | int32_t emu_memory_write_block(struct emu_memory *m, uint32_t addr, cons...
function emu_memory_segment_select (line 477) | void emu_memory_segment_select(struct emu_memory *m, enum emu_segment s)
function emu_memory_segment_get (line 483) | enum emu_segment emu_memory_segment_get(struct emu_memory *m)
function emu_memory_alloc (line 512) | int32_t emu_memory_alloc(struct emu_memory *m, uint32_t *addr, size_t len)
function emu_memory_mode_ro (line 555) | void emu_memory_mode_ro(struct emu_memory *m)
function emu_memory_mode_rw (line 560) | void emu_memory_mode_rw(struct emu_memory *m)
type emu_breakpoint (line 567) | struct emu_breakpoint
type emu_memory (line 567) | struct emu_memory
type emu (line 573) | struct emu
type emu_memory (line 573) | struct emu_memory
FILE: src/emu_queue.c
type emu_queue (line 35) | struct emu_queue
type emu_queue (line 37) | struct emu_queue
type emu_queue (line 37) | struct emu_queue
type emu_queue (line 37) | struct emu_queue
type emu_queue (line 42) | struct emu_queue
function emu_queue_free (line 46) | void emu_queue_free(struct emu_queue *eq)
type emu_queue (line 55) | struct emu_queue
function emu_queue_enqueue (line 60) | void emu_queue_enqueue(struct emu_queue *eq, void *data)
type emu_queue (line 76) | struct emu_queue
type emu_queue_item (line 81) | struct emu_queue_item
function emu_queue_empty (line 95) | bool emu_queue_empty(struct emu_queue *eq)
type emu_queue_item (line 104) | struct emu_queue_item
type emu_queue_item (line 106) | struct emu_queue_item
type emu_queue_item (line 106) | struct emu_queue_item
type emu_queue_item (line 106) | struct emu_queue_item
type emu_queue_item (line 111) | struct emu_queue_item
function emu_queue_item_free (line 116) | void emu_queue_item_free(struct emu_queue_item *eqi)
FILE: src/emu_shellcode.c
function tested_positions_cmp (line 54) | int tested_positions_cmp(struct emu_list_item *a, struct emu_list_item *b)
function emu_shellcode_run_and_track (line 148) | int32_t emu_shellcode_run_and_track(struct emu *e,
function emu_shellcode_test (line 471) | int32_t emu_shellcode_test(struct emu *e, uint8_t *data, uint16_t size)
type emu_stats (line 620) | struct emu_stats
type emu_stats (line 622) | struct emu_stats
type emu_stats (line 622) | struct emu_stats
type emu_stats (line 623) | struct emu_stats
function emu_stats_free (line 627) | void emu_stats_free(struct emu_stats *es)
FILE: src/emu_source.c
function emu_source_instruction_graph_create (line 41) | uint32_t emu_source_instruction_graph_create(struct emu *e, struct emu_t...
function emu_source_backward_bfs (line 111) | void emu_source_backward_bfs(struct emu_track_and_source *et, struct emu...
function emu_source_forward_bfs (line 150) | void emu_source_forward_bfs(struct emu_track_and_source *et, struct emu_...
FILE: src/emu_stack.c
type emu_stack (line 35) | struct emu_stack
type emu_stack (line 37) | struct emu_stack
type emu_stack (line 37) | struct emu_stack
type emu_stack (line 38) | struct emu_stack
function emu_stack_free (line 42) | void emu_stack_free(struct emu_stack *es)
type emu_stack (line 47) | struct emu_stack
function emu_stack_push (line 52) | void emu_stack_push(struct emu_stack *es, void *data)
type emu_stack (line 61) | struct emu_stack
type emu_stack_item (line 66) | struct emu_stack_item
function emu_stack_empty (line 73) | bool emu_stack_empty(struct emu_stack *es)
FILE: src/emu_string.c
type emu_string (line 37) | struct emu_string
type emu_string (line 39) | struct emu_string
type emu_string (line 39) | struct emu_string
type emu_string (line 39) | struct emu_string
type emu_string (line 44) | struct emu_string
function emu_string_free (line 48) | void emu_string_free(struct emu_string *s)
type emu_string (line 54) | struct emu_string
function emu_string_append_char (line 61) | void emu_string_append_char(struct emu_string *s, const char *data)
function emu_string_append_format (line 71) | void emu_string_append_format(struct emu_string *s, const char *format, ...
FILE: src/emu_track.c
type emu_track_and_source (line 40) | struct emu_track_and_source
type emu_track_and_source (line 42) | struct emu_track_and_source
type emu_track_and_source (line 42) | struct emu_track_and_source
type emu_track_and_source (line 42) | struct emu_track_and_source
type emu_track_and_source (line 43) | struct emu_track_and_source
function emu_track_and_source_free (line 48) | void emu_track_and_source_free(struct emu_track_and_source *et)
type emu_instruction (line 67) | struct emu_instruction
function emu_track_instruction_check (line 72) | int32_t emu_track_instruction_check(struct emu *e, struct emu_track_and_...
type emu_source_and_track_instr_info (line 127) | struct emu_source_and_track_instr_info
type emu_cpu (line 127) | struct emu_cpu
type emu_source_and_track_instr_info (line 129) | struct emu_source_and_track_instr_info
type emu_source_and_track_instr_info (line 129) | struct emu_source_and_track_instr_info
type emu_source_and_track_instr_info (line 129) | struct emu_source_and_track_instr_info
type emu_source_and_track_instr_info (line 134) | struct emu_source_and_track_instr_info
function emu_source_and_track_instr_info_free (line 161) | void emu_source_and_track_instr_info_free(struct emu_source_and_track_in...
function emu_source_and_track_instr_info_free_void (line 169) | void emu_source_and_track_instr_info_free_void(void *x)
function emu_tracking_info_diff (line 174) | void emu_tracking_info_diff(struct emu_tracking_info *a, struct emu_trac...
type emu_tracking_info (line 185) | struct emu_tracking_info
type emu_tracking_info (line 187) | struct emu_tracking_info
type emu_tracking_info (line 187) | struct emu_tracking_info
type emu_tracking_info (line 188) | struct emu_tracking_info
function emu_tracking_info_free (line 193) | void emu_tracking_info_free(struct emu_tracking_info *eti)
function emu_tracking_info_clear (line 198) | void emu_tracking_info_clear(struct emu_tracking_info *eti)
function emu_tracking_info_copy (line 204) | void emu_tracking_info_copy(struct emu_tracking_info *from, struct emu_t...
function emu_tracking_info_covers (line 209) | bool emu_tracking_info_covers(struct emu_tracking_info *a, struct emu_tr...
function emu_tracking_info_debug_print (line 236) | void emu_tracking_info_debug_print(struct emu_tracking_info *a)
FILE: src/environment/emu_env.c
type emu_env (line 34) | struct emu_env
type emu (line 34) | struct emu
type emu_env (line 36) | struct emu_env
type emu_env (line 36) | struct emu_env
type emu_env (line 37) | struct emu_env
function emu_env_free (line 46) | void emu_env_free(struct emu_env *env)
FILE: src/environment/emu_profile.c
type byte (line 53) | typedef unsigned char byte;
type emu_profile (line 59) | struct emu_profile
type emu_profile (line 61) | struct emu_profile
type emu_profile (line 61) | struct emu_profile
type emu_profile (line 62) | struct emu_profile
function emu_profile_free (line 69) | void emu_profile_free(struct emu_profile *profile)
function emu_profile_function_add (line 81) | void emu_profile_function_add(struct emu_profile *profile, char *fnname)
function emu_profile_argument_add (line 91) | void emu_profile_argument_add(struct emu_profile *profile, struct emu_pr...
function emu_profile_argument_struct_start (line 114) | void emu_profile_argument_struct_start(struct emu_profile* profile, cons...
function emu_profile_argument_struct_end (line 123) | void emu_profile_argument_struct_end(struct emu_profile *profile)
function emu_profile_argument_array_start (line 129) | void emu_profile_argument_array_start(struct emu_profile* profile, const...
function emu_profile_argument_array_end (line 136) | void emu_profile_argument_array_end(struct emu_profile *profile)
function emu_profile_argument_add_none (line 142) | void emu_profile_argument_add_none(struct emu_profile *profile)
function emu_profile_argument_add_int (line 148) | void emu_profile_argument_add_int(struct emu_profile *profile, char *arg...
function emu_profile_argument_add_short (line 156) | void emu_profile_argument_add_short(struct emu_profile *profile, char *a...
function emu_profile_argument_add_string (line 164) | void emu_profile_argument_add_string(struct emu_profile *profile, char *...
function emu_profile_argument_add_bytea (line 174) | void emu_profile_argument_add_bytea(struct emu_profile *profile, char *a...
function emu_profile_argument_add_ptr (line 185) | void emu_profile_argument_add_ptr(struct emu_profile *profile, char *arg...
function emu_profile_argument_add_ip (line 193) | void emu_profile_argument_add_ip(struct emu_profile *profile, char *argt...
function emu_profile_argument_add_port (line 200) | void emu_profile_argument_add_port(struct emu_profile *profile, char *ar...
function emu_profile_argument_add_sockaddr_ptr (line 207) | void emu_profile_argument_add_sockaddr_ptr(struct emu_profile *profile, ...
type emu_profile_function (line 235) | struct emu_profile_function
type emu_profile_function (line 237) | struct emu_profile_function
type emu_profile_function (line 237) | struct emu_profile_function
type emu_profile_function (line 238) | struct emu_profile_function
function emu_profile_function_free (line 247) | void emu_profile_function_free(struct emu_profile_function *function)
function emu_profile_function_returnvalue_int_set (line 265) | void emu_profile_function_returnvalue_int_set(struct emu_profile *profil...
function emu_profile_function_returnvalue_ptr_set (line 275) | void emu_profile_function_returnvalue_ptr_set(struct emu_profile *profil...
function measure_size (line 286) | uint32_t measure_size(struct emu_profile_argument *argument, bool follow...
function copy_data (line 353) | int copy_data(struct emu_profile_argument *argument, uint8_t *addr, uint...
type emu_profile_function (line 441) | struct emu_profile_function
type emu_profile_argument (line 443) | struct emu_profile_argument
type emu_profile_argument (line 476) | struct emu_profile_argument
type emu_profile_argument_render (line 476) | enum emu_profile_argument_render
type emu_profile_argument (line 478) | struct emu_profile_argument
type emu_profile_argument (line 478) | struct emu_profile_argument
type emu_profile_argument (line 479) | struct emu_profile_argument
function emu_profile_argument_free (line 497) | void emu_profile_argument_free(struct emu_profile_argument *argument)
function emu_profile_argument_debug (line 554) | void emu_profile_argument_debug(struct emu_profile_argument *argument, i...
function emu_profile_debug (line 634) | void emu_profile_debug(struct emu_profile *profile)
function emu_profile_function_debug (line 644) | void emu_profile_function_debug(struct emu_profile_function *function)
function emu_profile_dump_byte_write (line 677) | int emu_profile_dump_byte_write(FILE *f, byte value)
function emu_profile_dump_int_write (line 684) | int emu_profile_dump_int_write(FILE *f, int value)
function emu_profile_dump_short_write (line 693) | int emu_profile_dump_short_write(FILE *f, int16_t value)
function emu_profile_dump_string_write (line 703) | int emu_profile_dump_string_write(FILE *f, const char *string)
function emu_profile_dump_bytea_write (line 714) | int emu_profile_dump_bytea_write(FILE *f, const unsigned char *data, uin...
function emu_profile_argument_dump (line 723) | int emu_profile_argument_dump(FILE *f, struct emu_profile_argument *argu...
function emu_profile_function_dump (line 784) | int emu_profile_function_dump(FILE *f, struct emu_profile_function *func...
function emu_profile_dump (line 804) | int emu_profile_dump(struct emu_profile *profile, const char *path)
function emu_profile_dump_byte_read (line 847) | int emu_profile_dump_byte_read(FILE *f, byte *b)
function emu_profile_dump_int_read (line 856) | int emu_profile_dump_int_read(FILE *f, int *i)
function emu_profile_dump_short_read (line 866) | int emu_profile_dump_short_read(FILE *f, int16_t *i)
function emu_profile_dump_string_read (line 878) | int emu_profile_dump_string_read(FILE *f, char **string)
function emu_profile_dump_bytea_read (line 889) | int emu_profile_dump_bytea_read(FILE *f, unsigned char **data, uint32_t ...
function emu_profile_argument_parse (line 900) | int emu_profile_argument_parse(FILE *f, struct emu_profile *profile)
function emu_profile_function_parse (line 1018) | int emu_profile_function_parse(FILE *f, struct emu_profile *profile)
function emu_profile_parse (line 1042) | int emu_profile_parse(struct emu_profile *profile, const char *path)
FILE: src/environment/linux/emu_env_linux.c
type emu_env_linux (line 38) | struct emu_env_linux
type emu (line 38) | struct emu
type emu_env_linux (line 40) | struct emu_env_linux
type emu_env_linux (line 40) | struct emu_env_linux
type emu_env_linux (line 41) | struct emu_env_linux
type emu_env_hook (line 47) | struct emu_env_hook
type emu_env_linux_syscall (line 47) | struct emu_env_linux_syscall
type emu_env_linux_syscall (line 50) | struct emu_env_linux_syscall
function emu_env_linux_free (line 63) | void emu_env_linux_free(struct emu_env_linux *eel)
type emu_env_hook (line 72) | struct emu_env_hook
type emu_env (line 72) | struct emu_env
type emu_cpu (line 74) | struct emu_cpu
type emu_env_linux_syscall_entry (line 81) | struct emu_env_linux_syscall_entry
type emu_hashtable_item (line 96) | struct emu_hashtable_item
type emu_env_hook (line 99) | struct emu_env_hook
function emu_env_linux_syscall_hook (line 109) | int32_t emu_env_linux_syscall_hook(struct emu_env *env, const char *sysc...
type emu_env_linux (line 128) | struct emu_env_linux
type emu_cpu (line 151) | struct emu_cpu
FILE: src/environment/linux/env_linux_syscall_hooks.c
function env_linux_hook_exit (line 45) | int32_t env_linux_hook_exit(struct emu_env *env, struct emu_env_hook *hook)
function env_linux_hook_chmod (line 63) | int32_t env_linux_hook_chmod(struct emu_env *env, struct emu_env_hook *h...
function env_linux_hook_fork (line 80) | int32_t env_linux_hook_fork(struct emu_env *env, struct emu_env_hook *hook)
function env_linux_hook_execve (line 90) | int32_t env_linux_hook_execve(struct emu_env *env, struct emu_env_hook *...
function env_linux_hook_dup2 (line 163) | int32_t env_linux_hook_dup2(struct emu_env *env, struct emu_env_hook *hook)
function env_linux_hook_socketcall (line 184) | int32_t env_linux_hook_socketcall(struct emu_env *env, struct emu_env_ho...
FILE: src/environment/win32/emu_env_w32.c
type emu_env_w32_known_dll_segment (line 71) | struct emu_env_w32_known_dll_segment
type emu_env_w32_known_dll_segment (line 86) | struct emu_env_w32_known_dll_segment
type emu_env_w32_known_dll_segment (line 101) | struct emu_env_w32_known_dll_segment
type emu_env_w32_known_dll_segment (line 116) | struct emu_env_w32_known_dll_segment
type emu_env_w32_known_dll_segment (line 132) | struct emu_env_w32_known_dll_segment
type emu_env_w32_known_dll_segment (line 148) | struct emu_env_w32_known_dll_segment
type emu_env_w32_known_dll_segment (line 164) | struct emu_env_w32_known_dll_segment
type emu_env_w32_known_dll_segment (line 179) | struct emu_env_w32_known_dll_segment
type emu_env_w32_known_dll_segment (line 194) | struct emu_env_w32_known_dll_segment
type emu_env_w32_known_dll_segment (line 209) | struct emu_env_w32_known_dll_segment
type emu_env_w32_known_dll_segment (line 224) | struct emu_env_w32_known_dll_segment
type emu_env_w32_known_dll (line 240) | struct emu_env_w32_known_dll
type emu_env_w32 (line 338) | struct emu_env_w32
type emu (line 338) | struct emu
type emu_env_w32 (line 340) | struct emu_env_w32
type emu_env_w32 (line 340) | struct emu_env_w32
type emu_env_w32 (line 340) | struct emu_env_w32
type emu_env_w32 (line 341) | struct emu_env_w32
type emu_memory (line 346) | struct emu_memory
type emu_segment (line 347) | enum emu_segment
type UNICODE_STRING (line 380) | typedef struct _UNICODE_STRING
type LIST_ENTRY (line 389) | typedef struct _LIST_ENTRY
type PVOID (line 397) | typedef uint32_t PVOID;
type BYTE (line 398) | typedef unsigned char BYTE;
type ULONG (line 399) | typedef uint32_t ULONG;
type LDR_DATA_TABLE_ENTRY (line 401) | typedef struct _LDR_DATA_TABLE_ENTRY
type PEB_LDR_DATA (line 422) | typedef struct _PEB_LDR_DATA
type _PEB_LDR_DATA (line 433) | struct _PEB_LDR_DATA
type _LDR_DATA_TABLE_ENTRY (line 434) | struct _LDR_DATA_TABLE_ENTRY
type _LDR_DATA_TABLE_ENTRY (line 435) | struct _LDR_DATA_TABLE_ENTRY
type _LDR_DATA_TABLE_ENTRY (line 441) | struct _LDR_DATA_TABLE_ENTRY
type emu_env_w32_known_dll (line 450) | struct emu_env_w32_known_dll
type _LDR_DATA_TABLE_ENTRY (line 451) | struct _LDR_DATA_TABLE_ENTRY
type _LDR_DATA_TABLE_ENTRY (line 459) | struct _LDR_DATA_TABLE_ENTRY
type _LDR_DATA_TABLE_ENTRY (line 459) | struct _LDR_DATA_TABLE_ENTRY
type _LDR_DATA_TABLE_ENTRY (line 462) | struct _LDR_DATA_TABLE_ENTRY
type _LDR_DATA_TABLE_ENTRY (line 462) | struct _LDR_DATA_TABLE_ENTRY
function emu_env_w32_free (line 487) | void emu_env_w32_free(struct emu_env_w32 *env)
function emu_env_w32_load_dll (line 502) | int32_t emu_env_w32_load_dll(struct emu_env_w32 *env, char *dllname)
type emu_env_hook (line 553) | struct emu_env_hook
type emu_env (line 553) | struct emu_env
type emu_env_w32_dll (line 570) | struct emu_env_w32_dll
type emu_hashtable_item (line 572) | struct emu_hashtable_item
type emu_env_hook (line 581) | struct emu_env_hook
type emu_env_hook (line 581) | struct emu_env_hook
function emu_env_w32_export_hook (line 600) | int32_t emu_env_w32_export_hook(struct emu_env *env,
function emu_env_w32_step_failed (line 630) | int32_t emu_env_w32_step_failed(struct emu_env *env)
FILE: src/environment/win32/emu_env_w32_dll.c
type emu_env_w32_dll (line 37) | struct emu_env_w32_dll
type emu_env_w32_dll (line 39) | struct emu_env_w32_dll
type emu_env_w32_dll (line 39) | struct emu_env_w32_dll
type emu_env_w32_dll (line 39) | struct emu_env_w32_dll
type emu_env_w32_dll (line 40) | struct emu_env_w32_dll
function emu_env_w32_dll_free (line 44) | void emu_env_w32_dll_free(struct emu_env_w32_dll *dll)
function emu_env_w32_dll_exports_copy (line 54) | void emu_env_w32_dll_exports_copy(struct emu_env_w32_dll *to,struct emu_...
FILE: src/environment/win32/emu_env_w32_dll_export.c
type emu_env_w32_dll_export (line 52) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 54) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 54) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 54) | struct emu_env_w32_dll_export
type emu_env_w32_dll_export (line 55) | struct emu_env_w32_dll_export
function emu_env_w32_dll_export_free (line 59) | void emu_env_w32_dll_export_free(struct emu_env_w32_dll_export *exp)
function emu_env_w32_dll_export_copy (line 64) | void emu_env_w32_dll_export_copy(struct emu_env_w32_dll_export *to, stru...
FILE: src/environment/win32/env_w32_dll_export_kernel32_hooks.c
function env_w32_hook_CloseHandle (line 58) | int32_t env_w32_hook_CloseHandle(struct emu_env *env, struct emu_env_hoo...
function env_w32_hook_CreateFileA (line 109) | int32_t env_w32_hook_CreateFileA(struct emu_env *env, struct emu_env_hoo...
function env_w32_hook_CreateFileMapping (line 195) | int32_t env_w32_hook_CreateFileMapping(struct emu_env *env, struct emu_e...
function env_w32_hook_CreateProcessA (line 258) | int32_t env_w32_hook_CreateProcessA(struct emu_env *env, struct emu_env_...
function env_w32_hook_CreateProcessInternalA (line 443) | int32_t env_w32_hook_CreateProcessInternalA(struct emu_env *env, struct ...
function env_w32_hook_DeleteFileA (line 542) | int32_t env_w32_hook_DeleteFileA(struct emu_env *env, struct emu_env_hoo...
function env_w32_hook_ExitProcess (line 573) | int32_t env_w32_hook_ExitProcess(struct emu_env *env, struct emu_env_hoo...
function env_w32_hook_ExitThread (line 617) | int32_t env_w32_hook_ExitThread(struct emu_env *env, struct emu_env_hook...
function env_w32_hook_GetFileSize (line 662) | int32_t env_w32_hook_GetFileSize(struct emu_env *env, struct emu_env_hoo...
function env_w32_hook_GetModuleHandleA (line 703) | int32_t env_w32_hook_GetModuleHandleA(struct emu_env *env, struct emu_en...
function env_w32_hook_GetVersion (line 761) | int32_t env_w32_hook_GetVersion(struct emu_env *env, struct emu_env_hook...
function env_w32_hook_GetProcAddress (line 784) | int32_t env_w32_hook_GetProcAddress(struct emu_env *env, struct emu_env_...
function env_w32_hook_GetSystemDirectoryA (line 875) | int32_t env_w32_hook_GetSystemDirectoryA(struct emu_env *env, struct emu...
function env_w32_hook_GetTempPathA (line 918) | int32_t env_w32_hook_GetTempPathA(struct emu_env *env, struct emu_env_ho...
function env_w32_hook_GetTickCount (line 960) | int32_t env_w32_hook_GetTickCount(struct emu_env *env, struct emu_env_ho...
function env_w32_hook__hwrite (line 986) | int32_t env_w32_hook__hwrite(struct emu_env *env, struct emu_env_hook *h...
function env_w32_hook__lcreat (line 991) | int32_t env_w32_hook__lcreat(struct emu_env *env, struct emu_env_hook *h...
function env_w32_hook__lclose (line 1044) | int32_t env_w32_hook__lclose(struct emu_env *env, struct emu_env_hook *h...
function env_w32_hook__lwrite (line 1086) | int32_t env_w32_hook__lwrite(struct emu_env *env, struct emu_env_hook *h...
function env_w32_hook_LoadLibrayA (line 1157) | int32_t env_w32_hook_LoadLibrayA(struct emu_env *env, struct emu_env_hoo...
function env_w32_hook_malloc (line 1236) | int32_t env_w32_hook_malloc(struct emu_env *env, struct emu_env_hook *hook)
function env_w32_hook_memset (line 1279) | int32_t env_w32_hook_memset(struct emu_env *env, struct emu_env_hook *hook)
function env_w32_hook_MapViewOfFile (line 1319) | int32_t env_w32_hook_MapViewOfFile(struct emu_env *env, struct emu_env_h...
function env_w32_hook_Sleep (line 1368) | int32_t env_w32_hook_Sleep(struct emu_env *env, struct emu_env_hook *hook)
function env_w32_hook_UnmapViewOfFile (line 1400) | int32_t env_w32_hook_UnmapViewOfFile(struct emu_env *env, struct emu_env...
function env_w32_hook_SetFilePointer (line 1428) | int32_t env_w32_hook_SetFilePointer(struct emu_env *env, struct emu_env_...
function env_w32_hook_SetUnhandledExceptionFilter (line 1467) | int32_t env_w32_hook_SetUnhandledExceptionFilter(struct emu_env *env, st...
function env_w32_hook_WaitForSingleObject (line 1503) | int32_t env_w32_hook_WaitForSingleObject(struct emu_env *env, struct emu...
function env_w32_hook_WinExec (line 1553) | int32_t env_w32_hook_WinExec(struct emu_env *env, struct emu_env_hook *h...
function env_w32_hook_WriteFile (line 1612) | int32_t env_w32_hook_WriteFile(struct emu_env *env, struct emu_env_hook ...
function env_w32_hook_VirtualProtect (line 1692) | int32_t env_w32_hook_VirtualProtect(struct emu_env *env, struct emu_env_...
function env_w32_hook_VirtualProtectEx (line 1749) | int32_t env_w32_hook_VirtualProtectEx(struct emu_env *env, struct emu_en...
function env_w32_hook_TerminateThread (line 1812) | int32_t env_w32_hook_TerminateThread(struct emu_env *env, struct emu_env...
FILE: src/environment/win32/env_w32_dll_export_msvcrt_hooks.c
function env_w32_hook__execv (line 51) | int32_t env_w32_hook__execv(struct emu_env *env, struct emu_env_hook *hook)
function env_w32_hook_fclose (line 101) | int32_t env_w32_hook_fclose(struct emu_env *env, struct emu_env_hook *hook)
function env_w32_hook_fopen (line 139) | int32_t env_w32_hook_fopen(struct emu_env *env, struct emu_env_hook *hook)
function env_w32_hook_fwrite (line 204) | int32_t env_w32_hook_fwrite(struct emu_env *env, struct emu_env_hook *hook)
FILE: src/environment/win32/env_w32_dll_export_shdocvw_hooks.c
function env_w32_hook_IEWinMain (line 52) | int32_t env_w32_hook_IEWinMain(struct emu_env *env, struct emu_env_hook ...
FILE: src/environment/win32/env_w32_dll_export_shell32_hooks.c
function GetSHFolderName (line 51) | void GetSHFolderName(int clsid, char* buf255)
function env_hook_SHGetSpecialFolderPathA (line 94) | int32_t env_hook_SHGetSpecialFolderPathA(struct emu_env *env, struct emu...
FILE: src/environment/win32/env_w32_dll_export_urlmon_hooks.c
function env_w32_hook_URLDownloadToFileA (line 51) | int32_t env_w32_hook_URLDownloadToFileA(struct emu_env *env, struct emu_...
FILE: src/environment/win32/env_w32_dll_export_ws2_32_hooks.c
function env_w32_hook_accept (line 56) | int32_t env_w32_hook_accept(struct emu_env *env, struct emu_env_hook *hook)
function env_w32_hook_bind (line 113) | int32_t env_w32_hook_bind(struct emu_env *env, struct emu_env_hook *hook)
function env_w32_hook_closesocket (line 179) | int32_t env_w32_hook_closesocket(struct emu_env *env, struct emu_env_hoo...
function env_w32_hook_connect (line 222) | int32_t env_w32_hook_connect(struct emu_env *env, struct emu_env_hook *h...
function env_w32_hook_listen (line 280) | int32_t env_w32_hook_listen(struct emu_env *env, struct emu_env_hook *hook)
function env_w32_hook_recv (line 340) | int32_t env_w32_hook_recv(struct emu_env *env, struct emu_env_hook *hook)
function env_w32_hook_send (line 424) | int32_t env_w32_hook_send(struct emu_env *env, struct emu_env_hook *hook)
function env_w32_hook_sendto (line 501) | int32_t env_w32_hook_sendto(struct emu_env *env, struct emu_env_hook *hook)
function env_w32_hook_socket (line 590) | int32_t env_w32_hook_socket(struct emu_env *env, struct emu_env_hook *hook)
function env_w32_hook_WSASocketA (line 646) | int32_t env_w32_hook_WSASocketA(struct emu_env *env, struct emu_env_hook...
function env_w32_hook_WSAStartup (line 730) | int32_t env_w32_hook_WSAStartup(struct emu_env *env, struct emu_env_hook...
FILE: src/functions/aaa.c
function instr_aaa_37 (line 37) | int32_t instr_aaa_37(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/adc.c
type emu_cpu (line 116) | struct emu_cpu
type emu_cpu_instruction (line 116) | struct emu_cpu_instruction
type emu_cpu (line 149) | struct emu_cpu
type emu_cpu_instruction (line 149) | struct emu_cpu_instruction
type emu_cpu (line 344) | struct emu_cpu
type emu_cpu_instruction (line 344) | struct emu_cpu_instruction
type emu_cpu (line 414) | struct emu_cpu
type emu_cpu_instruction (line 414) | struct emu_cpu_instruction
FILE: src/functions/add.c
type emu_cpu (line 57) | struct emu_cpu
type emu_cpu_instruction (line 57) | struct emu_cpu_instruction
type emu_cpu (line 90) | struct emu_cpu
type emu_cpu_instruction (line 90) | struct emu_cpu_instruction
type emu_cpu (line 285) | struct emu_cpu
type emu_cpu_instruction (line 285) | struct emu_cpu_instruction
type emu_cpu (line 358) | struct emu_cpu
type emu_cpu_instruction (line 358) | struct emu_cpu_instruction
FILE: src/functions/and.c
type emu_cpu (line 56) | struct emu_cpu
type emu_cpu_instruction (line 56) | struct emu_cpu_instruction
type emu_cpu (line 90) | struct emu_cpu
type emu_cpu_instruction (line 90) | struct emu_cpu_instruction
type emu_cpu (line 289) | struct emu_cpu
type emu_cpu_instruction (line 289) | struct emu_cpu_instruction
type emu_cpu (line 358) | struct emu_cpu
type emu_cpu_instruction (line 358) | struct emu_cpu_instruction
FILE: src/functions/call.c
function instr_call_9a (line 39) | int32_t instr_call_9a(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_call_e8 (line 56) | int32_t instr_call_e8(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_group_5_ff_call (line 79) | int32_t instr_group_5_ff_call(struct emu_cpu *c, struct emu_cpu_instruct...
FILE: src/functions/cmp.c
type emu_cpu (line 65) | struct emu_cpu
type emu_cpu_instruction (line 65) | struct emu_cpu_instruction
type emu_cpu (line 274) | struct emu_cpu
type emu_cpu_instruction (line 274) | struct emu_cpu_instruction
type emu_cpu (line 338) | struct emu_cpu
type emu_cpu_instruction (line 338) | struct emu_cpu_instruction
FILE: src/functions/cmps.c
function instr_cmps_a6 (line 75) | int32_t instr_cmps_a6(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_cmps_a7 (line 164) | int32_t instr_cmps_a7(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/dec.c
function instr_dec_4x (line 76) | int32_t instr_dec_4x(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_group_4_fe_dec (line 98) | int32_t instr_group_4_fe_dec(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_5_ff_dec (line 122) | int32_t instr_group_5_ff_dec(struct emu_cpu *c, struct emu_cpu_instructi...
FILE: src/functions/div.c
function instr_group_3_f6_div (line 62) | int32_t instr_group_3_f6_div(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_3_f7_div (line 97) | int32_t instr_group_3_f7_div(struct emu_cpu *c, struct emu_cpu_instructi...
FILE: src/functions/group_1.c
function instr_group_1_80 (line 35) | int32_t instr_group_1_80(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_group_1_81 (line 51) | int32_t instr_group_1_81(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_group_1_82 (line 68) | int32_t instr_group_1_82(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_group_1_83 (line 73) | int32_t instr_group_1_83(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/group_10.c
function instr_group_10_8f_pop (line 36) | int32_t instr_group_10_8f_pop(struct emu_cpu *c, struct emu_cpu_instruct...
function instr_group_10_8f (line 63) | int32_t instr_group_10_8f(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/group_2.c
function instr_group_2_c0 (line 36) | int32_t instr_group_2_c0(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_group_2_c1 (line 53) | int32_t instr_group_2_c1(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_group_2_d0 (line 70) | int32_t instr_group_2_d0(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_group_2_d1 (line 86) | int32_t instr_group_2_d1(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_group_2_d2 (line 103) | int32_t instr_group_2_d2(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_group_2_d3 (line 120) | int32_t instr_group_2_d3(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/group_3.c
function instr_group_3_f6 (line 36) | int32_t instr_group_3_f6(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_group_3_f7 (line 53) | int32_t instr_group_3_f7(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/group_4.c
function instr_group_4_fe (line 36) | int32_t instr_group_4_fe(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/group_5.c
function instr_group_5_ff (line 41) | int32_t instr_group_5_ff(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/idiv.c
function instr_group_3_f6_idiv (line 62) | int32_t instr_group_3_f6_idiv(struct emu_cpu *c, struct emu_cpu_instruct...
function instr_group_3_f7_idiv (line 99) | int32_t instr_group_3_f7_idiv(struct emu_cpu *c, struct emu_cpu_instruct...
FILE: src/functions/imul.c
function instr_imul_69 (line 57) | int32_t instr_imul_69(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_imul_6b (line 178) | int32_t instr_imul_6b(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_imul_0f_af (line 281) | int32_t instr_imul_0f_af(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_group_3_f6_imul (line 372) | int32_t instr_group_3_f6_imul(struct emu_cpu *c, struct emu_cpu_instruct...
function instr_group_3_f7_imul (line 413) | int32_t instr_group_3_f7_imul(struct emu_cpu *c, struct emu_cpu_instruct...
FILE: src/functions/inc.c
function instr_inc_4x (line 76) | int32_t instr_inc_4x(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_group_4_fe_inc (line 97) | int32_t instr_group_4_fe_inc(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_5_ff_inc (line 121) | int32_t instr_group_5_ff_inc(struct emu_cpu *c, struct emu_cpu_instructi...
FILE: src/functions/int.c
function instr_int_cd (line 33) | int32_t instr_int_cd(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/jcc.c
function instr_jcc_70 (line 53) | int32_t instr_jcc_70(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_71 (line 66) | int32_t instr_jcc_71(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_72 (line 79) | int32_t instr_jcc_72(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_73 (line 94) | int32_t instr_jcc_73(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_setcc_0f94 (line 110) | int32_t instr_setcc_0f94(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_setcc_0f95 (line 126) | int32_t instr_setcc_0f95(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_74 (line 142) | int32_t instr_jcc_74(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_75 (line 157) | int32_t instr_jcc_75(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_76 (line 172) | int32_t instr_jcc_76(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_77 (line 188) | int32_t instr_jcc_77(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_78 (line 205) | int32_t instr_jcc_78(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_79 (line 219) | int32_t instr_jcc_79(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_7a (line 233) | int32_t instr_jcc_7a(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_7b (line 248) | int32_t instr_jcc_7b(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_7c (line 264) | int32_t instr_jcc_7c(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_7d (line 281) | int32_t instr_jcc_7d(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_7e (line 297) | int32_t instr_jcc_7e(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_7f (line 315) | int32_t instr_jcc_7f(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_e3 (line 332) | int32_t instr_jcc_e3(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_0f80 (line 358) | int32_t instr_jcc_0f80(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_0f81 (line 372) | int32_t instr_jcc_0f81(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_0f82 (line 386) | int32_t instr_jcc_0f82(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_0f83 (line 402) | int32_t instr_jcc_0f83(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_0f84 (line 418) | int32_t instr_jcc_0f84(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_0f85 (line 433) | int32_t instr_jcc_0f85(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_0f86 (line 448) | int32_t instr_jcc_0f86(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_0f87 (line 464) | int32_t instr_jcc_0f87(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_0f88 (line 481) | int32_t instr_jcc_0f88(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_0f89 (line 495) | int32_t instr_jcc_0f89(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_0f8a (line 509) | int32_t instr_jcc_0f8a(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_0f8b (line 524) | int32_t instr_jcc_0f8b(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_0f8c (line 539) | int32_t instr_jcc_0f8c(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_0f8d (line 555) | int32_t instr_jcc_0f8d(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_0f8e (line 571) | int32_t instr_jcc_0f8e(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jcc_0f8f (line 588) | int32_t instr_jcc_0f8f(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/jmp.c
function instr_jmp_e9 (line 36) | int32_t instr_jmp_e9(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jmp_ea (line 60) | int32_t instr_jmp_ea(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_jmp_eb (line 78) | int32_t instr_jmp_eb(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_group_5_ff_jmp (line 93) | int32_t instr_group_5_ff_jmp(struct emu_cpu *c, struct emu_cpu_instructi...
FILE: src/functions/lodscc.c
function instr_lods_ac (line 37) | int32_t instr_lods_ac(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_lods_ad (line 76) | int32_t instr_lods_ad(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/loopcc.c
function instr_loopcc_e0 (line 36) | int32_t instr_loopcc_e0(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_loopcc_e1 (line 71) | int32_t instr_loopcc_e1(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_loop_e2 (line 106) | int32_t instr_loop_e2(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/misc.c
function prefix_fn (line 37) | int32_t prefix_fn(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_daa_27 (line 44) | int32_t instr_daa_27(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_das_2f (line 56) | int32_t instr_das_2f(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_aas_3f (line 67) | int32_t instr_aas_3f(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_wait_9b (line 81) | int32_t instr_wait_9b(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_pushf_9c (line 92) | int32_t instr_pushf_9c(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_popf_9d (line 105) | int32_t instr_popf_9d(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_sahf_9e (line 117) | int32_t instr_sahf_9e(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_lahf_9f (line 128) | int32_t instr_lahf_9f(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_cmc_f5 (line 140) | int32_t instr_cmc_f5(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_clc_f8 (line 152) | int32_t instr_clc_f8(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_stc_f9 (line 164) | int32_t instr_stc_f9(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_cld_fc (line 176) | int32_t instr_cld_fc(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_std_fd (line 183) | int32_t instr_std_fd(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_lea_8d (line 199) | int32_t instr_lea_8d(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_cbw_98 (line 225) | int32_t instr_cbw_98(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_cwd_99 (line 249) | int32_t instr_cwd_99(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_esc_fpu_dx (line 281) | int32_t instr_esc_fpu_dx(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_sldt_0f00 (line 286) | int32_t instr_sldt_0f00(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_cpuid_0fa2 (line 329) | int32_t instr_cpuid_0fa2(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_salc_d6 (line 335) | int32_t instr_salc_d6(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/mov.c
function instr_mov_88 (line 40) | int32_t instr_mov_88(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_mov_89 (line 60) | int32_t instr_mov_89(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_mov_8a (line 103) | int32_t instr_mov_8a(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_mov_8b (line 123) | int32_t instr_mov_8b(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_mov_8c (line 170) | int32_t instr_mov_8c(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_mov_8e (line 180) | int32_t instr_mov_8e(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_mov_a0 (line 190) | int32_t instr_mov_a0(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_mov_a1 (line 201) | int32_t instr_mov_a1(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_mov_a2 (line 226) | int32_t instr_mov_a2(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_mov_a3 (line 237) | int32_t instr_mov_a3(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_movsb (line 261) | int32_t instr_movsb(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_mov_bx_1 (line 305) | int32_t instr_mov_bx_1(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_mov_bx_2 (line 316) | int32_t instr_mov_bx_2(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_mov_c6 (line 348) | int32_t instr_mov_c6(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_mov_c7 (line 369) | int32_t instr_mov_c7(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/movsx.c
function instr_movsx_0fbe (line 40) | int32_t instr_movsx_0fbe(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_movsx_0fbf (line 88) | int32_t instr_movsx_0fbf(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/movzx.c
function instr_movzx_0fb6 (line 40) | int32_t instr_movzx_0fb6(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_movzx_0fb7 (line 88) | int32_t instr_movzx_0fb7(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/mul.c
function instr_group_3_f6_mul (line 61) | int32_t instr_group_3_f6_mul(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_3_f7_mul (line 103) | int32_t instr_group_3_f7_mul(struct emu_cpu *c, struct emu_cpu_instructi...
FILE: src/functions/neg.c
function instr_group_3_f6_neg (line 86) | int32_t instr_group_3_f6_neg(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_3_f7_neg (line 114) | int32_t instr_group_3_f7_neg(struct emu_cpu *c, struct emu_cpu_instructi...
FILE: src/functions/not.c
function instr_group_3_f6_not (line 48) | int32_t instr_group_3_f6_not(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_3_f7_not (line 76) | int32_t instr_group_3_f7_not(struct emu_cpu *c, struct emu_cpu_instructi...
FILE: src/functions/or.c
type emu_cpu (line 57) | struct emu_cpu
type emu_cpu_instruction (line 57) | struct emu_cpu_instruction
type emu_cpu (line 91) | struct emu_cpu
type emu_cpu_instruction (line 91) | struct emu_cpu_instruction
type emu_cpu (line 288) | struct emu_cpu
type emu_cpu_instruction (line 288) | struct emu_cpu_instruction
type emu_cpu (line 359) | struct emu_cpu
type emu_cpu_instruction (line 359) | struct emu_cpu_instruction
FILE: src/functions/pop.c
function instr_pop_07 (line 38) | int32_t instr_pop_07(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_pop_17 (line 49) | int32_t instr_pop_17(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_pop_1f (line 61) | int32_t instr_pop_1f(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_pop_5x (line 73) | int32_t instr_pop_5x(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_pop_0fa1 (line 96) | int32_t instr_pop_0fa1(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_pop_0fa9 (line 108) | int32_t instr_pop_0fa9(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_popad_61 (line 120) | int32_t instr_popad_61(struct emu_cpu *c, struct emu_cpu_instruction *i)
type emu_cpu (line 156) | struct emu_cpu
type emu_cpu_instruction (line 156) | struct emu_cpu_instruction
function instr_leave (line 158) | int32_t instr_leave(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/push.c
function instr_push_06 (line 40) | int32_t instr_push_06(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_push_0e (line 52) | int32_t instr_push_0e(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_push_16 (line 66) | int32_t instr_push_16(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_push_1e (line 80) | int32_t instr_push_1e(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_push_5x (line 94) | int32_t instr_push_5x(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_push_68 (line 120) | int32_t instr_push_68(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_push_6a (line 146) | int32_t instr_push_6a(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_push_0fa0 (line 168) | int32_t instr_push_0fa0(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_push_0f08 (line 180) | int32_t instr_push_0f08(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_pushad_60 (line 191) | int32_t instr_pushad_60(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_group_5_ff_push (line 231) | int32_t instr_group_5_ff_push(struct emu_cpu *c, struct emu_cpu_instruct...
FILE: src/functions/rcl.c
function instr_group_2_c0_rcl (line 74) | int32_t instr_group_2_c0_rcl(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_c1_rcl (line 106) | int32_t instr_group_2_c1_rcl(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d0_rcl (line 172) | int32_t instr_group_2_d0_rcl(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d1_rcl (line 205) | int32_t instr_group_2_d1_rcl(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d2_rcl (line 271) | int32_t instr_group_2_d2_rcl(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d3_rcl (line 303) | int32_t instr_group_2_d3_rcl(struct emu_cpu *c, struct emu_cpu_instructi...
FILE: src/functions/rcr.c
function instr_group_2_c0_rcr (line 75) | int32_t instr_group_2_c0_rcr(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_c1_rcr (line 109) | int32_t instr_group_2_c1_rcr(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d0_rcr (line 175) | int32_t instr_group_2_d0_rcr(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d1_rcr (line 208) | int32_t instr_group_2_d1_rcr(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d2_rcr (line 274) | int32_t instr_group_2_d2_rcr(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d3_rcr (line 307) | int32_t instr_group_2_d3_rcr(struct emu_cpu *c, struct emu_cpu_instructi...
FILE: src/functions/repcc.c
function instr_repcc_f2a6 (line 70) | int32_t instr_repcc_f2a6(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_repcc_f2a7 (line 79) | int32_t instr_repcc_f2a7(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_repcc_f2ae (line 94) | int32_t instr_repcc_f2ae(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_repcc_f2af (line 104) | int32_t instr_repcc_f2af(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_repcc_f36c (line 119) | int32_t instr_repcc_f36c(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_repcc_f36d (line 129) | int32_t instr_repcc_f36d(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_repcc_f36e (line 144) | int32_t instr_repcc_f36e(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_repcc_f36f (line 154) | int32_t instr_repcc_f36f(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_repcc_f3a4 (line 169) | int32_t instr_repcc_f3a4(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_repcc_f3a5 (line 179) | int32_t instr_repcc_f3a5(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_repcc_f3aa (line 194) | int32_t instr_repcc_f3aa(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_repcc_f3ab (line 204) | int32_t instr_repcc_f3ab(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_repcc_f3ac (line 219) | int32_t instr_repcc_f3ac(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_repcc_f3ad (line 229) | int32_t instr_repcc_f3ad(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_repcc_f3a6 (line 244) | int32_t instr_repcc_f3a6(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_repcc_f3a7 (line 255) | int32_t instr_repcc_f3a7(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_repcc_f3ae (line 270) | int32_t instr_repcc_f3ae(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_repcc_f3af (line 280) | int32_t instr_repcc_f3af(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/ret.c
function instr_ret_c2 (line 36) | int32_t instr_ret_c2(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_ret_c3 (line 54) | int32_t instr_ret_c3(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_ret_ca (line 65) | int32_t instr_ret_ca(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_ret_cb (line 75) | int32_t instr_ret_cb(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/rol.c
function instr_group_2_c0_rol (line 72) | int32_t instr_group_2_c0_rol(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_c1_rol (line 106) | int32_t instr_group_2_c1_rol(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d0_rol (line 175) | int32_t instr_group_2_d0_rol(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d1_rol (line 208) | int32_t instr_group_2_d1_rol(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d2_rol (line 274) | int32_t instr_group_2_d2_rol(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d3_rol (line 307) | int32_t instr_group_2_d3_rol(struct emu_cpu *c, struct emu_cpu_instructi...
FILE: src/functions/ror.c
function instr_group_2_c0_ror (line 71) | int32_t instr_group_2_c0_ror(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_c1_ror (line 104) | int32_t instr_group_2_c1_ror(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d0_ror (line 169) | int32_t instr_group_2_d0_ror(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d1_ror (line 203) | int32_t instr_group_2_d1_ror(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d2_ror (line 268) | int32_t instr_group_2_d2_ror(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d3_ror (line 301) | int32_t instr_group_2_d3_ror(struct emu_cpu *c, struct emu_cpu_instructi...
FILE: src/functions/sal.c
function instr_group_2_c0_sal (line 77) | int32_t instr_group_2_c0_sal(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_c1_sal (line 111) | int32_t instr_group_2_c1_sal(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d0_sal (line 178) | int32_t instr_group_2_d0_sal(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d1_sal (line 212) | int32_t instr_group_2_d1_sal(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d2_sal (line 278) | int32_t instr_group_2_d2_sal(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d3_sal (line 311) | int32_t instr_group_2_d3_sal(struct emu_cpu *c, struct emu_cpu_instructi...
FILE: src/functions/sar.c
function instr_group_2_c0_sar (line 69) | int32_t instr_group_2_c0_sar(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_c1_sar (line 103) | int32_t instr_group_2_c1_sar(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d0_sar (line 169) | int32_t instr_group_2_d0_sar(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d1_sar (line 202) | int32_t instr_group_2_d1_sar(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d2_sar (line 267) | int32_t instr_group_2_d2_sar(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d3_sar (line 301) | int32_t instr_group_2_d3_sar(struct emu_cpu *c, struct emu_cpu_instructi...
FILE: src/functions/sbb.c
type emu_cpu (line 102) | struct emu_cpu
type emu_cpu_instruction (line 102) | struct emu_cpu_instruction
type emu_cpu (line 136) | struct emu_cpu
type emu_cpu_instruction (line 136) | struct emu_cpu_instruction
type emu_cpu (line 339) | struct emu_cpu
type emu_cpu_instruction (line 339) | struct emu_cpu_instruction
type emu_cpu (line 409) | struct emu_cpu
type emu_cpu_instruction (line 409) | struct emu_cpu_instruction
FILE: src/functions/scas.c
function instr_scas_ae (line 64) | int32_t instr_scas_ae(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_scas_af (line 104) | int32_t instr_scas_af(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/shr.c
function instr_group_2_c0_shr (line 76) | int32_t instr_group_2_c0_shr(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_c1_shr (line 110) | int32_t instr_group_2_c1_shr(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d0_shr (line 180) | int32_t instr_group_2_d0_shr(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d1_shr (line 213) | int32_t instr_group_2_d1_shr(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d2_shr (line 279) | int32_t instr_group_2_d2_shr(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_2_d3_shr (line 312) | int32_t instr_group_2_d3_shr(struct emu_cpu *c, struct emu_cpu_instructi...
FILE: src/functions/stoscc.c
function instr_stos_aa (line 38) | int32_t instr_stos_aa(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_stos_ab (line 100) | int32_t instr_stos_ab(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/sub.c
type emu_cpu (line 60) | struct emu_cpu
type emu_cpu_instruction (line 60) | struct emu_cpu_instruction
type emu_cpu (line 96) | struct emu_cpu
type emu_cpu_instruction (line 96) | struct emu_cpu_instruction
type emu_cpu (line 319) | struct emu_cpu
type emu_cpu_instruction (line 319) | struct emu_cpu_instruction
type emu_cpu (line 390) | struct emu_cpu
type emu_cpu_instruction (line 390) | struct emu_cpu_instruction
FILE: src/functions/test.c
function instr_test_84 (line 56) | int32_t instr_test_84(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_test_85 (line 84) | int32_t instr_test_85(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_test_a8 (line 150) | int32_t instr_test_a8(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_test_a9 (line 164) | int32_t instr_test_a9(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_group_3_f6_test (line 193) | int32_t instr_group_3_f6_test(struct emu_cpu *c, struct emu_cpu_instruct...
function instr_group_3_f7_test (line 225) | int32_t instr_group_3_f7_test(struct emu_cpu *c, struct emu_cpu_instruct...
FILE: src/functions/xchg.c
function instr_xchg_86 (line 42) | int32_t instr_xchg_86(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_xchg_87 (line 73) | int32_t instr_xchg_87(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_xchg_9x (line 139) | int32_t instr_xchg_9x(struct emu_cpu *c, struct emu_cpu_instruction *i)
FILE: src/functions/xor.c
function instr_xor_30 (line 60) | int32_t instr_xor_30(struct emu_cpu *c, struct emu_cpu_instruction *i)
type emu_cpu (line 97) | struct emu_cpu
type emu_cpu_instruction (line 97) | struct emu_cpu_instruction
type emu_cpu (line 229) | struct emu_cpu
type emu_cpu_instruction (line 229) | struct emu_cpu_instruction
function instr_xor_35 (line 358) | int32_t instr_xor_35(struct emu_cpu *c, struct emu_cpu_instruction *i)
function instr_group_1_80_xor (line 403) | int32_t instr_group_1_80_xor(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_1_81_xor (line 440) | int32_t instr_group_1_81_xor(struct emu_cpu *c, struct emu_cpu_instructi...
function instr_group_1_83_xor (line 526) | int32_t instr_group_1_83_xor(struct emu_cpu *c, struct emu_cpu_instructi...
FILE: src/libdasm.c
function BYTE (line 20) | BYTE FETCH8(BYTE *addr) {
function WORD (line 25) | WORD FETCH16(BYTE *addr) {
function DWORD (line 43) | DWORD FETCH32(BYTE *addr) {
function MODE_CHECK_ADDR (line 63) | enum Mode MODE_CHECK_ADDR(enum Mode mode, int flags) {
function MODE_CHECK_OPERAND (line 71) | enum Mode MODE_CHECK_OPERAND(enum Mode mode, int flags) {
function get_real_instruction2 (line 82) | int get_real_instruction2(BYTE *addr, int *flags) {
function get_real_instruction (line 127) | int get_real_instruction(BYTE *addr, int *index, int *flags) {
function get_operand (line 290) | int get_operand(PINST inst, int oflags, PINSTRUCTION instruction,
function get_operand_string (line 591) | int get_operand_string(INSTRUCTION *inst, OPERAND *op,
function get_instruction (line 835) | int get_instruction(PINSTRUCTION inst, BYTE *addr, enum Mode mode) {
function get_mnemonic_string (line 991) | int get_mnemonic_string(INSTRUCTION *inst, enum Format format, char *str...
function get_operands_string (line 1132) | int get_operands_string(INSTRUCTION *inst, enum Format format, DWORD off...
function get_instruction_string (line 1172) | int get_instruction_string(INSTRUCTION *inst, enum Format format, DWORD ...
function get_register_type (line 1192) | int get_register_type(POPERAND op) {
function get_operand_type (line 1228) | int get_operand_type(POPERAND op) {
function get_operand_register (line 1232) | int get_operand_register(POPERAND op) {
function get_operand_basereg (line 1236) | int get_operand_basereg(POPERAND op) {
function get_operand_indexreg (line 1240) | int get_operand_indexreg(POPERAND op) {
function get_operand_scale (line 1244) | int get_operand_scale(POPERAND op) {
function get_operand_immediate (line 1248) | int get_operand_immediate(POPERAND op, DWORD *imm) {
function get_operand_displacement (line 1257) | int get_operand_displacement(POPERAND op, DWORD *disp) {
function POPERAND (line 1268) | POPERAND get_source_operand(PINSTRUCTION inst) {
function POPERAND (line 1274) | POPERAND get_destination_operand(PINSTRUCTION inst) {
FILE: src/libdasm.h
type QWORD (line 36) | typedef unsigned __int64 QWORD;
type SBYTE (line 37) | typedef signed __int8 SBYTE;
type SWORD (line 38) | typedef signed __int16 SWORD;
type SDWORD (line 39) | typedef signed __int32 SDWORD;
type SQWORD (line 40) | typedef signed __int64 SQWORD;
type u_int8_t (line 53) | typedef u_int8_t BYTE;
type u_int16_t (line 54) | typedef u_int16_t WORD;
type u_int32_t (line 55) | typedef u_int32_t DWORD;
type u_int64_t (line 56) | typedef u_int64_t QWORD;
type SBYTE (line 57) | typedef int8_t SBYTE;
type SWORD (line 58) | typedef int16_t SWORD;
type SDWORD (line 59) | typedef int32_t SDWORD;
type SQWORD (line 60) | typedef int64_t SQWORD;
type Mode (line 143) | enum Mode {
type Format (line 149) | enum Format {
type Instruction (line 155) | enum Instruction {
type Operand (line 265) | enum Operand {
type INST (line 275) | typedef struct _INST {
type OPERAND (line 285) | typedef struct _OPERAND {
type INSTRUCTION (line 303) | typedef struct _INSTRUCTION {
type Mode (line 328) | enum Mode
type Format (line 334) | enum Format
type Format (line 343) | enum Format
type Format (line 352) | enum Format
FILE: testsuite/cpu_run.c
type run_options (line 52) | struct run_options
function main (line 61) | int main(int argc, char *argv[])
FILE: testsuite/emunids.c
type emu (line 31) | struct emu
type ip (line 32) | struct ip
type tuple4 (line 34) | struct tuple4
function tcp_callback (line 45) | void tcp_callback (struct tcp_stream *a_tcp, void ** this_time_not_needed)
function xlog (line 107) | void xlog(int type, int err, struct ip *iph, void *data)
function main (line 128) | int main (int argc, const char *argv[])
FILE: testsuite/hashtest.c
type addr_instr (line 6) | struct addr_instr
type addr_instr (line 13) | struct addr_instr
type addr_instr (line 188) | struct addr_instr
function main (line 198) | int main(void)
FILE: testsuite/instrtest.c
type run_time_options (line 57) | struct run_time_options
type instr_test (line 77) | struct instr_test
type instr_test (line 102) | struct instr_test
function prepare (line 772) | int prepare(void)
function test (line 828) | int test(int n)
function cleanup (line 1016) | void cleanup(void)
function dump_export_table (line 1025) | void dump_export_table(void)
function main (line 1033) | int main(int argc, char *argv[])
FILE: testsuite/instrtree.c
function indent (line 43) | void indent(int lev)
function instrtree (line 50) | void instrtree(uint8_t *data, uint8_t datasize, uint8_t offset, uint16_t...
function main (line 84) | int main(void)
FILE: testsuite/main.c
function main (line 36) | int main(void)
FILE: testsuite/memtest.c
function test_alloc (line 5) | void test_alloc(struct emu *e)
function main (line 28) | int main(int argc, char **argv)
FILE: testsuite/scprofiler.c
type run_options (line 56) | struct run_options
type run_options (line 67) | struct run_options
type emu_profile_function (line 69) | struct emu_profile_function
type emu_profile (line 69) | struct emu_profile
type emu_profile_function (line 71) | struct emu_profile_function
type emu_profile_argument (line 80) | struct emu_profile_argument
type emu_profile_function (line 80) | struct emu_profile_function
type emu_profile_argument (line 82) | struct emu_profile_argument
type emu_profile_function (line 92) | struct emu_profile_function
type function_render (line 94) | struct function_render
function print_connect (line 101) | void print_connect(struct emu_profile_function *function, void *args[])
function print_CreateProcess (line 119) | void print_CreateProcess(struct emu_profile_function *function, void *ar...
type function_render (line 144) | struct function_render
function main (line 152) | int main(int argc, char *argv[])
FILE: tools/sctest/dot.c
type instr_vertex (line 75) | struct instr_vertex
type instr_vertex (line 77) | struct instr_vertex
type instr_vertex (line 77) | struct instr_vertex
type instr_vertex (line 77) | struct instr_vertex
type instr_vertex (line 78) | struct instr_vertex
function instr_vertex_free (line 85) | void instr_vertex_free(struct instr_vertex *iv)
type instr_vertex (line 91) | struct instr_vertex
type instr_vertex (line 91) | struct instr_vertex
type instr_vertex (line 93) | struct instr_vertex
type instr_vertex (line 93) | struct instr_vertex
type instr_vertex (line 93) | struct instr_vertex
type instr_vertex (line 94) | struct instr_vertex
function instr_vertex_destructor (line 106) | void instr_vertex_destructor(void *data)
function graph_draw (line 113) | int graph_draw(struct emu_graph *graph)
FILE: tools/sctest/dot.h
type instr_vertex (line 1) | struct instr_vertex
type instr_vertex (line 10) | struct instr_vertex
type instr_vertex (line 11) | struct instr_vertex
type instr_vertex (line 13) | struct instr_vertex
type instr_vertex (line 13) | struct instr_vertex
type emu_graph (line 17) | struct emu_graph
FILE: tools/sctest/nanny.c
type nanny (line 9) | struct nanny
type nanny (line 11) | struct nanny
type nanny (line 11) | struct nanny
type nanny (line 12) | struct nanny
type nanny_file (line 19) | struct nanny_file
type nanny (line 19) | struct nanny
type nanny_file (line 21) | struct nanny_file
type nanny_file (line 21) | struct nanny_file
type nanny_file (line 22) | struct nanny_file
type nanny_file (line 35) | struct nanny_file
type nanny (line 35) | struct nanny
type emu_hashtable_item (line 37) | struct emu_hashtable_item
type nanny_file (line 40) | struct nanny_file
function nanny_del_file (line 47) | bool nanny_del_file(struct nanny *na, uint32_t emu_file)
function nanny_free (line 57) | void nanny_free(struct nanny *nanny)
FILE: tools/sctest/nanny.h
type nanny_file (line 5) | struct nanny_file
type nanny (line 26) | struct nanny
type nanny (line 34) | struct nanny
type nanny (line 35) | struct nanny
type nanny_file (line 37) | struct nanny_file
type nanny (line 37) | struct nanny
type nanny_file (line 38) | struct nanny_file
type nanny (line 38) | struct nanny
type nanny (line 39) | struct nanny
FILE: tools/sctest/options.h
type run_time_options (line 1) | struct run_time_options
type run_time_options (line 38) | struct run_time_options
FILE: tools/sctest/sctestmain.c
type run_time_options (line 105) | struct run_time_options
type emu_graph (line 126) | struct emu_graph
function test (line 128) | int test(struct emu *e)
function getpctest (line 458) | int getpctest(void)
function dump (line 479) | void dump(int n)
function cleanup (line 489) | void cleanup(void)
function list_tests (line 500) | void list_tests(void)
function prepare_from_stdin_read (line 508) | int prepare_from_stdin_read(void)
function prepare_from_stdin_write (line 563) | int prepare_from_stdin_write(struct emu *e)
function prepare_from_stdin (line 607) | int prepare_from_stdin(struct emu *e)
function prepare_testnumber (line 621) | int prepare_testnumber(struct emu *e)
function prepare_argos (line 668) | int prepare_argos(struct emu *e)
function prepare (line 735) | int prepare(struct emu *emu)
function print_help (line 750) | void print_help(void)
function main (line 798) | int main(int argc, char *argv[])
FILE: tools/sctest/tests.c
type instr_test (line 4) | struct instr_test
function numtests (line 1536) | int numtests(void)
FILE: tools/sctest/tests.h
type instr_test (line 3) | struct instr_test
type instr_test (line 29) | struct instr_test
FILE: tools/sctest/userhooks.c
function user_hook_ExitProcess (line 105) | uint32_t user_hook_ExitProcess(struct emu_env *env, struct emu_env_hook ...
function user_hook_ExitThread (line 129) | uint32_t user_hook_ExitThread(struct emu_env *env, struct emu_env_hook *...
function append (line 154) | void append(struct emu_string *to, const char *dir, char *data, int size)
function user_hook_CreateProcess (line 207) | uint32_t user_hook_CreateProcess(struct emu_env *env, struct emu_env_hoo...
function user_hook_WaitForSingleObject (line 366) | uint32_t user_hook_WaitForSingleObject(struct emu_env *env, struct emu_e...
function user_hook_exit (line 399) | uint32_t user_hook_exit(struct emu_env *env, struct emu_env_hook *hook, ...
function user_hook_accept (line 414) | uint32_t user_hook_accept(struct emu_env *env, struct emu_env_hook *hook...
function user_hook_bind (line 433) | uint32_t user_hook_bind(struct emu_env *env, struct emu_env_hook *hook, ...
function user_hook_closesocket (line 462) | uint32_t user_hook_closesocket(struct emu_env *env, struct emu_env_hook ...
function user_hook_connect (line 475) | uint32_t user_hook_connect(struct emu_env *env, struct emu_env_hook *hoo...
function user_hook_fclose (line 511) | uint32_t user_hook_fclose(struct emu_env *env, struct emu_env_hook *hook...
function user_hook_fopen (line 536) | uint32_t user_hook_fopen(struct emu_env *env, struct emu_env_hook *hook,...
function user_hook_fwrite (line 565) | uint32_t user_hook_fwrite(struct emu_env *env, struct emu_env_hook *hook...
function user_hook_listen (line 592) | uint32_t user_hook_listen(struct emu_env *env, struct emu_env_hook *hook...
function user_hook_recv (line 607) | uint32_t user_hook_recv(struct emu_env *env, struct emu_env_hook *hook, ...
function user_hook_send (line 624) | uint32_t user_hook_send(struct emu_env *env, struct emu_env_hook *hook, ...
function user_hook_socket (line 642) | uint32_t user_hook_socket(struct emu_env *env, struct emu_env_hook *hook...
function user_hook_WSASocket (line 660) | uint32_t user_hook_WSASocket(struct emu_env *env, struct emu_env_hook *h...
function user_hook_CreateFile (line 683) | uint32_t user_hook_CreateFile(struct emu_env *env, struct emu_env_hook *...
function user_hook_WriteFile (line 726) | uint32_t user_hook_WriteFile(struct emu_env *env, struct emu_env_hook *h...
function user_hook_CloseHandle (line 764) | uint32_t user_hook_CloseHandle(struct emu_env *env, struct emu_env_hook ...
function user_hook_URLDownloadToFile (line 798) | uint32_t user_hook_URLDownloadToFile(struct emu_env *env, struct emu_env...
function user_hook_IEWinMain (line 820) | uint32_t user_hook_IEWinMain(struct emu_env *env, struct emu_env_hook *h...
FILE: tools/sctest/userhooks.h
type emu_env (line 2) | struct emu_env
type emu_env_hook (line 2) | struct emu_env_hook
type emu_env (line 3) | struct emu_env
type emu_env_hook (line 3) | struct emu_env_hook
type emu_env (line 4) | struct emu_env
type emu_env_hook (line 4) | struct emu_env_hook
type emu_env (line 5) | struct emu_env
type emu_env_hook (line 5) | struct emu_env_hook
type emu_env (line 6) | struct emu_env
type emu_env_hook (line 6) | struct emu_env_hook
type emu_env (line 7) | struct emu_env
type emu_env_hook (line 7) | struct emu_env_hook
type emu_env (line 8) | struct emu_env
type emu_env_hook (line 8) | struct emu_env_hook
type emu_env (line 9) | struct emu_env
type emu_env_hook (line 9) | struct emu_env_hook
type emu_env (line 10) | struct emu_env
type emu_env_hook (line 10) | struct emu_env_hook
type emu_env (line 11) | struct emu_env
type emu_env_hook (line 11) | struct emu_env_hook
type emu_env (line 12) | struct emu_env
type emu_env_hook (line 12) | struct emu_env_hook
type emu_env (line 13) | struct emu_env
type emu_env_hook (line 13) | struct emu_env_hook
type emu_env (line 14) | struct emu_env
type emu_env_hook (line 14) | struct emu_env_hook
type emu_env (line 15) | struct emu_env
type emu_env_hook (line 15) | struct emu_env_hook
type emu_env (line 16) | struct emu_env
type emu_env_hook (line 16) | struct emu_env_hook
type emu_env (line 17) | struct emu_env
type emu_env_hook (line 17) | struct emu_env_hook
type emu_env (line 18) | struct emu_env
type emu_env_hook (line 18) | struct emu_env_hook
type emu_env (line 20) | struct emu_env
type emu_env_hook (line 20) | struct emu_env_hook
type emu_env (line 21) | struct emu_env
type emu_env_hook (line 21) | struct emu_env_hook
type emu_env (line 22) | struct emu_env
type emu_env_hook (line 22) | struct emu_env_hook
type emu_env (line 24) | struct emu_env
type emu_env_hook (line 24) | struct emu_env_hook
type emu_env (line 25) | struct emu_env
type emu_env_hook (line 25) | struct emu_env_hook
Condensed preview — 180 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,343K chars).
[
{
"path": ".gitignore",
"chars": 378,
"preview": "# Copying and distribution of this file, with or without modification,\n# are permitted in any medium without royalty pro"
},
{
"path": "AUTHORS",
"chars": 180,
"preview": "\nlibemu was designed and written by: \n * Paul Baecher\n * Markus Koetter\n\n\nspecial thanks go to:\n * jt / nologin.org for "
},
{
"path": "CHANGES",
"chars": 11805,
"preview": "\t\tChangelog for libemu\n\n30.11.2008 libemu 0.2.0\n ( created with svn log -r HEAD:1385 | grep -v -- \"----\" | grep -v ^r | "
},
{
"path": "Makefile.am",
"chars": 217,
"preview": "# $Id$\n\nAUTOMAKE_OPTIONS = foreign\nACLOCAL_AMFLAGS = -I m4\n\nSUBDIRS = src include testsuite doc bindings tools\n\nEXTRA_DI"
},
{
"path": "README",
"chars": 660,
"preview": "\n\t _______________\n\t | |\n\t | |\n\t | libemu |\n\t | x86 emulation |\n\t | |\n"
},
{
"path": "bindings/Makefile.am",
"chars": 114,
"preview": "# $Id$\n\nAUTOMAKE_OPTIONS = foreign\n\nif ENABLE_PYTHON_BINDINGS\npython_dir = python\nendif\n\nSUBDIRS = $(python_dir)\n\n"
},
{
"path": "bindings/python/Makefile.am",
"chars": 195,
"preview": "# $Id$\n\nAUTOMAKE_OPTIONS = foreign\n\nall:\n\tpython setup.py build\n\ninstall: all\n\tpython setup.py install\n\nclean:\n\tpython s"
},
{
"path": "bindings/python/libemu_module.c",
"chars": 4619,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "bindings/python/setup.py.in",
"chars": 655,
"preview": "#!/usr/bin/python\n\nfrom distutils.core import setup, Extension\n\nlibemu = Extension('libemu',\n sources"
},
{
"path": "configure.ac",
"chars": 8323,
"preview": "# -*- mode: m4; -*-\n# -*- Autoconf -*-\n# Process this file with autoconf to produce a configure script.\n# $Id$\n\nAC_PRERE"
},
{
"path": "debian/changelog",
"chars": 176,
"preview": "libemu (0.2.0-1) unstable; urgency=low\n\n * Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>\n\n -- c"
},
{
"path": "debian/compat",
"chars": 2,
"preview": "7\n"
},
{
"path": "debian/control",
"chars": 428,
"preview": "Source: libemu\nPriority: extra\nMaintainer: Nepenthes Development Team <nepenthesdev@gmail.com>\nBuild-Depends: debhelper "
},
{
"path": "debian/copyright",
"chars": 627,
"preview": "This package was debianized by Nepenthes Development Team <nepenthesdev@gmail.com> on\nMon, 17 May 2010 22:14:41 +0200.\n\n"
},
{
"path": "debian/docs",
"chars": 7,
"preview": "README\n"
},
{
"path": "debian/files",
"chars": 80,
"preview": "libemu-dev_0.2.0-1_amd64.deb libdevel extra\nlibemu_0.2.0-1_amd64.deb libs extra\n"
},
{
"path": "debian/libemu-dev.install",
"chars": 18,
"preview": "usr/include/emu/*\n"
},
{
"path": "debian/libemu.install",
"chars": 55,
"preview": "usr/lib/libemu.so.*\nusr/lib/libemu.so\nusr/lib/libemu.a\n"
},
{
"path": "debian/rules",
"chars": 442,
"preview": "#!/usr/bin/make -f\n# -*- makefile -*-\n# Sample debian/rules that uses debhelper.\n# This file was originally written by J"
},
{
"path": "doc/Makefile.am",
"chars": 84,
"preview": "# $Id$\n\nAUTOMAKE_OPTIONS = foreign\n\n\nman_MANS = libemu.3\n\nEXTRA_DIST = $(man_MANS)\n\n"
},
{
"path": "doc/libemu.3",
"chars": 6456,
"preview": ".TH EMU 3 \"04 September 2007\"\n.SH NAME \nlibemu - emulate x86 shellcodes \n.SH SYNOPSIS\n.nf\n.ft B\n#include <emu/emu.h>\n#in"
},
{
"path": "include/Makefile.am",
"chars": 50,
"preview": "# $Id$\n\nAUTOMAKE_OPTIONS = foreign\n\nSUBDIRS = emu\n"
},
{
"path": "include/emu/Makefile.am",
"chars": 1094,
"preview": "# $Id$\n\nAUTOMAKE_OPTIONS = foreign\n\nSUBDIRS = environment\n\nincludedir = $(prefix)/include/emu\n\ninclude_HEADERS = emu.h\ni"
},
{
"path": "include/emu/emu.h",
"chars": 2817,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_breakpoint.h",
"chars": 2171,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_cpu.h",
"chars": 3145,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_cpu_data.h",
"chars": 9633,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_cpu_functions.h",
"chars": 23878,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_cpu_instruction.h",
"chars": 2285,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_cpu_itables.h",
"chars": 29939,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_cpu_stack.h",
"chars": 3386,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_fpu_instruction.h",
"chars": 1455,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_getpc.h",
"chars": 1382,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_graph.h",
"chars": 3348,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_hashtable.h",
"chars": 4845,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_instruction.h",
"chars": 1865,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_list.h",
"chars": 14241,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_log.h",
"chars": 2042,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_memory.h",
"chars": 4003,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_queue.h",
"chars": 2336,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_shellcode.h",
"chars": 1826,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_source.h",
"chars": 1806,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_stack.h",
"chars": 1599,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_string.h",
"chars": 2201,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/emu_track.h",
"chars": 4114,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/environment/Makefile.am",
"chars": 150,
"preview": "# $Id$\n\nAUTOMAKE_OPTIONS = foreign\n\nSUBDIRS = win32 linux\n\n\nincludedir = $(prefix)/include/emu/environment\ninclude_HEADE"
},
{
"path": "include/emu/environment/emu_env.h",
"chars": 2688,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/environment/emu_profile.h",
"chars": 5296,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/environment/linux/Makefile.am",
"chars": 182,
"preview": "# $Id$\n\nincludedir = $(prefix)/include/emu/environment/linux\n\ninclude_HEADERS = emu_env_linux.h\ninclude_HEADERS += env_l"
},
{
"path": "include/emu/environment/linux/emu_env_linux.h",
"chars": 2480,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/environment/linux/env_linux_syscall_hooks.h",
"chars": 2003,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/environment/linux/env_linux_syscalls.h",
"chars": 18396,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/environment/win32/Makefile.am",
"chars": 544,
"preview": "# $Id$\n\nincludedir = $(prefix)/include/emu/environment/win32\n\ninclude_HEADERS = emu_env_w32.h\ninclude_HEADERS += emu_env"
},
{
"path": "include/emu/environment/win32/emu_env_w32.h",
"chars": 2947,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/environment/win32/emu_env_w32_dll.h",
"chars": 2033,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/environment/win32/emu_env_w32_dll_export.h",
"chars": 2120,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/environment/win32/env_w32_dll_export_hooks.h",
"chars": 269171,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/environment/win32/env_w32_dll_export_kernel32_hooks.h",
"chars": 4818,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/environment/win32/env_w32_dll_export_msvcrt_hooks.h",
"chars": 1443,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/environment/win32/env_w32_dll_export_shdocvw_hooks.h",
"chars": 1214,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/environment/win32/env_w32_dll_export_shell32_hooks.h",
"chars": 1225,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/environment/win32/env_w32_dll_export_urlmon_hooks.h",
"chars": 1224,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "include/emu/environment/win32/env_w32_dll_export_ws2_32_hooks.h",
"chars": 1990,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "libemu.doxy",
"chars": 50856,
"preview": "# Doxyfile 1.4.4\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org) "
},
{
"path": "libemu.pc.in",
"chars": 265,
"preview": "\nprefix=@prefix@\nexec_prefix=@exec_prefix@\nlibdir=@libdir@\nincludedir=@includedir@\n\nName: libemu\nDescription: library to"
},
{
"path": "src/Makefile.am",
"chars": 3594,
"preview": "# libemu Makefile\n# Paul Baecher, Markus Koetter\n# $Id$\n\nAUTOMAKE_OPTIONS = foreign subdir-objects\n\n\n\nAM_CFLAGS = -pipe "
},
{
"path": "src/emu.c",
"chars": 2724,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/emu_breakpoint.c",
"chars": 3763,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/emu_cpu.c",
"chars": 21481,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/emu_cpu_data.c",
"chars": 3018,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/emu_getpc.c",
"chars": 3854,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/emu_graph.c",
"chars": 6515,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/emu_hashtable.c",
"chars": 6305,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/emu_list.c",
"chars": 1439,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/emu_log.c",
"chars": 2565,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/emu_memory.c",
"chars": 12175,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/emu_queue.c",
"chars": 2641,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/emu_shellcode.c",
"chars": 19443,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/emu_source.c",
"chars": 5263,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/emu_stack.c",
"chars": 2064,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/emu_string.c",
"chars": 2320,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/emu_track.c",
"chars": 7182,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/environment/emu_env.c",
"chars": 1820,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/environment/emu_profile.c",
"chars": 27075,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/environment/linux/emu_env_linux.c",
"chars": 4503,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/environment/linux/env_linux_syscall_hooks.c",
"chars": 10879,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/environment/win32/dlls/advapi32dll.c",
"chars": 141079,
"preview": "const char advapi32_77DD0000[] =\n/* 000000 */ \"\\x4D\\x5A\\x90\\x00\\x03\\x00\\x00\\x00\\x04\\x00\\x00\\x00\\xFF\\xFF\\x00\\x00\" //M"
},
{
"path": "src/environment/win32/dlls/kernel32dll.c",
"chars": 212135,
"preview": "const char kernel32_dll_7c800000[] =\n/* 7C800000 */ \"\\x4D\\x5A\\x90\\x00\\x03\\x00\\x00\\x00\\x04\\x00\\x00\\x00\\xFF\\xFF\\x00\\x00\" /"
},
{
"path": "src/environment/win32/dlls/msvcrtdll.c",
"chars": 114671,
"preview": "const char msvcrt_77be0000[]=\n/* 77BE0000 */ \"\\x4D\\x5A\\x90\\x00\\x03\\x00\\x00\\x00\\x04\\x00\\x00\\x00\\xFF\\xFF\\x00\\x00\" // MZ.\u0003"
},
{
"path": "src/environment/win32/dlls/ntdll.c",
"chars": 258802,
"preview": "const char ntdll_7C900000[] =\n/* 000000 */ \"\\x4D\\x5A\\x90\\x00\\x03\\x00\\x00\\x00\\x04\\x00\\x00\\x00\\xFF\\xFF\\x00\\x00\" //MZ.."
},
{
"path": "src/environment/win32/dlls/shdocvwdll.c",
"chars": 143815,
"preview": "const char shdocvw_7E290000[] =\n/* 7E290000 */ \"\\x4D\\x5A\\x90\\x00\\x03\\x00\\x00\\x00\\x04\\x00\\x00\\x00\\xFF\\xFF\\x00\\x00\" //"
},
{
"path": "src/environment/win32/dlls/shell32dll.c",
"chars": 73732,
"preview": "const char shell32_7C9C0000[]= /* pe header and section table -dzzie*/\n/* 7C9C0000 */ \"\\x4D\\x5A\\x90\\x00\\x03\\x00\\x00\\x0"
},
{
"path": "src/environment/win32/dlls/shlwapidll.c",
"chars": 72170,
"preview": "const char shlwapi_77F60000[] =\n/* 000000 */ \"\\x4D\\x5A\\x90\\x00\\x03\\x00\\x00\\x00\\x04\\x00\\x00\\x00\\xFF\\xFF\\x00\\x00\" //MZ"
},
{
"path": "src/environment/win32/dlls/urlmondll.c",
"chars": 44717,
"preview": "const char urlmon_7DF20000[]=\n/* 7DF20000 */ \"\\x4D\\x5A\\x90\\x00\\x03\\x00\\x00\\x00\\x04\\x00\\x00\\x00\\xFF\\xFF\\x00\\x00\" // MZ.\u0003"
},
{
"path": "src/environment/win32/dlls/user32dll.c",
"chars": 132219,
"preview": "const char user32_7E410000[]= /* pe header and section table -dzzie*/\n/* 7E410000 */ \"\\x4D\\x5A\\x90\\x00\\x03\\x00\\x00\\x00"
},
{
"path": "src/environment/win32/dlls/wininetdll.c",
"chars": 54040,
"preview": "const char wininet_3D930000[] =\n/* 3D930000 */ \"\\x4D\\x5A\\x90\\x00\\x03\\x00\\x00\\x00\\x04\\x00\\x00\\x00\\xFF\\xFF\\x00\\x00\" //"
},
{
"path": "src/environment/win32/dlls/ws2_32dll.c",
"chars": 41022,
"preview": "const char ws2_32_71a10000[]=\n/* 71A10000 */ \"\\x4D\\x5A\\x90\\x00\\x03\\x00\\x00\\x00\\x04\\x00\\x00\\x00\\xFF\\xFF\\x00\\x00\" // MZ.\u0003"
},
{
"path": "src/environment/win32/emu_env_w32.c",
"chars": 19414,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/environment/win32/emu_env_w32_dll.c",
"chars": 2753,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/environment/win32/emu_env_w32_dll_export.c",
"chars": 2213,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/environment/win32/env_w32_dll_export_kernel32_hooks.c",
"chars": 51293,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/environment/win32/env_w32_dll_export_msvcrt_hooks.c",
"chars": 7341,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/environment/win32/env_w32_dll_export_shdocvw_hooks.c",
"chars": 3128,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/environment/win32/env_w32_dll_export_shell32_hooks.c",
"chars": 4107,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/environment/win32/env_w32_dll_export_urlmon_hooks.c",
"chars": 4002,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/environment/win32/env_w32_dll_export_ws2_32_hooks.c",
"chars": 17053,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/Makefile.am",
"chars": 97,
"preview": "# libemu Makefile\n# Paul Baecher, Markus Koetter\n# $Id$\n\nEXTRA_DIST = add.c\nEXTRA_DIST += misc.c\n"
},
{
"path": "src/functions/aaa.c",
"chars": 1684,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/adc.c",
"chars": 13094,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/add.c",
"chars": 9913,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/and.c",
"chars": 9767,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/call.c",
"chars": 3448,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/cmp.c",
"chars": 9721,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/cmps.c",
"chars": 6226,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/dec.c",
"chars": 4343,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/div.c",
"chars": 4291,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/group_1.c",
"chars": 2765,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/group_10.c",
"chars": 2307,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/group_2.c",
"chars": 4204,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/group_3.c",
"chars": 2211,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/group_4.c",
"chars": 1667,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/group_5.c",
"chars": 1837,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/idiv.c",
"chars": 4680,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/imul.c",
"chars": 11274,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/inc.c",
"chars": 4393,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/int.c",
"chars": 1313,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/jcc.c",
"chars": 16459,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/jmp.c",
"chars": 3774,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/lodscc.c",
"chars": 2956,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/loopcc.c",
"chars": 3067,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/misc.c",
"chars": 7594,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/mov.c",
"chars": 8562,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/movsx.c",
"chars": 2774,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/movzx.c",
"chars": 2696,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/mul.c",
"chars": 4334,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/neg.c",
"chars": 4582,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/not.c",
"chars": 3110,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/or.c",
"chars": 9698,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/pop.c",
"chars": 3654,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/push.c",
"chars": 4753,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/rcl.c",
"chars": 7567,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/rcr.c",
"chars": 7776,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/repcc.c",
"chars": 7600,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/ret.c",
"chars": 2159,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/rol.c",
"chars": 7521,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/ror.c",
"chars": 7801,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/sal.c",
"chars": 7349,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/sar.c",
"chars": 7400,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/sbb.c",
"chars": 12847,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/scas.c",
"chars": 4320,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/shr.c",
"chars": 7516,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/stoscc.c",
"chars": 3290,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/sub.c",
"chars": 10357,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/test.c",
"chars": 6141,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/xchg.c",
"chars": 4371,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/functions/xor.c",
"chars": 11872,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "src/libdasm.c",
"chars": 30877,
"preview": "\n/*\n * libdasm -- simple x86 disassembly library\n * (c) 2004 - 2006 jt / nologin.org\n *\n * libdasm.c:\n * This file cont"
},
{
"path": "src/libdasm.h",
"chars": 15303,
"preview": "\n/*\n * libdasm -- simple x86 disassembly library\n * (c) 2004 - 2005 jt / nologin.org\n *\n * libdasm.h:\n * Definitions fo"
},
{
"path": "src/opcode_tables.h",
"chars": 253237,
"preview": "/*\n * libdasm -- simple x86 disassembly library\n * (c) 2004 - 2006 jt / nologin.org\n *\n * opcode_tables.h:\n * Opcode ta"
},
{
"path": "testsuite/Makefile.am",
"chars": 693,
"preview": "AUTOMAKE_OPTIONS = foreign\n\nAM_CPPFLAGS = -I../include -I ../.. -Werror -Wall -g\nAM_LDFLAGS = -lemu -L../src \n\nbin_PROGR"
},
{
"path": "testsuite/cpu_run.c",
"chars": 6702,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "testsuite/emunids.c",
"chars": 3431,
"preview": "/* \n * emunids\n *\n * emulation based network intrusion system\n *\n * Markus Koetter 2007\n *\n * "
},
{
"path": "testsuite/hashtest.c",
"chars": 6519,
"preview": "#include <stdio.h>\n#include <string.h>\n\n#include <emu/emu_hashtable.h>\n\nstruct addr_instr\n{\n\tuint32_t addr;\n\tconst char "
},
{
"path": "testsuite/instrtest.c",
"chars": 27801,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "testsuite/instrtree.c",
"chars": 3243,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "testsuite/main.c",
"chars": 2098,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "testsuite/memtest.c",
"chars": 570,
"preview": "#include <stdio.h>\n#include \"emu/emu.h\"\n#include \"emu/emu_memory.h\"\n\nvoid test_alloc(struct emu *e)\n{\n\tconst uint32_t le"
},
{
"path": "testsuite/scprofiler.c",
"chars": 7565,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "tools/Makefile.am",
"chars": 53,
"preview": "# $Id$\n\nAUTOMAKE_OPTIONS = foreign\n\nSUBDIRS = sctest\n"
},
{
"path": "tools/sctest/Makefile.am",
"chars": 672,
"preview": "AUTOMAKE_OPTIONS = foreign\n\nAM_CPPFLAGS = -I../../include -I ../../.. -Werror -Wall -g\nAM_LDFLAGS = -lemu -L../../src \n\n"
},
{
"path": "tools/sctest/dot.c",
"chars": 8927,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "tools/sctest/dot.h",
"chars": 435,
"preview": "struct instr_vertex\n{\n\tuint32_t eip;\n\tstruct emu_string *instr_string;\n\tstruct emu_env_w32_dll *dll;\n\tstruct emu_env"
},
{
"path": "tools/sctest/nanny.c",
"chars": 1347,
"preview": "#include <string.h>\n#include <stdio.h>\n\n#include \"nanny.h\"\n\n#include \"../../include/emu/emu_hashtable.h\"\n\n\nstruct nanny "
},
{
"path": "tools/sctest/nanny.h",
"chars": 680,
"preview": "#include <stdint.h>\n#include <stdio.h>\n#include <stdbool.h>\n\nstruct nanny_file\n{\n\tbool active;\n\tchar\t\t*path;\n\tuint32_t\te"
},
{
"path": "tools/sctest/options.h",
"chars": 614,
"preview": "struct run_time_options\n{\n\tint verbose;\n\tint nasm_force;\n\tuint32_t steps;\n\tint testnumber;\n\tint getpc;\n\tchar *graphfile;"
},
{
"path": "tools/sctest/sctestmain.c",
"chars": 23083,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "tools/sctest/tests.c",
"chars": 103809,
"preview": "#include \"tests.h\"\n\n\nstruct instr_test tests[] = \n{\n#ifndef _NO_TESTS\n/* {\n\t\t.instr = \"instr\",\n\t\t.in_state.reg = {0,0,"
},
{
"path": "tools/sctest/tests.h",
"chars": 401,
"preview": "#include <stdint.h>\n\nstruct instr_test\n{\n\tconst char *instr;\n\n\tchar *code;\n\tuint16_t codesize;\n\n\tstruct \n\t{\n\t\tuint32_t "
},
{
"path": "tools/sctest/userhooks.c",
"chars": 18883,
"preview": "/********************************************************************************\n * libem"
},
{
"path": "tools/sctest/userhooks.h",
"chars": 1818,
"preview": "\nuint32_t user_hook_ExitProcess(struct emu_env *env, struct emu_env_hook *hook, ...);\nuint32_t user_hook_ExitThread(stru"
}
]
About this extraction
This page contains the full source code of the buffer/libemu GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 180 files (2.8 MB), approximately 731.6k tokens, and a symbol index with 1959 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.