Compare commits

...

12 Commits
v1.4 ... master

Author SHA1 Message Date
Li defd3f977c Update README.md 2024-01-20 07:42:50 +00:00
Li 53c04dfe7a Update README.md 2024-01-16 02:15:51 +00:00
Li 789eb5f4f2 update things ig 2024-01-04 21:42:55 +13:00
Li 83b544655a Merge branch 'master' of https://silica.codes/Li/UGP 2024-01-04 21:21:02 +13:00
Li c41d2b107d Attempt to fix scaling issues 2024-01-04 21:20:45 +13:00
Li d35581525d Update LICENSE 2024-01-04 07:14:08 +00:00
random() 11fd69f882 Update LICENSE 2024-01-04 07:12:08 +00:00
Li 8bfe2bad45 Update to use winspool.drv && include src to libeay patch 2024-01-04 20:07:32 +13:00
Li 7234acf4b1 Trans rights <3 2023-06-08 13:26:02 +12:00
Li 49e29d622b Fix issues on Modern Windows 2023-06-08 13:25:06 +12:00
Li 6b5663506c Support XP Better 2022-09-09 06:02:44 +12:00
Li 4c847bc0dc remove excess spaces 2022-07-08 22:12:40 +12:00
75 changed files with 2463 additions and 1476 deletions

2
.gitignore vendored
View File

