-
-
[原创]XEDParse Pascal汇编引擎头
-
发表于: 2020-2-3 21:52 6640
-
没有看到Pascal的 翻一个! { XEDParse Pascal汇编引擎头 XEDParse引擎地址:https://github.com/x64dbg/XEDParse by:静夜思 2020.1 } unit XEDParse; interface uses Windows,SysUtils; Const XEDPARSE_MAXBUFSIZE = 256; XEDPARSE_MAXASMSIZE = 16; type TXEDParse_call=function(Text:PAnsiChar;Value:PULONGLONG):BOOl; TXEDParse_status=( XEDPARSE_ERROR = 0, XEDPARSE_OK = 1 ); {$A8+} TXEDParse=Record x64:Bool; //use 64-bit instructions cip:ULONGLONG; //instruction pointer (for relative addressing) dest_size:UINT; //destination size (returned by XEDParse) cbUnkonow: TXEDPARSE_CALL; //unknown operand callback dest : array [0..XEDPARSE_MAXASMSIZE-1] of byte; //destination buffer instr: array [0..XEDPARSE_MAXBUFSIZE-1] of AnsiChar; //instruction text error: array [0..XEDPARSE_MAXBUFSIZE-1] of AnsiChar; //error text (in case of an error) End; function XEDParseAssemble(var xedParse:TXEDPARSE):TXEDPARSE_STATUS; cdecl; external 'XEDParse.dll'; implementation //Sample //function MemToHex2(p: PByteArray; size: Integer): string; //begin // for var i := 0 to size - 1 do Result := Result + IntToHex(p^[i], 2) + Chr(32); // Result := TrimRight(Result); //end; //var // parse:TXEDPARSE; //begin // ZeroMemory(@Parse,sizeof(TXEDPARSE)); // parse.x64 := false; // parse.cip := 0; // parse.instr := 'push dword ptr [ebp+0x10]'; // if XEDParseAssemble(parse)=XEDPARSE_OK then // begin // ShowMessage(MemToHex2(@parse.dest[0],parse.dest_size)); // end // else // begin // ShowMessage(Ansistring(parse.error)); // end; //end; end.
没有看到Pascal的 翻一个! { XEDParse Pascal汇编引擎头 XEDParse引擎地址:https://github.com/x64dbg/XEDParse by:静夜思 2020.1 } unit XEDParse; interface uses Windows,SysUtils; Const XEDPARSE_MAXBUFSIZE = 256; XEDPARSE_MAXASMSIZE = 16; type TXEDParse_call=function(Text:PAnsiChar;Value:PULONGLONG):BOOl; TXEDParse_status=( XEDPARSE_ERROR = 0, XEDPARSE_OK = 1 ); {$A8+} TXEDParse=Record x64:Bool; //use 64-bit instructions cip:ULONGLONG; //instruction pointer (for relative addressing) dest_size:UINT; //destination size (returned by XEDParse) cbUnkonow: TXEDPARSE_CALL; //unknown operand callback dest : array [0..XEDPARSE_MAXASMSIZE-1] of byte; //destination buffer instr: array [0..XEDPARSE_MAXBUFSIZE-1] of AnsiChar; //instruction text error: array [0..XEDPARSE_MAXBUFSIZE-1] of AnsiChar; //error text (in case of an error) End; function XEDParseAssemble(var xedParse:TXEDPARSE):TXEDPARSE_STATUS; cdecl; external 'XEDParse.dll'; implementation //Sample //function MemToHex2(p: PByteArray; size: Integer): string; //begin // for var i := 0 to size - 1 do Result := Result + IntToHex(p^[i], 2) + Chr(32); // Result := TrimRight(Result); //end; //var // parse:TXEDPARSE; //begin // ZeroMemory(@Parse,sizeof(TXEDPARSE)); // parse.x64 := false; // parse.cip := 0; // parse.instr := 'push dword ptr [ebp+0x10]'; // if XEDParseAssemble(parse)=XEDPARSE_OK then // begin // ShowMessage(MemToHex2(@parse.dest[0],parse.dest_size)); // end // else // begin // ShowMessage(Ansistring(parse.error)); // end; //end; end.
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!
赞赏
他的文章
看原图
赞赏
雪币:
留言: