node/lib/metasm/samples/dbg-apihook.rb
# skip the function call
# only valid in pre_hook
skip the function call
only valid in pre_hook
skip the function call only valid in pre_hook
def finish(retval)
		patch_ret(retval)
		@dbg.ip = @dbg.func_retaddr
		case @cur_abi
		when :fastcall
			@dbg[:esp] += 4*(@nargs-2) if @nargs > 2
		when :thiscall
			@dbg[:esp] += 4*(@nargs-1) if @nargs > 1
		when :stdcall
			@dbg[:esp] += 4*@nargs
		end
		@dbg.sp += @dbg.cpu.size/8
		throw :finish
	end
def finish ( retval ) patch_ret ( retval ) @dbg . ip = @dbg . func_retaddr case @cur_abi when :fastcall @dbg [ :esp ] += 4 * ( @nargs - 2 ) if @nargs > 2 when :thiscall @dbg [ :esp ] += 4 * ( @nargs - 1 ) if @nargs > 1 when :stdcall @dbg [ :esp ] += 4 * @nargs end @dbg . sp += @dbg . cpu . size / 8 throw :finish end
skip the function call
only valid in pre_hook
skip the function call only valid in pre_hook
retval