|
|
|
|
@ -48,6 +48,7 @@ uint32_t cli_bcapi_trace_source(struct cli_bc_ctx *ctx, const const uint8_t*, ui |
|
|
|
|
uint32_t cli_bcapi_trace_op(struct cli_bc_ctx *ctx, const const uint8_t*, uint32_t); |
|
|
|
|
uint32_t cli_bcapi_trace_value(struct cli_bc_ctx *ctx, const const uint8_t*, uint32_t); |
|
|
|
|
uint32_t cli_bcapi_trace_ptr(struct cli_bc_ctx *ctx, const const uint8_t*, uint32_t); |
|
|
|
|
uint32_t cli_bcapi_pe_rawaddr(struct cli_bc_ctx *ctx, uint32_t, uint32_t); |
|
|
|
|
|
|
|
|
|
const struct cli_apiglobal cli_globals[] = { |
|
|
|
|
/* Bytecode globals BEGIN */ |
|
|
|
|
@ -55,6 +56,8 @@ const struct cli_apiglobal cli_globals[] = { |
|
|
|
|
((char*)&((struct cli_bc_ctx*)0)->hooks.kind - (char*)NULL)}, |
|
|
|
|
{"__clambc_match_counts", GLOBAL_MATCH_COUNTS, 82, |
|
|
|
|
((char*)&((struct cli_bc_ctx*)0)->hooks.match_counts - (char*)NULL)}, |
|
|
|
|
{"__clambc_filesize", GLOBAL_FILESIZE, 32, |
|
|
|
|
((char*)&((struct cli_bc_ctx*)0)->hooks.filesize - (char*)NULL)}, |
|
|
|
|
{"__clambc_exeinfo", GLOBAL_EXEINFO, 79, |
|
|
|
|
((char*)&((struct cli_bc_ctx*)0)->hooks.exeinfo - (char*)NULL)}, |
|
|
|
|
{"__clambc_pedata", GLOBAL_PEDATA, 69, |
|
|
|
|
@ -76,14 +79,14 @@ static uint16_t cli_tmp10[]={80, 32, 32, 16}; |
|
|
|
|
static uint16_t cli_tmp11[]={81}; |
|
|
|
|
static uint16_t cli_tmp12[]={32, 32, 32, 32, 32, 32, 32, 32, 32}; |
|
|
|
|
static uint16_t cli_tmp13[]={32}; |
|
|
|
|
static uint16_t cli_tmp14[]={32, 65, 32}; |
|
|
|
|
static uint16_t cli_tmp15[]={32, 85, 32}; |
|
|
|
|
static uint16_t cli_tmp16[]={86}; |
|
|
|
|
static uint16_t cli_tmp17[]={16, 8, 8, 8, 88, 87}; |
|
|
|
|
static uint16_t cli_tmp18[]={8}; |
|
|
|
|
static uint16_t cli_tmp19[]={89}; |
|
|
|
|
static uint16_t cli_tmp20[]={8}; |
|
|
|
|
static uint16_t cli_tmp21[]={32, 32, 32}; |
|
|
|
|
static uint16_t cli_tmp14[]={32, 32, 32}; |
|
|
|
|
static uint16_t cli_tmp15[]={32, 65, 32}; |
|
|
|
|
static uint16_t cli_tmp16[]={32, 86, 32}; |
|
|
|
|
static uint16_t cli_tmp17[]={87}; |
|
|
|
|
static uint16_t cli_tmp18[]={16, 8, 8, 8, 89, 88}; |
|
|
|
|
static uint16_t cli_tmp19[]={8}; |
|
|
|
|
static uint16_t cli_tmp20[]={90}; |
|
|
|
|
static uint16_t cli_tmp21[]={8}; |
|
|
|
|
static uint16_t cli_tmp22[]={32, 92, 32}; |
|
|
|
|
static uint16_t cli_tmp23[]={93}; |
|
|
|
|
static uint16_t cli_tmp24[]={92}; |
|
|
|
|
@ -105,12 +108,12 @@ const struct cli_bc_type cli_apicall_types[]={ |
|
|
|
|
{DArrayType, cli_tmp13, 64, 0, 0}, |
|
|
|
|
{DFunctionType, cli_tmp14, 3, 0, 0}, |
|
|
|
|
{DFunctionType, cli_tmp15, 3, 0, 0}, |
|
|
|
|
{DPointerType, cli_tmp16, 1, 0, 0}, |
|
|
|
|
{DStructType, cli_tmp17, 6, 0, 0}, |
|
|
|
|
{DArrayType, cli_tmp18, 29, 0, 0}, |
|
|
|
|
{DArrayType, cli_tmp19, 10, 0, 0}, |
|
|
|
|
{DArrayType, cli_tmp20, 3, 0, 0}, |
|
|
|
|
{DFunctionType, cli_tmp21, 3, 0, 0}, |
|
|
|
|
{DFunctionType, cli_tmp16, 3, 0, 0}, |
|
|
|
|
{DPointerType, cli_tmp17, 1, 0, 0}, |
|
|
|
|
{DStructType, cli_tmp18, 6, 0, 0}, |
|
|
|
|
{DArrayType, cli_tmp19, 29, 0, 0}, |
|
|
|
|
{DArrayType, cli_tmp20, 10, 0, 0}, |
|
|
|
|
{DArrayType, cli_tmp21, 3, 0, 0}, |
|
|
|
|
{DFunctionType, cli_tmp22, 3, 0, 0}, |
|
|
|
|
{DPointerType, cli_tmp23, 1, 0, 0}, |
|
|
|
|
{DStructType, cli_tmp24, 1, 0, 0} |
|
|
|
|
@ -120,26 +123,28 @@ const unsigned cli_apicall_maxtypes=sizeof(cli_apicall_types)/sizeof(cli_apicall |
|
|
|
|
const struct cli_apicall cli_apicalls[]={ |
|
|
|
|
/* Bytecode APIcalls BEGIN */ |
|
|
|
|
{"test0", 22, 0, 1}, |
|
|
|
|
{"test1", 21, 0, 0}, |
|
|
|
|
{"read", 14, 1, 1}, |
|
|
|
|
{"write", 14, 2, 1}, |
|
|
|
|
{"seek", 21, 1, 0}, |
|
|
|
|
{"setvirusname", 14, 3, 1}, |
|
|
|
|
{"debug_print_str", 14, 4, 1}, |
|
|
|
|
{"debug_print_uint", 21, 2, 0}, |
|
|
|
|
{"disasm_x86", 15, 5, 1}, |
|
|
|
|
{"trace_directory", 14, 6, 1}, |
|
|
|
|
{"trace_scope", 14, 7, 1}, |
|
|
|
|
{"trace_source", 14, 8, 1}, |
|
|
|
|
{"trace_op", 14, 9, 1}, |
|
|
|
|
{"trace_value", 14, 10, 1}, |
|
|
|
|
{"trace_ptr", 14, 11, 1} |
|
|
|
|
{"test1", 14, 0, 0}, |
|
|
|
|
{"read", 15, 1, 1}, |
|
|
|
|
{"write", 15, 2, 1}, |
|
|
|
|
{"seek", 14, 1, 0}, |
|
|
|
|
{"setvirusname", 15, 3, 1}, |
|
|
|
|
{"debug_print_str", 15, 4, 1}, |
|
|
|
|
{"debug_print_uint", 14, 2, 0}, |
|
|
|
|
{"disasm_x86", 16, 5, 1}, |
|
|
|
|
{"trace_directory", 15, 6, 1}, |
|
|
|
|
{"trace_scope", 15, 7, 1}, |
|
|
|
|
{"trace_source", 15, 8, 1}, |
|
|
|
|
{"trace_op", 15, 9, 1}, |
|
|
|
|
{"trace_value", 15, 10, 1}, |
|
|
|
|
{"trace_ptr", 15, 11, 1}, |
|
|
|
|
{"pe_rawaddr", 14, 3, 0} |
|
|
|
|
/* Bytecode APIcalls END */ |
|
|
|
|
}; |
|
|
|
|
const cli_apicall_int2 cli_apicalls0[] = { |
|
|
|
|
(cli_apicall_int2)cli_bcapi_test1, |
|
|
|
|
(cli_apicall_int2)cli_bcapi_seek, |
|
|
|
|
(cli_apicall_int2)cli_bcapi_debug_print_uint |
|
|
|
|
(cli_apicall_int2)cli_bcapi_debug_print_uint, |
|
|
|
|
(cli_apicall_int2)cli_bcapi_pe_rawaddr |
|
|
|
|
}; |
|
|
|
|
const cli_apicall_pointer cli_apicalls1[] = { |
|
|
|
|
(cli_apicall_pointer)cli_bcapi_test0, |
|
|
|
|
|