elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Introducción a Git (Primera Parte)


  Mostrar Temas
Páginas: [1]
1  Programación / ASM / EOFEXTRACT - Funcion para extraer el EOF en: 11 Marzo 2009, 16:36 pm
Código
  1. ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  2. ;@                                     @
  3. ;@   EOFEXTRACT by krackwar            @
  4. ;@   krackwar@hotmail.com              @
  5. ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  6. include 'win32ax.inc'
  7. .code
  8. start:
  9. stdcall EOFEXTRACT,"C:\archivo.exe"
  10. xor ebx,ebx
  11. mov ebx,eax
  12. invoke GlobalAlloc,GPTR,4
  13. push eax
  14. invoke wsprintf,eax,"0x%x",ebx
  15. pop eax
  16. push eax
  17. invoke MessageBox,0,eax,"EOF data",0
  18. pop eax
  19.  
  20. invoke GlobalFree,eax
  21. invoke ExitProcess,0
  22. proc EOFEXTRACT,ruta
  23. locals
  24.    DireccionPE dd ?
  25.    bUsados dd ?
  26.    PE dd ?
  27.    NumeroSecciones dd ?
  28.    BeginLastSection   dd ?
  29.    hFile   dd ?
  30.    EOF dd ?
  31.    tamAr   dd ?
  32.    PointerToRawData dd ?
  33.    IB      dd ?
  34.    SizeOfRawData dd ?
  35. endl
  36. invoke  CreateFile, [ruta], GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0
  37. mov [hFile], eax
  38. invoke  GetFileSize, [hFile], 0
  39. mov [tamAr], eax
  40. invoke  GlobalAlloc, GPTR, eax
  41. mov [IB], eax
  42. invoke  ReadFile, [hFile], [IB], [tamAr], addr bUsados, 0
  43. mov ebx ,[IB]
  44. add ebx, 0x3c
  45. mov eax,dword[ebx]
  46. mov [DireccionPE] ,eax
  47. xor ebx,ebx
  48. mov ebx,[IB]
  49. add ebx,eax
  50. mov [PE],ebx
  51. add ebx,0x6
  52. xor edx,edx
  53. mov dx,word[ebx]
  54. mov [NumeroSecciones],edx
  55. mov eax,$28
  56. mov ebx,[NumeroSecciones]
  57. dec ebx
  58. mul ebx
  59. xor edx,edx
  60. mov edx,[DireccionPE]
  61. add edx,$F8
  62. add edx,eax
  63. mov [BeginLastSection],edx
  64. xor eax,eax
  65. xor ebx,ebx
  66. xor edx,edx
  67. mov eax,[IB]
  68. mov edx,[BeginLastSection]
  69. add eax,edx
  70. add eax,16
  71. mov ebx,DWORD[eax]
  72. mov [SizeOfRawData],ebx
  73. add eax,4
  74. xor ebx,ebx
  75. mov ebx,DWORD[eax]
  76. mov [PointerToRawData],ebx
  77. xor ebx,ebx
  78. xor eax,eax
  79. mov  edx, [PointerToRawData]
  80. mov ebx,[SizeOfRawData]
  81. add ebx,edx
  82. mov [EOF],ebx
  83. mov eax,[EOF]
  84. ret
  85. endp
  86.  
  87. .end start

Gracias a E0N ya que me apoye en un codigo de el en visual basic :P
2  Programación / Programación Visual Basic / API para saber si un archivo existe. en: 25 Febrero 2009, 03:14 am
Eso , e estado media hora buscando y no e encontrado la API para saber si un archivo existe o no  :-(

¿Alguien la sabe ?

PD: No me sirven funciones que por error digan si existe o no .
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines