This file is indexed.

/usr/include/emu/emu_cpu.h is in libemu-dev 0.2.0+git20120122-1.2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/********************************************************************************
 *                               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 */