Сдампить PE-файл

Тема в разделе "WASM.BEGINNERS", создана пользователем C2H5OH, 3 апр 2010.

  1. C2H5OH

    C2H5OH New Member

    Публикаций:
    0
    Регистрация:
    21 мар 2008
    Сообщения:
    42
    Кто-нибудь знает утилитку, которая может сдампить PE-файл в такой формат "0x4D,0x5A,0x90,0x00,0x03,0x00,0x00,0x00"?
     
  2. Clerk

    Clerk Забанен

    Публикаций:
    0
    Регистрация:
    4 янв 2008
    Сообщения:
    6.689
    Адрес:
    РБ, Могилёв
    C2H5OH
    Сохраняете в файл регион памяти, который занимает модуль и конвертируете в инклуд, например этой тулзой http://www.wasm.ru/forum/viewtopic.php?id=32145
    Вот только смысла в этом нет, изза релокации например.
     
  3. C2H5OH

    C2H5OH New Member

    Публикаций:
    0
    Регистрация:
    21 мар 2008
    Сообщения:
    42
    Clerk
    Спасибо!
     
  4. Asterix

    Asterix New Member

    Публикаций:
    0
    Регистрация:
    25 фев 2003
    Сообщения:
    3.576
    WinHEX
     
  5. Com[e]r

    Com[e]r Com[e]r

    Публикаций:
    0
    Регистрация:
    20 апр 2007
    Сообщения:
    2.624
    Адрес:
    ого..
    написал недавно:
    http://up.cih.ms/comer/dumper.exe
    по команде dumper <exename> генерит хедер с функой экстракта:
    Код (Text):
    1. #define _htnSZ  14336
    2.  
    3. char htn_bytes[_htnSZ]={0x4d,0x5a,0x50,0x00,0x02,0x00,0x00,0x00,0x04,0x00,0x0f,0x00,0xff,0xff,0x00,0x00,0xb8,0x00,0x00,
    4.                         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    5.                         0xba,0x10,0x00,0x0e,0x1f,0xb4,0x09,0xcd,0x21,0xb8,0x01,0x4c,0xcd,0x21,0x90,0x90,0x54,0x68,0x69,
    6.                         0x74,0x20,0x62,0x65,0x20,0x72,0x75,0x6e,0x20,0x75,0x6e,0x64,0x65,0x72,0x20,0x57,0x69,0x6e,0x33,
    7.                         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    8.                         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    9.                         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    10.                         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    11.                         0x50,0x45,0x00,0x00,0x4c,0x01,0x08,0x00,0x19,0x5e,0x42,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    12.                         0x00,0x18,0x00,0x00,0x74,0x29,0x00,0x00,0x34,0x29,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x30,0x00,
    13.                         0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x00,
    14.                         0x00,0x00,0x10,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,
    15.                         0x00,0x50,0x00,0x00,0x8a,0x04,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x00,0x00,
    16.                         0x00,0x80,0x00,0x00,0x58,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    17.                         0x00,0x70,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    18.                         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    19.                         0x93,0x1b,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,
    20.                         0x44,0x41,0x54,0x41,0x00,0x00,0x00,0x00,0xac,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x02,0x00,
    21.                         0x00,0x00,0x00,0x00,0x40,0x00,0x00,0xc0,0x42,0x53,0x53,0x00,0x00,0x00,0x00,0x00,0xf9,0x06,0x00,
    22.                         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x2e,0x69,0x64,
    23.                         0x00,0x06,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    24.                         0x04,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    25.                         0x2e,0x72,0x64,0x61,0x74,0x61,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x02,0x00,
    26.                         0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x50,0x2e,0x72,0x65,0x6c,0x6f,0x63,0x00,0x00,0x58,0x02,0x00,
    27.                         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x50,0x2e,0x72,0x73,
    28.                         ...
    29.                         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
    30.                         };
    31. bool Extract_htn(){
    32.   return FileWW("htn.exe",htn_bytes,_htnSZ);
    33. }
    (где FileWW() ~ CreateFileA|WriteFile|CloseHandle)