本帖最后由 liu1945325 于 2012-04-30 01:34:23 编辑

解决方案 »

  1.   

    function GetSinatureAddr(dn:PChar):DWORD;      // 获取特征码偏移
    var
      hLib: HMODULE;
      dwSinatureAddr:DWORD;
    begin
      hLib:= LoadLibrary(dn);
     if (hLib <> 0)  then
     begin
        asm                      // 特征码校验
       push ebx
    mov dword ptr [ebx], eax
    xor eax, eax@check_1_start:
    mov eax, dword ptr [ebx]
    cmp byte ptr [eax], $8B
    jnz @check_1_end
    mov eax, dword ptr [ebx]
    inc eax
    cmp byte ptr [eax], $4D
    jnz @check_1_end
    mov eax, dword ptr [ebx]
    add eax, 2
    cmp byte ptr [eax], $0C
    jnz @check_1_end
    mov eax, dword ptr [ebx]
    add eax, 3
    cmp byte ptr [eax], $49
    je @check_2_start
    @check_1_end:
    inc dword ptr [ebx]
    jmp @check_1_start@check_2_start:
    mov eax, dword ptr [ebx]
    cmp byte ptr [eax], $32
    jnz @check_2_end
    mov eax, dword ptr [ebx]
    inc eax
    cmp byte ptr [eax], $0c0
    jnz @check_2_end
    mov eax, dword ptr [ebx]
    push eax
      lea eax, dwSinatureAddr
    pop dword ptr [eax]
    mov eax, dword ptr [ebx]
    jmp @check__over@check_2_end:
    inc dword ptr [ebx]
    jmp @check_2_start@check__over:
    xor eax, eax
    pop ebx
     end;
     end
     else
     begin
       ShowMessage('Failt to found the Sinature offset.\n');
       Result:= Result  - 1;
     end;
       dwSinatureAddr:= dwSinatureAddr - hLib;
       FreeLibrary(hLib);
       Result:= dwSinatureAddr;
    end;自己翻译的,但是不管用。。求大牛指点
      

  2.   

    很久很久没玩Delphi了,都忘光了,帮你顶一下。