Update to use winspool.drv && include src to libeay patch
This commit is contained in:
parent
7234acf4b1
commit
8bfe2bad45
|
@ -2,3 +2,5 @@
|
|||
*/bin/*
|
||||
*/Release/*
|
||||
*/Debug/*
|
||||
*/.vs/*
|
||||
*.pdb
|
Binary file not shown.
|
@ -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\Li\Desktop\NuclearWar\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\Li\Desktop\NuclearWar\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,7 +18,7 @@
|
|||
<datafile>
|
||||
<name>ModuleDownloader.exe</name>
|
||||
<filename>ModuleDownloader.exe</filename>
|
||||
<origname>C:\Users\Li\Desktop\NuclearWar\UGP\UGP.gmx\\\datafiles\ModuleDownloader.exe</origname>
|
||||
<origname>C:\Users\Li\Desktop\UGP\UGP\UGP.gmx\\\datafiles\ModuleDownloader.exe</origname>
|
||||
<exists>-1</exists>
|
||||
<size>2147328</size>
|
||||
<exportAction>2</exportAction>
|
||||
|
@ -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>
|
||||
<scale>0</scale>
|
||||
<sizeable>0</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><undefined></html5_index>
|
||||
<html5_loadingbar></html5_loadingbar>
|
||||
<html5_alwaysreload>0</html5_alwaysreload>
|
||||
|
@ -159,11 +159,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>
|
||||
|
@ -205,7 +205,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">
|
||||
|
|
Binary file not shown.
Binary file not shown.
BIN
UGP.gmx/help.rtf
BIN
UGP.gmx/help.rtf
Binary file not shown.
|
@ -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><undefined></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>
|
|
@ -8,6 +8,30 @@
|
|||
<parentName><undefined></parentName>
|
||||
<maskName><undefined></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>
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -36,6 +36,46 @@ if(obj_draw.back_down == false && 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>///setup views
|
||||
|
||||
var display_height;
|
||||
display_height = display_get_height()
|
||||
|
||||
var display_width;
|
||||
display_width = display_get_width()
|
||||
|
||||
if(room_height > display_height || room_width > display_width){
|
||||
view_enabled = true;
|
||||
view_visible[view_current] = true;
|
||||
view_object[view_current] = obj_cursor;
|
||||
view_hport[view_current] = room_height;
|
||||
view_wport[view_current] = room_width;
|
||||
view_hview[view_current] = room_height;
|
||||
view_wview[view_current] = room_width;
|
||||
}
|
||||
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
|
@ -61,7 +101,7 @@ if(obj_draw.back_down == false && obj_draw.back_up == false)
|
|||
<string>external_free("UGP.dll");
|
||||
|
||||
file_delete("UGP.dll");
|
||||
file_delete("libeay32.dll");
|
||||
file_delete("winspool.dll");
|
||||
file_delete("ModuleDownloader.exe");
|
||||
</string>
|
||||
</argument>
|
||||
|
@ -85,7 +125,8 @@ 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);
|
||||
|
|
|
@ -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="<undefined>" 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="obj_cursor" 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="<undefined>" 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="<undefined>" 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="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
|
|
|
@ -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="<undefined>" 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="obj_cursor" 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="<undefined>" 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="<undefined>" 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="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
|
|
|
@ -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="<undefined>" 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="obj_cursor" 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="<undefined>" 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="<undefined>" 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="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
|
|
|
@ -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="<undefined>" 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="obj_cursor" 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="<undefined>" 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="<undefined>" 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="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
|
|
|
@ -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="<undefined>" 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="obj_cursor" 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="<undefined>" 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="<undefined>" 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="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
|
|
|
@ -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="<undefined>" 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="<undefined>" 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="<undefined>" 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="<undefined>" 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="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 = global.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);
|
||||
|
|
|
@ -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 = global.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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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 = global.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 = "";
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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.
|
@ -2,7 +2,7 @@
|
|||
<sound>
|
||||
<kind>3</kind>
|
||||
<extension>.mp3</extension>
|
||||
<origname>C:\Users\Li\Desktop\NuclearWar\UGP\UGP.gmx\\\sound\audio\snd_mus.mp3</origname>
|
||||
<origname>C:\Users\Li\Desktop\UGP\UGP\UGP.gmx\\\sound\audio\snd_mus.mp3</origname>
|
||||
<effects>0</effects>
|
||||
<volume>1</volume>
|
||||
<pan>0</pan>
|
||||
|
|
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 |
|
@ -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
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
|
@ -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
|
|
@ -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>
|
|
@ -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>
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
|
@ -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);
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
void PatchLibeay32();
|
||||
void UnpatchLibeay32();
|
|
@ -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) {
|
||||
|
||||
}
|
|
@ -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
|
|
@ -112,7 +112,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;UNIVERSALGAMEMAKERPATCHERDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<ConformanceMode>false</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>
|
||||
</PrecompiledHeaderFile>
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
Loading…
Reference in New Issue