@ -2,3 +2,5 @@
*/bin/*
*/Release/*
*/Debug/*
*/.vs/*
*.pdb

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) <year> <copyright holders>
Copyright (c) 2022 Li
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View File

@ -1,5 +1,44 @@
# UGP
# Universal GameMaker Patcher
Originally created to enable the built in PSVita support in GM Studio, it has evolved into the most universal key generator for the old GameMaker programs
gamemaker-studio allows you to provide any modules you want into your license
all options are:
```
HTML5
iOS
android
androidTest
AndroidTest
AndroidMips
AmazonFire
Mac
Tizen
WindowsTest
Linux
RaspberryPi
BlackBerry
WindowsPhone
Symbia
Windows8
Windows8RT
WindowsPhone8
yycompiler
NeoGeoX
ps3
ps4
psvita
wiiu
3ds
xboxone
WindowsUAP
AndroidTV
AppleTV
JavaScript
AmazonFireExpired
Free
```
note: not all of these are actually avalible for download on yoyogames servers, for example BlackBerrry, RaspberryPi, etc.
and so will not actually *work* if added into your license, the default options is for all modules that are public on yoyogames servers.
Universal GameMaker Patcher
Created in GameMaker: HTML5.

View File

@ -1,24 +1,10 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<assets>
<datafiles number="3">
<datafile>
<name>libeay32.dll</name>
<filename>libeay32.dll</filename>
<origname>C:\Users\User\Documents\git\UGP\UGP.gmx\\\datafiles\libeay32.dll</origname>
<exists>-1</exists>
<size>1207808</size>
<exportAction>2</exportAction>
<exportDir></exportDir>
<overwrite>0</overwrite>
<freeData>-1</freeData>
<removeEnd>0</removeEnd>
<store>-1</store>
<data>datafiles\libeay32.dll</data>
</datafile>
<datafile>
<name>UGP.dll</name>
<filename>UGP.dll</filename>
<origname>C:\Users\User\Documents\git\UGP\UGP.gmx\\\datafiles\UGP.dll</origname>
<origname>C:\Users\Li\Desktop\UGP\UGP\UGP.gmx\\\datafiles\UGP.dll</origname>
<exists>-1</exists>
<size>97280</size>
<exportAction>2</exportAction>
@ -32,9 +18,9 @@
<datafile>
<name>ModuleDownloader.exe</name>
<filename>ModuleDownloader.exe</filename>
<origname>C:\Users\User\Documents\git\UGP\UGP.gmx\\\datafiles\ModuleDownloader.exe</origname>
<origname>C:\Users\Li\Desktop\UGP\UGP\UGP.gmx\\\datafiles\ModuleDownloader.exe</origname>
<exists>-1</exists>
<size>2146816</size>
<size>2147328</size>
<exportAction>2</exportAction>
<exportDir></exportDir>
<overwrite>0</overwrite>
@ -43,19 +29,33 @@
<store>-1</store>
<data>datafiles\ModuleDownloader.exe</data>
</datafile>
<datafile>
<name>winspool.dll</name>
<filename>winspool.dll</filename>
<origname>C:\Users\Li\Desktop\UGP\UGP\UGP.gmx\\\datafiles\winspool.dll</origname>
<exists>-1</exists>
<size>75776</size>
<exportAction>2</exportAction>
<exportDir></exportDir>
<overwrite>0</overwrite>
<freeData>-1</freeData>
<removeEnd>0</removeEnd>
<store>-1</store>
<data>datafiles\winspool.dll</data>
</datafile>
</datafiles>
<options>
<fullscreen>-1</fullscreen>
<interpolate>0</interpolate>
<interpolate>-1</interpolate>
<noborder>0</noborder>
<showcursor>0</showcursor>
<scale>-1</scale>
<sizeable>0</sizeable>
<scale>0</scale>
<sizeable>-1</sizeable>
<stayontop>0</stayontop>
<windowcolor>0</windowcolor>
<changeresolution>0</changeresolution>
<colordepth>0</colordepth>
<resolution>0</resolution>
<resolution>6</resolution>
<frequency>0</frequency>
<nobuttons>0</nobuttons>
<freeze>0</freeze>
@ -84,18 +84,18 @@
<aborterrors>0</aborterrors>
<variableerrors>0</variableerrors>
<argumenterrors>-1</argumenterrors>
<author>decompiler clan :police_car: :police_car: :police_car:</author>
<version></version>
<author>Li</author>
<version>1.5</version>
<lastchanged>44738.8179982292</lastchanged>
<information></information>
<version_major>1</version_major>
<version_minor>0</version_minor>
<version_release>0</version_release>
<version_build>0</version_build>
<version_company></version_company>
<version_product></version_product>
<version_copyright></version_copyright>
<version_description></version_description>
<version_company>The Crystal System</version_company>
<version_product>Universal GameMaker Patcher</version_product>
<version_copyright>no</version_copyright>
<version_description>Patcher for GM5, 6, 8.1 HTML5 and Studio 1.4</version_description>
<html5_index>&lt;undefined&gt;</html5_index>
<html5_loadingbar></html5_loadingbar>
<html5_alwaysreload>0</html5_alwaysreload>
@ -147,6 +147,7 @@
</sprites>
<sprite>sprites\spr_checkmark</sprite>
<sprite>sprites\spr_mute</sprite>
<sprite>sprites\spr_fullscreen</sprite>
<sprite>sprites\spr_back</sprite>
<sprite>sprites\spr_go</sprite>
<sprite>sprites\spr_textinput</sprite>
@ -159,11 +160,11 @@
<paths name="paths"/>
<scripts name="scripts">
<scripts name="UI">
<script>scripts\create_gmhtml5_menu.gml</script>
<script>scripts\create_status.gml</script>
<script>scripts\create_product_menu.gml</script>
<script>scripts\create_status.gml</script>
<script>scripts\create_gm81_menu.gml</script>
<script>scripts\create_gm5_menu.gml</script>
<script>scripts\create_gmhtml5_menu.gml</script>
<script>scripts\create_studio_menu.gml</script>
<script>scripts\show_modules.gml</script>
</scripts>
@ -194,6 +195,11 @@
<script>scripts\dectohex.gml</script>
<script>scripts\string_starts_with.gml</script>
</scripts>
<scripts name="Ext">
<script>scripts\draw_text_center.gml</script>
<script>scripts\fullscreen_toggle.gml</script>
<script>scripts\fullscreen_off.gml</script>
</scripts>
</scripts>
<fonts name="fonts">
<font>fonts\fn_text</font>
@ -205,7 +211,7 @@
<object>objects\obj_checkmark_old</object>
<object>objects\obj_checkmark_modules</object>
<object>objects\obj_checkmark_updater</object>
<object>objects\obj_checkmark_libeay32</object>
<object>objects\obj_checkmark_winspool</object>
<object>objects\obj_checkmark_base</object>
</objects>
<objects name="Buttons">
@ -222,6 +228,7 @@
</objects>
<object>objects\obj_back</object>
<object>objects\obj_mute</object>
<object>objects\obj_fullscreen</object>
<object>objects\obj_lstbox_entry_module</object>
</objects>
<objects name="TextInputs">
@ -245,11 +252,10 @@
<object>objects\obj_draw_exports</object>
<object>objects\obj_status_draw</object>
<object>objects\obj_draw</object>
<object>objects\obj_cursor</object>
</objects>
</objects>
</objects>
<rooms name="rooms" roommaxid="100003" room_maxtileid="10000000">
<rooms name="rooms" roommaxid="100002" room_maxtileid="10000000">
<room>rooms\rm_product_select</room>
<room>rooms\rm_crack_gm8</room>
<room>rooms\rm_crack_studio</room>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,19 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>spr_checkmark</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>0</depth>
<persistent>0</persistent>
<parentName>obj_checkmark_base</parentName>
<maskName>&lt;undefined&gt;</maskName>
<events/>
<PhysicsObject>0</PhysicsObject>
<PhysicsObjectSensor>0</PhysicsObjectSensor>
<PhysicsObjectShape>0</PhysicsObjectShape>
<PhysicsObjectDensity>0.5</PhysicsObjectDensity>
<PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
<PhysicsObjectGroup>0</PhysicsObjectGroup>
<PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
<PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
</object>

View File

@ -8,6 +8,30 @@
<parentName>&lt;undefined&gt;</parentName>
<maskName>&lt;undefined&gt;</maskName>
<events>
<event eventtype="3" enumb="0">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>x = mouse_x;
y = mouse_y;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="8" enumb="0">
<action>
<libid>1</libid>
@ -25,7 +49,7 @@
<arguments>
<argument>
<kind>1</kind>
<string>draw_sprite(spr_cursor, 0, mouse_x, mouse_y);
<string>draw_sprite(spr_cursor, 0, window_mouse_get_x(), window_mouse_get_y());
</string>
</argument>

View File

@ -124,7 +124,7 @@ centerY = room_height/2;
draw_set_font(fn_text);
draw_set_color(c_white);
draw_text(0,0,"Press 'ESC' to exit.");
draw_text_center(0,"Press 'ESC' to exit.");
if(draw_flashing_text){
draw_text(centerX - (string_width(global.flashing_msg) / 2), room_height - (string_height(global.flashing_msg)), global.flashing_msg);

View File

@ -0,0 +1,132 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>spr_fullscreen</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>0</depth>
<persistent>-1</persistent>
<parentName>&lt;undefined&gt;</parentName>
<maskName>&lt;undefined&gt;</maskName>
<events>
<event eventtype="0" enumb="0">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>checked = 0;
image_speed = 0;
image_index = 0;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="6" enumb="11">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>if(checked)
image_index = 2;
else
image_index = 0
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="6" enumb="10">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>if(checked)
image_index = 3;
else
image_index = 1
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="6" enumb="4">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>fullscreen_toggle();
if(checked == 0)
checked = 1;
else
checked = 0;
if(checked)
image_index = 3;
else
image_index = 1;
</string>
</argument>
</arguments>
</action>
</event>
</events>
<PhysicsObject>0</PhysicsObject>
<PhysicsObjectSensor>0</PhysicsObjectSensor>
<PhysicsObjectShape>0</PhysicsObjectShape>
<PhysicsObjectDensity>0.5</PhysicsObjectDensity>
<PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
<PhysicsObjectGroup>0</PhysicsObjectGroup>
<PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
<PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
</object>

View File

@ -97,7 +97,7 @@ image_index = 0;
<kind>1</kind>
<string>error_occurred = 0;
license_gm81(obj_textinput_name.text, obj_textinput_key.text, obj_checkmark_libeay32.checked);
license_gm81(obj_textinput_name.text, obj_textinput_key.text, obj_checkmark_winspool.checked);
obj_draw.back_down = true;
if(!error_occurred)

View File

@ -97,7 +97,7 @@ image_index = 0;
<kind>1</kind>
<string>error_occurred = 0;
license_gmhtml5(obj_textinput_name.text, obj_textinput_key.text, obj_checkmark_libeay32.checked);
license_gmhtml5(obj_textinput_name.text, obj_textinput_key.text, obj_checkmark_winspool.checked);
obj_draw.back_down = true;
if(!error_occurred)

View File

@ -98,7 +98,7 @@ image_index = 0;
<string>error_occurred = 0;
///license_gmhtml5(name, answer, key, email, type, export_modules, do_libeay32, download_exports)
license_studio(obj_textinput_name.text, string(obj_textinput_answer.text), obj_textinput_key.text, obj_textinput_email.text, obj_textinput_type.text, global.export_modules, obj_checkmark_libeay32.checked, obj_checkmark_modules.checked, obj_checkmark_old.checked)
license_studio(obj_textinput_name.text, string(obj_textinput_answer.text), obj_textinput_key.text, obj_textinput_email.text, obj_textinput_type.text, global.export_modules, obj_checkmark_winspool.checked, obj_checkmark_modules.checked, obj_checkmark_old.checked)
obj_draw.back_down = true;
if(!error_occurred)
{

View File

@ -36,6 +36,43 @@ if(obj_draw.back_down == false &amp;&amp; obj_draw.back_up == false)
obj_draw.action += "game_end();";
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="7" enumb="4">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>///Check if the room is too big for the display.
var display_height;
display_height = display_get_height()
var display_width;
display_width = display_get_width()
if(room_width &gt; display_width &amp;&amp; room_height &gt; display_height){
fullscreen_off();
obj_fullscreen.checked = 1;
}
</string>
</argument>
</arguments>
@ -58,10 +95,11 @@ if(obj_draw.back_down == false &amp;&amp; obj_draw.back_up == false)
<arguments>
<argument>
<kind>1</kind>
<string>external_free("UGP.dll");
<string>/// delete included files
external_free("UGP.dll");
file_delete("UGP.dll");
file_delete("libeay32.dll");
file_delete("winspool.dll");
file_delete("ModuleDownloader.exe");
</string>
</argument>
@ -85,15 +123,26 @@ file_delete("ModuleDownloader.exe");
<arguments>
<argument>
<kind>1</kind>
<string>//UGP.DLL imports
<string>///Initalize
//UGP.DLL imports
global.getMachineGuid = external_define("UGP.dll","GetMachineGuid",dll_cdecl,ty_string,0);
global.MD5 = external_define("UGP.dll","MD5",dll_cdecl,ty_string,1,ty_string);
global.setBinKey = external_define("UGP.dll","SetBinKey",dll_cdecl,ty_real,3,ty_string, ty_string, ty_string);
global.generateGM6Key = external_define("UGP.dll","GenerateGM6Key",dll_cdecl,ty_string,1,ty_string);
global.getAppDataFolder = external_define("UGP.dll","GetAppDataFolder",dll_cdecl,ty_string,0);
global.getLocalAppDataFolder = external_define("UGP.dll","GetLocalAppDataFolder",dll_cdecl,ty_string,0);
global.APPDATA = external_call(global.getAppDataFolder);
global.LOCALAPPDATA = external_call(global.getLocalAppDataFolder);
global.download_exports = false;
instance_create((room_width-(44/2))-10, (room_height-(44/2))-10, obj_mute);
instance_create(35, 35, obj_fullscreen);
cursor_sprite = spr_cursor;
global.direction = 0;
sound_loop(snd_mus);
@ -104,6 +153,8 @@ for(i = 0; i &lt; 1000; i+=1)
obj = instance_create(obj_x, obj_y, obj_star);
}
</string>
</argument>
</arguments>

View File

@ -26,7 +26,7 @@
<argument>
<kind>1</kind>
<string>inputid = "email";
text = "cute.girls@dying.moe";
text = "trans@rights.lgbt";
image_speed = 0;
image_index = 0;
global.active = "";

View File

@ -40,7 +40,7 @@
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
</backgrounds>
<views>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="999" vborder="999" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>

View File

@ -40,7 +40,7 @@
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
</backgrounds>
<views>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="999" vborder="999" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>

View File

@ -40,7 +40,7 @@
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
</backgrounds>
<views>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="999" vborder="999" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>

View File

@ -40,7 +40,7 @@
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
</backgrounds>
<views>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="999" vborder="999" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>

View File

@ -40,7 +40,7 @@
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
</backgrounds>
<views>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="1920" hview="1080" xport="0" yport="0" wport="1920" hport="1080" hborder="999" vborder="999" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
@ -51,8 +51,7 @@
</views>
<instances>
<instance index="0" objName="obj_main" x="0" y="0" name="inst_14C62424" locked="0" code="" scaleX="1" scaleY="1" colour="-1" rotation="0"/>
<instance index="29" objName="obj_draw" x="16" y="0" name="inst_A00DD3E8" locked="0" code="" scaleX="1" scaleY="1" colour="-1" rotation="0"/>
<instance index="30" objName="obj_cursor" x="32" y="0" name="inst_DA3296D2" locked="0" code="" scaleX="1" scaleY="1" colour="-1" rotation="0"/>
<instance index="30" objName="obj_draw" x="16" y="0" name="inst_A00DD3E8" locked="0" code="" scaleX="1" scaleY="1" colour="-1" rotation="0"/>
</instances>
<tiles/>
<PhysicsWorld>0</PhysicsWorld>

View File

@ -40,7 +40,7 @@
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
</backgrounds>
<views>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="999" vborder="999" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>

View File

@ -1,6 +1,6 @@
global.direction = 1;
instance_create(centerX-250, centerY-150, obj_checkmark_libeay32);
instance_create(centerX-250, centerY-150, obj_checkmark_winspool);
//instance_create(centerX-250, centerY-90, obj_checkmark_updater);
instance_create(centerX-290, centerY+20, obj_textinput_name);
instance_create(centerX-290, centerY+110, obj_textinput_key);

View File

@ -1,6 +1,6 @@
global.direction = 1;
instance_create(centerX-250, centerY-150, obj_checkmark_libeay32);
instance_create(centerX-250, centerY-150, obj_checkmark_winspool);
instance_create(centerX-290, centerY+20, obj_textinput_name);
instance_create(centerX-290, centerY+110, obj_textinput_key);
instance_create(centerX, centerY+250, obj_go_gmhtml5);

View File

@ -1,6 +1,6 @@
global.direction = 1;
instance_create(centerX-250, centerY-150, obj_checkmark_libeay32);
instance_create(centerX-250, centerY-150, obj_checkmark_winspool);
instance_create(centerX-250, centerY-90, obj_checkmark_modules);
instance_create(centerX-290, centerY-30, obj_textinput_name);
instance_create(centerX-290, centerY+15, obj_textinput_key);

View File

@ -0,0 +1,2 @@
///draw_text(y, text)
draw_text((room_width / 2) - (string_width(argument1) / 2), argument0, argument1);

View File

@ -0,0 +1,10 @@
///fullscreen_off()
window_set_fullscreen(false);
window_set_size(960, 544);
window_set_region_size(window_get_width(), window_get_height(), true);
window_set_region_scale(0, true);
window_set_position((display_get_width() / 2) - (window_get_width() / 2), (display_get_height() / 2) - (window_get_height() / 2));

View File

@ -0,0 +1,7 @@
///fullscreen_toggle()
if(window_get_fullscreen()) {
fullscreen_off();
}
else{
window_set_fullscreen(true);
}

View File

@ -1,4 +1,4 @@
///license_gm81(name, key, do_libeay32)
///license_gm81(name, key, do_winspool)
var name;
var key;
var machineGuid;
@ -9,11 +9,10 @@ key = argument1;
if(argument2)
{
dll_path = environment_get_variable("APPDATA")+"\GameMaker\libeay32.dll";
dll_path = global.APPDATA+"\GameMaker\winspool.drv";
if(file_exists(dll_path))
file_delete(dll_path);
//export_include_file_location("libeay32.dll", dll_path);
file_copy("libeay32.dll", dll_path);
file_copy("winspool.dll", dll_path);
}
guid = external_call(global.getMachineGuid);
@ -28,7 +27,7 @@ xmlData[0] = name;
xmlData[1] = key;
xmlData[2] = "GameMaker for Windows";
xmlData[3] = chr($0a)+chr($09)+'rvunnwPVsFRMqCuuQ0u3cifBmlwEdRNvZZW3G6gYYEb1/Qs4p3PTUPmewyVck8YrhLZA'+chr($0a)+chr($09)+'Dc70u0IEX03KrCwz8RsQLITCa4iDJ6bkn+PjtUQeGNAr3haNpmPw0/v/v9K6haLXMaVy'+chr($0a)+chr($09)+'4QbSG4+JX5uqefP12xCvJGMMI+dkHDEgOBk='+chr($0a)+chr($09);
plistPath = environment_get_variable("LOCALAPPDATA")+"\GameMaker8.1\license.plist";
plistPath = global.LOCALAPPDATA+"\GameMaker8.1\license.plist";
plistFile = file_text_open_write(plistPath);
//datetime_str = string_replace(string_format(current_day,2,0)," ","0")+"/"+string_replace(string_format(current_month,2,0)," ","0")+"/"+string(current_year mod 100);

View File

@ -1,4 +1,4 @@
///license_gmhtml5(name, key, do_libeay32)
///license_gmhtml5(name, key, do_winspool)
var name;
var key;
var machineGuid;
@ -9,11 +9,10 @@ key = argument1;
if(argument2)
{
dll_path = environment_get_variable("APPDATA")+"\GameMaker-HTML5\libeay32.dll";
dll_path = global.APPDATA+"\GameMaker-HTML5\winspool.drv";
if(file_exists(dll_path))
file_delete(dll_path);
//export_include_file_location("libeay32.dll", dll_path);
file_copy("libeay32.dll", dll_path);
file_copy("winspool.dll", dll_path);
}
@ -29,7 +28,7 @@ xmlData[0] = name;
xmlData[1] = key;
xmlData[2] = "GameMaker for HTML5";
xmlData[3] = chr($0a)+chr($09)+'rvunnwPVsFRMqCuuQ0u3cifBmlwEdRNvZZW3G6gYYEb1/Qs4p3PTUPmewyVck8YrhLZA'+chr($0a)+chr($09)+'Dc70u0IEX03KrCwz8RsQLITCa4iDJ6bkn+PjtUQeGNAr3haNpmPw0/v/v9K6haLXMaVy'+chr($0a)+chr($09)+'4QbSG4+JX5uqefP12xCvJGMMI+dkHDEgOBk='+chr($0a)+chr($09);
plistPath = environment_get_variable("LOCALAPPDATA")+"\GameMaker-HTML5\license.plist";
plistPath = global.LOCALAPPDATA+"\GameMaker-HTML5\license.plist";
plistFile = file_text_open_write(plistPath);
//datetime_str = string_replace(string_format(current_day,2,0)," ","0")+"/"+string_replace(string_format(current_month,2,0)," ","0")+"/"+string(current_year mod 100);

View File

@ -1,4 +1,4 @@
///license_studio(name, answer, key, email, type, export_modules, do_libeay32, download_exports, old_version)
///license_studio(name, answer, key, email, type, export_modules, do_winspool, download_exports, old_version)
var name;
var key;
var answer;
@ -15,17 +15,16 @@ email = argument3;
type = argument4;
export_modules = argument5;
do_libeay32 = argument6
do_winspool = argument6
global.download_exports = argument7
old_version = argument8
if(do_libeay32)
if(do_winspool)
{
dll_path = environment_get_variable("APPDATA")+"\GameMaker-Studio\libeay32.dll";
dll_path = global.APPDATA+"\GameMaker-Studio\winspool.drv";
if(file_exists(dll_path))
file_delete(dll_path);
//export_include_file_location("libeay32.dll", dll_path);
file_copy("libeay32.dll", dll_path);
file_copy("winspool.dll", dll_path);
}
addons_string = "";
@ -73,7 +72,7 @@ xmlData[5] = key;
xmlData[6] = "GameMaker:Studio";
xmlData[7] = chr($0a)+chr($09)+'rvunnwPVsFRMqCuuQ0u3cifBmlwEdRNvZZW3G6gYYEb1/Qs4p3PTUPmewyVck8YrhLZA'+chr($0a)+chr($09)+'Dc70u0IEX03KrCwz8RsQLITCa4iDJ6bkn+PjtUQeGNAr3haNpmPw0/v/v9K6haLXMaVy'+chr($0a)+chr($09)+'4QbSG4+JX5uqefP12xCvJGMMI+dkHDEgOBk='+chr($0a)+chr($09);
plistPath = environment_get_variable("LOCALAPPDATA")+"\GameMaker-Studio\license.plist";
plistPath = global.LOCALAPPDATA+"\GameMaker-Studio\license.plist";
plistFile = file_text_open_write(plistPath);
file_text_write_string(plistFile,'<?xml version="1.0" encoding="UTF-8"?>'+chr($0a));

View File

@ -1,17 +1,12 @@
///generate_gm6(name)
var name;
var new_name;
var start;
var encname;
///setup_views()
// Pad name out with "X" (if its < 5 chars long)
new_name = string_upper(pad(name, 5, "X"));
var display_height = display_get_height()
var display_width = display_get_width()
// Start 5 characters from the end
start = (string_length(new_name) - 5)+1;
// Extract last 5 characters, into a 2 char and 3 char string
encname = string_copy(new_name, start, 2);
external_call(global.generateGM6Key, argument0);
if(room_height > display_height){
view_hview[view_current] = display_height;
}
if(room_width > display_width){
view_hview[view_current] = display_width;
}

View File

@ -0,0 +1,27 @@
///setup views()
var display_height;
display_height = display_get_height()
var display_width;
display_width = display_get_width()
if(room_height > display_height){
view_hview[view_current] = display_height;
view_hport[view_current] = display_height;
}
else{
view_hview[view_current] = room_height;
view_hport[view_current] = room_height;
}
if(room_width > display_width){
view_wview[view_current] = display_width;
view_wview[view_current] = display_width;
}
else{
view_wview[view_current] = room_width;
view_wport[view_current] = room_width;
}

View File

@ -8,7 +8,6 @@ else{
file_delete(location+"\ModuleDownloader.exe");
}
//export_include_file_location("ModuleDownloader.exe", location+"\ModuleDownloader.exe");
file_copy("ModuleDownloader.exe", location+"\ModuleDownloader.exe");
execute_program(location+"\ModuleDownloader.exe","",false);

Binary file not shown.

Binary file not shown.

View File

@ -1,13 +1,13 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<sound>
<kind>1</kind>
<extension>.mid</extension>
<origname>C:\Users\User\Documents\git\UGP\UGP.gmx\\\sound\audio\snd_mus.mid</origname>
<kind>3</kind>
<extension>.mp3</extension>
<origname>C:\Users\Li\Desktop\UGP\UGP\UGP.gmx\\\sound\audio\snd_mus.mp3</origname>
<effects>0</effects>
<volume>1</volume>
<pan>0</pan>
<mp3BitRate>192</mp3BitRate>
<oggQuality>6</oggQuality>
<preload>-1</preload>
<data>snd_mus.mid</data>
<data>snd_mus.mp3</data>
</sound>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -1,7 +1,7 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<sprite>
<xorig>41</xorig>
<yorigin>41</yorigin>
<xorig>44</xorig>
<yorigin>44</yorigin>
<colkind>0</colkind>
<coltolerance>0</coltolerance>
<sepmasks>0</sepmasks>

View File

@ -0,0 +1,19 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<sprite>
<xorig>25</xorig>
<yorigin>25</yorigin>
<colkind>0</colkind>
<coltolerance>0</coltolerance>
<sepmasks>0</sepmasks>
<bboxmode>2</bboxmode>
<bbox_left>3</bbox_left>
<bbox_right>46</bbox_right>
<bbox_top>3</bbox_top>
<bbox_bottom>46</bbox_bottom>
<frames>
<frame index="0">images\spr_fullscreen_0.png</frame>
<frame index="1">images\spr_fullscreen_1.png</frame>
<frame index="2">images\spr_fullscreen_2.png</frame>
<frame index="3">images\spr_fullscreen_3.png</frame>
</frames>
</sprite>

View File

@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34330.188
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibeayPatch", "LibeayPatch\LibeayPatch.vcxproj", "{122013EF-A5F6-40A0-A8E4-71F725C240A4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{122013EF-A5F6-40A0-A8E4-71F725C240A4}.Debug|x64.ActiveCfg = Debug|x64
{122013EF-A5F6-40A0-A8E4-71F725C240A4}.Debug|x64.Build.0 = Debug|x64
{122013EF-A5F6-40A0-A8E4-71F725C240A4}.Debug|x86.ActiveCfg = Debug|Win32
{122013EF-A5F6-40A0-A8E4-71F725C240A4}.Debug|x86.Build.0 = Debug|Win32
{122013EF-A5F6-40A0-A8E4-71F725C240A4}.Release|x64.ActiveCfg = Release|x64
{122013EF-A5F6-40A0-A8E4-71F725C240A4}.Release|x64.Build.0 = Release|x64
{122013EF-A5F6-40A0-A8E4-71F725C240A4}.Release|x86.ActiveCfg = Release|Win32
{122013EF-A5F6-40A0-A8E4-71F725C240A4}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {41A99AAD-D35F-4E17-A5BC-8DA7837843FE}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,39 @@
#include <windows.h>
#include <stdio.h>
#include "OpenSSLPatch.h"
void createDebugConsole() {
FILE* fDummy;
AllocConsole();
freopen_s(&fDummy, "CONIN$", "r", stdin);
freopen_s(&fDummy, "CONOUT$", "w", stderr);
freopen_s(&fDummy, "CONOUT$", "w", stdout);
}
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
#ifdef _DEBUG
createDebugConsole();
#endif
PatchLibeay32();
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
UnpatchLibeay32();
break;
}
return TRUE;
}

View File

@ -0,0 +1,183 @@
/*
* Shamelessly stolen from:
* https://github.com/adamhlt/IAT-Hooking/tree/main
*/
#include "Hook.h"
#include <TlHelp32.h>
#include <Psapi.h>
#include <Shlwapi.h>
/**
* Function who retrieve the base address of the main module of the current process.
* \return : the base address if it's successfull else nullptr
*/
LPVOID IAT::GetCurrentProcessModule()
{
char lpCurrentModuleName[MAX_PATH];
char lpImageName[MAX_PATH];
GetProcessImageFileNameA(GetCurrentProcess(), lpImageName, MAX_PATH);
MODULEENTRY32 ModuleList{};
ModuleList.dwSize = sizeof(ModuleList);
const HANDLE hProcList = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, 0);
if (hProcList == INVALID_HANDLE_VALUE)
return nullptr;
if (!Module32First(hProcList, &ModuleList))
return nullptr;
wcstombs_s(nullptr, lpCurrentModuleName, ModuleList.szModule, MAX_PATH);
lpCurrentModuleName[MAX_PATH - 1] = '\0';
if (strstr(lpImageName, lpCurrentModuleName) != nullptr)
return ModuleList.hModule;
while (Module32Next(hProcList, &ModuleList))
{
wcstombs_s(nullptr, lpCurrentModuleName, ModuleList.szModule, MAX_PATH);
lpCurrentModuleName[MAX_PATH - 1] = '\0';
if (strstr(lpImageName, lpCurrentModuleName) != nullptr)
return ModuleList.hModule;
}
return nullptr;
}
/**
* Function to hook functions in the IAT of a specified module.
* \param lpModuleName : name of the module wich contains the function you want to hook.
* \param lpFunctionName : name of the function you want to hook.
* \param lpFunction : pointer of the new function.
* \param lpTargetModuleName : name of the module you want to target.
* \return : the pointer of the original function or nullptr if it failed.
*/
LPVOID IAT::Hook(LPCSTR lpModuleName, LPCSTR lpFunctionName, const LPVOID lpFunction, LPCSTR lpTargetModuleName)
{
const HANDLE hModule = GetModuleHandleA(lpTargetModuleName);
const auto lpImageDOSHeader = (PIMAGE_DOS_HEADER)(hModule);
if (lpImageDOSHeader == nullptr)
return nullptr;
const auto lpImageNtHeader = (PIMAGE_NT_HEADERS)((DWORD_PTR)lpImageDOSHeader + lpImageDOSHeader->e_lfanew);
const IMAGE_DATA_DIRECTORY ImportDataDirectory = lpImageNtHeader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT];
auto lpImageImportDescriptor = (PIMAGE_IMPORT_DESCRIPTOR)((DWORD_PTR)hModule + ImportDataDirectory.VirtualAddress);
while (lpImageImportDescriptor->Characteristics != 0)
{
const auto lpCurrentModuleName = (LPSTR)((DWORD_PTR)lpImageDOSHeader + lpImageImportDescriptor->Name);
if (_stricmp(lpCurrentModuleName, lpModuleName) != 0)
{
lpImageImportDescriptor++;
continue;
}
auto lpImageOrgThunkData = (PIMAGE_THUNK_DATA)((DWORD_PTR)lpImageDOSHeader + lpImageImportDescriptor->OriginalFirstThunk);
auto lpImageThunkData = (PIMAGE_THUNK_DATA)((DWORD_PTR)lpImageDOSHeader + lpImageImportDescriptor->FirstThunk);
while (lpImageOrgThunkData->u1.AddressOfData != 0)
{
const auto lpImportData = (PIMAGE_IMPORT_BY_NAME)((DWORD_PTR)lpImageDOSHeader + lpImageOrgThunkData->u1.AddressOfData);
if (strcmp(lpFunctionName, (char*)lpImportData->Name) == 0)
{
DWORD dwJunk = 0;
MEMORY_BASIC_INFORMATION mbi;
VirtualQuery(lpImageThunkData, &mbi, sizeof(MEMORY_BASIC_INFORMATION));
if (!VirtualProtect(mbi.BaseAddress, mbi.RegionSize, PAGE_READWRITE, &mbi.Protect))
return nullptr;
const auto lpOrgFunction = (LPVOID)lpImageThunkData->u1.Function;
#if defined _M_IX86
lpImageThunkData->u1.Function = (DWORD_PTR)lpFunction;
#elif defined _M_X64
lpImageThunkData->u1.Function = (DWORD_PTR)lpFunction;
#endif
if (VirtualProtect(mbi.BaseAddress, mbi.RegionSize, mbi.Protect, &dwJunk))
return lpOrgFunction;
}
lpImageThunkData++;
lpImageOrgThunkData++;
}
lpImageImportDescriptor++;
}
return nullptr;
}
/**
* Function to hook functions in the IAT of a the main module of the process.
* \param lpModuleName : name of the module wich contains the function.
* \param lpFunctionName : name of the function you want to hook.
* \param lpFunction : pointer of the new function.
* \return : the pointer of the original function or nullptr if it failed.
*/
LPVOID IAT::Hook(LPCSTR lpModuleName, LPCSTR lpFunctionName, const LPVOID lpFunction)
{
const LPVOID hModule = GetCurrentProcessModule();
const auto lpImageDOSHeader = (PIMAGE_DOS_HEADER)(hModule);
if (lpImageDOSHeader == nullptr)
return nullptr;
const auto lpImageNtHeader = (PIMAGE_NT_HEADERS)((DWORD_PTR)lpImageDOSHeader + lpImageDOSHeader->e_lfanew);
const IMAGE_DATA_DIRECTORY ImportDataDirectory = lpImageNtHeader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT];
auto lpImageImportDescriptor = (PIMAGE_IMPORT_DESCRIPTOR)((DWORD_PTR)hModule + ImportDataDirectory.VirtualAddress);
while (lpImageImportDescriptor->Characteristics != 0)
{
const auto lpCurrentModuleName = (LPSTR)((DWORD_PTR)lpImageDOSHeader + lpImageImportDescriptor->Name);
if (_stricmp(lpCurrentModuleName, lpModuleName) != 0)
{
lpImageImportDescriptor++;
continue;
}
auto lpImageOrgThunkData = (PIMAGE_THUNK_DATA)((DWORD_PTR)lpImageDOSHeader + lpImageImportDescriptor->OriginalFirstThunk);
auto lpImageThunkData = (PIMAGE_THUNK_DATA)((DWORD_PTR)lpImageDOSHeader + lpImageImportDescriptor->FirstThunk);
while (lpImageOrgThunkData->u1.AddressOfData != 0)
{
const auto lpImportData = (PIMAGE_IMPORT_BY_NAME)((DWORD_PTR)lpImageDOSHeader + lpImageOrgThunkData->u1.AddressOfData);
if (strcmp(lpFunctionName, (char*)lpImportData->Name) == 0)
{
DWORD dwJunk = 0;
MEMORY_BASIC_INFORMATION mbi;
VirtualQuery(lpImageThunkData, &mbi, sizeof(MEMORY_BASIC_INFORMATION));
if (!VirtualProtect(mbi.BaseAddress, mbi.RegionSize, PAGE_READWRITE, &mbi.Protect))
return nullptr;
const auto lpOrgFunction = (LPVOID)lpImageThunkData->u1.Function;
#if defined _M_IX86
lpImageThunkData->u1.Function = (DWORD_PTR)lpFunction;
#elif defined _M_X64
lpImageThunkData->u1.Function = (DWORD_PTR)lpFunction;
#endif
if (VirtualProtect(mbi.BaseAddress, mbi.RegionSize, mbi.Protect, &dwJunk))
return lpOrgFunction;
}
lpImageThunkData++;
lpImageOrgThunkData++;
}
lpImageImportDescriptor++;
}
return nullptr;
}

