如何运行res里面包含的exe文件(100分)

  • 主题发起人 主题发起人 qfgj
  • 开始时间 开始时间
&nbsp;to caihua:<br>您是说不存到硬盘是肯定不能执行的吗?不是吧?不能草率下定论。。。至少理论上来说是可能的。<br><br>&nbsp; to dazzling:<br>我想说说自己的看法。。如果每个人都去问他,他一直回复难道不用干活了?<br>您应该对他人多一些谅解,别人也没有义务回答您,只能要求自己,不能过多的要求别人。<br>还有, 陈经韬先生也在我的QQ上。也感觉到确实他有点冷,这是事实。但是每个人都是有<br>自己的性格的,应该给别人一些谅解。。。。
 
to:刘麻子:<br>是吗?你有没有换台电脑扮成MM去找他聊天?<br>可是发一句回一句,没断过哦!
 
哎!说正事,MM退后。
 
请好心人把下面的UPX1.9源代码发到的邮箱里:wjp8@163.com,我将不胜感激!<br>http://www.playicq.com/dispdocnew.php?id=14089 &nbsp;<br>
 
dazzling同志:<br>(1)有次你问我一个问题,我已经告诉你到DFW的"编程心得"里面去找,里面有.你却叫我帮你找出来.我正在解决我的问题,又怎么有时间去帮你找你?<br>(2)其它.每次我都告诉你关键所在,你非要人家连代码都写出来给你.否则又威胁又漫骂.难道你的工资也给我吗?否则我怎么可能利用上班时间帮你做你上班的事情?<br><br>如果你白天看到我在QQ,不是周末(周末我要陪MM,一般都不上网).因为我在上班.公司一样规定上班时间不能开QQ的.所以不可能那么详细的连代码都给你写出来.<br>如果是晚上,我肯定在调试程序.你也知道,白天在公司是不能干私活的.所以只能利用晚上仅有的一点时间.<br>我喜欢帮助人,但是绝对没有义务非帮不可.你大可问问QQ 6667790 ,或者31541206.只有你一个人这样说我.呵呵.<br>===============================================================================<br>关于这个问题,可能大家摸的方向不对.实际上,你不一定要用资源.用流即可.当然,你要重组节内容.大概步骤如下:根据你要运行的EXE,计算出新头,然后重新写DOS头和节表即可,这样一来运行的时候,不用释放出来,直接跳到该地址即可.<br>第一步:计算节表并填充新的EXE头<br>&nbsp; &nbsp; &nbsp; if Key&lt;&gt;nil then<br>&nbsp; &nbsp; &nbsp; &nbsp;begin<br>&nbsp; &nbsp; &nbsp; &nbsp; GenerateKey(Key,KeySize);<br><br>&nbsp; &nbsp; &nbsp; &nbsp; ZeroMemory(@DosHeader,SizeOf(DosHeader));<br>&nbsp; &nbsp; &nbsp; &nbsp; ZeroMemory(@NtHeaders,SizeOf(NtHeaders));<br>&nbsp; &nbsp; &nbsp; &nbsp; ZeroMemory(@DosStubEnd,SizeOf(DosStubEnd));<br>&nbsp; &nbsp; &nbsp; &nbsp; if not Quiet then WriteLn(#$0D#$0A'Building DOS header ...');<br>&nbsp; &nbsp; &nbsp; &nbsp; DosHeader.e_magic:=PWord(PChar('MZ'))^;<br>&nbsp; &nbsp; &nbsp; &nbsp; DosHeader.e_cblp:=$0050;<br>&nbsp; &nbsp; &nbsp; &nbsp; DosHeader.e_cp:=$0002;<br>&nbsp; &nbsp; &nbsp; &nbsp; DosHeader.e_cparhdr:=$0004;<br>&nbsp; &nbsp; &nbsp; &nbsp; DosHeader.e_minalloc:=$000F;<br>&nbsp; &nbsp; &nbsp; &nbsp; DosHeader.e_maxalloc:=$FFFF;<br>&nbsp; &nbsp; &nbsp; &nbsp; DosHeader.e_sp:=$00B8;<br>&nbsp; &nbsp; &nbsp; &nbsp; DosHeader.e_lfarlc:=$0040;<br>&nbsp; &nbsp; &nbsp; &nbsp; DosHeader.e_ovno:=$001A;<br>&nbsp; &nbsp; &nbsp; &nbsp; DosHeader._lfanew:=$0100;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; if not Quiet then WriteLn('Building NT headers ...');<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.Signature:=PCardinal(PChar('PE'))^;<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.FileHeader.Machine:=IMAGE_FILE_MACHINE_I386;<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.FileHeader.NumberOfSections:=3;<br>&nbsp; &nbsp; &nbsp; &nbsp; if TlsSectionPresent then Inc(NtHeaders.FileHeader.NumberOfSections);<br>&nbsp; &nbsp; &nbsp; &nbsp; if not Quiet then WriteLn('Number of sections: ',NtHeaders.FileHeader.NumberOfSections);<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.FileHeader.TimeDateStamp:=Random($20000000)+$20000000;<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.FileHeader.SizeOfOptionalHeader:=IMAGE_SIZEOF_NT_OPTIONAL_HEADER;<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.FileHeader.Characteristics:=IMAGE_FILE_EXECUTABLE_IMAGE or IMAGE_FILE_LINE_NUMS_STRIPPED<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;or IMAGE_FILE_LOCAL_SYMS_STRIPPED or IMAGE_FILE_LINE_NUMS_STRIPPED<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;or IMAGE_FILE_BYTES_REVERSED_LO or IMAGE_FILE_32BIT_MACHINE<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;or IMAGE_FILE_BYTES_REVERSED_HI;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.Magic:=IMAGE_NT_OPTIONAL_HDR_MAGIC;<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.MajorLinkerVersion:=Random(9)+1;<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.MinorLinkerVersion:=Random(99)+1;<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.SizeOfCode:=$00001000; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//may change<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.BaseOfCode:=$00001000; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//may change<br>&nbsp; &nbsp; &nbsp; &nbsp; if ReqImageBase&lt;&gt;0 then NtHeaders.OptionalHeader.ImageBase:=RoundSize(ReqImageBase,$00010000)<br>&nbsp; &nbsp; &nbsp; &nbsp; else if HostImageBase=$00400000 then NtHeaders.OptionalHeader.ImageBase:=RoundSize(HostImageBase+HostSizeOfImage+$00100000,$00010000)<br>&nbsp; &nbsp; &nbsp; &nbsp; else NtHeaders.OptionalHeader.ImageBase:=$00400000;<br>&nbsp; &nbsp; &nbsp; &nbsp; if not Quiet then WriteLn('ImageBase: ',IntToHex(NtHeaders.OptionalHeader.ImageBase,8));<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.SectionAlignment:=$00001000;<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.FileAlignment:=$00000200; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //may change<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.MajorOperatingSystemVersion:=$0004;<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.MajorSubsystemVersion:=$0004;<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.SizeOfHeaders:=$00000400; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //may change<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.Subsystem:=HostSubsystem;<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.SizeOfStackReserve:=$00100000;<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.SizeOfStackCommit:=$00010000; &nbsp; &nbsp; &nbsp; &nbsp; //may change<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.SizeOfHeapReserve:=$00100000;<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.SizeOfHeapCommit:=$00010000;<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.NumberOfRvaAndSizes:=$00000010;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; if not Quiet then WriteLn(#$0D#$0A'Building .text section');<br>&nbsp; &nbsp; &nbsp; &nbsp; ZeroMemory(@CodeSection,SizeOf(CodeSection));<br>&nbsp; &nbsp; &nbsp; &nbsp; CopyMemory(@CodeSection.Name,PChar('.text'),5); &nbsp; &nbsp; &nbsp; &nbsp;//may change -&gt; CODE<br>&nbsp; &nbsp; &nbsp; &nbsp; CodeSection.Misc.VirtualSize:=$00001000; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //should change<br>&nbsp; &nbsp; &nbsp; &nbsp; CodeSection.VirtualAddress:=NtHeaders.OptionalHeader.BaseOfCode;<br>&nbsp; &nbsp; &nbsp; &nbsp; CodeSection.SizeOfRawData:=$00001000;<br>&nbsp; &nbsp; &nbsp; &nbsp; CodeSection.PointerToRawData:=NtHeaders.OptionalHeader.SizeOfHeaders;<br>&nbsp; &nbsp; &nbsp; &nbsp; CodeSection.Characteristics:=IMAGE_SCN_CNT_CODE or IMAGE_SCN_MEM_EXECUTE or IMAGE_SCN_MEM_WRITE or IMAGE_SCN_MEM_READ;<br>&nbsp; &nbsp; &nbsp; &nbsp; if not Quiet then<br>&nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WriteLn('.text section virtual address: ',IntToHex(CodeSection.VirtualAddress,8));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WriteLn('.text section virtual size: ',IntToHex(CodeSection.Misc.VirtualSize,8));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WriteLn(#$0D#$0A'Building .data section');<br>&nbsp; &nbsp; &nbsp; &nbsp; end;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; ZeroMemory(@DataSection,SizeOf(DataSection));<br>&nbsp; &nbsp; &nbsp; &nbsp; CopyMemory(@DataSection.Name,PChar('.data'),5); &nbsp; &nbsp; &nbsp; &nbsp;//may change -&gt; DATA<br>&nbsp; &nbsp; &nbsp; &nbsp; DataSection.Misc.VirtualSize:=RoundSize(MainSize,NtHeaders.OptionalHeader.SectionAlignment);<br>&nbsp; &nbsp; &nbsp; &nbsp; DataSection.VirtualAddress:=CodeSection.VirtualAddress+CodeSection.Misc.VirtualSize;<br>&nbsp; &nbsp; &nbsp; &nbsp; DataSection.SizeOfRawData:=RoundSize(MainSize,RawDataAlignment);<br>&nbsp; &nbsp; &nbsp; &nbsp; DataSection.PointerToRawData:=CodeSection.PointerToRawData+CodeSection.SizeOfRawData;<br>&nbsp; &nbsp; &nbsp; &nbsp; DataSection.Characteristics:=IMAGE_SCN_CNT_INITIALIZED_DATA or IMAGE_SCN_MEM_WRITE or IMAGE_SCN_MEM_READ;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.SizeOfInitializedData:=DataSection.Misc.VirtualSize;<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.BaseOfData:=DataSection.VirtualAddress;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; if not Quiet then<br>&nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WriteLn('.data section virtual address: ',IntToHex(DataSection.VirtualAddress,8));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WriteLn('.data section virtual size: ',IntToHex(DataSection.Misc.VirtualSize,8));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WriteLn(#$0D#$0A'Building .idata section');<br>&nbsp; &nbsp; &nbsp; &nbsp; end;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress:=DataSection.VirtualAddress+DataSection.Misc.VirtualSize; &nbsp; &nbsp; &nbsp; &nbsp;//may change<br>&nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].Size:=NtHeaders.OptionalHeader.SectionAlignment;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; ZeroMemory(@ImportSection,SizeOf(ImportSection));<br>&nbsp; &nbsp; &nbsp; &nbsp; CopyMemory(@ImportSection.Name,PChar('.idata'),6);<br>&nbsp; &nbsp; &nbsp; &nbsp; ImportSection.Misc.VirtualSize:=NtHeaders.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].Size;<br>&nbsp; &nbsp; &nbsp; &nbsp; ImportSection.VirtualAddress:=NtHeaders.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress;<br>&nbsp; &nbsp; &nbsp; &nbsp; ImportSection.SizeOfRawData:=RoundSize($00000070,RawDataAlignment);<br>&nbsp; &nbsp; &nbsp; &nbsp; ImportSection.PointerToRawData:=DataSection.PointerToRawData+DataSection.SizeOfRawData;<br>&nbsp; &nbsp; &nbsp; &nbsp; ImportSection.Characteristics:=IMAGE_SCN_CNT_CODE or IMAGE_SCN_CNT_INITIALIZED_DATA or IMAGE_SCN_MEM_WRITE or IMAGE_SCN_MEM_READ;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; if not Quiet then<br>&nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WriteLn('.idata section virtual address: ',IntToHex(DataSection.VirtualAddress,8));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WriteLn('.idata section virtual size: ',IntToHex(DataSection.Misc.VirtualSize,8));<br>&nbsp; &nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; &nbsp; &nbsp; // .tls Section<br>&nbsp; &nbsp; &nbsp; &nbsp; if TlsSectionPresent then<br>&nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if not Quiet then WriteLn(#$0D#$0A'Building .tls section');<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TlsCopy.Directory:=@PImageNtHeaders(Ptr)^.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_TLS];<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PB:=VirtAddrToPhysAddr(Ptr,Pointer(TlsCopy.Directory.VirtualAddress+PImageNtHeaders(Ptr)^.OptionalHeader.ImageBase));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if PB&lt;&gt;nil then Inc(PB,Cardinal(MainData));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TlsCopy.SectionData:=Pointer(PB);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if TlsCopy.SectionData&lt;&gt;nil then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TlsCopy.RawDataLen:=TlsCopy.SectionData^.RawDataEnd-TlsCopy.SectionData^.RawDataStart;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TlsCopy.RawData:=Pointer(LocalAlloc(LMEM_FIXED,TlsCopy.RawDataLen));<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PB:=VirtAddrToPhysAddr(Ptr,Pointer(TlsCopy.SectionData^.RawDataStart));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if PB&lt;&gt;nil then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Inc(PB,Cardinal(MainData));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CopyMemory(TlsCopy.RawData,PB,TlsCopy.RawDataLen);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end else ZeroMemory(TlsCopy.RawData,TlsCopy.RawDataLen);<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PB:=VirtAddrToPhysAddr(Ptr,Pointer(TlsCopy.SectionData^.AddressOfCallbacks));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if PB=nil then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TlsCopy.CallbacksLen:=4;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TlsCopy.Callbacks:=Pointer(LocalAlloc(LMEM_FIXED,TlsCopy.CallbacksLen));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ZeroMemory(TlsCopy.Callbacks,TlsCopy.CallbacksLen);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end else<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Inc(PB,Cardinal(MainData));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TlsCopy.CallbacksLen:=GetTlsCallbacksLen(PB);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TlsCopy.Callbacks:=Pointer(LocalAlloc(LMEM_FIXED,TlsCopy.CallbacksLen));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CopyMemory(TlsCopy.Callbacks,PB,TlsCopy.CallbacksLen);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ZeroMemory(@TlsSection,SizeOf(TlsSection));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CopyMemory(@TlsSection.Name,PChar('.tls'),4);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TlsSection.VirtualAddress:=ImportSection.VirtualAddress+ImportSection.Misc.VirtualSize;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TlsSection.PointerToRawData:=ImportSection.PointerToRawData+ImportSection.SizeOfRawData;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TlsSection.Characteristics:=IMAGE_SCN_MEM_WRITE or IMAGE_SCN_MEM_READ;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ZeroMemory(@TlsSectionData,SizeOf(TlsSectionData));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TlsSectionData.RawDataStart:=NtHeaders.OptionalHeader.ImageBase+TlsSection.VirtualAddress+RoundSize(SizeOf(TlsSectionData),$10);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TlsSectionData.RawDataEnd:=TlsSectionData.RawDataStart+TlsCopy.RawDataLen;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TlsSectionData.AddressOfCallbacks:=RoundSize(TlsSectionData.RawDataEnd,$10);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TlsSectionData.AddressOfIndex:=RoundSize(TlsSectionData.AddressOfCallbacks+TlsCopy.CallbacksLen,$08);<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TlsSection.SizeOfRawData:=RoundSize(TlsSectionData.AddressOfIndex-TlsSection.VirtualAddress-NtHeaders.OptionalHeader.ImageBase+$10,RawDataAlignment);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TlsSection.Misc.VirtualSize:=RoundSize(TlsSection.SizeOfRawData,NtHeaders.OptionalHeader.SectionAlignment);<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_TLS].VirtualAddress:=ImportSection.VirtualAddress+ImportSection.Misc.VirtualSize; &nbsp; &nbsp; &nbsp; //may change<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NtHeaders.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_TLS].Size:=TlsSection.SizeOfRawData;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end else TlsSectionPresent:=False;<br>&nbsp; &nbsp; &nbsp; &nbsp; end;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; if not Quiet then<br>&nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WriteLn('.tls section virtual address: ',IntToHex(TlsSection.VirtualAddress,8));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WriteLn('.tls section virtual size: ',IntToHex(TlsSection.Misc.VirtualSize,8));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if not TlsSectionPresent then WriteLn('.tls section is invalid, new executable may not work');<br>&nbsp; &nbsp; &nbsp; &nbsp; end;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; if TlsSectionPresent then NtHeaders.OptionalHeader.SizeOfImage:=TlsSection.VirtualAddress+TlsSection.Misc.VirtualSize<br>&nbsp; &nbsp; &nbsp; &nbsp; else NtHeaders.OptionalHeader.SizeOfImage:=ImportSection.VirtualAddress+ImportSection.Misc.VirtualSize;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; if not Quiet then WriteLn(#$0D#$0A'Building import descriptor ...');<br>&nbsp; &nbsp; &nbsp; &nbsp; ZeroMemory(@ImportDesc,SizeOf(ImportDesc));<br>&nbsp; &nbsp; &nbsp; &nbsp; ImportDesc.Characteristics:=ImportSection.VirtualAddress+(NumberOfDLL+1)*SizeOf(ImportDesc);<br>&nbsp; &nbsp; &nbsp; &nbsp; ImportDesc.cName:=ImportSection.VirtualAddress+(NumberOfDLL+1)*SizeOf(ImportDesc)+(NumberOfImports+1)*SizeOf(TImageThunkData)*2;<br>&nbsp; &nbsp; &nbsp; &nbsp; ImportDesc.cFirstThunk:=Pointer(ImportDesc.Characteristics+(NumberOfImports+1)*SizeOf(TImageThunkData));<br><br>&nbsp; &nbsp; &nbsp; &nbsp; ThunkGetProcAddress.Ordinal:=ImportSection.VirtualAddress+(NumberOfDLL+1)*SizeOf(ImportDesc)+(NumberOfImports+1)*SizeOf(TImageThunkData)*2+Kernel32Size+2;<br>&nbsp; &nbsp; &nbsp; &nbsp; ThunkLoadLibrary.Ordinal:=ThunkGetProcAddress.Ordinal+GetProcAddressSize+2+2;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; ZeroMemory(@NullDesc,SizeOf(NullDesc));<br>.......<br><br>其中可能用到的函数为:<br><br>procedure GenerateInitCode(ACodePtr,AKeyPtr,AData1Ptr,ASize1,AData2Ptr,ASize2,ADynLoadAddr,AGetProcAddrImpAddr,ALoadLibImpAddr,AMainPtr:Cardinal);<br>//this is the POLY-decoder and loader<br>//see the end of this function to know what it finally does<br>//don't forget to fixup pointers of some instructions<br>//add more variants for each instruction if you think antivirus still get this<br>var<br>&nbsp;LInitInstr:array[0..InitInstrCount-1] of TVarInstruction;<br>&nbsp;LI:Integer;<br>&nbsp;LVirtAddr,LRubbishSize,LDelta,LDelta2,LRemaining,LCodeStart,LPtrAddr:Cardinal;<br>&nbsp;LPB:PByte;<br>begin<br>&nbsp;ZeroMemory(@LInitInstr,SizeOf(LInitInstr));<br>&nbsp;//call somewhere to get eip<br>&nbsp;LInitInstr[00].Count:=1;<br>&nbsp;LInitInstr[00].Vars[0].Len:=5;<br>&nbsp;LInitInstr[00].Vars[0].Code:=#$E8#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //call 0WWXXYYZZh<br><br>&nbsp;//eip to ebx<br>&nbsp;LInitInstr[01].Count:=5;<br>&nbsp;LInitInstr[01].Vars[0].Len:=1;<br>&nbsp;LInitInstr[01].Vars[0].Code:=#$5B; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop ebx<br>&nbsp;LInitInstr[01].Vars[1].Len:=3;<br>&nbsp;LInitInstr[01].Vars[1].Code:=#$8B#$1C#$24; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov ebx,[esp]<br>&nbsp;LInitInstr[01].Vars[2].Len:=3;<br>&nbsp;LInitInstr[01].Vars[2].Code:=#$58 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$8B#$D8; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov ebx,eax<br>&nbsp;LInitInstr[01].Vars[3].Len:=5;<br>&nbsp;LInitInstr[01].Vars[3].Code:=#$8B#$14#$24 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov edx,[esp]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$87#$DA; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //xchg ebx,edx<br>&nbsp;LInitInstr[01].Vars[4].Len:=7;<br>&nbsp;LInitInstr[01].Vars[4].Code:=#$8B#$F4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov esi,esp<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$AD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//lodsd<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$33#$DB &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//xor ebx,ebx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$33#$D8; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //xor ebx,eax<br><br>&nbsp;//ebx - offset = image base<br>&nbsp;LInitInstr[02].Count:=4;<br>&nbsp;LInitInstr[02].Vars[0].Len:=6;<br>&nbsp;LInitInstr[02].Vars[0].Code:=#$81#$EB#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; //sub ebx,0WWXXYYZZh<br>&nbsp;LInitInstr[02].Vars[1].Len:=8;<br>&nbsp;LInitInstr[02].Vars[1].Code:=#$B9#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ecx,0WWXXYYZZh<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$4B &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//dec ebx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$E2#$FD; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //loop Code<br>&nbsp;LInitInstr[02].Vars[2].Len:=16;<br>&nbsp;LInitInstr[02].Vars[2].Code:=#$66#$B8#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ax,0WWXXh<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$66#$B9#$78#$56 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov cx,0YYZZh<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$C1#$E0#$10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//shl eax,010h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$66#$33#$C1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//xor ax,cx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$2B#$D8; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //sub ebx,eax<br>&nbsp;LInitInstr[02].Vars[3].Len:=9;<br>&nbsp;LInitInstr[02].Vars[3].Code:=#$53 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ebx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$81#$2C#$24#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp;//sub [esp],0WWXXYYZZh<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5B; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop ebx<br><br>&nbsp;//image base to eax<br>&nbsp;LInitInstr[03].Count:=4;<br>&nbsp;LInitInstr[03].Vars[0].Len:=2;<br>&nbsp;LInitInstr[03].Vars[0].Code:=#$8B#$C3; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov eax,ebx<br>&nbsp;LInitInstr[03].Vars[1].Len:=2;<br>&nbsp;LInitInstr[03].Vars[1].Code:=#$53 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ebx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$58; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop eax<br>&nbsp;LInitInstr[03].Vars[2].Len:=3;<br>&nbsp;LInitInstr[03].Vars[2].Code:=#$53 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ebx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$93 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//xchg ebx,eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5B; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop ebx<br>&nbsp;LInitInstr[03].Vars[3].Len:=5;<br>&nbsp;LInitInstr[03].Vars[3].Code:=#$52 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push edx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$89#$1C#$24 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov [esp],ebsx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$58; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop eax<br><br>&nbsp;//image base to edi<br>&nbsp;LInitInstr[04].Count:=4;<br>&nbsp;LInitInstr[04].Vars[0].Len:=2;<br>&nbsp;LInitInstr[04].Vars[0].Code:=#$8B#$FB; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov edi,ebx<br>&nbsp;LInitInstr[04].Vars[1].Len:=2;<br>&nbsp;LInitInstr[04].Vars[1].Code:=#$53 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ebx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5F; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop edi<br>&nbsp;LInitInstr[04].Vars[2].Len:=4;<br>&nbsp;LInitInstr[04].Vars[2].Code:=#$53 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ebx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$87#$DF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//xchg ebx,edi<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5B; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop ebx<br>&nbsp;LInitInstr[04].Vars[3].Len:=2;<br>&nbsp;LInitInstr[04].Vars[3].Code:=#$8D#$3B; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //lea edi,[ebx]<br><br>&nbsp;//edi + key addr = ptr on key<br>&nbsp;LInitInstr[05].Count:=4;<br>&nbsp;LInitInstr[05].Vars[0].Len:=6;<br>&nbsp;LInitInstr[05].Vars[0].Code:=#$81#$C7#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; //add edi,0WWXXYYZZh<br>&nbsp;LInitInstr[05].Vars[1].Len:=7;<br>&nbsp;LInitInstr[05].Vars[1].Code:=#$BA#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov edx,0WWXXYYZZh<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$FA; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add edi,edx<br>&nbsp;LInitInstr[05].Vars[2].Len:=8;<br>&nbsp;LInitInstr[05].Vars[2].Code:=#$68#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push 0WWXXYYZZh<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$3C#$24; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add esi,[esp]<br>&nbsp;LInitInstr[05].Vars[3].Len:=9;<br>&nbsp;LInitInstr[05].Vars[3].Code:=#$57 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push edi<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$BF#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov edi,0WWXXYYZZh<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5A &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop edx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$FA; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add edi,edx<br><br>&nbsp;//edi = key on stack<br>&nbsp;LInitInstr[06].Count:=4;<br>&nbsp;LInitInstr[06].Vars[0].Len:=1;<br>&nbsp;LInitInstr[06].Vars[0].Code:=#$57; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //push edi<br>&nbsp;LInitInstr[06].Vars[1].Len:=4;<br>&nbsp;LInitInstr[06].Vars[1].Code:=#$53 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ebx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$89#$3C#$24; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov [esp],edi<br>&nbsp;LInitInstr[06].Vars[2].Len:=3;<br>&nbsp;LInitInstr[06].Vars[2].Code:=#$8B#$CF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ecx,edi<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$51; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //push ecx<br>&nbsp;LInitInstr[06].Vars[3].Len:=5;<br>&nbsp;LInitInstr[06].Vars[3].Code:=#$6A#$00 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push 000h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$31#$3C#$24; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //xor [esp],edi<br><br>&nbsp;//eax + data addr = ptr on data<br>&nbsp;LInitInstr[07].Count:=4;<br>&nbsp;LInitInstr[07].Vars[0].Len:=5;<br>&nbsp;LInitInstr[07].Vars[0].Code:=#$05#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add eax,0WWXXYYZZh<br>&nbsp;LInitInstr[07].Vars[1].Len:=7;<br>&nbsp;LInitInstr[07].Vars[1].Code:=#$BA#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov edx,0WWXXYYZZh<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$C2; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add eax,edx<br>&nbsp;LInitInstr[07].Vars[2].Len:=9;<br>&nbsp;LInitInstr[07].Vars[2].Code:=#$68#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push 0WWXXYYZZh<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$04#$24 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//add eax,[esp]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5A; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop edx<br>&nbsp;LInitInstr[07].Vars[3].Len:=6;<br>&nbsp;LInitInstr[07].Vars[3].Code:=#$8D#$80#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; //lea eax,[eax+0WWXXYYZZh]<br><br>&nbsp;//size on stack<br>&nbsp;LInitInstr[08].Count:=4;<br>&nbsp;LInitInstr[08].Vars[0].Len:=5;<br>&nbsp;LInitInstr[08].Vars[0].Code:=#$68#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //push 0WWXXYYZZh<br>&nbsp;LInitInstr[08].Vars[1].Len:=6;<br>&nbsp;LInitInstr[08].Vars[1].Code:=#$BD#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ebp,0WWXXYYZZh<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$55; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //push ebp<br>&nbsp;LInitInstr[08].Vars[2].Len:=9;<br>&nbsp;LInitInstr[08].Vars[2].Code:=#$6A#$00 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push 000h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$81#$04#$24#$78#$56#$34#$12; &nbsp; &nbsp; //add [esp],0WWXXYYZZh<br>&nbsp;LInitInstr[08].Vars[3].Len:=9;<br>&nbsp;LInitInstr[08].Vars[3].Code:=#$33#$C9 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//xor ecx,ecx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$81#$C1#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//add ecx,0WWXXYYZZh<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$51; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //push ecx<br>&nbsp;//eax = addr on stack<br>&nbsp;LInitInstr[09].Count:=4;<br>&nbsp;LInitInstr[09].Vars[0].Len:=1;<br>&nbsp;LInitInstr[09].Vars[0].Code:=#$50; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //push eax<br>&nbsp;LInitInstr[09].Vars[1].Len:=4;<br>&nbsp;LInitInstr[09].Vars[1].Code:=#$51 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ecx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$89#$04#$24; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov [esp],eax<br>&nbsp;LInitInstr[09].Vars[2].Len:=3;<br>&nbsp;LInitInstr[09].Vars[2].Code:=#$8B#$E8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ebp,eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$55; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //push ebp<br>&nbsp;LInitInstr[09].Vars[3].Len:=9;<br>&nbsp;LInitInstr[09].Vars[3].Code:=#$6A#$21 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push 021h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$31#$04#$24 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//xor [esp],eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$83#$34#$24#$21; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //xor [esp],021h<br><br>&nbsp;//call @Coder<br>&nbsp;LInitInstr[10].Count:=1;<br>&nbsp;LInitInstr[10].Vars[0].Len:=5;<br>&nbsp;LInitInstr[10].Vars[0].Code:=#$E8#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //call 0WWXXYYZZh<br><br>&nbsp;//image base to eax<br>&nbsp;LInitInstr[11].Count:=4;<br>&nbsp;LInitInstr[11].Vars[0].Len:=2;<br>&nbsp;LInitInstr[11].Vars[0].Code:=#$8B#$C3; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov eax,ebx<br>&nbsp;LInitInstr[11].Vars[1].Len:=2;<br>&nbsp;LInitInstr[11].Vars[1].Code:=#$53 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ebx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$58; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop eax<br>&nbsp;LInitInstr[11].Vars[2].Len:=4;<br>&nbsp;LInitInstr[11].Vars[2].Code:=#$8B#$CB &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ecx,ebx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$8B#$C1; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov eax,ecx<br>&nbsp;LInitInstr[11].Vars[3].Len:=3;<br>&nbsp;LInitInstr[11].Vars[3].Code:=#$53 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ebx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$93 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//xchg ebx,eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5B; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop ebx<br><br>&nbsp;//eax + data ptr -&gt; ptr on data<br>&nbsp;LInitInstr[12].Count:=4;<br>&nbsp;LInitInstr[12].Vars[0].Len:=5;<br>&nbsp;LInitInstr[12].Vars[0].Code:=#$05#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add eax,012345678h<br>&nbsp;LInitInstr[12].Vars[1].Len:=7;<br>&nbsp;LInitInstr[12].Vars[1].Code:=#$B9#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ecx,012345678h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$C1; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add eax,ecx<br>&nbsp;LInitInstr[12].Vars[2].Len:=11;<br>&nbsp;LInitInstr[12].Vars[2].Code:=#$68#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push 012345678h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$04#$24 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//add eax,[esp]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$83#$C4#$04; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add esp,004h<br>&nbsp;LInitInstr[12].Vars[3].Len:=9;<br>&nbsp;LInitInstr[12].Vars[3].Code:=#$50 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$81#$04#$24#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp;//add [esp],012345678h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$58; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop eax<br><br>&nbsp;//edi = key on stack<br>&nbsp;LInitInstr[13].Count:=4;<br>&nbsp;LInitInstr[13].Vars[0].Len:=1;<br>&nbsp;LInitInstr[13].Vars[0].Code:=#$57; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //push edi<br>&nbsp;LInitInstr[13].Vars[1].Len:=4;<br>&nbsp;LInitInstr[13].Vars[1].Code:=#$53 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ebx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$89#$3C#$24; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov [esp],edi<br>&nbsp;LInitInstr[13].Vars[2].Len:=3;<br>&nbsp;LInitInstr[13].Vars[2].Code:=#$8B#$CF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ecx,edi<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$51; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //push ecx<br>&nbsp;LInitInstr[13].Vars[3].Len:=5;<br>&nbsp;LInitInstr[13].Vars[3].Code:=#$6A#$00 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push 000h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$31#$3C#$24; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //xor [esp],edi<br><br>&nbsp;//size on stack<br>&nbsp;LInitInstr[14].Count:=5;<br>&nbsp;LInitInstr[14].Vars[0].Len:=5;<br>&nbsp;LInitInstr[14].Vars[0].Code:=#$68#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //push 0WWXXYYZZh<br>&nbsp;LInitInstr[14].Vars[1].Len:=6;<br>&nbsp;LInitInstr[14].Vars[1].Code:=#$BD#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ebp,0WWXXYYZZh<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$55; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //push ebp<br>&nbsp;LInitInstr[14].Vars[2].Len:=9;<br>&nbsp;LInitInstr[14].Vars[2].Code:=#$6A#$00 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push 000h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$81#$04#$24#$78#$56#$34#$12; &nbsp; &nbsp; //add [esp],0WWXXYYZZh<br>&nbsp;LInitInstr[14].Vars[3].Len:=9;<br>&nbsp;LInitInstr[14].Vars[3].Code:=#$33#$C9 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//xor ecx,ecx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$81#$C1#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//add ecx,0WWXXYYZZh<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$51; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //push ecx<br>&nbsp;LInitInstr[14].Vars[4].Len:=9;<br>&nbsp;LInitInstr[14].Vars[4].Code:=#$6A#$00 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push 000h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$81#$34#$24#$78#$56#$34#$12; &nbsp; &nbsp; //xor [esp],0WWXXYYZZh<br><br>&nbsp;//eax = addr on stack<br>&nbsp;LInitInstr[15].Count:=4;<br>&nbsp;LInitInstr[15].Vars[0].Len:=1;<br>&nbsp;LInitInstr[15].Vars[0].Code:=#$50; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //push eax<br>&nbsp;LInitInstr[15].Vars[1].Len:=4;<br>&nbsp;LInitInstr[15].Vars[1].Code:=#$51 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ecx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$89#$04#$24; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov [esp],eax<br>&nbsp;LInitInstr[15].Vars[2].Len:=3;<br>&nbsp;LInitInstr[15].Vars[2].Code:=#$8B#$E8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ebp,eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$55; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //push ebp<br>&nbsp;LInitInstr[15].Vars[3].Len:=9;<br>&nbsp;LInitInstr[15].Vars[3].Code:=#$6A#$21 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push 021h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$31#$04#$24 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//xor [esp],eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$83#$34#$24#$21; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //xor [esp],021h<br><br>&nbsp;//call @Coder<br>&nbsp;LInitInstr[16].Count:=1;<br>&nbsp;LInitInstr[16].Vars[0].Len:=5;<br>&nbsp;LInitInstr[16].Vars[0].Code:=#$E8#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //call 0WWXXYYZZh<br><br>&nbsp;//call @DynLoader<br>&nbsp;LInitInstr[17].Count:=1;<br>&nbsp;LInitInstr[17].Vars[0].Len:=5;<br>&nbsp;LInitInstr[17].Vars[0].Code:=#$E8#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //call 0WWXXYYZZh<br><br>&nbsp;//ret<br>&nbsp;LInitInstr[18].Count:=4;<br>&nbsp;LInitInstr[18].Vars[0].Len:=1;<br>&nbsp;LInitInstr[18].Vars[0].Code:=#$C3; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //ret<br>&nbsp;LInitInstr[18].Vars[1].Len:=3;<br>&nbsp;LInitInstr[18].Vars[1].Code:=#$58 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$FF#$E0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //jmp eax<br>&nbsp;LInitInstr[18].Vars[2].Len:=7;<br>&nbsp;LInitInstr[18].Vars[2].Code:=#$83#$C4#$04 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//add esp,004h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$FF#$64#$24#$FC; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //jmp [esp-004h]<br>&nbsp;LInitInstr[18].Vars[3].Len:=7;<br>&nbsp;LInitInstr[18].Vars[3].Code:=#$8B#$04#$24 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov eax,[esp]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$50 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$C2#$04#$00; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //ret 004h<br><br>&nbsp;//@Coder_begin<br>&nbsp;//save edi on stack<br>&nbsp;LInitInstr[19].Count:=4;<br>&nbsp;LInitInstr[19].Vars[0].Len:=1;<br>&nbsp;LInitInstr[19].Vars[0].Code:=#$57; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //push edi<br>&nbsp;LInitInstr[19].Vars[1].Len:=4;<br>&nbsp;LInitInstr[19].Vars[1].Code:=#$53 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ebx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$89#$3C#$24; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov [esp],edi<br>&nbsp;LInitInstr[19].Vars[2].Len:=3;<br>&nbsp;LInitInstr[19].Vars[2].Code:=#$8B#$CF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ecx,edi<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$51; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //push ecx<br>&nbsp;LInitInstr[19].Vars[3].Len:=5;<br>&nbsp;LInitInstr[19].Vars[3].Code:=#$6A#$00 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push 000h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$31#$3C#$24; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //xor [esp],edi<br><br>&nbsp;//AAddr -&gt; edi<br>&nbsp;LInitInstr[20].Count:=4;<br>&nbsp;LInitInstr[20].Vars[0].Len:=4;<br>&nbsp;LInitInstr[20].Vars[0].Code:=#$8B#$7C#$24#$08; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov edi,[esp+008h]<br>&nbsp;LInitInstr[20].Vars[1].Len:=6;<br>&nbsp;LInitInstr[20].Vars[1].Code:=#$8B#$4C#$24#$08 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ecx,[esp+008h]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$87#$CF; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //xchg ecx,edi<br>&nbsp;LInitInstr[20].Vars[2].Len:=6;<br>&nbsp;LInitInstr[20].Vars[2].Code:=#$33#$FF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//xor edi,edi<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$7C#$24#$08; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add edi,[esp+008h]<br>&nbsp;LInitInstr[20].Vars[3].Len:=6;<br>&nbsp;LInitInstr[20].Vars[3].Code:=#$8D#$7C#$24#$08 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//lea edi,[esp+008h]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$8B#$3F; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov edi,[edi]<br><br>&nbsp;//ASize -&gt; ecx<br>&nbsp;LInitInstr[21].Count:=4;<br>&nbsp;LInitInstr[21].Vars[0].Len:=4;<br>&nbsp;LInitInstr[21].Vars[0].Code:=#$8B#$4C#$24#$0C; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov ecx,[esp+00Ch]<br>&nbsp;LInitInstr[21].Vars[1].Len:=5;<br>&nbsp;LInitInstr[21].Vars[1].Code:=#$8B#$44#$24#$0C &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov eax,[esp+00Ch]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$91; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //xchg ecx,eax<br>&nbsp;LInitInstr[21].Vars[2].Len:=7;<br>&nbsp;LInitInstr[21].Vars[2].Code:=#$6A#$00 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push 000h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$59 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop ecx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$4C#$24#$0C; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add ecx,[esp+00Ch]<br>&nbsp;LInitInstr[21].Vars[3].Len:=6;<br>&nbsp;LInitInstr[21].Vars[3].Code:=#$8D#$44#$24#$0C &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//lea eax,[esp+00Ch]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$8B#$08; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov ecx,[eax]<br><br>&nbsp;//ASize = ASize div 4 -&gt; ecx<br>&nbsp;LInitInstr[22].Count:=4;<br>&nbsp;LInitInstr[22].Vars[0].Len:=3;<br>&nbsp;LInitInstr[22].Vars[0].Code:=#$C1#$E9#$02; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //shr ecx,002h<br>&nbsp;LInitInstr[22].Vars[1].Len:=4;<br>&nbsp;LInitInstr[22].Vars[1].Code:=#$D1#$E9 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//shr ecx,001h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$D1#$E9; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //shr ecx,001h<br>&nbsp;LInitInstr[22].Vars[2].Len:=10;<br>&nbsp;LInitInstr[22].Vars[2].Code:=#$8B#$C1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov eax,ecx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$6A#$04 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push 004h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$59 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop ecx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$99 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//cdq<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$F7#$F1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//div ecx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$8B#$C8; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov ecx,eax<br>&nbsp;LInitInstr[22].Vars[3].Len:=14;<br>&nbsp;LInitInstr[22].Vars[3].Code:=#$51 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ecx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$58 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$48 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//dec eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$49 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//dec ecx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$E2#$FC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//loop -2<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$8B#$C8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ecx,eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$48 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//dec eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$49 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//dec ecx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$E2#$FC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//loop -2<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$8B#$C8; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov ecx,eax<br><br>&nbsp;//AKey -&gt; esi<br>&nbsp;LInitInstr[23].Count:=4;<br>&nbsp;LInitInstr[23].Vars[0].Len:=4;<br>&nbsp;LInitInstr[23].Vars[0].Code:=#$8B#$74#$24#$10; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov esi,[esp+010h]<br>&nbsp;LInitInstr[23].Vars[1].Len:=5;<br>&nbsp;LInitInstr[23].Vars[1].Code:=#$8B#$44#$24#$10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov eax,[esp+010h]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$96; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //xchg esi,eax<br>&nbsp;LInitInstr[23].Vars[2].Len:=6;<br>&nbsp;LInitInstr[23].Vars[2].Code:=#$33#$F6 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//xor esi,esi<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$33#$74#$24#$10; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //xor esi,[esp+010h]<br>&nbsp;LInitInstr[23].Vars[3].Len:=6;<br>&nbsp;LInitInstr[23].Vars[3].Code:=#$8D#$74#$24#$10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//lea esi,[esp+010h]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$8B#$36; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov esi,[esi]<br><br>&nbsp;//mov eax,[esi]<br>&nbsp;LInitInstr[24].Count:=4;<br>&nbsp;LInitInstr[24].Vars[0].Len:=2;<br>&nbsp;LInitInstr[24].Vars[0].Code:=#$8B#$06; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov eax,[esi]<br>&nbsp;LInitInstr[24].Vars[1].Len:=3;<br>&nbsp;LInitInstr[24].Vars[1].Code:=#$FF#$36 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push esi<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$58; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop eax<br>&nbsp;LInitInstr[24].Vars[2].Len:=4;<br>&nbsp;LInitInstr[24].Vars[2].Code:=#$8D#$06 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//lea eax,esi<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$8B#$00; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov eax,[eax]<br>&nbsp;LInitInstr[24].Vars[3].Len:=4;<br>&nbsp;LInitInstr[24].Vars[3].Code:=#$33#$C0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//xor eax,eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$06; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add eax,[esi]<br><br>&nbsp;//test eax,0FF000000h<br>&nbsp;LInitInstr[25].Count:=4;<br>&nbsp;LInitInstr[25].Vars[0].Len:=5;<br>&nbsp;LInitInstr[25].Vars[0].Code:=#$A9#$00#$00#$00#$FF; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //test eax,0FF000000h<br>&nbsp;LInitInstr[25].Vars[1].Len:=6;<br>&nbsp;LInitInstr[25].Vars[1].Code:=#$F7#$06#$00#$00#$00#$FF; &nbsp; &nbsp; &nbsp; &nbsp; //test [esi],0FF000000h<br>&nbsp;LInitInstr[25].Vars[2].Len:=7;<br>&nbsp;LInitInstr[25].Vars[2].Code:=#$8B#$D0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov edx,eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$C1#$EA#$18 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//shr edx,018h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$85#$D2; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //test edx,edx<br>&nbsp;LInitInstr[25].Vars[3].Len:=11;<br>&nbsp;LInitInstr[25].Vars[3].Code:=#$50 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5A &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop edx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$81#$E2#$00#$00#$00#$FF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//and edx,0FF000000h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$83#$FA#$00; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //cmp edx,000h<br><br>&nbsp;//jz @Coder_pre_code<br>&nbsp;LInitInstr[26].Count:=2;<br>&nbsp;LInitInstr[26].Vars[0].Len:=6;<br>&nbsp;LInitInstr[26].Vars[0].Code:=#$0F#$84#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; //jz +0XXYYZZWWh<br>&nbsp;LInitInstr[26].Vars[1].Len:=7;<br>&nbsp;LInitInstr[26].Vars[1].Code:=#$75#$05 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//jnz +5<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$E9#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //jmp 0XXYYZZWWh<br><br>&nbsp;//add eax,[esp+00Ch]<br>&nbsp;LInitInstr[27].Count:=4;<br>&nbsp;LInitInstr[27].Vars[0].Len:=4;<br>&nbsp;LInitInstr[27].Vars[0].Code:=#$03#$44#$24#$08; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add eax,[esp+00Ch]<br>&nbsp;LInitInstr[27].Vars[1].Len:=6;<br>&nbsp;LInitInstr[27].Vars[1].Code:=#$8D#$54#$24#$08 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//lea edx,[esp+00Ch]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$02; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add eax,[edx]<br>&nbsp;LInitInstr[27].Vars[2].Len:=5;<br>&nbsp;LInitInstr[27].Vars[2].Code:=#$8B#$D4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov edx,esp<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$42#$08; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add eax,[edx+00Ch]<br>&nbsp;LInitInstr[27].Vars[3].Len:=8;<br>&nbsp;LInitInstr[27].Vars[3].Code:=#$FF#$74#$24#$08 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push [esp+00Ch]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$04#$24 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//add eax,[esp]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5A; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop edx<br><br>&nbsp;//rol eax,010h<br>&nbsp;LInitInstr[28].Count:=4;<br>&nbsp;LInitInstr[28].Vars[0].Len:=3;<br>&nbsp;LInitInstr[28].Vars[0].Code:=#$C1#$C0#$10; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //rol eax,010h<br>&nbsp;LInitInstr[28].Vars[1].Len:=3;<br>&nbsp;LInitInstr[28].Vars[1].Code:=#$C1#$C8#$10; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //ror eax,010h<br>&nbsp;LInitInstr[28].Vars[2].Len:=11;<br>&nbsp;LInitInstr[28].Vars[2].Code:=#$8B#$D0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov edx,eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$C1#$EA#$10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//shr edx,010h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$C1#$E0#$10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//shl eax,010h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$66#$8B#$C2; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov ax,dx<br>&nbsp;LInitInstr[28].Vars[3].Len:=12;<br>&nbsp;LInitInstr[28].Vars[3].Code:=#$66#$50 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$C1#$E8#$10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//shr eax,010h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$66#$5A &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop dx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$C1#$E2#$10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//shl edx,010h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$0B#$C2; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //or eax,edx<br><br>&nbsp;//add eax,[esp+010h]<br>&nbsp;LInitInstr[29].Count:=4;<br>&nbsp;LInitInstr[29].Vars[0].Len:=4;<br>&nbsp;LInitInstr[29].Vars[0].Code:=#$03#$44#$24#$10; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add eax,[esp+010h]<br>&nbsp;LInitInstr[29].Vars[1].Len:=7;<br>&nbsp;LInitInstr[29].Vars[1].Code:=#$8D#$6C#$24#$10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//lea ebp,[esp+010h]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$45#$00; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add eax,[ebp+010h]<br>&nbsp;LInitInstr[29].Vars[2].Len:=5;<br>&nbsp;LInitInstr[29].Vars[2].Code:=#$8B#$D4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov edx,esp<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$42#$10; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add eax,[edx+010h]<br>&nbsp;LInitInstr[29].Vars[3].Len:=8;<br>&nbsp;LInitInstr[29].Vars[3].Code:=#$FF#$74#$24#$10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push [esp+00Ch]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$04#$24 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//add eax,[esp]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5A; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop edx<br><br>&nbsp;//rol eax,004h<br>&nbsp;LInitInstr[30].Count:=4;<br>&nbsp;LInitInstr[30].Vars[0].Len:=3;<br>&nbsp;LInitInstr[30].Vars[0].Code:=#$C1#$C0#$04; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //rol eax,004h<br>&nbsp;LInitInstr[30].Vars[1].Len:=3;<br>&nbsp;LInitInstr[30].Vars[1].Code:=#$C1#$C8#$1C; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //ror eax,01Ch<br>&nbsp;LInitInstr[30].Vars[2].Len:=10;<br>&nbsp;LInitInstr[30].Vars[2].Code:=#$8B#$D0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov edx,eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$C1#$EA#$1C &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//shr edx,01Ch<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$C1#$E0#$04 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//shl eax,004h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$0B#$C2; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //or eax,edx<br>&nbsp;LInitInstr[30].Vars[3].Len:=11;<br>&nbsp;LInitInstr[30].Vars[3].Code:=#$50 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$50 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$8B#$44#$24#$03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov eax,[esp+003h]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$C1#$C8#$04 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//ror eax,004h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5A &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop edx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5D; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop ebp<br><br>&nbsp;//add eax,ecx<br>&nbsp;LInitInstr[31].Count:=4;<br>&nbsp;LInitInstr[31].Vars[0].Len:=2;<br>&nbsp;LInitInstr[31].Vars[0].Code:=#$03#$C1; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add eax,ecx<br>&nbsp;LInitInstr[31].Vars[1].Len:=5;<br>&nbsp;LInitInstr[31].Vars[1].Code:=#$51 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ecx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$04#$24 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//add eax,[esp]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5A; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop edx<br>&nbsp;LInitInstr[31].Vars[2].Len:=4;<br>&nbsp;LInitInstr[31].Vars[2].Code:=#$8B#$E9 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ebp,ecx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$C5; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add eax,ebp<br>&nbsp;LInitInstr[31].Vars[3].Len:=5;<br>&nbsp;LInitInstr[31].Vars[3].Code:=#$50 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$01#$0C#$24 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//add [esp],ecx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$58; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop eax<br><br>&nbsp;//xor eax,[edi]<br>&nbsp;LInitInstr[32].Count:=4;<br>&nbsp;LInitInstr[32].Vars[0].Len:=2;<br>&nbsp;LInitInstr[32].Vars[0].Code:=#$33#$07; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //xor eax,[edi]<br>&nbsp;LInitInstr[32].Vars[1].Len:=6;<br>&nbsp;LInitInstr[32].Vars[1].Code:=#$FF#$37 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push [edi]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$33#$04#$24 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//xor eax,[esp]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5D; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop ebp<br>&nbsp;LInitInstr[32].Vars[2].Len:=4;<br>&nbsp;LInitInstr[32].Vars[2].Code:=#$8B#$17 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov edx,[edi]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$33#$C2; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //xor eax,edx<br>&nbsp;LInitInstr[32].Vars[3].Len:=7;<br>&nbsp;LInitInstr[32].Vars[3].Code:=#$8B#$2F &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ebp,[edi]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$55 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ebp<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$31#$04#$24 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//xor [esp],eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$58; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop eax<br><br>&nbsp;//stosd<br>&nbsp;LInitInstr[33].Count:=4;<br>&nbsp;LInitInstr[33].Vars[0].Len:=1;<br>&nbsp;LInitInstr[33].Vars[0].Code:=#$AB; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //stosd<br>&nbsp;LInitInstr[33].Vars[1].Len:=6;<br>&nbsp;LInitInstr[33].Vars[1].Code:=#$89#$07 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov [edi],eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$47 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//inc edi<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$47 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//inc edi<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$47 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//inc edi<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$47; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //inc edi<br>&nbsp;LInitInstr[33].Vars[2].Len:=7;<br>&nbsp;LInitInstr[33].Vars[2].Code:=#$87#$E7 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//xchg esp,edi<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5A &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop edx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$50 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5A &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop edx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$87#$FC; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //xchg edi,esp<br>&nbsp;LInitInstr[33].Vars[3].Len:=9;<br>&nbsp;LInitInstr[33].Vars[3].Code:=#$50 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$8B#$EC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ebp,esp<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$87#$F5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//xchg esi,ebp<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$A5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//movsd<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$8B#$F5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov esi,ebp<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5A; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop edx<br>&nbsp;//inc esi<br>&nbsp;LInitInstr[34].Count:=4;<br>&nbsp;LInitInstr[34].Vars[0].Len:=1;<br>&nbsp;LInitInstr[34].Vars[0].Code:=#$46; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //inc esi<br>&nbsp;LInitInstr[34].Vars[1].Len:=3;<br>&nbsp;LInitInstr[34].Vars[1].Code:=#$83#$C6#$01; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add esi,001h<br>&nbsp;LInitInstr[34].Vars[2].Len:=3;<br>&nbsp;LInitInstr[34].Vars[2].Code:=#$83#$EE#$FF; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //sub esi,-001h<br>&nbsp;LInitInstr[34].Vars[3].Len:=5;<br>&nbsp;LInitInstr[34].Vars[3].Code:=#$6A#$01 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push 001h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5A &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop edx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$03#$F2; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add esi,edx<br><br>&nbsp;//loop @Coder_code<br>&nbsp;LInitInstr[35].Count:=1;<br>&nbsp;LInitInstr[35].Vars[0].Len:=7;<br>&nbsp;LInitInstr[35].Vars[0].Code:=#$49 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//dec ecx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$0F#$85#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; //jnz +0WWXXYYZZh<br><br>&nbsp;//pop edi<br>&nbsp;LInitInstr[36].Count:=4;<br>&nbsp;LInitInstr[36].Vars[0].Len:=1;<br>&nbsp;LInitInstr[36].Vars[0].Code:=#$5F; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop edi<br>&nbsp;LInitInstr[36].Vars[1].Len:=4;<br>&nbsp;LInitInstr[36].Vars[1].Code:=#$8B#$3C#$24 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov edi,[esp]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5D; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop ebp<br>&nbsp;LInitInstr[36].Vars[2].Len:=3;<br>&nbsp;LInitInstr[36].Vars[2].Code:=#$5D &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop ebp<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$8B#$FD; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov edi,ebp<br>&nbsp;LInitInstr[36].Vars[3].Len:=3;<br>&nbsp;LInitInstr[36].Vars[3].Code:=#$5A &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop edx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$87#$FA; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //xchg edi,edx<br><br>&nbsp;//ret 00Ch<br>&nbsp;LInitInstr[37].Count:=4;<br>&nbsp;LInitInstr[37].Vars[0].Len:=3;<br>&nbsp;LInitInstr[37].Vars[0].Code:=#$C2#$0C#$00; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //ret 00Ch<br>&nbsp;LInitInstr[37].Vars[1].Len:=6;<br>&nbsp;LInitInstr[37].Vars[1].Code:=#$58 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5A &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop edx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5D &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop ebp<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$59 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop ecx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$FF#$E0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //jmp eax<br>&nbsp;LInitInstr[37].Vars[2].Len:=7;<br>&nbsp;LInitInstr[37].Vars[2].Code:=#$83#$C4#$10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//add esp,010h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$FF#$64#$24#$F0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //jmp [esp-010h]<br>&nbsp;LInitInstr[37].Vars[3].Len:=8;<br>&nbsp;LInitInstr[37].Vars[3].Code:=#$6A#$F0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push -010h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$59 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//pop ecx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$2B#$E1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//sub esp,ecx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$FF#$24#$0C; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //jmp [esp+ecx]<br><br>&nbsp;//mov eax,0WWXXYYZZh<br>&nbsp;LInitInstr[38].Count:=4;<br>&nbsp;LInitInstr[38].Vars[0].Len:=5;<br>&nbsp;LInitInstr[38].Vars[0].Code:=#$B8#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov eax,012345678h<br>&nbsp;LInitInstr[38].Vars[1].Len:=6;<br>&nbsp;LInitInstr[38].Vars[1].Code:=#$68#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push [0WWXXYYZZh]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$58; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop eax<br>&nbsp;LInitInstr[38].Vars[2].Len:=6;<br>&nbsp;LInitInstr[38].Vars[2].Code:=#$B9#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ecx,012345678h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$91; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //xchg ecx,eax<br>&nbsp;LInitInstr[38].Vars[3].Len:=6;<br>&nbsp;LInitInstr[38].Vars[3].Code:=#$8D#$05#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; //lea eax,[012345678h]<br><br>&nbsp;//mov [ebx+0WWXXYYZZh],eax<br>&nbsp;LInitInstr[39].Count:=4;<br>&nbsp;LInitInstr[39].Vars[0].Len:=6;<br>&nbsp;LInitInstr[39].Vars[0].Code:=#$89#$83#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; //mov [ebx+0WWXXYYZZh],eax<br>&nbsp;LInitInstr[39].Vars[1].Len:=7;<br>&nbsp;LInitInstr[39].Vars[1].Code:=#$50 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$8F#$83#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; //pop [ebx+0WWXXYYZZh]<br>&nbsp;LInitInstr[39].Vars[2].Len:=10;<br>&nbsp;LInitInstr[39].Vars[2].Code:=#$53 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ebx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$81#$C3#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//add ebx,0WWXXYYZZh<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$89#$03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov [ebx],eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5B; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop ebx<br>&nbsp;LInitInstr[39].Vars[3].Len:=7;<br>&nbsp;LInitInstr[39].Vars[3].Code:=#$8D#$BB#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//lea edi,[ebx+0WWXXYYZZh]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$AB; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //stosd<br><br>&nbsp;//mov eax,0WWXXYYZZh<br>&nbsp;LInitInstr[40].Count:=4;<br>&nbsp;LInitInstr[40].Vars[0].Len:=5;<br>&nbsp;LInitInstr[40].Vars[0].Code:=#$B8#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov eax,012345678h<br>&nbsp;LInitInstr[40].Vars[1].Len:=6;<br>&nbsp;LInitInstr[40].Vars[1].Code:=#$68#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push [0WWXXYYZZh]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$58; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop eax<br>&nbsp;LInitInstr[40].Vars[2].Len:=6;<br>&nbsp;LInitInstr[40].Vars[2].Code:=#$B9#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ecx,012345678h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$91; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //xchg ecx,eax<br>&nbsp;LInitInstr[40].Vars[3].Len:=6;<br>&nbsp;LInitInstr[40].Vars[3].Code:=#$8D#$05#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; //lea eax,[012345678h]<br><br>&nbsp;//mov [ebx+0WWXXYYZZh],eax<br>&nbsp;LInitInstr[41].Count:=4;<br>&nbsp;LInitInstr[41].Vars[0].Len:=6;<br>&nbsp;LInitInstr[41].Vars[0].Code:=#$89#$83#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; //mov [ebx+0WWXXYYZZh],eax<br>&nbsp;LInitInstr[41].Vars[1].Len:=7;<br>&nbsp;LInitInstr[41].Vars[1].Code:=#$50 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$8F#$83#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; //pop [ebx+0WWXXYYZZh]<br>&nbsp;LInitInstr[41].Vars[2].Len:=10;<br>&nbsp;LInitInstr[41].Vars[2].Code:=#$53 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ebx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$81#$C3#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//add ebx,0WWXXYYZZh<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$89#$03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov [ebx],eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5B; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop ebx<br>&nbsp;LInitInstr[41].Vars[3].Len:=7;<br>&nbsp;LInitInstr[41].Vars[3].Code:=#$8D#$BB#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//lea edi,[ebx+0WWXXYYZZh]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$AB; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //stosd<br><br>&nbsp;//mov eax,0WWXXYYZZh<br>&nbsp;LInitInstr[42].Count:=4;<br>&nbsp;LInitInstr[42].Vars[0].Len:=5;<br>&nbsp;LInitInstr[42].Vars[0].Code:=#$B8#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //mov eax,012345678h<br>&nbsp;LInitInstr[42].Vars[1].Len:=6;<br>&nbsp;LInitInstr[42].Vars[1].Code:=#$68#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push [0WWXXYYZZh]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$58; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop eax<br>&nbsp;LInitInstr[42].Vars[2].Len:=6;<br>&nbsp;LInitInstr[42].Vars[2].Code:=#$B9#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov ecx,012345678h<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$91; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //xchg ecx,eax<br>&nbsp;LInitInstr[42].Vars[3].Len:=6;<br>&nbsp;LInitInstr[42].Vars[3].Code:=#$8D#$05#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; //lea eax,[012345678h]<br><br>&nbsp;//mov [ebx+0WWXXYYZZh],eax<br>&nbsp;LInitInstr[43].Count:=4;<br>&nbsp;LInitInstr[43].Vars[0].Len:=6;<br>&nbsp;LInitInstr[43].Vars[0].Code:=#$89#$83#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; //mov [ebx+0WWXXYYZZh],eax<br>&nbsp;LInitInstr[43].Vars[1].Len:=7;<br>&nbsp;LInitInstr[43].Vars[1].Code:=#$50 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$8F#$83#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; //pop [ebx+0WWXXYYZZh]<br>&nbsp;LInitInstr[43].Vars[2].Len:=10;<br>&nbsp;LInitInstr[43].Vars[2].Code:=#$53 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//push ebx<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$81#$C3#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//add ebx,0WWXXYYZZh<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$89#$03 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//mov [ebx],eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$5B; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //pop ebx<br>&nbsp;LInitInstr[43].Vars[3].Len:=7;<br>&nbsp;LInitInstr[43].Vars[3].Code:=#$8D#$BB#$78#$56#$34#$12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//lea edi,[ebx+0WWXXYYZZh]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$AB; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //stosd<br><br>&nbsp;//jmp @DynLoader_begin<br>&nbsp;LInitInstr[44].Count:=3;<br>&nbsp;LInitInstr[44].Vars[0].Len:=5;<br>&nbsp;LInitInstr[44].Vars[0].Code:=#$E9#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //jmp +0WWXXYYZZh<br>&nbsp;LInitInstr[44].Vars[1].Len:=8;<br>&nbsp;LInitInstr[44].Vars[1].Code:=#$33#$C0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//xor eax,eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$0F#$84#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; //jz +0WWXXYYZZh<br>&nbsp;LInitInstr[44].Vars[2].Len:=7;<br>&nbsp;LInitInstr[44].Vars[2].Code:=#$48 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//dec eax<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+#$0F#$85#$78#$56#$34#$12; &nbsp; &nbsp; &nbsp; &nbsp; //jnz +0WWXXYYZZh<br><br><br>&nbsp;//<br>&nbsp;//now put some rubbish, select instruction and write it there<br>&nbsp;//then put some rubbish, select next instruction and write it there<br>&nbsp;//then put some ...<br>&nbsp;//<br>&nbsp;//but be careful with 26th and 27th instructions which is test and condition jump<br>&nbsp;//don't put the rubbish between them<br>&nbsp;//<br><br><br>&nbsp;ZeroMemory(InitData,InitSize);<br>&nbsp;LRemaining:=InitSize;<br><br>&nbsp;LPB:=InitData;<br>&nbsp;LCodeStart:=NtHeaders.OptionalHeader.ImageBase+NtHeaders.OptionalHeader.AddressOfEntryPoint;<br>&nbsp;LVirtAddr:=LCodeStart;<br><br>&nbsp;for LI:=0 to InitInstrCount-1 do<br>&nbsp;with LInitInstr[LI] do<br>&nbsp;begin<br>&nbsp; LDelta:=InitInstrCount-LI;<br>&nbsp; LDelta2:=LRemaining-LDelta*10;<br>&nbsp; LRubbishSize:=Random(LDelta2 div LDelta);<br>&nbsp; if (LI&lt;&gt;26) and (LRubbishSize&gt;0) then &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//can't change flags after test<br>&nbsp; begin<br>&nbsp; &nbsp;GenerateRubbishCode(LPB,LRubbishSize,LVirtAddr);<br>&nbsp; &nbsp;Inc(LPB,LRubbishSize);<br>&nbsp; &nbsp;Inc(LVirtAddr,LRubbishSize);<br>&nbsp; &nbsp;Dec(LRemaining,LRubbishSize);<br>&nbsp; end;<br><br>&nbsp; VirtualAddress:=LVirtAddr;<br>&nbsp; Index:=Random(LInitInstr[LI].Count);<br>&nbsp; with Vars[Index] do<br>&nbsp; begin<br>&nbsp; &nbsp;CopyMemory(LPB,@Code,Len);<br>&nbsp; &nbsp;Inc(LPB,Len);<br>&nbsp; &nbsp;Inc(LVirtAddr,Len);<br>&nbsp; &nbsp;Dec(LRemaining,Len);<br>&nbsp; end;<br>&nbsp;end;<br>&nbsp;LRubbishSize:=Random(LRemaining);<br>&nbsp;GenerateRubbishCode(LPB,LRubbishSize,LVirtAddr);<br>&nbsp;Dec(LRemaining,LRubbishSize);<br>&nbsp;Inc(LPB,LRubbishSize);<br>&nbsp;LRubbishSize:=Random(LRemaining);<br>&nbsp;GenerateRandomBuffer(LPB,LRubbishSize);<br><br><br>&nbsp;//<br>&nbsp;//now correct pointers<br>&nbsp;//<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[00].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=LInitInstr[01].VirtualAddress-(LInitInstr[00].VirtualAddress+5);<br>&nbsp;Inc(LPB);<br>&nbsp;PCardinal(LPB)^:=LPtrAddr;<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[02].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=LInitInstr[00].VirtualAddress+5-ACodePtr;<br>&nbsp;if LInitInstr[02].Index&lt;&gt;2 then<br>&nbsp;begin<br>&nbsp; case LInitInstr[02].Index of<br>&nbsp; &nbsp;0:Inc(LPB,2);<br>&nbsp; &nbsp;1:Inc(LPB);<br>&nbsp; &nbsp;3:Inc(LPB,4);<br>&nbsp; end;<br>&nbsp; PCardinal(LPB)^:=LPtrAddr;<br>&nbsp;end else<br>&nbsp;begin<br>&nbsp; Inc(LPB,2);<br>&nbsp; PWord(LPB)^:=HiWord(LPtrAddr);<br>&nbsp; Inc(LPB,4);<br>&nbsp; PWord(LPB)^:=LoWord(LPtrAddr);<br>&nbsp;end;<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[05].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=AKeyPtr;<br>&nbsp;case LInitInstr[05].Index of<br>&nbsp; 0,3:Inc(LPB,2);<br>&nbsp; 1,2:Inc(LPB);<br>&nbsp;end;<br>&nbsp;PCardinal(LPB)^:=LPtrAddr;<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[07].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=AData1Ptr;<br>&nbsp;case LInitInstr[07].Index of<br>&nbsp; 0,1,2:Inc(LPB);<br>&nbsp; 3:Inc(LPB,2);<br>&nbsp;end;<br>&nbsp;PCardinal(LPB)^:=LPtrAddr;<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[08].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=ASize1;<br>&nbsp;case LInitInstr[08].Index of<br>&nbsp; 0,1:Inc(LPB);<br>&nbsp; 2:Inc(LPB,5);<br>&nbsp; 3:Inc(LPB,4);<br>&nbsp;end;<br>&nbsp;PCardinal(LPB)^:=LPtrAddr;<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[10].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=LInitInstr[19].VirtualAddress-(LInitInstr[10].VirtualAddress+5);<br>&nbsp;Inc(LPB);<br>&nbsp;PCardinal(LPB)^:=LPtrAddr;<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[12].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=AData2Ptr;<br>&nbsp;case LInitInstr[12].Index of<br>&nbsp; 0,1,2:Inc(LPB);<br>&nbsp; 3:Inc(LPB,4);<br>&nbsp;end;<br>&nbsp;PCardinal(LPB)^:=LPtrAddr;<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[14].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=ASize2;<br>&nbsp;case LInitInstr[14].Index of<br>&nbsp; 0,1:Inc(LPB);<br>&nbsp; 2,4:Inc(LPB,5);<br>&nbsp; 3:Inc(LPB,4);<br>&nbsp;end;<br>&nbsp;PCardinal(LPB)^:=LPtrAddr;<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[16].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=LInitInstr[19].VirtualAddress-(LInitInstr[16].VirtualAddress+5);<br>&nbsp;Inc(LPB);<br>&nbsp;PCardinal(LPB)^:=LPtrAddr;<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[17].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=LInitInstr[38].VirtualAddress-(LInitInstr[17].VirtualAddress+5);<br>&nbsp;Inc(LPB);<br>&nbsp;PCardinal(LPB)^:=LPtrAddr;<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[26].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=LInitInstr[23].VirtualAddress-(LInitInstr[26].VirtualAddress+6);<br>&nbsp;case LInitInstr[26].Index of<br>&nbsp; 0:Inc(LPB,2);<br>&nbsp; 1:begin Inc(LPB,3); Dec(LPtrAddr); end;<br>&nbsp;end;<br>&nbsp;PCardinal(LPB)^:=LPtrAddr;<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[35].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=LInitInstr[24].VirtualAddress-(LInitInstr[35].VirtualAddress+6);<br>&nbsp;Inc(LPB,3);<br>&nbsp;Dec(LPtrAddr);<br>&nbsp;PCardinal(LPB)^:=LPtrAddr;<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[38].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=ALoadLibImpAddr;<br>&nbsp;case LInitInstr[38].Index of<br>&nbsp; 0,1,2:Inc(LPB);<br>&nbsp; 3:Inc(LPB,2);<br>&nbsp;end;<br>&nbsp;PCardinal(LPB)^:=LPtrAddr;<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[39].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=AData1Ptr+1;<br>&nbsp;case LInitInstr[39].Index of<br>&nbsp;0,3:Inc(LPB,2);<br>&nbsp; 1,2:Inc(LPB,3);<br>&nbsp;end;<br>&nbsp;PCardinal(LPB)^:=LPtrAddr;<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[40].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=AGetProcAddrImpAddr;<br>&nbsp;case LInitInstr[40].Index of<br>&nbsp; 0,1,2:Inc(LPB);<br>&nbsp; 3:Inc(LPB,2);<br>&nbsp;end;<br>&nbsp;PCardinal(LPB)^:=LPtrAddr;<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[41].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=AData1Ptr+6;<br>&nbsp;case LInitInstr[41].Index of<br>&nbsp; 0,3:Inc(LPB,2);<br>&nbsp; 1,2:Inc(LPB,3);<br>&nbsp;end;<br>&nbsp;PCardinal(LPB)^:=LPtrAddr;<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[42].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=AMainPtr;<br>&nbsp;case LInitInstr[42].Index of<br>&nbsp; 0,1,2:Inc(LPB);<br>&nbsp; 3:Inc(LPB,2);<br>&nbsp;end;<br>&nbsp;PCardinal(LPB)^:=LPtrAddr;<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[43].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=AData1Ptr+11;<br>&nbsp;case LInitInstr[43].Index of<br>&nbsp; &nbsp;0,3:Inc(LPB,2);<br>&nbsp; 1,2:Inc(LPB,3);<br>&nbsp;end;<br>&nbsp;PCardinal(LPB)^:=LPtrAddr;<br><br>&nbsp;LPB:=Pointer(Cardinal(InitData)+LInitInstr[44].VirtualAddress-LCodeStart);<br>&nbsp;LPtrAddr:=ADynLoadAddr-(LInitInstr[44].VirtualAddress+5);<br>&nbsp;case LInitInstr[44].Index of<br>&nbsp; 0:Inc(LPB);<br>&nbsp; 1:begin Inc(LPB,4); Dec(LPtrAddr,3); end;<br>&nbsp; 2:begin Inc(LPB,3); Dec(LPtrAddr,2); end;<br>&nbsp;end;<br>&nbsp;PCardinal(LPB)^:=LPtrAddr;<br><br>end;<br>
 
晕,不能简化一下么,那么长,都是必须的么?
 
jingtao能不能给个完整的例子?分不够可以再加
 
大家的方向好像有点问题,应该使用远程线程技术(好像是这个名词),就是将流文件对应的代码附加到其他程序中(比如资源管理器等),并在其他程序中运行。直接在自己的内存空间运行应该也可以,在DOS时代不是有个叫“覆盖”的编程技术吗,变通一下在Win下也许行。
 
来如风:<br>这只是其中的一部分而已.整个代码更加大.呵呵.<br>lxggc:<br>方向绝对是正确的.<br>远程线程是不能实现这个功能的.<br>(1)远程线程只能针对DLL文件.而且这个DLL的格式必须类似以下格式:<br>...<br>var<br>&nbsp; hThreadHandle : THandle;<br><br>procedure DllMain(dwReason : DWORD);<br>var<br>&nbsp; dwThreadID : DWORD;<br>begin<br>&nbsp; case dwReason of<br>&nbsp; &nbsp; DLL_PROCESS_ATTACH :<br>&nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; hThreadHandle := CreateThread(nil, 0, @ThreadProc, nil, 0, dwThreadID);<br>&nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; DLL_PROCESS_DETACH :<br>&nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; if (hThreadHandle &lt;&gt; 0) then &nbsp;TerminateThread(hThreadHandle, 0);<br>&nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; DLL_THREAD_ATTACH :<br>&nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; DLL_THREAD_DETACH :<br>&nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; end;<br>&nbsp; end;<br>end;<br><br>begin<br>&nbsp; DLLProc := @DLLMain;<br>&nbsp; DLLMain(DLL_PROCESS_ATTACH);<br>end.<br><br>(2)最重要的是,远程线程一样需要保存到磁盘,然后再将其插入到另外的EXE<br>{=======================================================}<br>{ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>{ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Singularity 黑洞2004 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>{ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>{ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;版权所有 (c) 2004 陈经韬 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>{ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>{=======================================================}<br><br>unit Unit_InjectDllToModule;<br><br>{=======================================================<br>&nbsp; 项目: &nbsp;Singularity 黑洞2004<br>&nbsp; 模块: &nbsp;进程插入单元<br>&nbsp; 描述:<br>&nbsp; 版本: &nbsp;2004<br>&nbsp; 日期: &nbsp;2003-03-05<br>&nbsp; 作者: &nbsp;陈经韬<br>&nbsp; 更新: &nbsp;2004-03-06:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;添加一个参数bHaltOnFinish.<br>=======================================================}<br><br>interface<br>uses<br>&nbsp; Windows,Messages,MyClasses{去掉Classes.pas不必要的定义,便于生成的文件最小},OpenThread;<br><br>const<br>&nbsp; WM_THREADFINISH = WM_USER + 1234;<br>type<br>&nbsp; TInjectDllToModule = class<br>&nbsp; private<br>&nbsp; &nbsp; { Private declarations }<br>&nbsp; &nbsp; m_hInjectThread: THandle;<br>&nbsp; &nbsp; m_hInjectProcess: THandle;<br>&nbsp; &nbsp; m_lpCodeBase, m_lpDataBase: Pointer;<br>&nbsp; &nbsp; m_OldThreadContext: CONTEXT;<br>&nbsp; &nbsp; strDllFileName,strModuleFileName:string;<br>&nbsp; &nbsp; FHideWinHandle: HWND;{隐藏窗口,动态建立}<br>&nbsp; &nbsp; bSystemIsNT,bInjectProc,bHaltOnFinish:Boolean;<br>&nbsp; &nbsp; function SystemIsNT:Boolean;<br>&nbsp; &nbsp; procedure WndProc(var msg: TMessage);<br>&nbsp; &nbsp; procedure InitInjectWin9X;<br>&nbsp; &nbsp; procedure InitInjectWinNT(const dwOwnerPIDin:dword=0);<br>&nbsp; &nbsp; procedure InjectCodeIntoThread(dwThreadID: DWORD);<br>&nbsp; public<br>&nbsp; &nbsp; { Public declarations }<br>&nbsp; &nbsp;constructor Create();<br>&nbsp; &nbsp;destructor Destroy; override;<br>&nbsp; &nbsp;procedure &nbsp;InjectDllToModule(const DllFileName,ModuleFileName:string;const HaltOnFinish:Boolean=False);<br>&nbsp; end;<br>type<br>&nbsp; TImportCode = packed record<br>&nbsp; &nbsp; &nbsp;JumpInstruction: Word;<br>&nbsp; &nbsp; &nbsp;AddressOfPointerToFunction: PPointer;<br>&nbsp; end;<br>&nbsp; PImportCode = ^TImportCode;<br><br>&nbsp; TImportCode2 = packed record<br>&nbsp; &nbsp; &nbsp;JumpInstruction: byte;<br>&nbsp; &nbsp; &nbsp;AddressOfPointerToFunction: PPointer;<br>&nbsp; end;<br>&nbsp; PImportCode2 = ^TImportCode2;<br><br>&nbsp; ProcLoadLibrary = function(lpLibFileName: PAnsiChar): HMODULE; stdcall;<br>&nbsp; PostMessage = function(hwnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): Bool; stdcall;<br>implementation<br><br>function ExtractFileName(const Str: string): string;<br>var<br>&nbsp; L, i, flag: integer;<br>begin<br>&nbsp; L := Length(Str);<br>&nbsp; flag:=0;<br>&nbsp; for i := 1 to L do<br>&nbsp; &nbsp; if Str = '/' then<br>&nbsp; &nbsp; &nbsp; flag := i;<br>&nbsp; result := copy(Str, flag + 1, L - flag);<br>end;<br>procedure InjectCodeFun; stdcall;<br>var<br>&nbsp; pl: PROCLOADLIBRARY;<br>&nbsp; ps: POSTMESSAGE;<br>&nbsp; i:integer;<br>begin<br>&nbsp; pl := pointer($11111111); //LoadLibraryA<br>&nbsp; pl(pchar($22222222));<br>&nbsp; ps := pointer($33333333); //PostMessageA<br>&nbsp; ps($44444444, WM_THREADFINISH, 0, 0);<br>&nbsp; i:=0;<br>&nbsp; while i=0 do;<br>end;<br><br>function FinalFunctionAddress(Code: Pointer): Pointer;<br>Var<br>&nbsp; func: PImportCode;<br>&nbsp; func2: PImportCode2;<br>begin<br>&nbsp; Result:=Code;<br>&nbsp; if Code=nil then exit;<br>&nbsp; try<br>&nbsp; &nbsp; func:=result;<br>&nbsp; &nbsp; if (func.JumpInstruction=$25FF) then<br>&nbsp; &nbsp; &nbsp; result:=func.AddressOfPointerToFunction^;<br><br>&nbsp; &nbsp; func2:=result;<br>&nbsp; &nbsp; if (func2.JumpInstruction=$68) then<br>&nbsp; &nbsp; &nbsp; result:=func2.AddressOfPointerToFunction;<br>&nbsp; except<br>&nbsp; &nbsp; Result:=nil;<br>&nbsp; end;<br>end;<br><br>{ TInjectDllToModule }<br><br>constructor TInjectDllToModule.Create;<br>begin<br>&nbsp; inherited Create;<br>&nbsp; FHideWinHandle := MyClasses.AllocateHWND(WndProc);<br>&nbsp; bSystemIsNT:=SystemIsNT;<br>&nbsp; strDllFileName:='';<br>&nbsp; strModuleFileName:='';<br>&nbsp; bInjectProc:=False;<br>&nbsp; bHaltOnFinish:=False;<br>end;<br>procedure TInjectDllToModule.InitInjectWinNT(const dwOwnerPIDin:dword=0);<br>var<br>&nbsp; iCodeSize:integer;<br>&nbsp; i:integer;<br>&nbsp; dwOwnerPID,HasWrite:dword;<br>&nbsp; hinstUser,hinstKernel:HMODULE;<br>&nbsp; fnLoadLibrary:PROCLOADLIBRARY;<br>&nbsp; fnPostMessage:POSTMESSAGE;<br>&nbsp; lpCodeDup:PCHAR;<br>&nbsp; dwPtr:plongword;<br>&nbsp; hMainWnd:HWND;<br>begin<br>iCodeSize := DWORD(@EndOfInjectCodeFun) - DWORD(@InjectCodeFun);<br>if dwOwnerPIDin=0 then dwOwnerPID := GetProcessID(ExtractFileName(strModuleFileName))//For Test<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else dwOwnerPID:=dwOwnerPIDin;{到这里,dwOwnerPIDin的作用期实际上已经结束}<br><br>m_hInjectProcess := OpenProcess(PROCESS_ALL_ACCESS , FALSE,dwOwnerPID); {打开需要被插入的进程}<br>if(m_hInjectProcess&lt;&gt;0)then<br>begin<br>&nbsp; m_lpCodeBase := VirtualAllocEx( m_hInjectProcess,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nil,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; iCodeSize,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MEM_COMMIT,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PAGE_EXECUTE_READWRITE);{在该进程空间分配代码内存}<br><br><br><br>&nbsp; m_lpDataBase := VirtualAllocEx( m_hInjectProcess,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nil,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; length(strDllFileName) + 1,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MEM_COMMIT,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PAGE_READWRITE);{在该进程空间分配Dll路径内存}<br><br>&nbsp; if((m_lpDataBase &lt;&gt; nil) and (m_lpCodeBase &lt;&gt; nil))then<br>&nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hinstKernel := GetModuleHandle('Kernel32.dll');<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hinstUser := GetModuleHandle('User32.dll');<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fnLoadLibrary := PROCLOADLIBRARY(FinalFunctionAddress(GetProcAddress(hinstKernel,'LoadLibraryA')));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fnPostMessage := POSTMESSAGE(FinalFunctionAddress(GetProcAddress(hinstUser,'PostMessageA')));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hMainWnd := FHideWinHandle;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WriteProcessMemory(m_hInjectProcess,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_lpDataBase,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pchar(strDllFileName),<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Length(strDllFileName) + 1,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HasWrite);{在该进程内写入Dll路径}<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lpCodeDup:=pchar(GlobalAlloc(Gmem_Fixed,iCodeSize));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(lpCodeDup&lt;&gt;nil)then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; move((@InjectCodeFun)^,lpCodeDup^,iCodeSize);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for i := 0 to iCodeSize - 5 do<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dwPtr := pointer(longword(lpCodeDup) + i);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (dwPtr^ = $11111111)then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dwPtr^ := longword(@fnLoadLibrary)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (dwPtr^ = $22222222)then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dwPtr^ := DWORD(m_lpDataBase)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (dwPtr^ = $33333333)then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dwPtr^ := longword(@fnPostMessage)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (dwPtr^ = $44444444)then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dwPtr^ := DWORD(hMainWnd);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WriteProcessMemory(m_hInjectProcess,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;m_lpCodeBase,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lpCodeDup,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iCodeSize,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;haswrite);{在该进程内写入函数代码}<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GlobalFree(cardinal(lpCodeDup));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;<br>&nbsp; end;<br>end;<br>end;<br>procedure TInjectDllToModule.InitInjectWin9X;<br>var<br>&nbsp; iCodeSize:integer;<br>&nbsp; m_hShareCodeObj, m_hShareDataObj:Thandle;<br>&nbsp; i:integer;<br>&nbsp; hinstUser,hinstKernel:HMODULE;<br>&nbsp; fnLoadLibrary:PROCLOADLIBRARY;<br>&nbsp; fnPostMessage:POSTMESSAGE;<br><br>&nbsp; dwPtr:plongword;<br>&nbsp; hMainWnd:HWND;<br>begin<br>&nbsp;iCodeSize := DWORD(@EndOfInjectCodeFun) - DWORD(@InjectCodeFun);<br><br>&nbsp; m_hShareCodeObj := CreateFileMapping($FFFFFFFF,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nil,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PAGE_READWRITE,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iCodeSize,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'InjectCode');<br>&nbsp; if(m_hShareCodeObj &lt;&gt; 0) then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_lpCodeBase := MapViewOfFile(m_hShareCodeObj,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FILE_MAP_ALL_ACCESS,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; iCodeSize);<br>&nbsp; m_hShareDataObj := CreateFileMapping($FFFFFFFF,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nil,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PAGE_READWRITE,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Length(strDllFileName) + 1,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'InjectData');<br>&nbsp; if(m_hShareDataObj &lt;&gt; 0) then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_lpDataBase := MapViewOfFile(m_hShareDataObj,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FILE_MAP_ALL_ACCESS,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; length(strDllFileName) + 1);<br>ZeroMemory(m_lpDataBase,Length(strDllFileName) + 1);<br>if((m_lpDataBase &lt;&gt;nil) and (m_lpCodeBase &lt;&gt;nil)) then<br>begin<br>........<br><br>
 
jingtao给一个能实现的例子吧
 
jingtao大侠,能发一个完整的例了到:wjp8@163.com吗?<br>如果收到,我将感激不尽!
 
留名,学习先.
 
&nbsp;wjp888 , 邮件已发 差收 &nbsp;:)
 
刘麻子:<br>&nbsp; &nbsp;您真是大好人,我已收到!希望以后多交流,或常来信,您这个朋友我交定了!<br>如果您是‘乔峰’,那么我就是您的小弟‘段誉’!
 
如果您是‘乔峰’,那么我就是您的小弟‘段誉’! &nbsp;(有点肉麻)
 
to fu_qi_ming:<br>&nbsp; &nbsp;你没看过<天龙八部>,那你就不知道什么样的人是让人感慨的英雄!
 
&nbsp;wjp888大哥,希望以后能有机会象您请教 &nbsp; &nbsp;:)
 
这完全是两回事。
 
to:刘麻子<br>&nbsp; &nbsp;麻烦也给一份jeary_gzb@21cn.net
 
后退
顶部