miasm
Reverse engineering framework
|
#include "vm_mngr.h"
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "queue.h"
Macros | |
#define | MIN(a, b) (((a)<(b))?(a):(b)) |
#define | MAX(a, b) (((a)>(b))?(a):(b)) |
Functions | |
void | memory_access_list_init (struct memory_access_list *access) |
void | memory_access_list_reset (struct memory_access_list *access) |
void | memory_access_list_add (struct memory_access_list *access, uint64_t start, uint64_t stop) |
uint16_t | set_endian16 (vm_mngr_t *vm_mngr, uint16_t val) |
uint32_t | set_endian32 (vm_mngr_t *vm_mngr, uint32_t val) |
uint64_t | set_endian64 (vm_mngr_t *vm_mngr, uint64_t val) |
void | print_val (uint64_t base, uint64_t addr) |
int | midpoint (int imin, int imax) |
int | find_page_node (struct memory_page_node *array, uint64_t key, int imin, int imax) |
struct memory_page_node * | get_memory_page_from_address (vm_mngr_t *vm_mngr, uint64_t ad, int raise_exception) |
void | dump_code_bloc (vm_mngr_t *vm_mngr) |
void | add_range_to_list (struct memory_access_list *access, uint64_t addr1, uint64_t addr2) |
void | add_mem_read (vm_mngr_t *vm_mngr, uint64_t addr, uint64_t size) |
void | add_mem_write (vm_mngr_t *vm_mngr, uint64_t addr, uint64_t size) |
void | check_invalid_code_blocs (vm_mngr_t *vm_mngr) |
void | check_memory_breakpoint (vm_mngr_t *vm_mngr) |
PyObject * | get_memory_pylist (vm_mngr_t *vm_mngr, struct memory_access_list *memory_list) |
PyObject * | get_memory_read (vm_mngr_t *vm_mngr) |
PyObject * | get_memory_write (vm_mngr_t *vm_mngr) |
void | vm_MEM_WRITE_08 (vm_mngr_t *vm_mngr, uint64_t addr, unsigned char src) |
void | vm_MEM_WRITE_16 (vm_mngr_t *vm_mngr, uint64_t addr, unsigned short src) |
void | vm_MEM_WRITE_32 (vm_mngr_t *vm_mngr, uint64_t addr, unsigned int src) |
void | vm_MEM_WRITE_64 (vm_mngr_t *vm_mngr, uint64_t addr, uint64_t src) |
unsigned char | vm_MEM_LOOKUP_08 (vm_mngr_t *vm_mngr, uint64_t addr) |
unsigned short | vm_MEM_LOOKUP_16 (vm_mngr_t *vm_mngr, uint64_t addr) |
unsigned int | vm_MEM_LOOKUP_32 (vm_mngr_t *vm_mngr, uint64_t addr) |
uint64_t | vm_MEM_LOOKUP_64 (vm_mngr_t *vm_mngr, uint64_t addr) |
int | vm_read_mem (vm_mngr_t *vm_mngr, uint64_t addr, char **buffer_ptr, size_t size) |
uint64_t | vm_read_mem_ret_buf (vm_mngr_t *vm_mngr, uint64_t addr, size_t size, char *buffer) |
int | vm_write_mem (vm_mngr_t *vm_mngr, uint64_t addr, char *buffer, size_t size) |
int | is_mapped (vm_mngr_t *vm_mngr, uint64_t addr, size_t size) |
struct memory_page_node * | create_memory_page_node (uint64_t ad, size_t size, unsigned int access, const char *name) |
struct code_bloc_node * | create_code_bloc_node (uint64_t ad_start, uint64_t ad_stop) |
void | add_code_bloc (vm_mngr_t *vm_mngr, struct code_bloc_node *cbp) |
void | dump_code_bloc_pool (vm_mngr_t *vm_mngr) |
void | init_memory_page_pool (vm_mngr_t *vm_mngr) |
void | init_code_bloc_pool (vm_mngr_t *vm_mngr) |
void | init_memory_breakpoint (vm_mngr_t *vm_mngr) |
void | reset_memory_page_pool (vm_mngr_t *vm_mngr) |
void | reset_code_bloc_pool (vm_mngr_t *vm_mngr) |
void | reset_memory_access (vm_mngr_t *vm_mngr) |
void | reset_memory_breakpoint (vm_mngr_t *vm_mngr) |
int | is_mpn_in_tab (vm_mngr_t *vm_mngr, struct memory_page_node *mpn_a) |
void | add_memory_page (vm_mngr_t *vm_mngr, struct memory_page_node *mpn_a) |
void | remove_memory_page (vm_mngr_t *vm_mngr, uint64_t ad) |
char * | dump (vm_mngr_t *vm_mngr) |
void | dump_memory_breakpoint_pool (vm_mngr_t *vm_mngr) |
void | add_memory_breakpoint (vm_mngr_t *vm_mngr, uint64_t ad, uint64_t size, unsigned int access) |
void | remove_memory_breakpoint (vm_mngr_t *vm_mngr, uint64_t ad, unsigned int access) |
void | hexdump (char *m, unsigned int l) |
_MIASM_EXPORT uint64_t | get_exception_flag (vm_mngr_t *vm_mngr) |
#define MAX | ( | a, | |
b | |||
) | (((a)>(b))?(a):(b)) |
#define MIN | ( | a, | |
b | |||
) | (((a)<(b))?(a):(b)) |
void add_code_bloc | ( | vm_mngr_t * | vm_mngr, |
struct code_bloc_node * | cbp | ||
) |
void add_mem_read | ( | vm_mngr_t * | vm_mngr, |
uint64_t | addr, | ||
uint64_t | size | ||
) |
void add_mem_write | ( | vm_mngr_t * | vm_mngr, |
uint64_t | addr, | ||
uint64_t | size | ||
) |
void add_memory_breakpoint | ( | vm_mngr_t * | vm_mngr, |
uint64_t | ad, | ||
uint64_t | size, | ||
unsigned int | access | ||
) |
void add_memory_page | ( | vm_mngr_t * | vm_mngr, |
struct memory_page_node * | mpn_a | ||
) |
void add_range_to_list | ( | struct memory_access_list * | access, |
uint64_t | addr1, | ||
uint64_t | addr2 | ||
) |
void check_invalid_code_blocs | ( | vm_mngr_t * | vm_mngr | ) |
void check_memory_breakpoint | ( | vm_mngr_t * | vm_mngr | ) |
struct code_bloc_node* create_code_bloc_node | ( | uint64_t | ad_start, |
uint64_t | ad_stop | ||
) |
struct memory_page_node* create_memory_page_node | ( | uint64_t | ad, |
size_t | size, | ||
unsigned int | access, | ||
const char * | name | ||
) |
char* dump | ( | vm_mngr_t * | vm_mngr | ) |
void dump_code_bloc | ( | vm_mngr_t * | vm_mngr | ) |
void dump_code_bloc_pool | ( | vm_mngr_t * | vm_mngr | ) |
void dump_memory_breakpoint_pool | ( | vm_mngr_t * | vm_mngr | ) |
int find_page_node | ( | struct memory_page_node * | array, |
uint64_t | key, | ||
int | imin, | ||
int | imax | ||
) |
_MIASM_EXPORT uint64_t get_exception_flag | ( | vm_mngr_t * | vm_mngr | ) |
struct memory_page_node* get_memory_page_from_address | ( | vm_mngr_t * | vm_mngr, |
uint64_t | ad, | ||
int | raise_exception | ||
) |
PyObject* get_memory_pylist | ( | vm_mngr_t * | vm_mngr, |
struct memory_access_list * | memory_list | ||
) |
PyObject* get_memory_read | ( | vm_mngr_t * | vm_mngr | ) |
PyObject* get_memory_write | ( | vm_mngr_t * | vm_mngr | ) |
void hexdump | ( | char * | m, |
unsigned int | l | ||
) |
void init_code_bloc_pool | ( | vm_mngr_t * | vm_mngr | ) |
void init_memory_breakpoint | ( | vm_mngr_t * | vm_mngr | ) |
void init_memory_page_pool | ( | vm_mngr_t * | vm_mngr | ) |
int is_mapped | ( | vm_mngr_t * | vm_mngr, |
uint64_t | addr, | ||
size_t | size | ||
) |
int is_mpn_in_tab | ( | vm_mngr_t * | vm_mngr, |
struct memory_page_node * | mpn_a | ||
) |
void memory_access_list_add | ( | struct memory_access_list * | access, |
uint64_t | start, | ||
uint64_t | stop | ||
) |
void memory_access_list_init | ( | struct memory_access_list * | access | ) |
void memory_access_list_reset | ( | struct memory_access_list * | access | ) |
int midpoint | ( | int | imin, |
int | imax | ||
) |
void print_val | ( | uint64_t | base, |
uint64_t | addr | ||
) |
void remove_memory_breakpoint | ( | vm_mngr_t * | vm_mngr, |
uint64_t | ad, | ||
unsigned int | access | ||
) |
void remove_memory_page | ( | vm_mngr_t * | vm_mngr, |
uint64_t | ad | ||
) |
void reset_code_bloc_pool | ( | vm_mngr_t * | vm_mngr | ) |
void reset_memory_access | ( | vm_mngr_t * | vm_mngr | ) |
void reset_memory_breakpoint | ( | vm_mngr_t * | vm_mngr | ) |
void reset_memory_page_pool | ( | vm_mngr_t * | vm_mngr | ) |
uint16_t set_endian16 | ( | vm_mngr_t * | vm_mngr, |
uint16_t | val | ||
) |
uint32_t set_endian32 | ( | vm_mngr_t * | vm_mngr, |
uint32_t | val | ||
) |
uint64_t set_endian64 | ( | vm_mngr_t * | vm_mngr, |
uint64_t | val | ||
) |
unsigned char vm_MEM_LOOKUP_08 | ( | vm_mngr_t * | vm_mngr, |
uint64_t | addr | ||
) |
unsigned short vm_MEM_LOOKUP_16 | ( | vm_mngr_t * | vm_mngr, |
uint64_t | addr | ||
) |
unsigned int vm_MEM_LOOKUP_32 | ( | vm_mngr_t * | vm_mngr, |
uint64_t | addr | ||
) |
uint64_t vm_MEM_LOOKUP_64 | ( | vm_mngr_t * | vm_mngr, |
uint64_t | addr | ||
) |
void vm_MEM_WRITE_08 | ( | vm_mngr_t * | vm_mngr, |
uint64_t | addr, | ||
unsigned char | src | ||
) |
void vm_MEM_WRITE_16 | ( | vm_mngr_t * | vm_mngr, |
uint64_t | addr, | ||
unsigned short | src | ||
) |
void vm_MEM_WRITE_32 | ( | vm_mngr_t * | vm_mngr, |
uint64_t | addr, | ||
unsigned int | src | ||
) |
void vm_MEM_WRITE_64 | ( | vm_mngr_t * | vm_mngr, |
uint64_t | addr, | ||
uint64_t | src | ||
) |
int vm_read_mem | ( | vm_mngr_t * | vm_mngr, |
uint64_t | addr, | ||
char ** | buffer_ptr, | ||
size_t | size | ||
) |
uint64_t vm_read_mem_ret_buf | ( | vm_mngr_t * | vm_mngr, |
uint64_t | addr, | ||
size_t | size, | ||
char * | buffer | ||
) |
int vm_write_mem | ( | vm_mngr_t * | vm_mngr, |
uint64_t | addr, | ||
char * | buffer, | ||
size_t | size | ||
) |