View File

@ -0,0 +1,15 @@
#ifndef IAT_HOOK_H
#define IAT_HOOK_H
#include <Windows.h>
class IAT
{
public:
static LPVOID Hook(LPCSTR lpModuleName, LPCSTR lpFunctionName, const LPVOID lpFunction, LPCSTR lpTargetModuleName);
static LPVOID Hook(LPCSTR lpModuleName, LPCSTR lpFunctionName, const LPVOID lpFunction);
private:
static LPVOID GetCurrentProcessModule();
};
#endif

View File

@ -0,0 +1,186 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{122013ef-a5f6-40a0-a8e4-71f725c240a4}</ProjectGuid>
<RootNamespace>winspoolstub</RootNamespace>
<ProjectName>LibeayPatch</ProjectName>
<WindowsTargetPlatformVersion>7.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<TargetName>winspool</TargetName>
<OutDir>$(SolutionDir)\..\..\UGP.gmx\datafiles</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<TargetName>winspool</TargetName>
<OutDir>$(SolutionDir)\..\..\UGP.gmx\datafiles</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<TargetName>winspool</TargetName>
<OutDir>$(SolutionDir)\..\..\UGP.gmx\datafiles</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<TargetName>winspool</TargetName>
<OutDir>$(SolutionDir)\..\..\UGP.gmx\datafiles</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;WINSPOOLSTUB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>false</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>Stub.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;WINSPOOLSTUB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>false</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>Stub.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;WINSPOOLSTUB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>false</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>Stub.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;WINSPOOLSTUB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>false</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>Stub.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Dllmain.cpp" />
<ClCompile Include="Hook.cpp" />
<ClCompile Include="OpenSSLPatch.cpp" />
<ClCompile Include="Stub.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Hook.h" />
<ClInclude Include="OpenSSLPatch.h" />
</ItemGroup>
<ItemGroup>
<None Include="Stub.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Dllmain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Stub.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Hook.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="OpenSSLPatch.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Hook.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="OpenSSLPatch.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="Stub.def">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

