Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keep_the_size method //for loading dll
#1
Thanks to BP, so I have such an idea. :p

Let's start with this file: lf2_5MB_loaddll.rar

This file will load the dll in the same location named lfe.dll. (If you want to change the name of the dll, go OllyDBG to the address 446F00 of the exe, in which the name of the dll is defined.)

I expanded the exe to 5MB and also made it loads the dll, by adding some unused dummy resources by the Resource Hacker. So, when you use Resource Hacker to make changes on the skin, you are able to keep the size of the exe by deleting the dummies I placed, and replace some of suitable size. By keeping the size of the exe, there will be no any error due to the change of address in the exe.

Note that the size of the exe should be kept exactly 5 MB (= 5,242,880 Bytes = 5*2^20 Bytes).

The method knowing the suitable size of dummy: (Click to View)


This exe will work with the dll in topic The exe used for the forum mod or the dll made from LF2 DLL Framework.

You don't have to patch the exe by IIDKing or edit all the offsets defined in the dll when you use this Keep_the_size method.


Attached Files Thumbnail(s)
   
Reply
Thanks given by: Yinseko , Hukko
#2
I dont understand that either...and I cant do the think(change the stuff and remove the dummy) because when I do that....my exe is 13 mb
Reply
Thanks given by:
#3
Last night I was too tired to tell (That was a midnight when I post this thread), there was a misconception. The Resouce Hacker and IIDKing actually does not edit the address of the main code.
Error occurs only when using Resouce Hacker for a exe edited by IIDKing. The exe crashes in this case because the IIDKing stuff in the exe was affected, not the main code was affected. So, if you use Resource Hacker followed by IIDKing, it will be alright. There is a case you are able to edit the IIDKing-patched exe by Resource Hacker, that is keeping the total size of the resource. It is what all my method was talking about.

@FKN
Do you mean your total size of the resources is bigger, making the exe greater than 5MB?
If yes, maybe I can make a 15MB exe also,
or you can normally
1st edit the original nonumlock-exe by Resouce Hacker and
2nd patch it by IIDKing like this tutorial told:
http://www.lf-empire.de/forum/showthread...1#pid42291
Reply
Thanks given by:
#4
Gggghhh *Whew* (Click to View)

@Genevrier
Thank you so much for clearing this up.

Remind me give Silva a kick for all that nonsense about changing the file size, etc.

This is working fine! :D

Thanks Genevrier! Problem Solved!


~Solomon Leung
<div style="background-image:url('http://f.imagehost.org/0086/Fill.png'); filter:alpha(opacity=70); border-top:1px solid #000000; border-right:1px solid #000000; border-left: 1px solid #000000; border-bottom: 1px solid #000000"> <table border="0" width="100%"><tr><td width="500"><img src=http://g.imagehost.org/0170/FORUM_SIGNATURE.png opacity="1" alt="Little Fighter Code Lyoko"></td><td width="30"><img src="http://www.antoninasdesigns.com/images/real-gray-square.gif" width="1" height="100"></td><td><font face=monotype corsiva><font color=#0A298F><font size="4"><b><i>~Solomon Leung</size><br><font size="2">P.S. I Just Lost <a href="http://www.losethegame.org" target="_blank" style="text-decoration: none"><font color=#0A298F>The Game</font></a></b></i></font></font></size></td></tr></table></div>
Reply
Thanks given by:
#5
Duh, it isn't my fault :p. I didn't bother testing this stuff, I knew it really didn't make sense(because the.rsc section is located after the .data section), but seeing as it didn't work I was assuming that was the case(lots of things don't make sense :D).

The thing I don't understand is, why didn't it work when you tried patching the exe? I guess it is because you tried doing a jmp instead of a retn? I guess it is my fault if that is the case :p.
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by:
#6
genevrier, thank you very much!) *bow* ^^

p.s. i make screnshot, who knows, maybe Silva will opposite this method)
hm...1 thing
after last Silva's update in april, it doesn't work with this update:

Quote:Update 28/3/09:
Loading text can be manipulated from dll

but exe can work with this if dll ai older version.
it's not too fairly, just note ^^
Reply
Thanks given by:
#7
(05-14-2009, 09:33 AM)Yinseko Wrote:  genevrier, thank you very much!) *bow* ^^

p.s. i make screnshot, who knows, maybe Silva will opposite this method)
hm...1 thing
after last Silva's update in april, it doesn't work with this update:

Quote:Update 28/3/09:
Loading text can be manipulated from dll

but exe can work with this if dll ai older version.
it's not too fairly, just note ^^
Oh, I see the mistake now. I will correct it in the next release of the dll framework. Thanks for reporting. :p

For now, you may add a line to correct it for your use:
Code:
    call Text
in rarara.asm -> DLLStartup proc
Reply
Thanks given by:
#8
can you wtire tutor for using your method with screenshots , cuz whatever i'm dooing exe crashes :(
just can't understand how to use RIGHTLY (
totally all my bitmaps have size above 5 mb (it nearly 9mb AFTER it indexed! ) and how to replace them into exe (with dll) without crashing i really don't know (
Reply
Thanks given by:
#9
Since your files are bigger, it is impossible to make a 5MB exe.

So, lf2_10MB_loaddll.rar :p
Reply
Thanks given by:
#10
thanks ^^''''
and one else.
in 5 mb exe, if i remove, for example, second dummy file and save exe, it doesnt work, but if delete all dummy's files it works, it's normal?
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)