Ver Mensaje Individual
  #1  
Antiguo 09-08-2016
Stringxpx Stringxpx is offline
Baneado
NULL
 
Registrado: ago 2016
Posts: 6
Reputación: 0
Stringxpx Va por buen camino
Red face Convertir código "asm" a código Delphi

Hola que tal, quisiera que me ayuden a pasar un codigo de ASM, hacia delphi aca les dejare el codigo para que lo revisen porfavor espero su ayuda ESTE ES EL CODIGO DE ASM !
Código PHP:
.386 
.model flat,stdcall 
option casemap
:none 

      
include windows.inc
      
include masm32.inc
      
include gdi32.inc
      
include user32.inc
      
include kernel32.inc
      
include Comctl32.inc
      
include comdlg32.inc
      
include shell32.inc
      
include oleaut32.inc
      
include dialogs.inc
      includelib masm32
.lib
      includelib gdi32
.lib
      includelib user32
.lib
      includelib kernel32
.lib
      includelib Comctl32
.lib
      includelib comdlg32
.lib
      includelib shell32
.lib
      includelib oleaut32
.lib



Funcion  PROTO 
Thread  PROTO

.data

Entities db    
"entitiesmp.dll",
Engine   db 
"engine.dll",0

FieldInfo    db 
"?GetFieldInfo@CPlayer@@QBEPAVFieldInfo@@XZ",0  
FDX db 
"?GetPlayerEntityByIndex@CPlayer@@QAEPAVCEntity@@E@Z",
LocalPlayer    db 
"?GetPlayer@FieldInfo@@QAEPAVCEntity@@E@Z",
FlyFire db 
"?FlyFire@CEnemyFly@@QAEHABVCEntityEvent@@@Z",0   

             
             
             
.code     
.data?
ThrdID dd ?
instance dd ?

.
code
Punto_de_Inicio proc hInstance
:HINSTANCEreason:DWORDreserved1:DWORD

.if reason==DLL_PROCESS_ATTACH
invoke MessageBox
,0,addr MsgTexto,addr MsgTitulo,MB_OK+MB_ICONWARNING

invoke CreateThread
,NULL,NULL,ADDR Thread ,NULL,NULL,NULL    

invoke CloseHandle
,eax

.elseif reason==DLL_PROCESS_DETACH

.elseif reason==DLL_THREAD_ATTACH


.elseif reason== DLL_THREAD_DETACH

.endif

mov eax,TRUE
ret
Punto_de_Inicio Endp 
Thread proc
tecla
:
invoke Sleep15

invoke GetAsyncKeyState
VK_F1
test eax
eax
jz tecla
invoke Funcion 
;Fear

jmp tecla
ret

Thread endp
Funcion proc
LOCAL listo
:DWORD
LOCAL pot
:DWORD
LOCAL Revenge
:DWORD
LOCAL jojo
:DWORD
LOCAL Estructura
:DWORD

   invoke GetModuleHandle
addr Entities
    invoke GetProcAddress
eaxaddr FDX
    mov jojo
,ebx
    call eax
    mov Revenge
,eax
    mov Estructura
,ebx

    invoke GetModuleHandle
addr Entities
    invoke GetProcAddress
eaxaddr FieldInfo
    call eax
    mov jojo
,ebx
    mov listo
,eax
    

    invoke GetModuleHandle
addr Engine
    invoke GetProcAddress
eaxaddr LocalPlayer
    mov jojo
,ebx
    mov ecx
listo
    call eax
    mov listo
,eax
    mov Estructura
,ebx

    invoke GetModuleHandle
addr Entities
    invoke GetProcAddress
eaxaddr FlyFire
    mov jojo
,ebx
    mov pot
,eax
    
    mov ebx
Estructura
    mov ebx
jojo
    mov ecx
listo
    mov edi
listo
    mov esi
jojo
    mov eax
pot
    call eax
    
    ret
    

Funcion endp
End Punto_de_Inicio 

ESTE ES EL CODIGO QUE ME TRANSPASARON HACE POCO, PERO ESTA EN PROBLEMAS, LES DEJARE PARA QUE TOMEN COMO EJEMPLO PORFAVOR ! LO QUE PASA ES QUE EL CODIGO DELPHI QUE VOY A MOSTRAR.
Código PHP:
library Project2;

uses
  classes
,
  
Dialogs,
  
Forms,
  
Windows;
var
  
getLocalPlayer:AnsiString;
  
UseFearPotion:AnsiString;
  
Entitez:AnsiString;
  
RetornoCardinal;

procedure Reserved1();
   var
   
pot:procedure;
GetLP:procedure;
begin
    pot 
:= GetProcAddress(GetModuleHandleA(PAnsiChar(Entitez)), PAnsiChar(UseFearPotion));
    
GetLP := GetProcAddress(GetModuleHandleA(PAnsiChar(Entitez)), PAnsiChar(getLocalPlayer));

while(
true) do begin
    Sleep
(40);
    if (
GetAsyncKeyState(VK_F1) <> 0then begin;
        
asm
        call GetLP
        mov ecx
eax
        mov edi
eax
        call pot
      end
;
    
end;
  
end;
  
end;


procedure DllMain(reasonInteger);
begin
  
if reason DLL_PROCESS_ATTACH then begin
      showmessage
('DLL');
    
getLocalPlayer := '?GetLocalPlayer@CPlayer@@QAEPAV1@XZ';
    
UseFearPotion := '?UseFearType1@CPlayer@@QAEXXZ';
    
Entitez := 'entitiesmp.dll';

    
CreateThread(nil,0,Pointer(@Reserved1),nil,0,Retorno);

  
end;
end;

begin
 DllProc 
:= DllMain;
 
DllMain(DLL_PROCESS_ATTACH);
end
Espero que me ayuden ,MUCHAS GRACIAS !