View File

@ -0,0 +1,96 @@
#include "Hook.h"
#include <stdio.h>
// dllmain.cpp : Defines the entry point for the DLL application.
// ripped from openssl
typedef struct bignum_st {
unsigned long* d;
int top;
int dmax;
int neg;
int flags;
} BIGNUM;
typedef struct rsa_st {
void* unk1;
void* unk2;
void* unk3;
void* unk4;
BIGNUM* m;
BIGNUM* e;
void* unk5;
void* unk6;
} RSA;
using openssl_rsa_public_decrypt_ptr = int(__cdecl*)(int flen, const unsigned char* from, unsigned char* to, RSA* rsa, int padding);
static openssl_rsa_public_decrypt_ptr RsaPublicDecrypt = nullptr;
using openssl_sha1_ptr = char* (__cdecl*)(const unsigned char* d, size_t n, unsigned char* md);
static openssl_sha1_ptr Sha1 = nullptr;
const size_t SHA1_SZ = 0x14;
char YOYO_LICENSE_PUBLIC_KEY[0x80] = {
0x7B, 0x05, 0x78, 0xE0, 0x05, 0x50, 0xA4, 0xD6, 0xBA, 0xE9, 0x5E, 0x28, 0xF6, 0x74, 0x2A, 0x07,
0x21, 0x08, 0xB8, 0xC0, 0x71, 0x38, 0xA3, 0x44, 0xCD, 0x87, 0xD0, 0xAB, 0x39, 0xA1, 0xF5, 0x56,
0x94, 0x97, 0x3E, 0xF2, 0x03, 0x9C, 0xAD, 0x86, 0x37, 0x4B, 0x82, 0xC2, 0x8C, 0x40, 0x30, 0x85,
0x39, 0x4F, 0x04, 0xBA, 0x4B, 0x65, 0xF6, 0x0E, 0x4B, 0x9A, 0x47, 0x59, 0xFE, 0xA0, 0xA6, 0x33,
0xDC, 0x8A, 0x0C, 0x35, 0x58, 0xDF, 0x74, 0xDC, 0xB7, 0xFE, 0x57, 0x2C, 0x85, 0x14, 0xA6, 0xD2,
0x34, 0x9E, 0x54, 0x7D, 0xCF, 0xEA, 0x08, 0x2D, 0x29, 0xB5, 0x0B, 0x01, 0x30, 0x14, 0x5A, 0x0C,
0xBC, 0x28, 0xF2, 0x44, 0xAA, 0xA4, 0x59, 0xEF, 0xF4, 0x4A, 0x4D, 0xFE, 0x90, 0xF4, 0x19, 0x4D,
0xAE, 0x9C, 0x8B, 0x26, 0x9B, 0x57, 0xE5, 0x7A, 0xFC, 0x93, 0x31, 0xE5, 0xA7, 0x43, 0xCA, 0xDD
};
static bool JustCheckedLicense = false;
char* SHA1(const unsigned char* d, size_t n, unsigned char* md) {
// If the license was just checked, fake the SHA1 result as all 0xFF
if (md != nullptr && JustCheckedLicense) {
memset(md, 0xFF, SHA1_SZ);
JustCheckedLicense = false;
return (char*)md;
}
return Sha1(d, n, md);
}
int RSA_public_decrypt(int flen, const unsigned char* from, unsigned char* to, RSA* rsa, int padding) {
// If the rsa key being used is the public key for license files,
// set 0xFF as the result
int res = RsaPublicDecrypt(flen, from, to, rsa, padding);
if ( res == SHA1_SZ && memcmp(rsa->m->d, YOYO_LICENSE_PUBLIC_KEY, rsa->m->dmax) == 0) {
memset(to, 0xFF, SHA1_SZ);
JustCheckedLicense = true;
}
return res;
}
// hook RSA Public Decrypt & SHA1 functions
void PatchLibeay32() {
LPVOID pubdecPtr = IAT::Hook("libeay32.dll", "RSA_public_decrypt", &RSA_public_decrypt);
if (pubdecPtr == nullptr)
return;
RsaPublicDecrypt = (openssl_rsa_public_decrypt_ptr)pubdecPtr;
LPVOID shaPtr = IAT::Hook("libeay32.dll", "SHA1", &SHA1);
if (shaPtr == nullptr)
return;
Sha1 = (openssl_sha1_ptr)shaPtr;
}
void UnpatchLibeay32() {
if(RsaPublicDecrypt != nullptr)
IAT::Hook("libeay32.dll", "RSA_public_decrypt", &RsaPublicDecrypt);
if(Sha1 != nullptr)
IAT::Hook("libeay32.dll", "SHA1", &Sha1);
}

