/*
//////////////////////////////////////////////////
Назначение скрипта : Позволяет сохранить все хеши в отдельный файл
Author : Djeck
OS : OllyDbg 1.10, Plugin Phantom, WinXP-Win7
Date : 12.11.2013
/////////////////////////////////////////////////
*/

var SECTION_SIZE
var ADRESS_SAVE
var ALLOCATED_MEMORY
var START_MEMORY
var ORIGIN_EIP
var FILE_NAME

mov SECTION_SIZE, 80000 // set section size
mov FILE_NAME, "dump.bin"

bc
bpmc
bphwc

ask "Enter address place where CRC save VMProtect"
mov ADRESS_SAVE, $RESULT
cmp ADRESS_SAVE, 0
je FINISH
mov ORIGIN_EIP, eip
alloc SECTION_SIZE
cmp $RESULT, 0
je FINISH
mov ALLOCATED_MEMORY, $RESULT
mov START_MEMORY, $RESULT
bphws esp-4, "r"
bp ADRESS_SAVE
RUN:
run
cmp eip, ADRESS_SAVE
jne RUN

// save hashes
START_SAVE:
mov [ALLOCATED_MEMORY], eax
add ALLOCATED_MEMORY, 4
run
cmp eip, ADRESS_SAVE
je START_SAVE
dm START_MEMORY, SECTION_SIZE, FILE_NAME
free ALLOCATED_MEMORY
bc
bpmc
bphwc
mov eip, ORIGIN_EIP

FINISH:
ret