Código
include 'win32ax.inc' .code start: stdcall DetectaExtención,"SoyUnExe.php.exe.YoSoyLaextensionreal" invoke MessageBox,0,eax,0,0 invoke ExitProcess,0 ;Descripcion: Esta función devuelve la extension de un archivo ; cRuta = Ruta del archivo ; by YST proc DetectaExtención,cRuta push ebx esi xchg eax,[cRuta] dec eax .bucle: inc eax cmp byte[eax],0 jne .bucle inc eax .bucle2: dec eax cmp byte[eax],"." jne .bucle2 xor esi,esi dec esi .bucle3: inc eax inc esi cmp byte[eax],0 jne .bucle3 push eax invoke GlobalAlloc,GPTR,esi xchg ebx,eax pop eax sub eax,esi stdcall cRtlMoveMemory,ebx,eax,esi xchg ebx,eax .salir: pop esi ebx ret endp ;Descripcion: Esta función funciona igual que la winapi RtlMoveMemory ; by YST proc cRtlMoveMemory,cBuffer,Cpuntero,cCantidad push esi edi xchg edi,[cBuffer] xchg esi,[Cpuntero] .bucleb: dec [cCantidad] movsb cmp [cCantidad],0 jge .bucleb pop edi esi ret endp .end start
¿Podrias explicarlo?