View File

@ -0,0 +1,2 @@
void PatchLibeay32();
void UnpatchLibeay32();

View File

@ -0,0 +1,43 @@
void ClosePrinter(int a) {
}
void DocumentPropertiesW(int a, int b, int c, int d, int e, int f) {
}
void DocumentPropertiesA(int a, int b, int c, int d, int e, int f) {
}
void GetPrinterA(int a, int b, int c, int d, int e) {
}
void GetPrinterW(int a, int b, int c, int d, int e) {
}
void EnumPrintersW(int a, int b, int c, int d, int e, int f, int g) {
}
void EnumPrintersA(int a, int b, int c, int d, int e, int f, int g) {
}
void GetDefaultPrinterW(int a, int b) {
}
void GetDefaultPrinterA(int a, int b) {
}
void OpenPrinterA(int a, int b, int c) {
}
void OpenPrinterW(int a, int b, int c) {
}

View File

@ -0,0 +1,13 @@
LIBRARY WINSPOOL
EXPORTS
ClosePrinter @144
DocumentPropertiesW @189
DocumentPropertiesA @188
GetPrinterA @281
GetPrinterW @294
EnumPrintersW @248
EnumPrintersA @247
GetDefaultPrinterW @203
GetDefaultPrinterA @201
OpenPrinterA @302
OpenPrinterW @308

