Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #define BEA_ENGINE_STATIC /* specify the usage of a static version of BeaEngine */
- #define BEA_USE_STDCALL /* specify the usage of a stdcall version of BeaEngine */
- #include "BeaEngine.h"
- int main(int argc, char* argv [])
- {
- /* ============================= Init datas */
- DISASM MyDisasm;
- int len, i = 0;
- int Error = 0;
- /* ===================== display the version and revision used */
- (void) printf("Version : %s\n", BeaEngineVersion());
- (void) printf("Revision : %s\n", BeaEngineRevision());
- /* ============================= Init the Disasm structure (important !)*/
- (void) memset (&MyDisasm, 0, sizeof(DISASM));
- /* ============================= Init EIP */
- MyDisasm.EIP = (UIntPtr) &main;
- /* ============================= Loop for Disasm */
- while ((!Error) && (i<20)){
- len = Disasm(&MyDisasm);
- if (len != UNKNOWN_OPCODE) {
- (void) puts(MyDisasm.CompleteInstr);
- MyDisasm.EIP = MyDisasm.EIP + (UIntPtr)len;
- i++;
- }
- else {
- Error = 1;
- }
- };
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement