firstret=0x0040755D;
lib="kernel32.dll";
func="GetModuleHandleA";

Start(false);
bbreak=GetProcAddress(lib,func);
AddBreak(bbreak,1,0);
EnableBreak(bbreak);
while true do
	Continue(true);
	if break_where==bbreak then
		if ReadMem(ESP,4)==firstret then
			break;
		else
			TraceAndReplace(bbreak);
		end;
	elseif break_where==0xf00 then
		WriteEx("Damn, process died :(",true,true,0x0000ff);
		return -1;
	end;
end;
EIP=jmp_to_oep+victim_base;
SuspendAllOther();
Dump();
if cut_sections==true then
	ProcessResources();
	CutSections();
	ProcessExport();
	ProcessTLS();
end;
RestoreImportRelocs();
if cut_sections==true then
	SaveResources();
end;
SaveFile();
Terminate();