-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMain.cpp
More file actions
64 lines (51 loc) · 1.63 KB
/
Main.cpp
File metadata and controls
64 lines (51 loc) · 1.63 KB
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
// ****************************************************************************
// File: Main.cpp
// Desc: IDA Pro plug in that does an extra pass to fix unresolved code.
// Plug-in interface
//
// ****************************************************************************
#include "stdafx.h"
// Run IDA in plug in debug mode with -z20
// === Function Prototypes ===
int idaapi IDAP_init();
void idaapi IDAP_term();
void idaapi IDAP_run(int arg);
extern void CORE_Init();
extern void CORE_Process(int iArg);
extern void CORE_Exit();
// === Data ===
const char IDAP_comment[] = "ExtraPass: Does extra possessing steps on Win32 code sections to fix unresolved code, etc.";
const char IDAP_help[] = "ExtraPass: Activate with configured hotkey.";
const char IDAP_name[] = "ExtraPass";
// Plug-in description block
extern "C" ALIGN(16) plugin_t PLUGIN =
{
IDP_INTERFACE_VERSION, // IDA version plug-in is written for
PLUGIN_UNL, // Plug-in flags
IDAP_init, // Initialization function
IDAP_term, // Clean-up function
IDAP_run, // Main plug-in body
IDAP_comment, // Comment - unused
IDAP_help, // As above - unused
IDAP_name, // Plug-in name shown in Edit->Plugins menu
NULL // Hot key to run the plug-in
};
// Init
int idaapi IDAP_init()
{
// Only x86 supported
if (ph.id != PLFM_386)
return(PLUGIN_SKIP);
CORE_Init();
return(PLUGIN_OK);
}
// Un-init
void idaapi IDAP_term()
{
CORE_Exit();
}
// Run
void idaapi IDAP_run(int iArg)
{
CORE_Process(iArg);
}