View File

@ -33,7 +33,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Crypto">
<HintPath>..\..\..\..\AppData\Roaming\GameMaker-Studio\BouncyCastle.Crypto.dll</HintPath>
<HintPath>..\..\..\..\..\..\AppData\Roaming\GameMaker\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="HtmlAgilityPack, Version=1.11.33.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.1.11.33\lib\Net35\HtmlAgilityPack.dll</HintPath>
@ -56,12 +56,12 @@
<Compile Include="downloadForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<Compile Include="downloadForm.Designer.cs">
<DependentUpon>downloadForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<EmbeddedResource Include="downloadForm.resx">
<DependentUpon>downloadForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">

View File

@ -1,77 +1,77 @@

namespace DownloadModules
{
partial class downloadForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(downloadForm));
this.downloadProgress = new System.Windows.Forms.ProgressBar();
this.downloadStatus = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// downloadProgress
//
this.downloadProgress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.downloadProgress.Location = new System.Drawing.Point(12, 25);
this.downloadProgress.Name = "downloadProgress";
this.downloadProgress.Size = new System.Drawing.Size(828, 23);
this.downloadProgress.TabIndex = 0;
//
// downloadStatus
//
this.downloadStatus.AutoSize = true;
this.downloadStatus.Location = new System.Drawing.Point(12, 9);
this.downloadStatus.Name = "downloadStatus";
this.downloadStatus.Size = new System.Drawing.Size(104, 13);
this.downloadStatus.TabIndex = 1;
this.downloadStatus.Text = "Reading license.plist";
//
// downloadForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(852, 62);
this.Controls.Add(this.downloadStatus);
this.Controls.Add(this.downloadProgress);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "downloadForm";
this.Text = "GameMaker Exports Downloader";
this.Load += new System.EventHandler(this.downloadForm_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ProgressBar downloadProgress;
private System.Windows.Forms.Label downloadStatus;
}
}

