opengmk / gm8decompiler Goto Github PK
View Code? Open in Web Editor NEWA decompiler for GameMaker 8.x executables
License: GNU General Public License v2.0
A decompiler for GameMaker 8.x executables
License: GNU General Public License v2.0
Hello!
As the title suggests, I explicitly downloaded Rust to use this tool, and am very, utterly lost.
After using cargo build in console, I get this:
error: failed to run custom build command for gm8decompiler v2.1.1 (C:\Users\<User>\Desktop\GM8Decompiler-master)
Caused by:
process didn't exit successfully: C:\Users\<User>\Desktop\GM8Decompiler-master\target\debug\build\gm8decompiler-13460346f50a5470\build-script-build
(exit code: 1)
--- stdout
cargo:rustc-env=BUILD_DATE=2021/10/12
--- stderr
Error: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }
I had a minor error of cmake not being found by the program, which a bit of Googling helped with, and I've reinstalled Rust.
The error makes no sense to me, what am I missing?
Thank you very much for your help
UTF-8 support was introduced only in GM 8.1.
Before that, all GM versions had used Windows single-byte encodings, e.g. Windows-1251 for Cyrillic languages such as Russian.
https://en.wikipedia.org/wiki/Windows_code_page
Since the specific code page to be used depended on the settings of the local computer (most often on the localization of Windows actually), a program, compiled on non-UTF version of GM with strings, for example, in Russian, could display them incorrecly while being run on a computer with default code page other than 1251.
Currently such texts (string literals, comments, you name it) are unsupported, resulting in somewhat broken GMKs of such programs.
So, I would propose to add a command-line parameter to specify Windows code page to be used for GML scripts and other strings decoding on decompilation of such executables, with default value of somewhat like CP_ACP
just as described here:
https://docs.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar
Error parsing gamedata:
Reader error: asset data error: version error: expected 800 (8), found 810 (8.1)
Game Maker 8 stores source code as one single binary (.gmk, .gm81). There was a GMKSplitter written in Java that hasn't been updated for years. Is it possible for you to make a new one?
GM8Decompiler v2.1.1 for i686-pc-windows-gnu - built on 2021/3/9, #452a89b
Input file: C:\Users\user\AppData\Roaming\BrickHill\Player.exe
Verbose logging ON: verbose console output enabled
Found .rsrc section beginning at 2672128
WARNING: Failed to recover an icon: id 9, rva 0x512BB8
Loaded 8 icon(s)
Checking for standard GM8.0 format...
Checking for standard GM8.1 format
GM8.1 magic check looks intact - value is 0xF7140067
Searching for GM8.1 magic number 4145283175 from position 3560004
Decrypting GM8.1 protection (hashkey: _MJD720658057#RWK, seed1: 344183239, seed2: 433001557)
Reading settings chunk... (size: 40028)
+ Loaded settings structure
- Start in full-screen mode: false
- Interpolate colors between pixels: false
- Don't draw a border in windowed mode: false
- Display the cursor: true
- Scaling: 0
- Allow the player to resize the game window: true
- Let the game window always stay on top: false
- Colour outside the room region (RGBA): #00000000
- Set the resolution of the screen: false
- -> Color Depth: No Change
- -> Resolution: 1280x1024
- -> Frequency: No Change
- Don't show the buttons in the window captions: false
- Use synchronization to avoid tearing: false
- Disable screensavers and power saving actions: true
- Let <Esc> end the game: false
- Treat the close button as the <Esc> key: false
- Let <F1> show the game information: false
- Let <F4> switch between screen modes: false
- Let <F5> save the game and <F6> load a game: false
- Let <F9> take a screenshot of the game: false
- Game Process Priority: Normal
- Freeze the game window when the window loses focus: false
- Loading bar: Default loading progress bar
- Show your own image while loading: true
- -> Make image partially translucent: true
- -> Make translucent with alpha value: 0
- Scale progress bar image: true
- Display error messages: true
- Write error messages to file game_errors.log: true
- Abort on all error messages: false
- Treat uninitialized variables as value 0: true
- Throw an error when arguments aren't initialized correctly: false
Skipping embedded DLL 'D3DX8.dll'
Decrypting asset data... (size: 2784648, garbage1: 0, garbage2: 0)
Skipped 0 garbage DWORDs
Pro flag: true
Game ID: 720658057
+ Added extension 'd3d_model_load_fast81141' (files: 2)
+ Added extension 'Game Maker 8.2 Core' (files: 10)
+ Added extension 'Game Maker 8.2 DirectX9' (files: 6)
+ Added extension 'Game Maker 8.2 Network' (files: 1)
+ Added constant 'cluster_size' (expression: 256)
+ Added constant 'version' (expression: "0.3.1.0")
+ Added constant 'eol' (expression: chr(13)+chr(10))
+ Added sprite 'spr_button' (84x32, 3 frames)
+ Added sprite 'spr_admin' (24x24, 1 frame)
+ Added sprite 'spr_speech' (10x10, 1 frame)
+ Added sprite 'spr_check' (16x16, 2 frames)
+ Added sprite 'spr_mint' (24x24, 1 frame)
+ Added sprite 'spr_ace' (24x24, 1 frame)
+ Added sprite 'spr_royal' (24x24, 1 frame)
+ Added sprite 'spr_vap' (24x24, 1 frame)
+ Added sprite 'spr_hand' (21x32, 1 frame)
+ Added sprite 'spr_rad' (24x24, 1 frame)
+ Added sprite 'spr_column_show' (24x24, 1 frame)
+ Added sprite 'spr_column_hide' (24x24, 1 frame)
+ Added sprite 'spr_empty' (0x0, 0 frame)
+ Added sprite 'spr_hue_slider' (182x16, 1 frame)
+ Added sprite 'spr_saturation_slider' (182x16, 1 frame)
+ Added sprite 'spr_brightness_slider' (182x16, 1 frame)
+ Added sprite 'spr_slider' (18x18, 1 frame)
+ Added sprite 'spr_slider_default' (182x16, 1 frame)
+ Added background 'bkg_stud' (200x200)
+ Added background 'bkg_stud_under' (200x200)
+ Added background 'bkg_face' (512x512)
+ Added background 'bkg_slope' (200x200)
+ Added background 'bkg_spawnpoint' (256x256)
+ Added background 'bkg_message' (16x16)
+ Added background 'bkg_snow' (400x400)
+ Added background 'bkg_snow_drop' (200x200)
+ Added background 'bkg_rain' (200x200)
+ Added background 'bkg_default' (512x512)
+ Added background 'bkg_quader' (256x256)
+ Added script 'messageAdd'
+ Added script 'camera_create'
+ Added script 'window_ini'
+ Added script 'get_params'
+ Added script 'server_connect'
+ Added script 'send_auth'
+ Added script 'send_command'
+ Added script 'chat_ini'
+ Added script 'draw_ground'
+ Added script 'camera_update'
+ Added script 'world_create'
+ Added script 'handle_collisions'
+ Added script 'mouse_get_vector'
+ Added script 'ds_vec_list_add'
+ Added script 'ds_vec_list_delete'
+ Added script 'ds_vec_list_insert'
+ Added script 'ds_vec_list_size'
+ Added script 'string_to_list'
+ Added script 'string_to_list_ext'
+ Added script 'string_to_list_str'
+ Added script 'show_list'
+ Added script 'string_pos_ext'
+ Added script 'ds_list_add_mass'
+ Added script 'ds_list_copy'
+ Added script 'ds_list_add_list'
+ Added script 'scale_list'
+ Added script 'interpolate_values'
+ Added script 'GmnCollisionGet'
+ Added script 'GmnCollisionGetNext'
+ Added script 'GmnCollisionGetObject'
+ Added script 'GmnCollisionGetContactCount'
+ Added script 'GmnCollisionGetMaxImpactSpeed'
+ Added script 'GmnInit'
+ Added script 'GmnSetCompatabilityMode'
+ Added script 'GmnGetCompatabilityMode'
+ Added script 'GmnSetGravity'
+ Added script 'nf'
+ Added script 'gmi_init'
+ Added script 'gmi_set_script_transform_body'
+ Added script 'gmi_update_body'
+ Added script 'GmnCreate'
+ Added script 'GmnDestroy'
+ Added script 'GmnSetPlatformArchitecture'
+ Added script 'GmnSetSolverModel'
+ Added script 'GmnSetFrictionModel'
+ Added script 'GmnSetMinimumFrameRate'
+ Added script 'GmnUpdateFPS'
+ Added script 'GmnUpdate'
+ Added script 'GmnDestroyAllBodies'
+ Added script 'GmnSetWorldSize'
+ Added script 'GmnWorldGetBodyCount'
+ Added script 'GmnBodyLinkObject'
+ Added script 'GmnBodyUnlinkObject'
+ Added script 'GmnBodyGetLinked'
+ Added script 'GmnBodyGetLinkedObject'
+ Added script 'GmnBodyAutoGetPosRot'
+ Added script 'GmnBodySetLinearDamping'
+ Added script 'GmnBodyGetLinearDamping'
+ Added script 'GmnBodySetAngularDamping'
+ Added script 'GmnBodyGetAngularDamping'
+ Added script 'GmnCreateBody'
+ Added script 'GmnDestroyBody'
+ Added script 'GmnBodyGetWorld'
+ Added script 'GmnBodyGetCollision'
+ Added script 'GmnBodySetMaterialGroupID'
+ Added script 'GmnBodySetAutoSleep'
+ Added script 'GmnBodySetCentreOfMass'
+ Added script 'GmnBodySetMassMatrix'
+ Added script 'GmnBodySetAutoMassMatrix'
+ Added script 'GmnBodySetContinuousCollisionMode'
+ Added script 'GmnBodySetJointRecursiveCollision'
+ Added script 'GmnBodySetFreezeState'
+ Added script 'GmnBodyAddImpulse'
+ Added script 'GmnBodyGetPointGlobalVelocity'
+ Added script 'GmnBodyGetPointLocalVelocity'
+ Added script 'GmnBodyAddPointGlobalForce'
+ Added script 'GmnBodyAddPointLocalForce'
+ Added script 'GmnBodyGetLocalOmega'
+ Added script 'GmnBodySetTorque'
+ Added script 'GmnBodyAddTorque'
+ Added script 'GmnBodyGetTorque'
+ Added script 'GmnBodySetOmega'
+ Added script 'GmnBodyGetOmega'
+ Added script 'GmnBodySetOmegaAxis'
+ Added script 'GmnBodyGetPosition'
+ Added script 'GmnBodySetPosition'
+ Added script 'GmnBodyGetRotation'
+ Added script 'GmnBodySetRotation'
+ Added script 'GmnBodySetForce'
+ Added script 'GmnBodyAddForce'
+ Added script 'GmnBodyGetForce'
+ Added script 'GmnBodySetVelocity'
+ Added script 'GmnBodySetVelocityAxis'
+ Added script 'GmnBodyGetVelocity'
+ Added script 'GmnBeginConstructCompoundCollision'
+ Added script 'GmnConstructCompoundCollisionAdd'
+ Added script 'GmnEndConstructCompoundCollision'
+ Added script 'GmnModelBufferClear'
+ Added script 'GmnModelBufferAdd'
+ Added script 'GmnModelBufferAddFromList'
+ Added script 'GmnModelBufferLoadMod'
+ Added script 'GmnModelBufferCount'
+ Added script 'GmnCreateConvexHull'
+ Added script 'GmnConvexCollisionCalculateVolume'
+ Added script 'GmnReleaseCollision'
+ Added script 'GmnCollisionSetAsTriggerVolume'
+ Added script 'GmnCreateNull'
+ Added script 'GmnCreateBox'
+ Added script 'GmnCreateSphere'
+ Added script 'GmnCreateCone'
+ Added script 'GmnCreateCapsule'
+ Added script 'GmnCreateCylinder'
+ Added script 'GmnCreateChamferCylinder'
+ Added script 'GmnWorldRayCastDist'
+ Added script 'GmnWorldRayCastObject'
+ Added script 'GmnCreateTreeCollision'
+ Added script 'GmnTreeCollisionBeginBuild'
+ Added script 'GmnTreeCollisionAddFace'
+ Added script 'GmnTreeCollisionAddMesh'
+ Added script 'GmnTreeCollisionEndBuild'
+ Added script 'GmnConstraintCreateBall'
+ Added script 'GmnBallGetJointForce'
+ Added script 'GmnBallGetJointForceMag'
+ Added script 'GmnDestroyJoint'
+ Added script 'GmnCustomDestroyJoint'
+ Added script 'GmnJointSetCollisionState'
+ Added script 'GmnCustomJointSetCollisionState'
+ Added script 'GmnConstraintCreateHinge'
+ Added script 'GmnCreateCustomHinge'
+ Added script 'GmnCustomHingeSetLimits'
+ Added script 'GmnCustomHingeGetForceMagnitude'
+ Added script 'GmnCustomHingeGetTorqueMagnitude'
+ Added script 'GmnCustomHingeSetSeverCallscript'
+ Added script 'GmnCustomHingeSetBreakCallscript'
+ Added script 'GmnCustomHingeSetSeverTolerance'
+ Added script 'GmnCustomHingeSetSeverable'
+ Added script 'GmnCustomHingeSetLimitsBreakTolerance'
+ Added script 'GmnCustomHingeSetLimitsBreakable'
+ Added script 'GmnCustomHingeGetLimitsBreakTolerance'
+ Added script 'GmnCreateCustomKinematicController'
+ Added script 'GmnCustomKinematicControllerSetMaxAngularFriction'
+ Added script 'GmnCustomKinematicControllerSetMaxLinearFriction'
+ Added script 'GmnCustomKinematicControllerSetPickMode'
+ Added script 'GmnCustomKinematicControllerSetTargetPosit'
+ Added script 'GmnCustomKinematicControllerSetTargetRotation'
+ Added script 'GmnCreateCustomPlayerController'
+ Added script 'GmnCustomPlayerControllerSetMaxSlope'
+ Added script 'GmnCustomPlayerControllerSetVelocity'
+ Added script 'GmnCreateCustomRigid'
+ Added script 'GmnCustomRigidGetForceMagnitude'
+ Added script 'GmnCustomRigidGetTorqueMagnitude'
+ Added script 'GmnCustomRigidSetSeverCallscript'
+ Added script 'GmnCustomRigidSetSeverTolerance'
+ Added script 'GmnCustomRigidSetSeverable'
+ Added script 'GmnCreateCustomSlider'
+ Added script 'GmnSliderEnableLimits'
+ Added script 'GmnSliderSetLimits'
+ Added script 'GmnConstraintCreateUpVector'
+ Added script 'GmnCustomConstraintCreateDryRollingFriction'
+ Added script 'createBuoyancyDefine'
+ Added script 'GmnMaterialSetBuoyancyCallback'
+ Added script 'GmnMaterialGetDefaultGroupID'
+ Added script 'GmnMaterialCreateGroupId'
+ Added script 'GmnMaterialDestroyAllGroupID'
+ Added script 'GmnMaterialSetDefaultCollidable'
+ Added script 'GmnMaterialSetContinuousCollisionMode'
+ Added script 'GmnMaterialSetDefaultFriction'
+ Added script 'GmnMaterialSetDefaultElasticity'
+ Added script 'GmnMaterialSetDefaultSoftness'
+ Added script 'GmnMaterialSetCollisionCallback'
+ Added script 'GmnMaterialSetResponseType'
+ Added script 'player_movement'
+ Added script 'is_col'
+ Added script 'string_hex'
+ Added script 'hex_to_dec'
+ Added script 'string_limit'
+ Added script 'convertPrepare'
+ Added script 'convert_3d'
+ Added script 'convert_2d'
+ Added script 'draw_world'
+ Added script 'draw_player'
+ Added script 'load_bricks'
+ Added script 'string_split'
+ Added script 'string_to_real'
+ Added script 'new_brick'
+ Added script 'draw_bricks'
+ Added script 'larm_walk'
+ Added script 'rarm_walk'
+ Added script 'rleg_walk'
+ Added script 'lleg_walk'
+ Added script 'rarm_jump'
+ Added script 'larm_jump'
+ Added script 'rayCast'
+ Added script 'convert_2d_z'
+ Added script 'ray_find'
+ Added script 'ray_cast'
+ Added script 'in_cuboid'
+ Added script 'color_to_3d'
+ Added script 'model_load'
+ Added script 'texture_load'
+ Added script 'hcf'
+ Added script 'environmentSetAmbient'
+ Added script 'clientTopPrint'
+ Added script 'clientCenterPrint'
+ Added script 'clientBottomPrint'
+ Added script 'dec_to_hex'
+ Added script 'textbox_create'
+ Added script 'textbox_draw'
+ Added script 'player_physics'
+ Added script 'frustum_culling_init'
+ Added script 'frustum_culling'
+ Added script 'draw_figure'
+ Added script 'getKeyString'
+ Added script 'draw_health'
+ Added script 'new_projectile'
+ Added script 'draw_projectile'
+ Added script 'draw_pause'
+ Added script 'settings_create'
+ Added script 'draw_checkbox'
+ Added script 'point_line_distance'
+ Added script 'd3d_draw_block2'
+ Added script 'draw_snow'
+ Added script 'draw_rain'
+ Added script 'download_asset'
+ Added script 'fetch_asset'
+ Added script 'scr_load_model_obj'
+ Added script 'get_membership'
+ Added script 'real_string_split'
+ Added script 'draw_speech'
+ Added script 'packet_handler'
+ Added script 'draw_brick_click'
+ Added script 'strip_tags'
+ Added script 'add_brick_mesh'
+ Added script 'draw_fast_bricks_list'
+ Added script 'convert_to_fast_brick'
+ Added script 'fixImage'
+ Added script 'packet_handler_figure'
+ Added script 'packet_handler_brick'
+ Added script 'sanitize'
+ Added script 'draw_chat'
+ Added script 'draw_optimized_chat'
+ Added script 'optimize_format'
+ Added script 'strip_optimized_tags'
+ Added script 'num_fixed'
+ Added script 'post_invalidate_token'
+ Added script 'scr_rotatearb'
+ Added script 'add_rotated_brick_mesh'
+ Added script 'update_delta'
+ Added script 'update_brick_mesh'
+ Added script 'ready_for_modify'
+ Added script 'settings_save'
+ Added script 'discord_rpc_initialize'
+ Added script 'discord_rpc_setActivity'
+ Added script 'discord_rpc_callback'
+ Added script 'discord_rpc_init'
+ Added script 'discord_rpc_clearActivity'
+ Added script 'cache_texture'
+ Added script 'draw_simple_chat'
+ Added script 'apply_dead_brick_transforms'
+ Added script 'draw_cluster'
+ Added script 'remove_brick'
+ Added script 'remove_all_bricks'
+ Added script 'add_brick_to_cluster'
+ Added script 'find_brick_a_cluster'
+ Added script 'new_cluster'
+ Added script 'remove_cluster'
+ Added script 'clear_unused'
+ Added script 'setup_surfaces'
+ Added script 'update_clothes'
+ Added script 'check_shape_meshable'
+ Added script 'd3d_model_cylinder_ext'
+ Added script 'draw_hacklist'
+ Added script 'draw_hacklist_button'
+ Added script 'draw_hacklist_background'
+ Added script 'draw_hacklist_color_slider'
+ Added script 'tp_to_position'
+ Added script 'draw_esp'
+ Added script 'c_rainbow'
+ Added script 'c_rainbow_dark'
+ Added script 'clientMessage'
+ Added script 'string_replace_at'
+ Added script 'draw_active_hacks'
+ Added script 'draw_invis_brick_esp'
+ Added script 'draw_nocol_brick_esp'
+ Added script 'draw_chat_raw'
+ Added script 'draw_slider'
+ Added script 'reach'
+ Added script 'send_movement_packet'
+ Added script 'send_click_packet'
+ Added script 'send_keystroke_packet'
+ Added script 'click_delete'
+ Added script 'draw_brick_esp_clickaura'
+ Added script 'draw_brick_esp'
+ Added script 'ms_macro'
+ Added script 'draw_boundary'
+ Added font 'fnt_bold' (Arial, 12px, bold)
+ Added font 'fnt_big' (Arial, 14px, bold)
+ Added font 'fnt_anvil' (Consolas, 13px)
+ Added font 'fnt_anvil_bold' (Consolas, 13px, bold)
+ Added object obj_client (visible; persistent; depth 0)
+ Added object obj_figure (persistent; depth 0)
+ Added object obj_brick (persistent; depth 0)
+ Added object obj_topPrint (persistent; depth 0)
+ Added object obj_centerPrint (persistent; depth 0)
+ Added object obj_bottomPrint (persistent; depth 0)
+ Added object obj_team (persistent; depth 0)
+ Added object obj_slot (persistent; depth 0)
+ Added object obj_textbox (persistent; depth 0)
+ Added object obj_dummy (persistent; depth 0)
+ Added object obj_projectile (persistent; depth 0)
+ Added object obj_asset_download (persistent; depth 0)
+ Added object obj_fast_brick (persistent; depth 0)
+ Added object obj_sprite (visible; depth 0)
+ Added object obj_screen_element (depth 0)
+ Added object obj_cluster (persistent; depth 0)
+ Added object obj_light_impostor (persistent; depth 0)
+ Added object obj_sleeping_cat (persistent; depth 0)
Error parsing gamedata:
Reader error: asset data error: version error: expected 541 (5.41), found 811 (8.11)
could i use this to decompile gamedata on an APK file ? if not please support that.
Hi,
First of all, thanks for this tool! I can appreciate the work put into this.
I am trying to use it for the first time (no instructions on the README), so after building the project with
cargo build
I tried to decompile a GM project with these results:
manuel@hp15db0:~/Downloads/maldita$ gm8decompiler maldita_castilla_arcade_cabinet.exe
GM8Decompiler v2.0.6 for x86_64-unknown-linux-gnu - built on 2020/12/11, #16c5534
Input file: maldita_castilla_arcade_cabinet.exe
WARNING: Failed to recover an icon: id 1, rva 0x55B9A8
Error parsing gamedata:
Reader error: io error: failed to fill whole buffer
manuel@hp15db0:~/Downloads/maldita$ file data.win
data.win: IFF data
Maybe data.win should have another name? Is this compatible with Windows executables only?
First of all thank you for this tool, it's great.
Next, I'm sure you're aware of the GM5~GM7 Decompilers out there. There's a tool called GMD Recovery that does the job pretty well. However, it doesn't go beyond 5. I have a a game that's running on GM4 (one of the very first games I've ever made) and I really want to have the source code for it. Is it possible for you to add support to GM4?
$subj. Or maybe even older versions?
The old Java-based decompiler by Clam fails on some GM 7.0 executables, for example:
https://yadi.sk/d/rwM0eZmIUqRWQ (D2DMP_Editor.exe in the archive)
I can provide all the formats info if necessary.
Anyway thanks.
Hey, I was trying to decompile a game (where I'm pretty sure it was made in GM8, but maybe it's GM7) and I'm getting this error:
WARNING: Failed to recover an icon: id 1, rva 0x25B374
thread 'main' panicked at 'index out of bounds: the len is 1059 but the index is 4294948444', C:\projects\gm8decompiler\gm8exe\src\upx.rs:139:25
At first, I thought this maybe happens because of obfuscation, but even with -d on it was still giving me the same error.
Hello
when I try to use the decomplier it just seems to immediately crash, I've dragged the game I want to decompile or even just press a key the whole thing will just immediately crash, it boots up okay but I cannot use it at all.
GM8Decompiler crashes everytime i press a key or drag a file into it
When dragging the .gmk onto the executable, nothing happens.
Context, I'm trying to look at the assets for The Void Rains Upon Her Heart.
Can it be packaged and released? It's been a long time since the update was released.
Drag and drop did not respond in the past, what kind of operating environment does the application need?
i get this error what to do?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.