wakillon

SDL2 Firework

3 posts in this topic

#1 ·  Posted (edited)

A little try with SDL 2 Library, SDL 2 GFX and Sid music.

As usual, no externals files needed.

Press "Esc" for quit.

SDL2_Fireworks.au3

Happy New Year 2017 ;)

Edited by wakillon
2 people like this

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites



#2 ·  Posted

It looks nice, and Happy new Year to you to.

Share this post


Link to post
Share on other sites

#3 ·  Posted

Thanks


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • Xandy
      By Xandy
      I wanted to start using SDL2 libraries in C++.
      This is a Hello World project that covers some of the essentials of programming with SDL2.
      I will use it when I forget how to create an SDL2 project.
      Loads a scrolling background image for world. Mouse position, left click, and double click example. Hotkeys and cooldown timers to prevent hotkey spam. Plays background music. (ALT + P) Plays sound effects changing sprite type. (numpad: /, *, -, +) Features a Player class for multiplayer. Player collision detection. Uses a Window class from Lazyfoo for maximize button, fullscreen ext.. Built using MSVS 2013 (free).  All dlls and libraries included and linked (for MSVS) using relative paths. You can probably run the SDL2_HelloWorld.sln without setting up any libraries. Note SDL_Net is setup but not used. Delta time used to create consistent frame rate across machines. Player animation sprite sheet:  
      Demo: Slimy's First Kiss
      Download Source and project: http://songersoft.com/programming/sdl2_helloworld/sdl2_helloworld_about.phtml
      This isn't meant to be amazing.  It's just to help get started with SDL2.
      I will consider any criticism.
      main.cpp
      // This example HelloWorld followed this video: // https://www.youtube.com/watch?v=M4Jgz0wEQxY // Turned into this // https://www.youtube.com/watch?v=yRpen8jOa08&list=PL77-op_SRaiEuC0YC43ZAUJJwL_G_C2z8&index=15 // Window class was copied from Lazyfoo // http://lazyfoo.net/tutorials/SDL/35_window_events/index.php #include <iostream> #include <string> #include "SDL.h" #include "SDL_image.h" #include "SDL_ttf.h" #include "SDL_mixer.h" #include "SDL_net.h" #include "Player.h" #include "Window.h" using namespace std; // Prototypes SDL_Texture *LoadTexture(string filepath, SDL_Renderer *renderTarget); void logSDLError(const string); SDL_Rect sdlrect(int, int, int, int); SDL_Surface *OptimizedSurface(string filepath, SDL_Surface *windowSurface); // if(okAlt) either Alt key is pressed OrKeyALT #define okAlt (k[SDL_SCANCODE_RALT] || k[SDL_SCANCODE_LALT]) int main(int argc, char *argv[]) { // Needed for the initialize block Window window; SDL_Renderer *renderTarget = nullptr; // Initialize SDL2 if (SDL_Init(SDL_INIT_EVERYTHING) < 0) { logSDLError("SDL_Init "); } // Initialize SDL_image if (!(IMG_Init(IMG_INIT_PNG) & IMG_INIT_PNG)) { cout << "Could not initialize SDL_image: " << IMG_GetError() << std::endl; SDL_Delay(5500); } // Initialize TTF if (TTF_Init() < 0) cout << "TTF_Init " << TTF_GetError() << endl; //Create window if (!window.init("SDL2 Hello World", 640, 480, "../../Graphics/iconbmp.bmp")) { printf("Window could not be created! SDL Error: %s\n", SDL_GetError()); } else { //Create renderer for window renderTarget = window.createRenderer(); if (renderTarget == NULL) { printf("Renderer could not be created! SDL Error: %s\n", SDL_GetError()); } } // Audio if (Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 2048) < 0) { cout << "Mix_OpenAudio: " << Mix_GetError() << endl; } // Load sounds: Run chunk if less than 10 sec, music if greater (generally) //Mix_Music *bgm = Mix_LoadMUS("../../Sounds/overworld.mid"); // Can't Pause MIDI Mix_Music *bgm = Mix_LoadMUS("../../Sounds/bensound-goinghigher.mp3"); cout << Mix_GetError() << endl; // Font and text SDL_Texture *text_texture = nullptr; SDL_Color textColor = { 144, 77, 255, 255 }; TTF_Font *font = TTF_OpenFont("../../Graphics/Fonts/VCR_OSD_MONO.ttf", 20); if (font) { SDL_Surface *textSurf = TTF_RenderText_Solid(font, "Hello world", textColor); text_texture = SDL_CreateTextureFromSurface(renderTarget, textSurf); SDL_FreeSurface(textSurf); } else cout << TTF_GetError() << endl; SDL_Rect textRect = { 0, 0, 0, 0 };// Position of text on window // Get the size of the text_texture SDL_QueryTexture(text_texture, NULL, NULL, &textRect.w, &textRect.h); const int playerMax = 8; int players = 2; float prevTime = 0, currentTime = 0, deltaTime = 0; bool fullscreen_toggle = 0; int i = 0, ii = 0; int redraw = 1; bool done = 0; // Load player sprite sheet and background texture SDL_Texture *spritesheet_texture = LoadTexture("../../Graphics/DW3_Char_SpriteSheet.png", renderTarget); SDL_Texture *bg_texture = LoadTexture("../../Graphics/dw3-over.png", renderTarget); int bg_texture_w = 0, bg_texture_h = 0; // Point k to Keyboard state (only needs done here, not in main loop) const Uint8 *k = SDL_GetKeyboardState(NULL); SDL_Event windowEvent; // Stop keys spamming (like music ON / OFF) float key_cooldown_timer_max = 500.0f, key_cooldown_timer = 0; SDL_Rect cameraRect = { 0, 0, window.getWidth(), window.getHeight()}; // Construct default players Player player[playerMax]; // Customize players (texture and position) for (i = 0; i < players; i++)//(sprite texture, position x, position y) player[i].Player_new(spritesheet_texture, window.getWidth() / 2 + i * 16, window.getHeight() / 2); // Get the size of bg_texture SDL_QueryTexture(bg_texture, NULL, NULL, &bg_texture_w, &bg_texture_h); // Main message loop while (!done) { prevTime = currentTime; currentTime = SDL_GetTicks(); deltaTime = (currentTime - prevTime) / 1000.0f; while (SDL_PollEvent(&windowEvent) != 0) { // Check for events if (windowEvent.type == SDL_QUIT) { // Window Exit done = 1; } else if(windowEvent.type == SDL_MOUSEBUTTONDOWN) { // Mouse buttons if (windowEvent.button.clicks == 2) { // Double left click redraw = 1; } else if (windowEvent.button.button == SDL_BUTTON_LEFT) { // Single left click redraw = 1; } // Output mouse position cout << "Mouse: " << windowEvent.button.x << " " << windowEvent.button.y << endl; } }// if(SDL_PollEvent(&windowEvent)) if (okAlt) { // Either ALT key if (k[SDL_SCANCODE_RETURN]) { // ALT + ENTER, toggle fullscreen // Consider matching current window resolution to closest preset array of valid full screen resolutions. fullscreen_toggle = 1; } if (k[SDL_SCANCODE_P]) { if (SDL_GetTicks() - key_cooldown_timer > key_cooldown_timer_max) { // Action cooldown timer is ready. Avoids ON / OFF flicker // Play Music if (!Mix_PlayingMusic()) { cout << "PLAY"; Mix_PlayMusic(bgm, -1); } else if (Mix_PausedMusic()) { cout << "RESUME"; Mix_ResumeMusic(); } else { cout << "PAUSE"; Mix_PauseMusic(); } key_cooldown_timer = SDL_GetTicks(); } }// SDL_SCANCODE_P if (k[SDL_SCANCODE_S]) { // Stop Music Mix_HaltMusic(); } }// okAlt //Handle window events fullscreen_toggle = window.handleEvent(windowEvent, renderTarget, fullscreen_toggle); // Player Update and IntersectsWith for (i = 0; i < players; i++) { player[i].Update(deltaTime, k); for (ii = 0; ii < players; ii++) { if(i != ii)// Not self player[i].IntersectsWith(player[ii]); } } // Camera cameraRect.x = player[0].GetOriginX() - window.getWidth() / 2; cameraRect.y = player[0].GetOriginY() - window.getHeight() / 2; // Normalize if (cameraRect.x < 0) cameraRect.x = 0; if (cameraRect.y < 0) cameraRect.y = 0; if (cameraRect.x + cameraRect.w >= bg_texture_w) cameraRect.x = bg_texture_w - window.getWidth(); if (cameraRect.y + cameraRect.h >= bg_texture_h) cameraRect.y = bg_texture_h - window.getHeight(); redraw = 1; // Don't judge me if (redraw) { // Redraw should definatly pretty much be at the end of loop // Clear window SDL_RenderClear(renderTarget); // Copy camera from bg_texture SDL_RenderCopy(renderTarget, bg_texture, &cameraRect, NULL); // Draw players for (i = 0; i < players; i++) player[i].Draw(renderTarget, cameraRect); // Print text SDL_RenderCopy(renderTarget, text_texture, NULL, &textRect); // Show the rendered content SDL_RenderPresent(renderTarget); redraw = 0; }// if(redraw) }// while(true) // Free windows window.free(); SDL_DestroyTexture(bg_texture); SDL_DestroyTexture(spritesheet_texture); SDL_DestroyTexture(text_texture); TTF_CloseFont(font); // Free Renderers SDL_DestroyRenderer(renderTarget); // Free music Mix_FreeMusic(bgm); // Close systems Mix_Quit(); TTF_Quit(); IMG_Quit(); SDL_Quit(); return EXIT_SUCCESS; }// main() SDL_Texture *LoadTexture(string filepath, SDL_Renderer *renderTarget) { // Create texture SDL_Texture *texture = nullptr; // Load surface SDL_Surface *surface = IMG_Load(filepath.c_str()); if (surface == NULL) { // surface didn't load logSDLError("LoadTexture surface "); } else { SDL_SetColorKey(surface, SDL_TRUE, SDL_MapRGB(surface->format, 0, 0, 0)); texture = SDL_CreateTextureFromSurface(renderTarget, surface); //SDL_SetTextureColorMod(texture, 120, 150, 140); if (texture == NULL) logSDLError("LoadTexture texture "); } SDL_FreeSurface(surface); return texture; } void logSDLError(const string msg){ cout << msg << " Error: " << SDL_GetError() << endl; SDL_Delay(4000); } SDL_Rect sdlrect(int x, int y, int w, int h) { SDL_Rect rect = {x, y, w, h}; return rect; } SDL_Surface *OptimizedSurface(string filepath, SDL_Surface *windowSurface) { SDL_Surface *optimizedSurf = nullptr; SDL_Surface *surface = IMG_Load(filepath.c_str()); if (surface == NULL) { cout << "Error: " << endl; } else { optimizedSurf = SDL_ConvertSurface(surface, windowSurface->format, 0); if (optimizedSurf == NULL) cout << "Error: " << endl; } SDL_FreeSurface(surface); return optimizedSurf; } Player.h
      #pragma once #include <iostream> #include "SDL.h" #include <String> #include "SDL_mixer.h" using namespace std; enum player_control { ePlayer_control_up, ePlayer_control_down, ePlayer_control_left, ePlayer_control_right, ePlayer_control_type_minus, ePlayer_control_type_plus }; class Player { private: SDL_Rect cropRect; SDL_Texture *texture; int spritesheet_texture_w, spritesheet_texture_h;//size of spritesheet texture bool isActive;//animation timer SDL_Scancode keys[6]; int frame_w, frame_h;//16, 16 float frameTimerMax; float frameTimer;//0..frameTimerMax int frame;//0..1 int frameMax;//2 int way;//0..3 int classType;//0..53 float moveSpeed; float cast_cooldown_max; Mix_Chunk *soundEffect; int originX, originY; int radius; Uint32 key_cooldown_timer; string name; public: void Player_new(SDL_Texture *spritesheet_texture, int x, int y); Player(); ~Player(); void Update(float delta, const Uint8 *keyState); void Draw(SDL_Renderer *renderTarget, SDL_Rect cameraRect); bool IntersectsWith(Player &p); int GetOriginX(); int GetOriginY(); int GetRadius(); SDL_Rect positionRect; }; Player.cpp
      #pragma once #include "Player.h" #include "SDL_image.h" #include "SDL_mixer.h" #include <iostream> #include <String> #include <cmath> using namespace std; Player::Player() { cropRect = {0, 0, 16, 16}; texture = nullptr; spritesheet_texture_w = spritesheet_texture_h = 0;//size of spritesheet texture isActive = false;//animation timer keys[6]; frame_w = frame_h = 16;//16, 16 frameTimerMax = 0.5f; frameTimer = 0;//0..frameTimerMax frame = 0;//0..1 frameMax = 2;//2 way = 0;//0..3 classType = 0;//0..53 moveSpeed = 200.0f; radius = frame_w / 2; soundEffect = nullptr; key_cooldown_timer = 0; cast_cooldown_max = 190.0f; static int playerNumber = 0; playerNumber++; name = "Player:" + to_string(playerNumber); // Setup keys for player 1 // ** I see the enum didn't exist when this was written ** if (playerNumber == 1) { keys[0] = SDL_SCANCODE_W; keys[1] = SDL_SCANCODE_S; keys[2] = SDL_SCANCODE_A; keys[3] = SDL_SCANCODE_D; keys[4] = SDL_SCANCODE_KP_MINUS; keys[5] = SDL_SCANCODE_KP_PLUS; } else { // Setup keys all other players (not 1) keys[0] = SDL_SCANCODE_UP; keys[1] = SDL_SCANCODE_DOWN; keys[2] = SDL_SCANCODE_LEFT; keys[3] = SDL_SCANCODE_RIGHT; keys[4] = SDL_SCANCODE_KP_DIVIDE; keys[5] = SDL_SCANCODE_KP_MULTIPLY; } }//Player::Player() void Player::Player_new(SDL_Texture *spritesheet_texture, int x, int y) { // This is new player isActive = false; // Read size of spritesheet texture SDL_QueryTexture(spritesheet_texture, NULL, NULL, &spritesheet_texture_w, &spritesheet_texture_h); texture = spritesheet_texture; // spritesheet rect cropRect = { 0, 0, 16, 16 }; // player screen position positionRect = { x, y, 16, 16 }; // Defaults moveSpeed = 200.0f; radius = frame_w / 2; frameTimer = 0; frame = 0; frameMax = 2; way = 0; classType = 0; originX = frame_w / 2; originY = frame_h / 2; soundEffect = Mix_LoadWAV("../../Sounds/whipcrack1.wav"); cout << "Name: " << name << endl; }//Player::Player_new() void Player::Update(float delta, const Uint8 *keyState) { isActive = true; if (keyState[keys[ePlayer_control_up]]) { way = 0; positionRect.y -= moveSpeed * delta; cropRect.x = (way * cropRect.w * frameMax) + (frame * cropRect.w); } if (keyState[keys[ePlayer_control_down]]) { way = 1; positionRect.y += moveSpeed * delta; cropRect.x = (way * cropRect.w * frameMax) + (frame * cropRect.w); } if (keyState[keys[ePlayer_control_left]]) { way = 3; positionRect.x -= moveSpeed * delta; cropRect.x = (way * cropRect.w * frameMax) + (frame * cropRect.w); } if (keyState[keys[ePlayer_control_right]]) { way = 2; positionRect.x += moveSpeed * delta; cropRect.x = (way * cropRect.w * frameMax) + (frame * cropRect.w); } if (keyState[keys[ePlayer_control_type_minus]]) { if (SDL_GetTicks() - key_cooldown_timer > cast_cooldown_max) { key_cooldown_timer = SDL_GetTicks(); Mix_PlayChannel(-1, soundEffect, 0); classType--; if (classType < 0) classType = spritesheet_texture_h / cropRect.h - 1; cropRect.y = classType * cropRect.h; } } if (keyState[keys[ePlayer_control_type_plus]]) { if (SDL_GetTicks() - key_cooldown_timer > cast_cooldown_max) { key_cooldown_timer = SDL_GetTicks(); Mix_PlayChannel(-1, soundEffect, 0); classType++; if (classType >= spritesheet_texture_h / cropRect.h) classType = 0; cropRect.y = classType * cropRect.h; } } if (isActive) { frameTimer += delta; if (frameTimer >= frameTimerMax){ frameTimer = 0; cropRect.x = (way * cropRect.w * frameMax) + (frame * cropRect.w); if (frame >= frameMax - 1) frame = 0; else frame++; } } else { frameTimer = 0; } }//Player::Update() void Player::Draw(SDL_Renderer *renderTarget, SDL_Rect cameraRect) { SDL_Rect drawingRect = { positionRect.x - cameraRect.x, positionRect.y - cameraRect.y, positionRect.w, positionRect.h }; SDL_RenderCopy(renderTarget, texture, &cropRect, &drawingRect); } bool Player::IntersectsWith(Player &p){ if (sqrt(pow(GetOriginX() - p.GetOriginX(), 2) + pow(GetOriginY() - p.GetOriginY(), 2)) >= radius + p.GetRadius()) { SDL_SetTextureColorMod(texture, 255, 255, 255); return false; } SDL_SetTextureColorMod(texture, 255, 0, 0); return true; } Player::~Player() { SDL_DestroyTexture(texture); Mix_FreeChunk(soundEffect); } int Player::GetOriginX() { return positionRect.x + originX; } int Player::GetOriginY() { return positionRect.y + originY; } int Player::GetRadius() { return radius; }  
    • wakillon
      By wakillon
      #NoTrayIcon #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon='' #AutoIt3Wrapper_Outfile=Fireworks.exe #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_UPX_Parameters=--best --lzma #AutoIt3Wrapper_UseX64=n ; titchysid.dll id 32 bit #AutoIt3Wrapper_Res_Description=Fireworks + Music #AutoIt3Wrapper_Res_Fileversion=1.0.1 #AutoIt3Wrapper_Res_LegalCopyright=wakillon #AutoIt3Wrapper_Res_Field='Compiled with'|'AutoIt Version 3.3.14.2' #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y #AutoIt3Wrapper_Run_After=move /y "%out%" "Fireworks.scr" #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #Region ;************ Includes ************ #Include <WindowsConstants.au3> #include <AutoitObject.au3> ; https://www.autoitscript.com/forum/topic/110379-autoitobject-udf/ #include <WINAPI.au3> #Include <Memory.au3> #EndRegion ;************ Includes ************ HotKeySet ( '{ESC}', '_Exit' ) ; SWF Constants from SWF.au3 by trancexx. https://www.autoitscript.com/forum/topic/126608-flash-matic/ Global $dtagIPersist = $dtagIUnknown & "GetClassID hresult(ptr*);" Global $dtagIPersistStream = $dtagIPersist & "IsDirty hresult(ptr);Load hresult(ptr);Save hresult(ptr;bool);GetSizeMax hresult(uint64*);" Global Const $sIID_IPersistStreamInit = "{7FD52380-4E07-101B-AE2D-08002B2EC713}" Global $dtagIPersistStreamInit = $dtagIPersistStream & "InitNew hresult();" Global $dtagISequentialStream = $dtagIUnknown & "Read hresult(ptr;dword;dword*);Write hresult(ptr;dword;dword*);" Global $dtagIStream = $dtagISequentialStream & "Seek hresult(int64;dword;int64);SetSize hresult(int64);CopyTo hresult(ptr;int64;int64*;int64*);Commit hresult(dword);" & _ "Revert none();LockRegion hresult(int64;int64;dword);UnlockRegion hresult(int64;int64;dword);Stat hresult(ptr;dword);Clone hresult(ptr*);" ; Memory constants from MemoryDll.au3 by Ward. https://www.autoitscript.com/forum/topic/77463-embed-dlls-in-script-and-call-functions-from-memory-memorydll-udf/ Global Const $tagIMAGE_DOS_HEADER = 'WORD e_magic;WORD e_cblp;WORD e_cp;WORD e_crlc;WORD e_cparhdr;WORD e_minalloc;WORD e_maxalloc;WORD e_ss;WORD e_sp;WORD e_csum;WORD e_ip;WORD e_cs;WORD e_lfarlc;WORD e_ovno;WORD e_res[4];' & _ 'WORD e_oemid;WORD e_oeminfo;WORD e_res2[10];LONG e_lfanew;' Global Const $tagIMAGE_FILE_HEADER = 'WORD Machine;WORD NumberOfSections;DWORD TimeDateStamp;DWORD PointerToSymbolTable;DWORD NumberOfSymbols;WORD SizeOfOptionalHeader;WORD Characteristics;' Global $tagIMAGE_OPTIONAL_HEADER = 'WORD Magic;BYTE MajorLinkerVersion;BYTE MinorLinkerVersion;DWORD SizeOfCode;DWORD SizeOfInitializedData;DWORD SizeOfUninitializedData;DWORD AddressOfEntryPoint;DWORD BaseOfCode;DWORD BaseOfData;' & _ 'PTR ImageBase;DWORD SectionAlignment;DWORD FileAlignment;WORD MajorOperatingSystemVersion;WORD MinorOperatingSystemVersion;WORD MajorImageVersion;WORD MinorImageVersion;WORD MajorSubsystemVersion;WORD MinorSubsystemVersion;' & _ 'DWORD Win32VersionValue;DWORD SizeOfImage;DWORD SizeOfHeaders;DWORD CheckSum;WORD Subsystem;WORD DllCharacteristics;PTR SizeOfStackReserve;PTR SizeOfStackCommit;PTR SizeOfHeapReserve;PTR SizeOfHeapCommit;DWORD LoaderFlags;DWORD NumberOfRvaAndSizes;' Global Const $tagIMAGE_NT_HEADER = 'DWORD Signature;' & $tagIMAGE_FILE_HEADER & $tagIMAGE_OPTIONAL_HEADER Global Const $tagIMAGE_SECTION_HEADER = 'CHAR Name[8];DWORD VirtualSize;DWORD VirtualAddress;DWORD SizeOfRawData;DWORD PointerToRawData;DWORD PointerToRelocations;DWORD PointerToLinenumbers;WORD NumberOfRelocations;WORD NumberOfLinenumbers;' & _ 'DWORD Characteristics;' Global Const $tagIMAGE_DATA_DIRECTORY = 'DWORD VirtualAddress;DWORD Size;' Global Const $tagIMAGE_BASE_RELOCATION = 'DWORD VirtualAddress;DWORD SizeOfBlock;' Global Const $tagIMAGE_IMPORT_DESCRIPTOR = 'DWORD OriginalFirstThunk;DWORD TimeDateStamp;DWORD ForwarderChain;DWORD Name;DWORD FirstThunk;' Global Const $tagIMAGE_IMPORT_BY_NAME = 'WORD Hint;char Name[1];' Global Const $tagIMAGE_EXPORT_DIRECTORY = 'DWORD Characteristics;DWORD TimeDateStamp;WORD MajorVersion;WORD MinorVersion;DWORD Name;DWORD Base;DWORD NumberOfFunctions;DWORD NumberOfNames;DWORD AddressOfFunctions;DWORD AddressOfNames;' & _ 'DWORD AddressOfNameOrdinals;' Global $_KERNEL32DLL = DllOpen ( 'kernel32.dll' ) Global $_MFHookPtr, $_MFHookBak, $_MFHookApi = 'LocalCompact' Global Const $tagModule = 'PTR ExportList;PTR CodeBase;PTR ImportList;PTR DllEntry;DWORD Initialized;' Global $_BinaryCall_Msvcrtdll = DllOpen ( 'msvcrt.dll' ) ; Sid Constants used in SIDOpen from TitchySID Player. https://www.autoitscript.com/forum/topic/169098-chiptunes-players/ Global Const $SID_RESOURCE = 0 ; Load SID file from resources Global Const $SID_MEMORY = 1 ; Load SID file from memory Global Const $SID_DEFAULT = 1 ; Play default sub song, as found in the PSID header Global Const $SID_NON_DEFAULT = 2 ; Play specified sub song ; Internal variables. Global $hTitchysidDll, $bin, $oShockwaveFlash, $iPos, $iSizeData, $vVar, $hGui, $TransColor = 0xABCDEF Global $oError = ObjEvent ( 'AutoIt.Error', '_ErrFunc' ) AutoItWinSetTitle ( 'Fireworks.Swf.Example' ) If _ScriptIsAlreadyRunning() Then Exit _AutoItObject_Startup() $oShockwaveFlash = ObjCreate( 'ShockwaveFlash.ShockwaveFlash' ) If Not IsObj ( $oShockwaveFlash ) Then Exit -1 $hGui = GUICreate( '', @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, BitOR ( $WS_EX_LAYERED, $WS_EX_TOPMOST ), WinGetHandle ( AutoItWinGetTitle() ) ) ;~ GUISetBkColor( $TransColor ) GUICtrlCreateObj( $oShockwaveFlash, 0, 0, @DesktopWidth, @DesktopHeight ) ; choice : ;~ $vVar = FireworksTransSwf() ; Transparent Background $vVar = FireworksBlackswf() ; Black Background _FlashLoadMemory( $oShockwaveFlash, $vVar, $iSizeData, $iPos ) _WinAPI_SetLayeredWindowAttributes( $hGui, $TransColor, 255 ) GUISetState() $hTitchysidDll = _SIDStartup() If Not @error Then $bin = Beat_Popsid() ; 16_Beat_Pop.sid _SIDOpen ( $bin, $SID_RESOURCE ) EndIf While 1 Sleep ( 1000 ) WEnd Func _ErrFunc() ConsoleWrite ( 'COM Error, ScriptLine(' & $oError.scriptline & ') : Number 0x' & Hex ( $oError.number, 8 ) & ' - ' & $oError.windescription & @CRLF ) EndFunc ;==> _ErrFunc() Func _Exit() _SIDStop() _SIDClose() _SIDShutdown() $oShockwaveFlash = 0 GUIDelete( $hGui ) Exit EndFunc ;==> _Exit() Func _FlashLoadMemory($oShockwaveFlash, ByRef $vData, ByRef $iSizeData, ByRef $iPos) If Not IsObj($oShockwaveFlash) Then Return SetError(1, 0, False) Local $oFlashInterface = _AutoItObject_WrapperCreate(_AutoItObject_IDispatchToPtr($oShockwaveFlash), $dtagIUnknown) If Not IsObj($oFlashInterface) Then Return SetError(2, 0, False) Local $oFlashMemoryStream = _AutoItObject_ObjectFromDtag("_FlashMemoryStream_", $dtagIStream) Local $tIID_IPersistStreamInit = _AutoItObject_CLSIDFromString($sIID_IPersistStreamInit) Local $aCall = $oFlashInterface.QueryInterface(Number(DllStructGetPtr($tIID_IPersistStreamInit)), 0) Local $pPersistStreamInit = $aCall[2] Local $oPersistStreamInit = _AutoItObject_WrapperCreate($pPersistStreamInit, $dtagIPersistStreamInit) $oPersistStreamInit.InitNew() $iPos = 0 $iSizeData = BinaryLen($vData) $oPersistStreamInit.Load(Number($oFlashMemoryStream.__ptr__)) _AutoItObject_IUnknownAddRef($oShockwaveFlash) Return True EndFunc ;==>_FlashLoadMemory Func _FlashMemoryStream_Read($pSelf, $pBuffer, $iCb, $pRead) #forceref $pSelf If $iPos = 0 And $iCb = 4 Then DllStructSetData(DllStructCreate("char[4]", $pBuffer), 1, "fUfU") $iPos += 4 ElseIf $iPos = 4 And $iCb = 4 Then DllStructSetData(DllStructCreate("dword", $pBuffer), 1, $iSizeData) $iSizeData += 8 $iPos += 4 Else If $iPos + $iCb > $iSizeData Then $iCb = $iSizeData - $iPos If $iCb = 0 Then Return 1 DllStructSetData(DllStructCreate("byte[" & $iCb & "]", $pBuffer), 1, BinaryMid($vVar, 1 + $iPos - 8, $iCb)) If $pRead Then DllStructSetData(DllStructCreate("dword", $pRead), 1, $iCb) $iPos += $iCb EndIf Return 0 EndFunc ;==>_FlashMemoryStream_Read Func _FlashMemoryStream_Release($pSelf) #forceref $pSelf Return 0x80004001 EndFunc ;==>_FlashMemoryStream_Release Func _ScriptIsAlreadyRunning() Local $aWinList = WinList ( AutoItWinGetTitle() ) If Not @error Then Return UBound ( $aWinList ) -1 > 1 EndFunc ;==> _ScriptIsAlreadyRunning() Func _SIDClose() Local $aRet = MemoryDllCall ( $hTitchysidDll, 'int', 'SIDClose' ) If @error Then Return SetError ( @error, 0, 0 ) Return $aRet[0] EndFunc ;==> _SIDClose() Func _SIDOpen ( $Sid, $iSubsong=1 ) Local $bSid If Not IsBinary ( $Sid ) Then If Not FileExists ( $Sid ) Then Return SetError ( 2, 0, 0 ) Local $hFileOpen = FileOpen ( $Sid, 0 ) If $hFileOpen = -1 Then Return SetError ( -1, 0, 0 ) $bSid = FileRead ( $hFileOpen ) FileClose ( $hFileOpen ) Else $bSid = $Sid EndIf Local $tSid = DllStructCreate ( 'byte[' & BinaryLen ( $bSid ) & ']') DllStructSetData ( $tSid, 1, $bSid ) Local $iSubsongCount = Int ( StringTrimLeft ( BinaryMid ( $bSid, 15, 2 ), 2 ) ) $iSubsong = $iSubsong -1 ; based 0 If $iSubsong < 0 Then $iSubsong = 0 If $iSubsong > $iSubsongCount Then $iSubsong = 0 Local $aRet = MemoryDllCall ( $hTitchysidDll, 'int', 'SIDOpen', 'ptr', DllStructGetPtr ( $tSid ), 'int', DllStructGetSize ( $tSid ), 'int', $SID_MEMORY, 'int', $SID_NON_DEFAULT, 'int', $iSubsong ) If @error Then Return SetError ( @error, 0, 0 ) $tSid = 0 $bSid = 0 Return $aRet[0] ; Returns non-zero on success. EndFunc ;==> _SIDOpen() Func _SIDShutdown() MemoryDllClose ( $hTitchysidDll ) $hTitchysidDll = 0 EndFunc ;==> _SIDShutdown() Func _SIDStartup() Local $hOpen = MemoryDllOpen ( Titchysiddll() ) If $hOpen = -1 Then Return SetError ( 1, 0, 0 ) Return SetError ( 0, 0, $hOpen ) EndFunc ;==> _SIDStartup() Func _SIDStop() Local $aRet = MemoryDllCall ( $hTitchysidDll, 'int', 'SIDStop' ) If @error Then Return SetError ( @error, 0, 0 ) Return $aRet[0] EndFunc ;==> _SIDStop() Func API_FreeLibrary ( $Module ) Local $Ret = DllCall ( $_KERNEL32DLL, 'bool', 'FreeLibrary', 'handle', $Module ) If @Error Then Return SetError ( @Error, @Extended, 0 ) Return $Ret[0] EndFunc ;==> API_FreeLibrary() Func API_GetProcAddress ( $Module, $Procname ) Local $Ret If IsNumber ( $Procname ) Then $Ret = DllCall ( $_KERNEL32DLL, 'ptr', 'GetProcAddress', 'handle', $Module, 'int', $Procname ) Else $Ret = DllCall ( $_KERNEL32DLL, 'ptr', 'GetProcAddress', 'handle', $Module, 'str', $Procname ) EndIf If @Error Then Return SetError ( @Error, @Extended, 0 ) Return $Ret[0] EndFunc ;==> API_GetProcAddress() Func API_IsBadReadPtr ( $Ptr, $Len ) Local $Ret = DllCall ( $_KERNEL32DLL, 'int', 'IsBadReadPtr', 'ptr', $Ptr, 'UINT_PTR', $Len ) If @Error Then Return SetError ( @Error, @Extended, 0 ) Return $Ret[0] EndFunc ;==> API_IsBadReadPtr() Func API_LoadLibrary ( $Filename ) Local $Ret = DllCall ( $_KERNEL32DLL, 'handle', 'LoadLibraryW', 'wstr', $Filename ) If @Error Then Return SetError ( @Error, @Extended, 0 ) Return $Ret[0] EndFunc ;==> API_LoadLibrary() Func API_lstrlenA ( $Address ) Local $Ret = DllCall ( $_KERNEL32DLL, 'int', 'lstrlenA', 'ptr', $Address ) If @Error Then Return SetError ( @Error, @Extended, 0 ) Return $Ret[0] EndFunc ;==> API_lstrlenA() Func API_lstrlenW ( $Address ) Local $Ret = DllCall ( $_KERNEL32DLL, 'int', 'lstrlenW', 'ptr', $Address ) If @Error Then Return SetError ( @Error, @Extended, 0 ) Return $Ret[0] EndFunc ;==> API_lstrlenW() Func API_VirtualProtect ( $Address, $Size, $Protection ) Local $Ret = DllCall ( $_KERNEL32DLL, 'bool', 'VirtualProtect', 'ptr', $Address, 'dword_ptr', $Size, 'dword', $Protection, 'dword*', 0 ) If @Error Then Return SetError ( @Error, @Extended, 0 ) Return $Ret[0] EndFunc ;==> API_VirtualProtect() Func API_ZeroMemory ( $Address, $Size ) Local $Ret = DllCall ( $_KERNEL32DLL, 'none', 'RtlZeroMemory', 'ptr', $Address, 'dword_ptr', $Size ) If @Error Then Return SetError ( @Error, @Extended, 0 ) Return $Ret[0] EndFunc ;==> API_ZeroMemory() Func Beat_Popsid() ; Code Generated by BinaryToAu3Kompressor. Local $sFileBin = 'UFNJRAACAHwAABAAEAMAAQABAAAAADE2IEJlYXQgUG9wAA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fn5+fn5+fjAyNDA5OTUyMH5+fn5+fn5+fn5+fn5+fn9ohMk5PH5+yTk8fn7JNzl+yTs+fsk5PH5+fn7JNjl+fn7JNjl+fsk5PH7JNDd+fn5+fn6BNTc5foQ8fn48fn45fj5+PH5+fn45fn5+OX5+PH433wd+fn5+fn5/s9UIK3nSVhoaGxsbGxw=' $sFileBin = Binary ( __Au3Obj_Mem_Base64Decode ( $sFileBin ) ) Return SetError ( 0, 0, $sFileBin ) EndFunc ;==> Beat_Popsid() Func BinaryCall_Alloc ( $Code, $Padding = 0 ) Local $Length = BinaryLen ( $Code ) + $Padding Local $Ret = DllCall ( $_KERNEL32DLL, 'ptr', 'VirtualAlloc', 'ptr', 0, 'ulong_ptr', $Length, 'dword', 0x1000, 'dword', 0x40 ) If @Error Or Not $Ret[0] Then Return SetError ( 1, @Error, 0 ) If BinaryLen ( $Code ) Then Local $Buffer = DllStructCreate ( 'byte[' & $Length & ']', $Ret[0] ) DllStructSetData ( $Buffer, 1, $Code ) EndIf Return $Ret[0] EndFunc ;==> BinaryCall_Alloc() Func BinaryCall_Base64Decode ( $Src ) Static $CodeBase If Not $CodeBase Then $CodeBase = BinaryCall_Create ( '0x55B9FF00000089E531C05756E8F10000005381EC0C0100008B55088DBDF5FEFFFFF3A4E9C00000003B45140F8FC20000000FB65C0A028A9C1DF5FEFFFF889DF3FEFFFF0FB65C0A038A9C1DF5FEFFFF889DF2FEFFFF0FB65C0A018985E8FEFFFF0FB69C1DF5FEFFFF899DECFEFFFF0FB63C0A89DE83E630C1FE040FB6BC3DF5FEFFFFC1E70209FE8B7D1089F3881C074080BDF3FEFFFF63745C0FB6B5F3FEFFFF8BBDECFEFFFF8B9DE8FEFFFF89F083E03CC1E704C1F80209F88B7D1088441F0189D883C00280BDF2FEFFFF6374278A85F2FEFFFFC1E60683C10483E03F09F088441F0289D883C0033B4D0C0F8C37FFFFFFEB0231C081C40C0100005B5E5F5DC35EC3E8F9FFFFFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000003E0000003F3435363738393A3B3C3D00000063000000000102030405060708090A0B0C0D0E0F101112131415161718190000000000001A1B1C1D1E1F202122232425262728292A2B2C2D2E2F30313233', '', 132, True, False ) If Not $CodeBase Then Return SetError ( 1, 0, Binary ( '' ) ) EndIf $Src = String ( $Src ) Local $SrcLen = StringLen ( $Src ) Local $SrcBuf = DllStructCreate ( 'char[' & $SrcLen & ']' ) DllStructSetData ( $SrcBuf, 1, $Src ) Local $DstLen = Int ( ( $SrcLen + 2 ) / 4 ) * 3 + 1 Local $DstBuf = DllStructCreate ( 'byte[' & $DstLen & ']' ) Local $Ret = DllCallAddress ( 'uint:cdecl', $CodeBase, 'ptr', DllStructGetPtr ( $SrcBuf ), 'uint', $SrcLen, 'ptr', DllStructGetPtr ( $DstBuf ), 'uint', $DstLen ) If $Ret[0] = 0 Then Return SetError ( 2, 0, Binary ( '' ) ) Return BinaryMid ( DllStructGetData ( $DstBuf, 1 ), 1, $Ret[0] ) EndFunc ;==> BinaryCall_Base64Decode() Func BinaryCall_CodePrepare ( $Code ) If Not $Code Then Return '' If IsBinary ( $Code ) Then Return $Code $Code = String ( $Code ) If StringLeft ( $Code, 2 ) = '0x' Then Return Binary ( $Code ) If StringIsXDigit ( $Code ) Then Return Binary ( '0x' & $Code ) Return BinaryCall_LzmaDecompress ( BinaryCall_Base64Decode ( $Code ) ) EndFunc ;==> BinaryCall_CodePrepare() Func BinaryCall_Create ( $Code, $Reloc = '', $Padding = 0, $ReleaseOnExit = True, $LibraryImport = True ) Local $BinaryCode = BinaryCall_CodePrepare ( $Code ) If Not $BinaryCode Then Return SetError ( 1, BinaryCall_LastError ( 'Invalid code' ), 0 ) Local $BinaryCodeLen = BinaryLen ( $BinaryCode ) Local $TotalCodeLen = $BinaryCodeLen + $Padding Local $CodeBase = BinaryCall_Alloc ( $BinaryCode, $Padding ) If Not $CodeBase Then Return SetError ( 2, BinaryCall_LastError ( 'Unable to allocate memory block' ), 0 ) If $Reloc Then $Reloc = BinaryCall_CodePrepare ( $Reloc ) If Not $Reloc Then Return SetError ( 3, BinaryCall_LastError ( 'Invalid relocation table' ), 0 ) BinaryCall_Relocation ( $CodeBase, $Reloc ) EndIf If $LibraryImport Then If Not BinaryCall_ImportLibrary ( $CodeBase, $BinaryCodeLen ) Then BinaryCall_Free ( $CodeBase ) Return SetError ( 4, 0, 0 ) EndIf EndIf If $ReleaseOnExit Then BinaryCall_ReleaseOnExit ( $CodeBase ) EndIf Return SetError ( 0, $TotalCodeLen, $CodeBase ) EndFunc ;==> BinaryCall_Create() Func BinaryCall_DoRelease() BinaryCall_ReleaseOnExit_Handle() EndFunc ;==> BinaryCall_DoRelease() Func BinaryCall_Free ( $Ptr ) Local $Ret = DllCall ( $_KERNEL32DLL, 'bool', 'VirtualFree', 'ptr', $Ptr, 'ulong_ptr', 0, 'dword', 0x8000 ) If @Error Or $Ret[0] = 0 Then $Ret = DllCall ( $_KERNEL32DLL, 'bool', 'GlobalFree', 'ptr', $Ptr ) If @Error Or $Ret[0] <> 0 Then Return SetError ( 1, @Error, False ) EndIf Return True EndFunc ;==> BinaryCall_Free() Func BinaryCall_GetProcAddress ( $Module, $Proc ) Local $Ret = DllCall ( $_KERNEL32DLL, 'ptr', 'GetProcAddress', 'ptr', $Module, 'str', $Proc ) If @Error Or Not $Ret[0] Then Return SetError ( 1, @Error, 0 ) Return $Ret[0] EndFunc ;==> BinaryCall_GetProcAddress() Func BinaryCall_ImportLibrary ( $Base, $Length ) ;~ Static $HasMemoryDll = IsFunc(Execute ( '__MemoryModule_RuntimeLoader' ) ) Local $JmpBin, $JmpOff, $JmpLen, $DllName, $ProcName $JmpBin = Binary ( '0xB8FFFFFFFFFFE0' ) $JmpOff = 1 $JmpLen = BinaryLen ( $JmpBin ) Local $Ptr, $StringPtr, $StringLen, $String, $Split, $Proc, $Diff, $Handle Do $Ptr = BinaryCall_MemorySearch ( $Base, $Length, $JmpBin ) If $Ptr = 0 Then ExitLoop $StringPtr = $Ptr + $JmpLen $StringLen = BinaryCall_lstrlenA ( $StringPtr ) If Not $StringLen Then Return SetError ( 3, BinaryCall_LastError ( 'Invalid import table' ), False ) $String = DllStructGetData ( DllStructCreate ( 'char[' & $StringLen & ']', $StringPtr ), 1 ) $Split = StringSplit ( $String, '|' ) If $Split[0] = 1 Then $ProcName = $Split[1] ElseIf $Split[0] = 2 Then If $Split[1] Then $DllName = $Split[1] $ProcName = $Split[2] EndIf If $DllName And $ProcName Then $Proc = 0 $Handle = BinaryCall_LoadLibrary ( $DllName ) If Not $Handle Then Return SetError ( 1, BinaryCall_LastError ( 'LoadLibrary fail on ' & $DllName ), False ) $Proc = BinaryCall_GetProcAddress ( $Handle, $ProcName ) If Not $Proc Then Return SetError ( 2, BinaryCall_LastError ( 'GetProcAddress failed on ' & $ProcName ), False ) DllStructSetData(DllStructCreate ( 'ptr', $Ptr + $JmpOff ), 1, $Proc ) EndIf $Diff = Int ( $Ptr - $Base + $JmpLen + $StringLen + 1 ) $Base += $Diff $Length -= $Diff Until $Length <= $JmpLen Return True EndFunc ;==> BinaryCall_ImportLibrary() Func BinaryCall_IsBadReadPtr ( $Ptr, $Length ) Local $Ret = DllCall ( $_KERNEL32DLL, 'int', 'IsBadReadPtr', 'ptr', $Ptr, 'uint_ptr', $Length ) If @Error Then Return SetError ( 1, @Error, 0 ) Return $Ret[0] EndFunc ;==> BinaryCall_IsBadReadPtr() Func BinaryCall_LastError ( $Error = Default ) Static $LastError If IsKeyword ( $Error ) Then Return $LastError $LastError = $Error EndFunc ;==> BinaryCall_LastError() Func BinaryCall_LoadLibrary ( $Filename ) Local $Ret = DllCall ( $_KERNEL32DLL, 'handle', 'LoadLibraryW', 'wstr', $Filename ) If @Error Then Return SetError ( 1, @Error, 0 ) Return $Ret[0] EndFunc ;==> BinaryCall_LoadLibrary() Func BinaryCall_lstrlenA ( $Ptr ) Local $Ret = DllCall ( $_KERNEL32DLL, 'int', 'lstrlenA', 'ptr', $Ptr ) If @Error Then Return SetError ( 1, @Error, 0 ) Return $Ret[0] EndFunc ;==> BinaryCall_lstrlenA() Func BinaryCall_LzmaDecompress ( $Src ) Static $CodeBase If Not $CodeBase Then $CodeBase = BinaryCall_Create ( BinaryCall_Base64Decode ( 'VYnlVzH/VlOD7EyLXQiKC4D54A+HxQAAADHA6wWD6S2I0ID5LI1QAXfziEXmMcDrBYPpCYjQgPkIjVABd/OIReWLRRSITeSLUwkPtsmLcwWJEA+2ReUBwbgAAwAA0+CNhABwDgAAiQQk6EcEAACJNCSJRdToPAQAAItV1InHi0Xkhf+JArgBAAAAdDaF9nQyi0UQg8MNiRQkiXQkFIl8JBCJRCQYjUXgiUQkDItFDIlcJASD6A2JRCQI6CkAAACLVdSJRdSJFCToAQQAAItF1IXAdAqJPCQx/+jwAwAAg8RMifhbXl9dw1dWU1WJ5YtFJAFFKFD8i3UYAXUcVot1FK2SUopO/oPI/9Pg99BQiPGDyP/T4PfQUADRifeD7AwpwEBQUFBQUFcp9laDy/+4AAMAANPgjYg2BwAAuAAEAATR6fOragVZ6MoCAADi+Yt9/ItF8Ct9JCH4iUXosADoywIAAA+FhQAAAIpN9CN97NPngOkI9tnT7lgB916NPH/B5wg8B1qNjH5sDgAAUVa+AAEAAFCwAXI0i338K33cD7Y/i23M0eeJ8SH+AfGNbE0A6JgCAACJwcHuCIPhATnOvgABAAB1DjnwctfrDIttzOh5AgAAOfBy9FqD+gSJ0XIJg/oKsQNyArEGKcpS60mwwOhJAgAAdRRYX1pZWln/NCRRUrpkBgAAsQDrb7DM6CwCAAB1LLDw6BMCAAB1U1g8B7AJcgKwC1CLdfwrddw7dSQPgs8BAACsi338qumOAQAAsNjo9wEAAIt12HQbsOTo6wEAAIt11HQJi3XQi03UiU3Qi03YiU3Ui03ciU3YiXXcWF9ZumgKAACxCAH6Ulc8B4jIcgIEA1CLbczovAEAAHUUi0Xoi33MweADKclqCF6NfEcE6zWLbcyDxQLomwEAAHUYi0Xoi33MweADaghZaghejbxHBAEAAOsQvwQCAAADfcxqEFm+AAEAAIlN5CnAQIn96GYBAACJwSnxcvMBTeSDfcQED4OwAAAAg0XEB4tN5IP5BHIDagNZi33IweEGKcBAakBejbxPYAMAAIn96CoBAACJwSnxcvOJTeiJTdyD+QRyc4nOg2XcAdHug03cAk6D+Q5zGbivAgAAKciJ8dJl3ANF3NHgA0XIiUXM6y2D7gToowAAANHr0WXcOV3gcgb/RdwpXeBOdei4RAYAAANFyIlFzMFl3ARqBF4p/0eJ+IttzOi0AAAAqAF0Awl93NHnTnXs6wD/RdyLTeSDwQKLffyJ+CtFJDlF3HdIif4rddyLVSisqjnXcwNJdfeJffwPtvA7fSgPgnH9///oKAAAACnAjWwkPItVIIt1+Ct1GIkyi1Usi338K30kiTrJW15fw15YKcBA69qB+wAAAAFyAcPB4whWi3X4O3Ucc+SLReDB4AisiUXgiXX4XsOLTcQPtsDB4QQDRegByOsGD7bAA0XEi23IjWxFACnAjWxFAIH7AAAAAXMci0wkOMFkJCAIO0wkXHOcihH/RCQ4weMIiFQkIInZD7dVAMHpCw+vyjlMJCBzF4nLuQAIAAAp0cHpBWYBTQABwI1sJEDDweoFKUwkICnLZilVAAHAg8ABjWwkQMO4///////gbXN2Y3J0LmRsbHxtYWxsb2MAuP//////4GZyZWUA' ) ) If Not $CodeBase Then Return SetError ( 1, 0, Binary ( '' ) ) EndIf $Src = Binary ( $Src ) Local $SrcLen = BinaryLen ( $Src ) Local $SrcBuf = DllStructCreate ( 'byte[' & $SrcLen & ']' ) DllStructSetData ( $SrcBuf, 1, $Src ) Local $Ret = DllCallAddress ( 'ptr:cdecl', $CodeBase, 'ptr', DllStructGetPtr ( $SrcBuf ), 'uint_ptr', $SrcLen, 'uint_ptr*', 0, 'uint*', 0 ) If $Ret[0] Then Local $DstBuf = DllStructCreate ( 'byte[' & $Ret[3] & ']', $Ret[0] ) Local $Output = DllStructGetData ( $DstBuf, 1 ) DllCall ( $_BinaryCall_Msvcrtdll, 'none:cdecl', 'free', 'ptr', $Ret[0] ) Return $Output EndIf Return SetError(2, 0, Binary ( '' ) ) EndFunc ;==> BinaryCall_LzmaDecompress() Func BinaryCall_MemorySearch ( $Ptr, $Length, $Binary ) Static $CodeBase If Not $CodeBase Then $CodeBase = BinaryCall_Create ( '0x5589E58B4D14578B4508568B550C538B7D1085C9742139CA721B29CA8D341031D2EB054239CA740F8A1C17381C1074F34039F076EA31C05B5E5F5DC3', '', 0, True, False ) If Not $CodeBase Then Return SetError ( 1, 0, 0 ) EndIf $Binary = Binary ( $Binary ) Local $Buffer = DllStructCreate ( 'byte[' & BinaryLen ( $Binary ) & ']' ) DllStructSetData ( $Buffer, 1, $Binary ) Return DllCallAddress ( 'ptr:cdecl', $CodeBase, 'ptr', $Ptr, 'uint', $Length, 'ptr', DllStructGetPtr ( $Buffer ), 'uint', DllStructGetSize ( $Buffer ) )[0] EndFunc ;==> BinaryCall_MemorySearch() Func BinaryCall_RegionSize ( $Ptr ) Local $Buffer = DllStructCreate ( 'ptr;ptr;dword;uint_ptr;dword;dword;dword' ) Local $Ret = DllCall ( $_KERNEL32DLL, 'int', 'VirtualQuery', 'ptr', $Ptr, 'ptr', DllStructGetPtr ( $Buffer ), 'uint_ptr', DllStructGetSize ( $Buffer ) ) If @Error Or $Ret[0] = 0 Then Return SetError ( 1, @Error, 0 ) Return DllStructGetData ( $Buffer, 4 ) EndFunc ;==> BinaryCall_RegionSize() Func BinaryCall_ReleaseOnExit ( $Ptr ) OnAutoItExitRegister ( 'BinaryCall_DoRelease' ) BinaryCall_ReleaseOnExit_Handle ( $Ptr ) EndFunc ;==> BinaryCall_ReleaseOnExit() Func BinaryCall_ReleaseOnExit_Handle ( $Ptr = Default ) Static $PtrList If @NumParams = 0 Then If IsArray ( $PtrList ) Then For $i = 1 To $PtrList[0] BinaryCall_Free ( $PtrList[$i] ) Next EndIf Else If Not IsArray($PtrList) Then Local $InitArray[1] = [0] $PtrList = $InitArray EndIf If IsPtr($Ptr) Then Local $Array = $PtrList Local $Size = UBound ( $Array ) ReDim $Array[$Size + 1] $Array[$Size] = $Ptr $Array[0] += 1 $PtrList = $Array EndIf EndIf EndFunc ;==> BinaryCall_ReleaseOnExit_Handle() Func BinaryCall_Relocation ( $Base, $Reloc ) Local $Size = Int ( BinaryMid ( $Reloc, 1, 2 ) ) Local $Offset, $Ptr For $i = 3 To BinaryLen ( $Reloc ) Step $Size $Offset = Int(BinaryMid ( $Reloc, $i, $Size ) ) $Ptr = $Base + $Offset DllStructSetData ( DllStructCreate ( 'ptr', $Ptr ), 1, DllStructGetData ( DllStructCreate ( 'ptr', $Ptr ), 1 ) + $Base ) Next EndFunc ;==> BinaryCall_Relocation() Func BinaryCall_SymbolFind ( $CodeBase, $Identify, $Length, $BeforeJump = False ) Local $Ptr $Identify = Binary ( $Identify ) If BinaryCall_IsBadReadPtr ( $CodeBase, $Length ) Then Return SetError ( 2, 0, 0 ) If $BeforeJump Then $Ptr = BinaryCall_MemorySearch ( $CodeBase, $Length, $Identify & Binary ( '0xE9' ) ) If $Ptr Then Return $Ptr + BinaryLen ( $Identify ) $Ptr = BinaryCall_MemorySearch ( $CodeBase, $Length, $Identify & Binary ( '0xEB' ) ) If $Ptr Then Return $Ptr + BinaryLen ( $Identify ) Else $Ptr = BinaryCall_MemorySearch ( $CodeBase, $Length, $Identify ) If $Ptr Then Return $Ptr + BinaryLen ( $Identify ) EndIf Return SetError ( 1, 0, 0 ) EndFunc ;==> BinaryCall_SymbolFind() Func BinaryCall_SymbolList ( $CodeBase, $Symbol ) If UBound ( $Symbol, 0 ) <> 1 Then Return SetError ( 1, BinaryCall_LastError ( 'Invalid symbol array' ), 0 ) Local $Tag = '' For $i = 0 To UBound ( $Symbol ) - 1 $Tag &= 'ptr ' & $Symbol[$i] & ';' Next Local $SymbolList = DllStructCreate ( $Tag ) If @Error Then Return SetError(1, BinaryCall_LastError ( 'Invalid symbol' ), 0 ) Local $Length = BinaryCall_RegionSize ( $CodeBase ) If @Error Or Not $Length Then Return SetError ( 1, BinaryCall_LastError ( 'Invalid codebase' ), 0 ) Local $Locate For $i = 0 To UBound ( $Symbol ) - 1 $Locate = BinaryCall_SymbolFind ( $CodeBase, $Symbol[$i], $Length, True ) If @Error Then Return SetError(1, BinaryCall_LastError ( "Unable to find symbol: '" & $Symbol[$i] & "'" ), 0 ) DllStructSetData ( $SymbolList, $Symbol[$i], $Locate ) $Length -= $Locate - $CodeBase $CodeBase = $Locate Next Return $SymbolList EndFunc ;==> BinaryCall_SymbolList() Func FireworksBlackswf() Local $sFileBin = 'RldTBewXAAB4AAVfAAAPoAAAHgEAQwIAAAA/A1gAAACIDQACAGkAYW5pX2NsaXAAlgcACAAHAQAAAB2WAgAIAByWBQAHHgAAAEgSnQIAJwCWBgAIAQgBCAAcR5YHAAcAQAAACAAcRySWBAAIAAgAHFAdmQIAxP8APwhtAAAAAQBU/Cr8QPAFAP////8AZmZm/xCt1w7CbSAQAgAAAAD///////8QrdcOwm0gEAIA////////////EK3XDsJtIBACAP///wD//////wAwFNtfc857Wwk2ygxnbPPNvGoPk2rYDtmv3itfxZ2tAL8AMAAAAAIAPUWVFgABAGZmZgAQFM/DkNNASkASzNkzNuAkuAzzkzzAukAuNzkNzSAkSANNAP8J8QQAAAMAPACRBg4BAAEAAOjXNc10ACkKQAAAQACQBg0BAA6cAOWa2Gw+hQKAAABAAJAGDQEAEJoA5YTZbL1E4nAAAEAAkAYNAQAQ5gDlcNptO8TCYAAAQACRBg0BABKZAADlXNttukSiUAAAQACRBg0BABK+AADlSNttuQSiUAAAQACRBg0BABLjAADlNNxuN4SCQAAAQACRBg0BABSEAADlIN1utkRiMAAAQACRBg0BABSWgADlDt5vNMRCIAAAQACRBg0BABSogADk+t9vs4QiEAAAQACRBg0BABS6gADk5uBwMkQCAAAAQACRBg0BABTMAADk1OFwsMPh8AAAQACRBg0BABTeAADkwOFwr4Ph8AAAQACRBg0BABTvAADkruJxLkPB4AAAQACRBg0BABaAQADknONxrQOh0AAAQACRBg0BABaJAADkiORyK8OBwAAAQACRBg0BABaRgADkduVyqoNhsAAAQACRBg0BABaZwADkZOVyqUNhsAAAQACRBg0BABaiQADkUuZzKANBoAAAQACRBg0BABaqgADkQOdzpsMhkAAAQACRBg0BABaywADkMOh0JYMBgAAAQACRBg0BABa6wADkHuh0JEMBgAAAQACRBg0BABbDAADkDOl0owLhcAAAQACRBg0BABbLAADn/Op1IgLBYAAAQACRBg0BABbSwADn6ut1oMKhUAAAQACRBg0BABbawADn2ut1n4KhUAAAQACRBg0BABbigADnyux2HoKBQAAAQACRBg0BABbqAADnuO12nUJhMAAAQACRBg0BABbxwADnqO53HEJBIAAAQACRBg0BABb5QADnmO53GwJBIAAAQACRBg0BABiAYADniO93mgIhEAAAQACRBg0BABiEAADnePB4GMIBAAAAQACRBg0BABiHwADnaPB4F8IBAAAAQACRBg0BABiLYADnWvF4lsHg8AAAQACRBg0BABiO4ADnSvJ5FYHA4AAAQACRBg0BABiSYADnPPJ5FIHA4AAAQACRBg0BABiWAADnLPN5k4Gg0AAAQACRBg0BABiZYADnHvR6EoGAwAAAQACRBg0BABic4ADnDvR6EYGAwAAAQACRBg0BABigQADnAPV6kIFgsAAAQACRBg0BABijgADm8vV6j4FgsAAAQACRBg0BABim4ADm5PZ7DoFAoAAAQACRBg0BABiqIADm1vd7jYEgkAAAQACRBg0BABitYADmyPd7jIEgkAAAQACRBg0BABiwoADmuvh8C8EAgAAAQACRBg0BABizwADmrPh8CsEAgAAAQACRBg0BABi24ADmoPl8icDgcAAAQACRBg0BABi6AADmkvp9CMDAYAAAQACRBg0BABi9AADmhPp9CADAYAAAQACRBg0BABjAAADmePt9hwCgUAAAQACRBg0BABjDAADmbPt9hkCgUAAAQACRBg0BABjF4ADmXvx+BUCAQAAAQACRBg0BABjIwADmUvx+BICAQAAAQACRBg0BABjLoADmRv1+g4BgMAAAQACRBg0BABjOgADmOv1+gsBgMAAAQACRBg0BABjRQADmLv5/AgBAIAAAQACRBg0BABjUAADmIv9/gQAgEAAAQACRBg0BABjWwADmFv9/gEAgEAAAQACNBg0BABjZ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AAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAD8DBwAAAIECAAAABgBAAAIHAQD/CgMAAABsNQCWBh4BAAkAGOqn7OgAAAAEAPs+wPAA4wBAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAD8DBwAAAIECAAAABgBAAAIHAQD/CgMAAABsNgCXBh4BAAkAG2AN/YDoMwzDNAAAL0JgAAkBQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAA/AwcAAACBAgAAAAYAQAAAAL8GEwAAACYBAAoAHKvh9ABhbmlfY2xpcAC/AB0AAAALAFAAuQALkAEAAAAA' $sFileBin &= 'ABAVS5Ll4KO4aO4Fy4VyAL8IUAAAAAwAAAoADwsAAQAABAAAAAgAgzsAaHR0cDovL3d3dy5hbWFyYXNvZnR3YXJlLmNvbS9mbGFzaC1pbnRyb3MtYW5kLWJhbm5lcnMuaHRtAAAAkAYOAwAMALW6zdYAaQBAEAAAQAAAAA==' $sFileBin = Binary ( __Au3Obj_Mem_Base64Decode ( $sFileBin ) ) Return SetError ( 0, 0, $sFileBin ) EndFunc ;==> FireworksBlackswf() Func FireworksTransSwf() Local $sFileBin = 'RldTBewXAAB4AAVfAAAPoAAAHgEAQwKrze8/A1gAAACIDQACAGkAYW5pX2NsaXAAlgcACAAHAQAAAB2WAgAIAByWBQAHHgAAAEgSnQIAJwCWBgAIAQgBCAAcR5YHAAcAQAAACAAcRySWBAAIAAgAHFAdmQIAxP8APwhtAAAAAQBU/Cr8QPAFAP////8AZmZm/xCt1w7CbSAQAgAAAAD///////8QrdcOwm0gEAIA////////////EK3XDsJtIBACAP///wD//////wAwFNtfc857Wwk2ygxnbPPNvGoPk2rYDtmv3itfxZ2tAL8AMAAAAAIAPUWVFgABAGZmZgAQFM/DkNNASkASzNkzNuAkuAzzkzzAukAuNzkNzSAkSANNAP8J8QQAAAMAPACRBg4BAAEAAOjXNc10ACkKQAAAQACQBg0BAA6cAOWa2Gw+hQKAAABAAJAGDQEAEJoA5YTZbL1E4nAAAEAAkAYNAQAQ5gDlcNptO8TCYAAAQACRBg0BABKZAADlXNttukSiUAAAQACRBg0BABK+AADlSNttuQSiUAAAQACRBg0BABLjAADlNNxuN4SCQAAAQACRBg0BABSEAADlIN1utkRiMAAAQACRBg0BABSWgADlDt5vNMRCIAAAQACRBg0BABSogADk+t9vs4QiEAAAQACRBg0BABS6gADk5uBwMkQCAAAAQACRBg0BABTMAADk1OFwsMPh8AAAQACRBg0BABTeAADkwOFwr4Ph8AAAQACRBg0BABTvAADkruJxLkPB4AAAQACRBg0BABaAQADknONxrQOh0AAAQACRBg0BABaJAADkiORyK8OBwAAAQACRBg0BABaRgADkduVyqoNhsAAAQACRBg0BABaZwADkZOVyqUNhsAAAQACRBg0BABaiQADkUuZzKANBoAAAQACRBg0BABaqgADkQOdzpsMhkAAAQACRBg0BABaywADkMOh0JYMBgAAAQACRBg0BABa6wADkHuh0JEMBgAAAQACRBg0BABbDAADkDOl0owLhcAAAQACRBg0BABbLAADn/Op1IgLBYAAAQACRBg0BABbSwADn6ut1oMKhUAAAQACRBg0BABbawADn2ut1n4KhUAAAQACRBg0BABbigADnyux2HoKBQAAAQACRBg0BABbqAADnuO12nUJhMAAAQACRBg0BABbxwADnqO53HEJBIAAAQACRBg0BABb5QADnmO53GwJBIAAAQACRBg0BABiAYADniO93mgIhEAAAQACRBg0BABiEAADnePB4GMIBAAAAQACRBg0BABiHwADnaPB4F8IBAAAAQACRBg0BABiLYADnWvF4lsHg8AAAQACRBg0BABiO4ADnSvJ5FYHA4AAAQACRBg0BABiSYADnPPJ5FIHA4AAAQACRBg0BABiWAADnLPN5k4Gg0AAAQACRBg0BABiZYADnHvR6EoGAwAAAQACR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IECAAAABgBAAAIHAQD/CgMAAABsMQCLBhYBAAcAFjptEDwAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAD8DBwAAAIECAAAABgBAAAIHAQD/CgMAAABsMgCLBhYBAAcAFZDcoGkAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAD8DBwAAAIECAAAABgBAAAIHAQD/CgMAAABsMwCWBh4BAAkAGE+0QugAAAAEAOwACaAAlgBAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAA/AwcAAACBAgAAAAYAQAD/CgMAAABsNABAAAIHAQCLBhYBAAkAGaWqcrYAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAD8DBwAAAIECAAAABgBAAAIHAQD/CgMAAABsNQCWBh4BAAkAGOqn7OgAAAAEAPs+wPAA4wBAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAD8DBwAAAIECAAAABgBAAAIHAQD/CgMAAABsNgCXBh4BAAkAG2AN/YDoMwzDNAAAL0JgAAkBQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAA/AwcAAACBAgAAAAYAQAAAAL8GEwAAACYBAAoAHKvh9ABhbmlfY2xpcAC/AB0AAAALAFAAuQALkAEAAAAA' $sFileBin &= 'ABAVS5Ll4KO4aO4Fy4VyAL8IUAAAAAwAAAoADwsAAQAABAAAAAgAgzsAaHR0cDovL3d3dy5hbWFyYXNvZnR3YXJlLmNvbS9mbGFzaC1pbnRyb3MtYW5kLWJhbm5lcnMuaHRtAAAAkAYOAwAMALW6zdYAaQBAEAAAQAAAAA==' $sFileBin = Binary ( __Au3Obj_Mem_Base64Decode ( $sFileBin ) ) Return SetError ( 0, 0, $sFileBin ) EndFunc ;==> FireworksTransSwf() Func LzntDecompress ( $bBinary ); by trancexx $bBinary = Binary ( $bBinary ) Local $tInput = DllStructCreate ( 'byte[' & BinaryLen ( $bBinary ) & ']' ) DllStructSetData ( $tInput, 1, $bBinary ) Local $tBuffer = DllStructCreate ( 'byte[' & 16*DllStructGetSize ( $tInput ) & ']' ) Local $a_Call = DllCall ( 'ntdll.dll', 'int', 'RtlDecompressBuffer', 'ushort', 2, 'ptr', DllStructGetPtr ( $tBuffer ), 'dword', DllStructGetSize ( $tBuffer ), 'ptr', DllStructGetPtr ( $tInput ), 'dword', DllStructGetSize ( $tInput ), 'dword*', 0 ) If @error Or $a_Call[0] Then Return SetError ( 1, 0, '' ) Local $tOutput = DllStructCreate ( 'byte[' & $a_Call[6] & ']', DllStructGetPtr ( $tBuffer ) ) Return SetError ( 0, 0, DllStructGetData ( $tOutput, 1 ) ) EndFunc ;==> LzntDecompress() Func MemLib_BuildImportTable ( $CodeBase, $PEHeader ) Local Const $IMAGE_DIRECTORY_ENTRY_IMPORT = 1 Local Const $SizeOfPtr = DllStructGetSize ( DllStructCreate ( 'ptr', 1 ) ) Local $IMAGE_NT_HEADER = DllStructCreate ( $tagIMAGE_NT_HEADER, $PEHeader ) Local $SizeOfDataDirectory = DllStructGetSize ( DllStructCreate ( $tagIMAGE_DATA_DIRECTORY ) ) Local $ImportDirectoryPtr = $PEHeader + DllStructGetSize ( $IMAGE_NT_HEADER ) + $IMAGE_DIRECTORY_ENTRY_IMPORT * $SizeOfDataDirectory Local $ImportDirectory = DllStructCreate ( $tagIMAGE_DATA_DIRECTORY, $ImportDirectoryPtr ) Local $ImportSize = DllStructGetData ( $ImportDirectory, 'Size' ) Local $ImportVirtualAddress = DllStructGetData ( $ImportDirectory, 'VirtualAddress' ) Local $SizeOfImportDir = DllStructGetSize ( DllStructCreate ( $tagIMAGE_IMPORT_DESCRIPTOR ) ) Local $ImportList = '' If $ImportSize > 0 Then Local $ImportDescPtr = $CodeBase + $ImportVirtualAddress Local $ImportDesc, $NameOffset, $Name, $OriginalFirstThunk, $FirstThunk, $Handle, $FuncRef, $ThunkRef, $Ref, $IMAGE_IMPORT_BY_NAME, $NamePtr, $FuncName, $Ptr While 1 If API_IsBadReadPtr ( $ImportDescPtr, $SizeOfImportDir ) Then ExitLoop $ImportDesc = DllStructCreate ( $tagIMAGE_IMPORT_DESCRIPTOR, $ImportDescPtr ) $NameOffset = DllStructGetData ( $ImportDesc, 'Name' ) If $NameOffset = 0 Then ExitLoop $Name = Peek ( 'str', $CodeBase + $NameOffset ) $OriginalFirstThunk = DllStructGetData ( $ImportDesc, 'OriginalFirstThunk' ) $FirstThunk = DllStructGetData ( $ImportDesc, 'FirstThunk' ) $Handle = API_LoadLibrary ( $Name ) If $Handle Then $ImportList &= $Handle & ',' $FuncRef = $CodeBase + $FirstThunk $ThunkRef = $CodeBase + $OriginalFirstThunk If $OriginalFirstThunk = 0 Then $ThunkRef = $FuncRef While 1 $Ref = Peek ( 'ptr', $ThunkRef ) If $Ref = 0 Then ExitLoop If BitAND ( Peek ( 'byte', $ThunkRef + $SizeOfPtr - 1 ), 0x80 ) Then $Ptr = API_GetProcAddress ( $Handle, BitAND ( $Ref, 0xffff ) ) Else $IMAGE_IMPORT_BY_NAME = DllStructCreate ( $tagIMAGE_IMPORT_BY_NAME, $CodeBase + $Ref ) $NamePtr = DllStructGetPtr ( $IMAGE_IMPORT_BY_NAME, 2 ) $FuncName = Peek ( 'str', $NamePtr ) $Ptr = API_GetProcAddress ( $Handle, $FuncName ) EndIf If $Ptr = 0 Then Return SetError ( 1, 0, False ) Poke ( 'ptr', $FuncRef, $Ptr ) $ThunkRef += $SizeOfPtr $FuncRef += $SizeOfPtr WEnd Else Return SetError ( 1, 0, False ) EndIf $ImportDescPtr += $SizeOfImportDir WEnd EndIf Return $ImportList EndFunc ;==> MemLib_BuildImportTable() Func MemLib_CopySections ( $CodeBase, $PEHeader, $DllDataPtr ) Local $IMAGE_NT_HEADER = DllStructCreate ( $tagIMAGE_NT_HEADER, $PEHeader ) Local $SizeOfFileHeader = DllStructGetPtr ( $IMAGE_NT_HEADER, 'Magic' ) - $PEHeader Local $SizeOfOptionalHeader = DllStructGetData ( $IMAGE_NT_HEADER, 'SizeOfOptionalHeader' ) Local $NumberOfSections = DllStructGetData ( $IMAGE_NT_HEADER, 'NumberOfSections' ) Local $SectionAlignment = DllStructGetData ( $IMAGE_NT_HEADER, 'SectionAlignment' ) Local $SectionPtr = $PEHeader + $SizeOfFileHeader + $SizeOfOptionalHeader Local $Section, $VirtualAddress, $SizeOfRawData, $PointerToRawData, $Dest For $i = 1 To $NumberOfSections $Section = DllStructCreate ( $tagIMAGE_SECTION_HEADER, $SectionPtr ) $VirtualAddress = DllStructGetData ( $Section, 'VirtualAddress' ) $SizeOfRawData = DllStructGetData ( $Section, 'SizeOfRawData' ) $PointerToRawData = DllStructGetData ( $Section, 'PointerToRawData' ) If $SizeOfRawData = 0 Then $Dest = _MemVirtualAlloc ( $CodeBase + $VirtualAddress, $SectionAlignment, $MEM_COMMIT, $PAGE_READWRITE ) API_ZeroMemory ( $Dest, $SectionAlignment ) Else $Dest = _MemVirtualAlloc ( $CodeBase + $VirtualAddress, $SizeOfRawData, $MEM_COMMIT, $PAGE_READWRITE ) _MemMoveMemory ( $DllDataPtr + $PointerToRawData, $Dest, $SizeOfRawData ) EndIf DllStructSetData ( $Section, 'VirtualSize', $Dest - $CodeBase ) $SectionPtr += DllStructGetSize ( $Section ) Next EndFunc ;==> MemLib_CopySections() Func MemLib_FinalizeSections ( $CodeBase, $PEHeader ) Local Const $IMAGE_SCN_MEM_EXECUTE = 0x20000000 Local Const $IMAGE_SCN_MEM_READ = 0x40000000 Local Const $IMAGE_SCN_MEM_WRITE = 0x80000000 Local Const $IMAGE_SCN_MEM_NOT_CACHED = 0x4000000 Local Const $IMAGE_SCN_CNT_INITIALIZED_DATA = 64 Local Const $IMAGE_SCN_CNT_UNINITIALIZED_DATA = 128 Local Const $PAGE_WRITECOPY = 0x0008 Local Const $PAGE_EXECUTE_WRITECOPY = 0x0080 Local $IMAGE_NT_HEADER = DllStructCreate ( $tagIMAGE_NT_HEADER, $PEHeader ) Local $SizeOfFileHeader = DllStructGetPtr ( $IMAGE_NT_HEADER, 'Magic' ) - $PEHeader Local $SizeOfOptionalHeader = DllStructGetData ( $IMAGE_NT_HEADER, 'SizeOfOptionalHeader' ) Local $NumberOfSections = DllStructGetData ( $IMAGE_NT_HEADER, 'NumberOfSections' ) Local $SectionAlignment = DllStructGetData ( $IMAGE_NT_HEADER, 'SectionAlignment' ) Local $SectionPtr = $PEHeader + $SizeOfFileHeader + $SizeOfOptionalHeader Local $Section, $Characteristics, $SizeOfRawData, $Executable, $Readable, $Writeable, $ProtectList, $Protect, $Size, $PhysicalAddress For $i = 1 To $NumberOfSections $Section = DllStructCreate ( $tagIMAGE_SECTION_HEADER, $SectionPtr ) $Characteristics = DllStructGetData ( $Section, 'Characteristics' ) $SizeOfRawData = DllStructGetData ( $Section, 'SizeOfRawData' ) $Executable = ( BitAND ( $Characteristics, $IMAGE_SCN_MEM_EXECUTE ) <> 0 ) $Readable = ( BitAND ( $Characteristics, $IMAGE_SCN_MEM_READ ) <> 0 ) $Writeable = ( BitAND ( $Characteristics, $IMAGE_SCN_MEM_WRITE ) <> 0 ) Dim $ProtectList[8] = [$PAGE_NOACCESS, $PAGE_EXECUTE, $PAGE_READONLY, $PAGE_EXECUTE_READ, $PAGE_WRITECOPY, $PAGE_EXECUTE_WRITECOPY, $PAGE_READWRITE, $PAGE_EXECUTE_READWRITE] $Protect = $ProtectList[$Executable + $Readable * 2 + $Writeable * 4] If BitAND ( $Characteristics, $IMAGE_SCN_MEM_NOT_CACHED ) Then $Protect = BitOR ( $Protect, $PAGE_NOCACHE ) $Size = $SizeOfRawData If $Size = 0 Then If BitAND ( $Characteristics, $IMAGE_SCN_CNT_INITIALIZED_DATA ) Then $Size = DllStructGetData ( $IMAGE_NT_HEADER, 'SizeOfInitializedData' ) ElseIf BitAND ( $Characteristics, $IMAGE_SCN_CNT_UNINITIALIZED_DATA ) Then $Size = DllStructGetData ( $IMAGE_NT_HEADER, 'SizeOfUninitializedData' ) EndIf EndIf If $Size > 0 Then $PhysicalAddress = $CodeBase + DllStructGetData ( $Section, 'VirtualSize' ) API_VirtualProtect ( $PhysicalAddress, $Size, $Protect ) EndIf $SectionPtr += DllStructGetSize ( $Section ) Next EndFunc ;==> MemLib_FinalizeSections() Func MemLib_FreeLibrary ( $ModulePtr ) If Not MemLib_Vaild ( $ModulePtr ) Then Return 0 Local $Module = DllStructCreate ( $tagModule, $ModulePtr ) Local $CodeBase = DllStructGetData ( $Module, 'CodeBase' ) Local $DllEntry = DllStructGetData ( $Module, 'DllEntry' ) Local $Initialized = DllStructGetData ( $Module, 'Initialized' ) Local $ImportListPtr = DllStructGetData ( $Module, 'ImportList' ) Local $ExportListPtr = DllStructGetData ( $Module, 'ExportList' ) If $Initialized And $DllEntry Then Local $Success = MemoryFuncCall ( 'bool', $DllEntry, 'ptr', $CodeBase, 'dword', 0, 'ptr', 0 ) ; DLL_PROCESS_DETACH DllStructSetData ( $Module, 'Initialized', 0 ) EndIf If $ExportListPtr Then _MemGlobalFree ( $ExportListPtr ) If $ImportListPtr Then Local $ImportList = StringSplit ( Peek ( 'str', $ImportListPtr ), ',' ) For $i = 1 To $ImportList[0] If $ImportList[$i] Then API_FreeLibrary ( $ImportList[$i] ) Next _MemGlobalFree ( $ImportListPtr ) EndIf If $CodeBase Then _MemVirtualFree ( $CodeBase, 0, $MEM_RELEASE ) DllStructSetData ( $Module, 'CodeBase', 0 ) DllStructSetData ( $Module, 'ExportList', 0 ) _MemGlobalFree ( $ModulePtr ) Return 1 EndFunc ;==> MemLib_FreeLibrary() Func MemLib_GetExportList ( $CodeBase, $PEHeader ) Local Const $IMAGE_DIRECTORY_ENTRY_EXPORT = 0 Local $IMAGE_NT_HEADER = DllStructCreate ( $tagIMAGE_NT_HEADER, $PEHeader ) Local $SizeOfDataDirectory = DllStructGetSize ( DllStructCreate ( $tagIMAGE_DATA_DIRECTORY ) ) Local $ExportDirectoryPtr = $PEHeader + DllStructGetSize ( $IMAGE_NT_HEADER ) + $IMAGE_DIRECTORY_ENTRY_EXPORT * $SizeOfDataDirectory Local $ExportDirectory = DllStructCreate ( $tagIMAGE_DATA_DIRECTORY, $ExportDirectoryPtr ) Local $ExportSize = DllStructGetData ( $ExportDirectory, 'Size' ) Local $ExportVirtualAddress = DllStructGetData ( $ExportDirectory, 'VirtualAddress' ) Local $ExportList = '' If $ExportSize > 0 Then Local $IMAGE_EXPORT_DIRECTORY = DllStructCreate ( $tagIMAGE_EXPORT_DIRECTORY, $CodeBase + $ExportVirtualAddress ) Local $NumberOfNames = DllStructGetData ( $IMAGE_EXPORT_DIRECTORY, 'NumberOfNames' ) Local $NumberOfFunctions = DllStructGetData ( $IMAGE_EXPORT_DIRECTORY, 'NumberOfFunctions' ) Local $AddressOfFunctions = DllStructGetData ( $IMAGE_EXPORT_DIRECTORY, 'AddressOfFunctions' ) If $NumberOfNames = 0 Or $NumberOfFunctions = 0 Then Return '' Local $NameRef = $CodeBase + DllStructGetData ( $IMAGE_EXPORT_DIRECTORY, 'AddressOfNames' ) Local $Ordinal = $CodeBase + DllStructGetData ( $IMAGE_EXPORT_DIRECTORY, 'AddressOfNameOrdinals' ) Local $Ref, $Idx, $FuncName, $Addr For $i = 1 To $NumberOfNames $Ref = Peek ( 'dword', $NameRef ) $Idx = Peek ( 'word', $Ordinal ) $FuncName = Peek ( 'str', $CodeBase + $Ref ) If $Idx <= $NumberOfFunctions Then $Addr = $CodeBase + Peek ( 'dword', $CodeBase + $AddressOfFunctions + $Idx * 4 ) $ExportList &= $FuncName & Chr ( 1 ) & $Addr & Chr ( 1 ) EndIf $NameRef += 4 ; DWORD $Ordinal += 2 ; WORD Next EndIf Return $ExportList EndFunc ;==> MemLib_GetExportList() Func MemLib_GetProcAddress ( $ModulePtr, $FuncName ) Local $ExportPtr = Peek ( 'ptr', $ModulePtr ) If Not $ExportPtr Then Return 0 Local $ExportList = Peek ( 'str', $ExportPtr ) Local $Match = StringRegExp ( $ExportList, '(?i)' & $FuncName & '\001([^\001]*)\001', 3 ) If Not @Error Then Return Ptr ( $Match[0] ) Return 0 EndFunc ;==> MemLib_GetProcAddress() Func MemLib_LoadLibrary ( $DllBinary ) $DllBinary = Binary ( $DllBinary ) Local $DllData = DllStructCreate ( 'byte[' & BinaryLen ( $DllBinary ) & ']' ) Local $DllDataPtr = DllStructGetPtr ( $DllData ) DllStructSetData ( $DllData, 1, $DllBinary ) Local $IMAGE_DOS_HEADER = DllStructCreate ( $tagIMAGE_DOS_HEADER, $DllDataPtr ) If DllStructGetData ( $IMAGE_DOS_HEADER, 'e_magic' ) <> 0x5A4D Then Return SetError ( 1, 0, 0 ) EndIf Local $PEHeader = $DllDataPtr + DllStructGetData ( $IMAGE_DOS_HEADER, 'e_lfanew' ) Local $IMAGE_NT_HEADER = DllStructCreate ( $tagIMAGE_NT_HEADER, $PEHeader ) If DllStructGetData ( $IMAGE_NT_HEADER, 'Signature' ) <> 0x4550 Then Return SetError ( 1, 0, 0 ) EndIf Switch DllStructGetData ( $IMAGE_NT_HEADER, 'Magic' ) Case 0x20B ; IMAGE_NT_OPTIONAL_HDR64_MAGIC Return SetError ( 2, 0, 0 ) EndSwitch Local $ImageBase = DllStructGetData ( $IMAGE_NT_HEADER, 'ImageBase' ) Local $SizeOfImage = DllStructGetData ( $IMAGE_NT_HEADER, 'SizeOfImage' ) Local $SizeOfHeaders = DllStructGetData ( $IMAGE_NT_HEADER, 'SizeOfHeaders' ) Local $AddressOfEntryPoint = DllStructGetData ( $IMAGE_NT_HEADER, 'AddressOfEntryPoint' ) Local $ModulePtr = _MemGlobalAlloc ( DllStructGetSize ( DllStructCreate ( $tagModule ) ), $GPTR ) If $ModulePtr = 0 Then Return SetError ( 3, 0, 0 ) Local $Module = DllStructCreate ( $tagModule, $ModulePtr ) Local $CodeBase = _MemVirtualAlloc ( $ImageBase, $SizeOfImage, $MEM_RESERVE, $PAGE_READWRITE ) If $CodeBase = 0 Then $CodeBase = _MemVirtualAlloc ( 0, $SizeOfImage, $MEM_RESERVE, $PAGE_READWRITE ) If $CodeBase = 0 Then Return SetError ( 3, 0, 0 ) DllStructSetData ( $Module, 'CodeBase', $CodeBase ) _MemVirtualAlloc ( $CodeBase, $SizeOfImage, $MEM_COMMIT, $PAGE_READWRITE ) Local $Base = _MemVirtualAlloc ( $CodeBase, $SizeOfHeaders, $MEM_COMMIT, $PAGE_READWRITE ) _MemMoveMemory ( $DllDataPtr, $Base, $SizeOfHeaders ) MemLib_CopySections ( $CodeBase, $PEHeader, $DllDataPtr ) Local $LocationDelta = $CodeBase - $ImageBase If $LocationDelta <> 0 Then MemLib_PerformBaseRelocation ( $CodeBase, $PEHeader, $LocationDelta ) Local $ImportList = MemLib_BuildImportTable ( $CodeBase, $PEHeader ) If @Error Then MemLib_FreeLibrary ( $ModulePtr ) Return SetError ( 2, 0, 0 ) EndIf Local $ExportList = MemLib_GetExportList ( $CodeBase, $PEHeader ) Local $ImportListPtr = _MemGlobalAlloc ( StringLen ( $ImportList ) + 2, $GPTR ) Local $ExportListPtr = _MemGlobalAlloc ( StringLen ( $ExportList ) + 2, $GPTR ) DllStructSetData ( $Module, 'ImportList', $ImportListPtr ) DllStructSetData ( $Module, 'ExportList', $ExportListPtr ) If $ImportListPtr = 0 Or $ExportListPtr = 0 Then MemLib_FreeLibrary ( $ModulePtr ) Return SetError ( 3, 0, 0 ) EndIf Poke ( 'str', $ImportListPtr, $ImportList ) Poke ( 'str', $ExportListPtr, $ExportList ) MemLib_FinalizeSections ( $CodeBase, $PEHeader ) Local $DllEntry = $CodeBase + $AddressOfEntryPoint DllStructSetData ( $Module, 'DllEntry', $DllEntry ) DllStructSetData ( $Module, 'Initialized', 0 ) If $AddressOfEntryPoint Then Local $Success = MemoryFuncCall ( 'bool', $DllEntry, 'ptr', $CodeBase, 'dword', 1, 'ptr', 0 ) ; DLL_PROCESS_ATTACH If Not $Success[0] Then MemLib_FreeLibrary ( $ModulePtr ) Return SetError ( 4, 0, 0 ) EndIf DllStructSetData ( $Module, 'Initialized', 1 ) EndIf Return $ModulePtr EndFunc ;==> MemLib_LoadLibrary() Func MemLib_PerformBaseRelocation ( $CodeBase, $PEHeader, $LocationDelta ) Local Const $IMAGE_DIRECTORY_ENTRY_BASERELOC = 5 Local Const $IMAGE_REL_BASED_HIGHLOW = 3 Local Const $IMAGE_REL_BASED_DIR64 = 10 Local $IMAGE_NT_HEADER = DllStructCreate ( $tagIMAGE_NT_HEADER, $PEHeader ) Local $SizeOfDataDirectory = DllStructGetSize ( DllStructCreate ( $tagIMAGE_DATA_DIRECTORY ) ) Local $RelocDirectoryPtr = $PEHeader + DllStructGetSize ( $IMAGE_NT_HEADER ) + $IMAGE_DIRECTORY_ENTRY_BASERELOC * $SizeOfDataDirectory Local $RelocDirectory = DllStructCreate ( $tagIMAGE_DATA_DIRECTORY, $RelocDirectoryPtr ) Local $RelocSize = DllStructGetData ( $RelocDirectory, 'Size' ) Local $RelocVirtualAddress = DllStructGetData ( $RelocDirectory, 'VirtualAddress' ) If $RelocSize > 0 Then Local $Relocation = $CodeBase + $RelocVirtualAddress Local $IMAGE_BASE_RELOCATION, $VirtualAddress, $SizeOfBlock, $Dest, $Entries, $RelInfo, $Info, $Type, $Addr While 1 $IMAGE_BASE_RELOCATION = DllStructCreate ( $tagIMAGE_BASE_RELOCATION, $Relocation ) $VirtualAddress = DllStructGetData ( $IMAGE_BASE_RELOCATION, 'VirtualAddress' ) $SizeOfBlock = DllStructGetData ( $IMAGE_BASE_RELOCATION, 'SizeOfBlock' ) If $VirtualAddress = 0 Then ExitLoop $Dest = $CodeBase + $VirtualAddress $Entries = ( $SizeOfBlock - 8 ) / 2 $RelInfo = DllStructCreate ( 'word[' & $Entries & ']', $Relocation + 8 ) For $i = 1 To $Entries $Info = DllStructGetData ( $RelInfo, 1, $i ) $Type = BitShift ( $Info, 12 ) If $Type = $IMAGE_REL_BASED_HIGHLOW Or $Type = $IMAGE_REL_BASED_DIR64 Then $Addr = DllStructCreate ( 'ptr', $Dest + BitAND ( $Info, 0xFFF ) ) DllStructSetData ( $Addr, 1, DllStructGetData ( $Addr, 1 ) + $LocationDelta ) EndIf Next $Relocation += $SizeOfBlock WEnd EndIf EndFunc ;==> MemLib_PerformBaseRelocation() Func MemLib_Vaild ( $ModulePtr ) Local $ModuleSize = DllStructGetSize ( DllStructCreate ( $tagModule ) ) If API_IsBadReadPtr ( $ModulePtr, $ModuleSize ) Then Return False Local $Module = DllStructCreate ( $tagModule, $ModulePtr ) Local $CodeBase = DllStructGetData ( $Module, 'CodeBase' ) If Not $CodeBase Then Return False Return True EndFunc ;==> MemLib_Vaild() Func MemoryDllCall ( $Module, $RetType, $FuncName, $Type1 = '', $Param1 = 0, $Type2 = '', $Param2 = 0, $Type3 = '', $Param3 = 0, $Type4 = '', $Param4 = 0, $Type5 = '', $Param5 = 0, $Type6 = '', $Param6 = 0, $Type7 = '', $Param7 = 0, $Type8 = '', $Param8 = 0, $Type9 = '', $Param9 = 0, $Type10 = '', $Param10 = 0, $Type11 = '', $Param11 = 0, $Type12 = '', $Param12 = 0, $Type13 = '', $Param13 = 0, $Type14 = '', $Param14 = 0, $Type15 = '', $Param15 = 0, $Type16 = '', $Param16 = 0, $Type17 = '', $Param17 = 0, $Type18 = '', $Param18 = 0, $Type19 = '', $Param19 = 0, $Type20 = '', $Param20 = 0 ) Local $Ret, $OpenFlag = False Local Const $MaxParams = 20 If ( @NumParams < 3 ) Or ( @NumParams > $MaxParams * 2 + 3 ) Or ( Mod ( @NumParams, 2 ) = 0 ) Then Return SetError ( 4, 0, 0 ) If Not IsPtr ( $Module ) Then $OpenFlag = True $Module = MemoryDllOpen ( $Module ) If @Error Then Return SetError ( 1, 0, 0 ) EndIf Local $Addr = MemLib_GetProcAddress ( $Module, $FuncName ) If Not $Addr Then Return SetError ( 3, 0, 0 ) Poke ( 'ptr', $_MFHookPtr + 1, $Addr ) Switch @NumParams Case 3 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi ) Case 5 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1 ) Case 7 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2 ) Case 9 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2, $Type3, $Param3 ) Case 11 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2, $Type3, $Param3, $Type4, $Param4 ) Case 13 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2, $Type3, $Param3, $Type4, $Param4, $Type5, $Param5 ) Case Else Local $DllCallStr = 'DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi', $n = 1 For $i = 5 To @NumParams Step 2 $DllCallStr &= ', $Type' & $n & ', $Param' & $n $n += 1 Next $DllCallStr &= ' )' $Ret = Execute ( $DllCallStr ) EndSwitch Local $Err = @Error If $OpenFlag Then MemoryDllClose ( $Module ) Return SetError ( $Err, 0, $Ret ) EndFunc ;==> MemoryDllCall() Func MemoryDllClose ( $Module ) MemLib_FreeLibrary ( $Module ) EndFunc ;==> MemoryDllClose() Func MemoryDllOpen ( $DllBinary ) If Not IsDllStruct ( $_MFHookBak ) Then MemoryFuncInit() Local $Module = MemLib_LoadLibrary ( $DllBinary ) If @Error Then Return SetError ( @Error, 0, -1 ) Return $Module EndFunc ;==> MemoryDllOpen() Func MemoryFuncCall ( $RetType, $Address, $Type1 = '', $Param1 = 0, $Type2 = '', $Param2 = 0, $Type3 = '', $Param3 = 0, $Type4 = '', $Param4 = 0, $Type5 = '', $Param5 = 0, $Type6 = '', $Param6 = 0, $Type7 = '', $Param7 = 0, $Type8 = '', $Param8 = 0, $Type9 = '', $Param9 = 0, $Type10 = '', $Param10 = 0, $Type11 = '', $Param11 = 0, $Type12 = '', $Param12 = 0, $Type13 = '', $Param13 = 0, $Type14 = '', $Param14 = 0, $Type15 = '', $Param15 = 0, $Type16 = '', $Param16 = 0, $Type17 = '', $Param17 = 0, $Type18 = '', $Param18 = 0, $Type19 = '', $Param19 = 0, $Type20 = '', $Param20 = 0 ) If Not IsDllStruct ( $_MFHookBak ) Then MemoryFuncInit() Poke ( 'ptr', $_MFHookPtr + 1, $Address ) Local $Ret Switch @NumParams Case 2 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi ) Case 4 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1 ) Case 6 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2 ) Case 8 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2, $Type3, $Param3 ) Case 10 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2, $Type3, $Param3, $Type4, $Param4 ) Case 12 $Ret = DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2, $Type3, $Param3, $Type4, $Param4, $Type5, $Param5 ) Case Else Local $DllCallStr = 'DllCall($_KERNEL32DLL, $RetType, $_MFHookApi', $n = 1 For $i = 4 To @NumParams Step 2 $DllCallStr &= ', $Type' & $n & ', $Param' & $n $n += 1 Next $DllCallStr &= ')' $Ret = Execute ( $DllCallStr ) EndSwitch Return SetError ( @Error, 0, $Ret ) EndFunc ;==> MemoryFuncCall() Func MemoryFuncInit() Local $KernelHandle = API_LoadLibrary ( 'kernel32.dll' ) API_FreeLibrary ( $KernelHandle ) Local $HookPtr = API_GetProcAddress ( $KernelHandle, $_MFHookApi ) Local $HookSize = 7 $_MFHookPtr = $HookPtr $_MFHookBak = DllStructCreate ( 'byte[' & $HookSize & ']' ) If Not API_VirtualProtect ( $_MFHookPtr, $HookSize, $PAGE_EXECUTE_READWRITE ) Then Return False DllStructSetData ( $_MFHookBak, 1, Peek ( 'byte[' & $HookSize & ']', $_MFHookPtr ) ) Poke ( 'byte', $_MFHookPtr, 0xB8 ) Poke ( 'word', $_MFHookPtr + 5, 0xE0FF ) Return True EndFunc ;==> MemoryFuncInit() Func Peek ( $Type, $Ptr ) If $Type = 'str' Then $Type = 'char[' & API_lstrlenA ( $Ptr ) & ']' ElseIf $Type = 'wstr' Then $Type = 'wchar[' & API_lstrlenW ( $Ptr ) & ']' EndIf Return DllStructGetData ( DllStructCreate ( $Type, $Ptr ), 1 ) EndFunc ;==> Peek() Func Poke ( $Type, $Ptr, $Value ) If $Type = 'str' Then $Type = 'char[' & ( StringLen ( $Value ) + 1 ) & ']' ElseIf $Type = 'wstr' Then $Type = 'wchar[' & ( StringLen ( $Value ) + 1 ) & ']' EndIf DllStructSetData ( DllStructCreate ( $Type, $Ptr ), 1, $Value ) EndFunc ;==> Poke() Func Titchysiddll() ; Code Generated by BinaryToAu3Kompressor. Local $sFileBin = 'cbsATVqQAAMAAACCBAAw//8AALgAOC0BAEAEOBkAsAAMDh8Aug4AtAnNIbgAAUzNIVRoaXMAIHByb2dyYW0AIGNhbm5vdCAAYmUgcnVuIGkAbiBET1MgbW+AZGUuDQ0KJASGADvpjpN/iODAQQUDg6jywHwAB/EQl/PAZQAHUmljBmgBFwVzUEUAAEyAAQQA9O0oVQUTAOAADiELAQUMpAASAAzMAgegEAADfjAECQELABoB5wEABQcA/iCAfgQGgxwAFIEVhgMDA2BgMgAAvoEDgCc84RmKEAMAnKCdDgCAK4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PAA8ADwD/DwAPAA8ADwAPAA8ADwAPAP8PAA8ADwAPAA8ADwAPAA8A/w8ADwAPAA8ADwAPAA8ABAA=' $sFileBin = Binary ( BinaryCall_Base64Decode ( $sFileBin ) ) $sFileBin = Binary ( LzntDecompress ( $sFileBin ) ) Return SetError ( 0, 0, $sFileBin ) EndFunc ;==> Titchysiddll() Flash and Sid are loaded in memory.
      For a transparent background, look at lines 76/77  (Thanks to Chimp)
      Thanks to trancexx for SWF.au3 and Ward for MemoryDll.au3
      Happy New Year 2017 
    • TMelanson
      By TMelanson
      Hi folks,
      I'm hoping someone can help me out here.
      Background:
      I have the need to run a program with admin credentials (#RequireAdmin), and then get the SID of the locally logged in account. Not the admin account.
      If you look at the attached script, Line 16 uses the @UserName variable and returns the SID for the admin account I used to launch the app.
      I want to use line 17 which passes the result of the _GetUsername function which is a username using  ($UserName) to the WMIService.
      I'm getting " The requested action with this object has failed.:" error message.
      Any suggestions would be appreciated!
       
      test1.au3
    • UEZ
      By UEZ
      Just a fast hack for next Thursday. Maybe too early but who cares...
       
      Source:
      ;coded by UEZ build 2016-01-08 ;~ #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #pragma compile(Icon, "c:\Program Files (x86)\AutoIt3\Icons\au3.ico") #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/so /pe /rm #AutoIt3Wrapper_Run_After=del /f /q "%scriptdir%\%scriptfile%_stripped.au3" #include <GDIPlus.au3> #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include "BassConstants.au3" #include "Bass.au3" _GDIPlus_Startup() Global $hGUI, $iFPS = 0, $iFrames = 0, $iShowFPS = 0, $fTimer, $bExit, $aAudio Global Const $iW = @DesktopWidth, $iH = @DesktopHeight, $iWh = $iW / 2, $iHh = $iH / 2, $sTitle = "GDI+ Simple Firework by UEZ" Global Const $fPi = ACos(-1), $fRad = $fPi / 180, $iMaxParticles = 51, $iFireworks = 10, $iParticleSize = 4 Global $iElements = 9, $aCoords[$iFireworks][$iElements + $iMaxParticles * 4 - 3] ;don't touch these values AutoItSetOption("GUIOnEventMode", 1) GDIPlus_SimpleFirework() AutoItSetOption("GUIOnEventMode", 0) _GDIPlus_Shutdown() Func GDIPlus_SimpleFirework() $bExit = False $hGUI = GUICreate($sTitle & 0, $iW, $iH, 0, 0, $WS_POPUP) GUISetState(@SW_SHOW, $hGUI) WinSetTrans($hGUI, "", 0xF8) GUISetCursor(16, 1) ;create canvas elements Local Const $hDC = _WinAPI_GetDC($hGUI) Local Const $hHBitmap = _WinAPI_CreateCompatibleBitmap($hDC, $iW, $iH) Local Const $hDC_backbuffer = _WinAPI_CreateCompatibleDC($hDC) Local Const $DC_obj = _WinAPI_SelectObject($hDC_backbuffer, $hHBitmap) Local Const $hCanvas = _GDIPlus_GraphicsCreateFromHDC($hDC_backbuffer) _GDIPlus_GraphicsSetSmoothingMode($hCanvas, $GDIP_SMOOTHINGMODE_HIGHQUALITY) _GDIPlus_GraphicsSetPixelOffsetMode($hCanvas, $GDIP_PIXELOFFSETMODE_HIGHQUALITY) Local Const $hBrush = _GDIPlus_BrushCreateSolid(0xFFE0E0E0), _ $hBrush_Clr = _GDIPlus_BrushCreateSolid(0x70000000), _ $hBrush_Txt = _GDIPlus_BrushCreateSolid(0x10202020), $hBrush_FPS = _GDIPlus_BrushCreateSolid(0xA0505050), _ $hFormat = _GDIPlus_StringFormatCreate(), $hFormat_FPS = _GDIPlus_StringFormatCreate(), _ $hFamily = _GDIPlus_FontFamilyCreate("Impact"), $hFamily_FPS = _GDIPlus_FontFamilyCreate("Arial"), _ $hFont = _GDIPlus_FontCreate($hFamily, $iH / 4.5), $hFont_FPS = _GDIPlus_FontCreate($hFamily_FPS, 8), _ $tLayout = _GDIPlus_RectFCreate(0, 0, $iW, $iH), $tLayout_FPS = _GDIPlus_RectFCreate(0, 0, 150, 32) _GDIPlus_StringFormatSetAlign($hFormat, 1) _GDIPlus_StringFormatSetLineAlign($hFormat, 1) Local $iX, $iY, $j = -2^32 + 1, $bAudio = True ;init sound _BASS_STARTUP() _BASS_Init(0, -1, 44100, 0, "") If @error Then $bAudio = False Local $aAudio[$iFireworks][2], $hAudio_Whoa, $hAudio_BgNoise For $iY = 0 To $iFireworks - 1 ;generated firework particles GenCoordinates($iY, $aCoords, 1.5, 3.5, 1, 5.5) If $bAudio Then $aAudio[$iY][0] = _BASS_StreamCreateFile(False, @ScriptDir & "\" & Random(1, 7, 1) & ".mp3", 0, 0, 0) $aAudio[$iY][1] = 0 EndIf Next $hAudio_Whoa = _BASS_StreamCreateFile(False, @ScriptDir & "\ApplauseWoah.mp3", 0, 0, 0) $hAudio_BgNoise = _BASS_StreamCreateFile(False, @ScriptDir & "\BgNoise.mp3", 0, 0, 0) _BASS_ChannelPlay($hAudio_BgNoise, True) $iFPS = 0 GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit_About") AdlibRegister("CalcFPS", 1000) Local $iAlpha, $iCounterFX = 0, $iCounterParticles = 0 $fTimer = TimerInit() Do DllCall($__g_hGDIPDll, "int", "GdipFillRectangle", "handle", $hCanvas, "handle", $hBrush_Clr, "float", 0, "float", 0, _ "float", $iW, "float", $iH) ;erase canvas background _GDIPlus_GraphicsDrawStringEx($hCanvas, "Happy new year 2016", $hFont, $tLayout, $hFormat, $hBrush_Txt) ;draw background message text For $iY = 0 To $iFireworks - 1 ;calculate and draw firework particles If $aCoords[$iY][1] > $aCoords[$iY][4] Then ;draw rocket only until explosion $aCoords[$iY][0] += $aCoords[$iY][2] ;x vector $aCoords[$iY][1] -= Abs($aCoords[$iY][3] * 10) ;y vector should be in upper direction only _GDIPlus_BrushSetSolidColor($hBrush, 0x60909090) DllCall($__g_hGDIPDll, "int", "GdipFillRectangle", "handle", $hCanvas, "handle", $hBrush, "float", $aCoords[$iY][0], "float", $aCoords[$iY][1], "float", 2, "float", 2) $iCounterParticles += 1 For $iX = $iElements To UBound($aCoords, 2) - 5 Step 4 $aCoords[$iY][$iX] = $aCoords[$iY][0] ;copy x position $aCoords[$iY][$iX + 1] = $aCoords[$iY][1] ;copy y position Next Else For $iX = $iElements To UBound($aCoords, 2) - 5 Step 4 $aCoords[$iY][$iX] += $aCoords[$iY][$iX + 2] ;x coordinate $aCoords[$iY][$iX + 1] += $aCoords[$iY][$iX + 3] + $aCoords[$iY][8] ;y coordinate $aCoords[$iY][$iX + 2] *= 0.98 ;neg. accelaration of x vector $aCoords[$iY][$iX + 3] *= 0.98 ;neg. accelaration of y vector $iAlpha = $aCoords[$iY][6] > 0xFF ? 0xFF : $aCoords[$iY][6] Switch $aCoords[$iY][7] ;choose color mode Case 0 To 3 _GDIPlus_BrushSetSolidColor($hBrush, Int($iAlpha) * 0x1000000 + $aCoords[$iY][5]) Case Else Switch Mod($j, 3) Case 0 _GDIPlus_BrushSetSolidColor($hBrush, Int($iAlpha) * 0x1000000 + 0x10000 * Random(0xD0, 0xFF, 1) + 0x100 * Random(0xD0, 0xFF, 1) + Random(0xD0, 0xFF, 1)) Case Else _GDIPlus_BrushSetSolidColor($hBrush, Int($iAlpha) * 0x1000000 + 0x10000 * Random(0x40, 0xA0, 1) + 0x100 * Random(0x40, 0xA0, 1) + Random(0x40, 0xA0, 1)) EndSwitch $j += 1 EndSwitch ;draw only visible particles If BitAND($aCoords[$iY][$iX] > -1, $aCoords[$iY][$iX] < $iW, $aCoords[$iY][$iX + 1] > -1, $aCoords[$iY][$iX + 1] < $iH) Then DllCall($__g_hGDIPDll, "int", "GdipFillEllipse", "handle", $hCanvas, "handle", $hBrush, _ "float", $aCoords[$iY][$iX], "float", $aCoords[$iY][$iX + 1], _ "float", $iParticleSize, "float", $iParticleSize) ;draw firework particles $iCounterParticles += 1 EndIf Next $aCoords[$iY][6] *= 0.933 ;decrease alpha channel $aCoords[$iY][8] *= 1.075 ;gravity accelaration (y axis) -> earth's gravitational force simulation If Not $aAudio[$iY][1] And $bAudio Then ;play audio fx _BASS_ChannelPlay($aAudio[$iY][0], False) $aAudio[$iY][1] = 1 $iCounterFX += 1 EndIf If $aCoords[$iY][6] < 0x08 Then ;reset firework elements $aAudio[$iY][1] = 0 GenCoordinates($iY, $aCoords) EndIf EndIf Next If $iCounterFX > 2 Then _BASS_ChannelPlay($hAudio_Whoa, False) EndIf _GDIPlus_GraphicsDrawStringEx($hCanvas, "FPS: " & $iShowFPS & @CRLF & "Particles: " & $iCounterParticles, $hFont_FPS, $tLayout_FPS, $hFormat_FPS, $hBrush_FPS) ;draw background message text _WinAPI_BitBlt($hDC, 0, 0, $iW, $iH, $hDC_backbuffer, 0, 0, $SRCCOPY) ;blit drawn bitmap to GUI $iCounterFX = 0 $iCounterParticles = 0 $iFPS += 1 $iFrames += 1 If $bExit Then ExitLoop Until Not Sleep(10) AdlibUnRegister("CalcFPS") ;release resources _GDIPlus_FontDispose($hFont) _GDIPlus_FontDispose($hFont_FPS) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_FontFamilyDispose($hFamily_FPS) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_StringFormatDispose($hFormat_FPS) _GDIPlus_BrushDispose($hBrush) _GDIPlus_BrushDispose($hBrush_Clr) _GDIPlus_BrushDispose($hBrush_Txt) _GDIPlus_BrushDispose($hBrush_FPS) _GDIPlus_GraphicsDispose($hCanvas) _WinAPI_SelectObject($hDC, $DC_obj) _WinAPI_DeleteObject($hHBitmap) _WinAPI_ReleaseDC($hGUI, $hDC) GUIDelete($hGUI) If $bAudio Then For $iY = 0 To $iFireworks - 1 _BASS_ChannelStop($aAudio[$iY][0]) Next _BASS_ChannelStop($hAudio_Whoa) _BASS_ChannelStop($hAudio_BgNoise) _BASS_Free() EndIf EndFunc ;==>GDIPlus_SimpleFirework Func GenCoordinates($iY, ByRef $aCoords, $fVXmin = 2.5, $fVXmax = 15.5, $fVYmin = 1.5, $fVYmax = 5.5) Local $aColors[7] = [0xFF0000, 0x00FF00, 0x0000FF, 0xFFFF00, 0xFF7514, 0xFFFFFF, 0x40E0D0] $aCoords[$iY][0] = $iWh ;x coordinate (x coordinate of starting point) $aCoords[$iY][1] = $iH ;y coordinate (y coordinate of starting point) $aCoords[$iY][2] = Random($fVXmin, $fVXmax) * (Random(0, 1, 1) = 0 ? -1 : 1) ;x vector (direction of rocket) $aCoords[$iY][3] = Random($fVYmin, $fVYmax) * (Random(0, 1, 1) = 0 ? -1 : 1) ;y vector (direction of rocket) $aCoords[$iY][4] = Random($iH * 0.15, $iH * 0.35) ;area of detonation ;~ $aCoords[$iY][5] = 0x10000 * Random(0x40, 0xE0, 1) + 0x100 * Random(0x40, 0xE0, 1) + Random(0x40, 0xE0, 1) ;random color $aCoords[$iY][5] = $aColors[Random(0, 6, 1)] ;random color $aCoords[$iY][6] = 0x250 ;alpha channel value $aCoords[$iY][7] = Random(0, 8, 1) ;value for color mode $aCoords[$iY][8] = 0.15 ;gravity accelaration (y axis) initial value Local $iX, $fSpeed, $fRadius, $iFX = Random(1, 20, 1), $e = Random(5, 25), $h = 0, $g = 360 / ($iMaxParticles - 1), _ $j = 360 / 10, $jj = $j, $k = Random(0.5, 1.5), $kk = Random(1, 3.5), $l = 0 For $iX = $iElements To UBound($aCoords, 2) - 5 Step +4 Switch $iFX Case 1 To 3 $fSpeed = Cos($g * $iFX * $e * $iX) * $e $fRadius = $fSpeed / 2 Case 4 To 6 $fSpeed = Sin($iX / 7.85) * $e ;particle speed (explosion strength) $fRadius = $fSpeed / 2 Case 7 To 9 $fSpeed = Tan($iX / 2) + $e ;particle speed (explosion strength) $fRadius = $fSpeed / 2 Case 10 To 12 $fSpeed = Cos($iX / 2.5) + $e ;particle speed (explosion strength) $fRadius = $fSpeed / 2 Case 13 To 15 ;create circular effect $fSpeed = Random($e, $e + 0.333333) ;particle speed (explosion strength) $fRadius = $fSpeed / 2 Case 16 To 18 $fSpeed = $e $fRadius = $k $h = $jj $jj += $j If $jj > 360 Then $jj = $j - $l $k += $kk $l += Random(1, 15) EndIf Case Else $fSpeed = Random(5, 25) ;particle speed (explosion strength) $fRadius = $fSpeed / 2 EndSwitch $aCoords[$iY][$iX + 2] = ($fSpeed + Cos($h * $fRad) * $fRadius) - $fSpeed ;x vector particle speed $aCoords[$iY][$iX + 3] = ($fSpeed + Sin($h * $fRad) * $fRadius) - $fSpeed ;y vector particle speed $h += $g ;next angle Next EndFunc ;==>GenCoordinates Func _Exit_About() $bExit = True EndFunc ;==>_Exit_About Func CalcFPS() ;display FPS $iShowFPS = $iFPS & " / Ø " & Round($iFrames / TimerDiff($fTimer) * 1000, 4) $iFPS = 0 EndFunc ;==>CalcFPS  
      Sound FX and other files are in the archive only! Sounds best with earphones
       
      Speed: ~17 FPS on Intel Core i5 4300U @ 2.6 GHz CPU (1600x900). If it is too slow on your machine decrease the values for $iMaxParticles and $iFireworks.
       
      Download available in download section.  Use e.g. 7-Zip to open archive.
       
      Happy new year...