namespace DownloadModules
{
partial class downloadForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(downloadForm));
this.downloadProgress = new System.Windows.Forms.ProgressBar();
this.downloadStatus = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// downloadProgress
//
this.downloadProgress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.downloadProgress.Location = new System.Drawing.Point(12, 25);
this.downloadProgress.Name = "downloadProgress";
this.downloadProgress.Size = new System.Drawing.Size(828, 23);
this.downloadProgress.TabIndex = 0;
//
// downloadStatus
//
this.downloadStatus.AutoSize = true;
this.downloadStatus.Location = new System.Drawing.Point(12, 9);
this.downloadStatus.Name = "downloadStatus";
this.downloadStatus.Size = new System.Drawing.Size(104, 13);
this.downloadStatus.TabIndex = 1;
this.downloadStatus.Text = "Reading license.plist";
//
// downloadForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(852, 62);
this.Controls.Add(this.downloadStatus);
this.Controls.Add(this.downloadProgress);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "downloadForm";
this.Text = "GameMaker Exports Downloader";
this.Load += new System.EventHandler(this.downloadForm_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ProgressBar downloadProgress;
private System.Windows.Forms.Label downloadStatus;
}
}

View File

@ -141,31 +141,29 @@ namespace DownloadModules
}
catch (Exception) { };
if (Urls.Count > 0)
{
CurrentFile = pop();
DownloadLocation = Path.Combine(Path.Combine(Path.Combine(Environment.GetEnvironmentVariable("LOCALAPPDATA"), "GameMaker-Studio"), "UpgradeZip"), Path.GetFileName(CurrentFile));
wc.DownloadFileAsync(new Uri(CurrentFile), DownloadLocation);
}
else
{
Application.Exit();
}
});
extractThread.Start();
while (extractThread.IsAlive)
Application.DoEvents();
if (Urls.Count > 0)
{
CurrentFile = pop();
DownloadLocation = Path.Combine(Path.Combine(Path.Combine(Environment.GetEnvironmentVariable("LOCALAPPDATA"), "GameMaker-Studio"), "UpgradeZip"), Path.GetFileName(CurrentFile));
wc.DownloadFileAsync(new Uri(CurrentFile), DownloadLocation);
}
else
{
Application.Exit();
}
}
private void Wc_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
downloadProgress.Value = e.ProgressPercentage;
downloadStatus.Text = "Downloading: (File "+fileCount.ToString()+"/"+filesToDownload.ToString()+") "+Path.GetFileName(CurrentFile)+" "+e.BytesReceived.ToString()+"/"+e.TotalBytesToReceive.ToString()+" "+e.ProgressPercentage.ToString()+"%";
Application.DoEvents();
}
}
}

