Let them drag and drop files on your program

unit dropfile;
 interface
 uses
   Windows, Messages, SysUtils, Classes,
   Graphics, Controls, Forms, Dialogs;
 type
   TForm1 = class(TForm)
     procedure FormCreate(Sender: TObject);
   private
     { Private declarations }
   public
     { Public declarations }
     // declare our DROPFILES message handler
     procedure AcceptFiles( var msg : TMessage );
     message WM_DROPFILES;
   end;
 var
   Form1: TForm1;
 implementation
 uses
   // this unit contains certain functions that we'll be using
   ShellAPI;
 {$R *.DFM}
Continue Reading

OD Unicode String Format Convert v0.1

就像我们所熟知的那样,IDA对于Unicode和中文的串式参考并没有太好的处理,在这一方面不管是从插件还是ida自身的功能来看都要比OD的Unicode字符串搜索差得多。但是OD的字符串参考却不太好导入到IDA中于是就先是写了个idc的脚本,用来导入数据。今天又写了个小工具用来处理od解析出来的中文字符串参考。效果就是上面的样子,也许那天实在无聊了会改下OD的中文字符串搜索插件,让其可以直接导出数据。

Continue Reading

HEX2ASCII && ASCII2HEX

; Author: Jake Commander
; Copyright The GeneSys Development System

HexEncode proc uses edi esi ebx pBuff:dword,dwLen:dword,pOutBuff:dword
;---------------------------------------
    mov    ebx, dwLen
    mov    edi, pOutBuff
    test    ebx, ebx
    mov    esi, pBuff
    jz      @F
    .repeat
      movzx  eax, byte ptr [esi]
      mov    ecx, eax
      add    edi, 2
      shr    ecx, 4
      and    eax, 1111b
      and    ecx, 1111b
      cmp    eax, 10
      sbb    edx, edx
      adc    eax, 0
      lea    eax, [eax+edx*8+'7']
      cmp    ecx, 10
      sbb    edx, edx
      adc    ecx, 0
      shl    eax, 8
      lea    ecx, [ecx+edx*8+'7']
      or      eax, ecx
      inc    esi
      mov    [edi-2], ax
      dec    ebx
    .until ZERO?
@@: mov    eax, edi
    mov    byte ptr [edi], 0
    sub    eax, pOutBuff
    ret
;---------------------------------------
HexEncode endp
Continue Reading

Embarcadero.Delphi.XE2.RTM.v16.0.4256.43595.Lite.v5.0

Embarcadero.Delphi.XE2.RTM.v16.0.4256.43595.Lite.v5.0
——————————————————————————–

作者:lsuper
——————————————————————————–
发布历史:
2011.09.09 – v5.0
1、根据 RTM v16.0.4256.43595 原版制作
2011.08.08 – v5.0 Beta8
1、根据 beta8 v16.0.4223.41907 原版制作
2、为便于大家试用,写了一个 XE2Resetter 外挂
——————————————————————————–

Continue Reading

MASM – error A2042: statement too complex

在定义比较长的数据的时候会因为数据超过行限制而出现statement too complex或者line to long的错误提示,可以使用下面的代码:

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
    include \masm32\include\masm32rt.inc
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
    .data
      kostka1 real4 -1.0,-1.0, 1.0, 1.0,-1.0, 1.0, 1.0, 1.0, 1.0
              real4 -1.0, 1.0, 1.0,-1.0,-1.0,-1.0,-1.0, 1.0,-1.0
              real4  1.0, 1.0,-1.0, 1.0,-1.0,-1.0,-1.0, 1.0,-1.0
              real4 -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,-1.0
              real4 -1.0,-1.0,-1.0, 1.0,-1.0,-1.0, 1.0,-1.0, 1.0
              real4 -1.0,-1.0, 1.0, 1.0,-1.0,-1.0, 1.0, 1.0,-1.0
              real4  1.0, 1.0, 1.0, 1.0,-1.0, 1.0,-1.0,-1.0,-1.0
              real4 -1.0,-1.0, 1.0,-1.0, 1.0, 1.0,-1.0, 1.0,-1.0

      _SIZEOF_kostka1 = ($ - kostka1)
      dd_SIZEOF_kostka1 dd ($ - kostka1)

      tmp TEXTEQU %_SIZEOF_kostka1
      % echo _SIZEOF_kostka1 = tmp

    .code
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
start:
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
    print ustr$(dd_SIZEOF_kostka1),13,10
    mov   eax, input(13,10,"Press enter to exit...")
    exit
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
end start
Continue Reading

Delphi Get HDD Serial Number


program keygenme;

uses
Windows,Messages,CommCtrl;

{$R software.RES}
var WinClass: TWndClassA;
Inst: HINST;
hWindow: HWND;
TheMessage: TMsg;

hDrive:HWND;
hID:HWND;
hf:THandle;

htitle:HWND;

cmbChange: HWND;
cmbAbout: HWND;
cmbExit: HWND;

PaintStruct: TPaintStruct;
PaintDC: HDC;
hFont1: HFONT;
isNT:Boolean;

function StrToInt(const S: string):Integer;
var
E: Integer;
begin
Val(S, Result, E);
end;

Continue Reading