View File

@ -3,6 +3,8 @@
#include <windows.h>
#include <iostream>
#include <shlwapi.h>
#include <Shlobj.h>
char* GetMachineGuid()
{
@ -19,7 +21,12 @@ char* GetMachineGuid()
int main()
{
printf("Hello World!");
char szPath[MAX_PATH];
SHGetFolderPathA(NULL, CSIDL_LOCAL_APPDATA, NULL, 0, szPath);
printf("local %s\n", szPath);
SHGetFolderPathA(NULL, CSIDL_APPDATA, NULL, 0, szPath);
printf("common %s\n", szPath);
GetMachineGuid();
}

View File

@ -42,7 +42,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v141_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">

View File

@ -9,25 +9,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "Test\Test.vcxproj",
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F1AB918F-7AF0-4536-A779-286A3A709558}.Debug|x64.ActiveCfg = Debug|x64
{F1AB918F-7AF0-4536-A779-286A3A709558}.Debug|x64.Build.0 = Debug|x64
{F1AB918F-7AF0-4536-A779-286A3A709558}.Debug|x86.ActiveCfg = Debug|Win32
{F1AB918F-7AF0-4536-A779-286A3A709558}.Debug|x86.Build.0 = Debug|Win32
{F1AB918F-7AF0-4536-A779-286A3A709558}.Release|x64.ActiveCfg = Release|Win32
{F1AB918F-7AF0-4536-A779-286A3A709558}.Release|x64.Build.0 = Release|Win32
{F1AB918F-7AF0-4536-A779-286A3A709558}.Release|x86.ActiveCfg = Release|Win32
{F1AB918F-7AF0-4536-A779-286A3A709558}.Release|x86.Build.0 = Release|Win32
{3B3E009B-BCEF-4259-AAAC-B7CD9DEEFD86}.Debug|x64.ActiveCfg = Debug|x64
{3B3E009B-BCEF-4259-AAAC-B7CD9DEEFD86}.Debug|x64.Build.0 = Debug|x64
{3B3E009B-BCEF-4259-AAAC-B7CD9DEEFD86}.Debug|x86.ActiveCfg = Debug|Win32
{3B3E009B-BCEF-4259-AAAC-B7CD9DEEFD86}.Release|x64.ActiveCfg = Release|Win32
{3B3E009B-BCEF-4259-AAAC-B7CD9DEEFD86}.Release|x64.Build.0 = Release|Win32
{3B3E009B-BCEF-4259-AAAC-B7CD9DEEFD86}.Release|x86.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution

View File

@ -43,7 +43,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v141_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
@ -92,8 +92,8 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;UNIVERSALGAMEMAKERPATCHERDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;UNIVERSALGAMEMAKERPATCHERDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
@ -111,8 +111,8 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;UNIVERSALGAMEMAKERPATCHERDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;UNIVERSALGAMEMAKERPATCHERDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>false</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
@ -130,9 +130,9 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;UNIVERSALGAMEMAKERPATCHERDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_DEBUG;UNIVERSALGAMEMAKERPATCHERDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
@ -147,9 +147,9 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;UNIVERSALGAMEMAKERPATCHERDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NDEBUG;UNIVERSALGAMEMAKERPATCHERDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>

View File

@ -1,13 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommand>C:\Users\User\Desktop\UGP\UGP\UGP.exe</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>C:\Users\User\Desktop\UGP\UGP</LocalDebuggerWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerCommand>C:\Users\User\Desktop\UGP\UGP\UGP.exe</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>C:\Users\User\Desktop\UGP\UGP</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

View File

@ -2,14 +2,32 @@
#include <windows.h>
#include "md5.h"
#include "gm6.h"
#include <shlwapi.h>
#include <shlobj.h>
#define GMSTR __declspec(dllexport) char* __cdecl
#define GMREAL __declspec(dllexport) double __cdecl
static char appdata[MAX_PATH];
static char appdatalocal[MAX_PATH];
static char md5str[33];
static BYTE guid[0x1028];
static char gm6key[31];
GMSTR GetAppDataFolder(void)
{
memset(appdata, 0, sizeof(appdata));
SHGetFolderPathA(NULL, CSIDL_APPDATA, NULL, 0, appdata);
return appdata;
}
GMSTR GetLocalAppDataFolder(void)
{
memset(appdatalocal, 0, sizeof(appdatalocal));
SHGetFolderPathA(NULL, CSIDL_LOCAL_APPDATA, NULL, 0, appdatalocal);
return appdatalocal;
}
GMSTR GetMachineGuid(void)
{
HKEY hk;

View File

@ -496,7 +496,7 @@ int main(int argc, char* argv[]) {
key_to_string(out_key, keystr, sizeof(keystr));
printf("Key found: %s", keystr);
return 0;
}
}
#endif

View File

@ -4,7 +4,6 @@
#include <string.h>
#include <time.h>
#define KEY_LEN (0xC)
//#define STANDALONE 1