[1.13d] code edits collection

This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.

Moderators: Nefarius, Havvoric

Post Reply
User avatar
devurandom
Forum Regular
Angel
Posts: 632
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

[1.13d] code edits collection

Post by devurandom » Sun Apr 05, 2015 1:16 am

Greetings,

I'm uploading my small collection of 1.13d code edits. I can't take much credit for this.
only a couple code enhancements. :roll:

These are basic code edits that many will find useful for 1.13d.

Credits should go to the person(s) that found the original code edits, since that is much more difficult and time consuming that porting code edits to a different version. I've listed references in most of these code edits to others work here on the Keep, but I apologize if it is not the original person(s) to give proper credit..

In General I want to give credit the people who've posted many of the code edits for previous versions.

Nefarious
Kidpaddle94
Necrolis
Kingpin
Lolet

and others


Edit: Changed method for Charsi Imbue.
Updated notes on Nihlathak portal fix.
Add A1Q3 reward

Edit:
Force 6 affix rares
Bypass Intro
Force prefix-suffix on magic item drops

Edit:
Adds 7 more items and update to some others
Attachments
DevUR113d_code_edits.zip
(51.36 KiB) Downloaded 506 times
Last edited by devurandom on Thu Mar 03, 2016 10:17 pm, edited 4 times in total.
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

“The urge to save humanity is almost always a false-face for the urge to rule it." ― H.L. Mencken 1956

User avatar
Xibalba
Dark Alliance Beta Test
Champion of the Light
Posts: 280
Joined: Thu Aug 29, 2013 2:38 pm
Location: Skyrim

Re: [1.13d] code edits collection

Post by Xibalba » Sun Apr 05, 2015 12:51 pm

Thanks for sharing, continue sharing stuff :)
Life is too short to drive boring cars.

User avatar
borg
Posts: 35
Joined: Mon Jun 10, 2002 3:52 pm
Location: taiwan
Contact:
Taiwan

Re: [1.13d] code edits collection

Post by borg » Fri Oct 09, 2015 6:13 pm

That's awesome work and worthy of respect.
I am looking forward to potential support for patch 1.13c or PlugY.

User avatar
devurandom
Forum Regular
Angel
Posts: 632
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: [1.13d] code edits collection

Post by devurandom » Fri Oct 09, 2015 8:23 pm

I'm looking at converting my mod to a plugin, once that's done It could also add support for 1.13c.
But this is going to take some time.
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

“The urge to save humanity is almost always a false-face for the urge to rule it." ― H.L. Mencken 1956

Wuffie888
Posts: 5
Joined: Wed Oct 14, 2015 2:01 pm

Re: [1.13d] code edits collection

Post by Wuffie888 » Wed Oct 14, 2015 7:58 pm

Thank you

:) Ive been using them in a tool called modexe from PPM forums
[url]hxxp://www.ppmsite.com/forum/viewtopic.php?p=512422[/url]
Attachments
ModExe.Diablo2.zip
modexe with a small example ini file for 1.10 and 1.13d code edits
(76.99 KiB) Downloaded 176 times

Code: Select all

68 9D 61 F9 77 B8 C7 93 C1 77 FF D0 "Whoops"

User avatar
devurandom
Forum Regular
Angel
Posts: 632
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: [1.13d] code edits collection

Post by devurandom » Wed Oct 14, 2015 8:47 pm

Hope you scanned this before you install it on your pc. I don't know if
PE:Malware.RDM.36!5.2A[F1] is keylogger or FP?


Ollydbg 2.01 is the only tool I use, just as easy as once you learn how to use it.
Last edited by devurandom on Wed Oct 14, 2015 8:53 pm, edited 1 time in total.
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

“The urge to save humanity is almost always a false-face for the urge to rule it." ― H.L. Mencken 1956

Wuffie888
Posts: 5
Joined: Wed Oct 14, 2015 2:01 pm

Re: [1.13d] code edits collection

Post by Wuffie888 » Wed Oct 14, 2015 8:55 pm

ooo :) didn't see that when I scanned it with Virus total.com, I want to Crawl it with a debugger but have just been running it in the trail version of sandboxie. its good practice for Any software you dont know/trust.

Thanks for the quick response ill check my system, it could be a false positive, do you have a link to the virus scan results !?

:edit:
https://www.virustotal.com/en/file/087a ... /analysis/

User avatar
devurandom
Forum Regular
Angel
Posts: 632
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: [1.13d] code edits collection

Post by devurandom » Wed Oct 14, 2015 9:26 pm

I checked both: The download you have here, and download at the link to the website.
Both report back with the same detection results..

Edit:
http://www.virustotal.com/en/file/47d27 ... /analysis/

-But anyway, a simple way to find he code edit offset in Olly is to load the module without the game running right click the address then select addressing, next select relative to module base, then find the offset listed in the code edit. simple and quick.

cheers ;)
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

“The urge to save humanity is almost always a false-face for the urge to rule it." ― H.L. Mencken 1956

Wuffie888
Posts: 5
Joined: Wed Oct 14, 2015 2:01 pm

Re: [1.13d] code edits collection

Post by Wuffie888 » Wed Oct 14, 2015 9:30 pm

lol, well this isnt going to look good,.. Rising is detecting one of the ini files having byte code for a shellcode that is OLD :) good on rising... I put it in as a joke, it doesnt point to any of diablos files (or any files), sure it could be used as a reference for some other part to load but its for the Russian xp sp3 unpatched.... as for the original websites file having a viral payload im checking that now since, ive been running it for a few days im as curious about it as you.

Code: Select all

68 9D 61 F9 77 B8 C7 93 C1 77 FF D0 "Whoops"

Wuffie888
Posts: 5
Joined: Wed Oct 14, 2015 2:01 pm

Re: [1.13d] code edits collection

Post by Wuffie888 » Wed Oct 14, 2015 9:39 pm

If you go to the [Contained files] section on the [File Details] Tab in VT, you can check the files and see the exe is clean so I dont get IT :P

Chur :)

User avatar
devurandom
Forum Regular
Angel
Posts: 632
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: [1.13d] code edits collection

Post by devurandom » Wed Oct 14, 2015 11:46 pm

Wuffie888" wrote:lol, well this isnt going to look good,.. Rising is detecting one of the ini files having byte code for a shellcode that is OLD :) good on rising...
I think that would explain it.
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

“The urge to save humanity is almost always a false-face for the urge to rule it." ― H.L. Mencken 1956

meinerdeiner
Posts: 16
Joined: Sun Feb 26, 2017 8:29 pm
Germany

Re: [1.13d] code edits collection

Post by meinerdeiner » Sun Feb 26, 2017 8:30 pm

Hey is there a way to use Extended Level for 1.13d ?

User avatar
devurandom
Forum Regular
Angel
Posts: 632
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: [1.13d] code edits collection

Post by devurandom » Mon Feb 27, 2017 7:17 am

Lolet Posted Code for 1.13d Extended Level on this page. (255 level)

http://www.d2mods.info/forum/viewtopic.php?p=482799

Edit:
If that doesn't work for you.. I'll see if I can find the edited binaries. and upload them.
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

“The urge to save humanity is almost always a false-face for the urge to rule it." ― H.L. Mencken 1956

meinerdeiner
Posts: 16
Joined: Sun Feb 26, 2017 8:29 pm
Germany

Re: [1.13d] code edits collection

Post by meinerdeiner » Mon Feb 27, 2017 11:20 pm

devurandom" wrote:Lolet Posted Code for 1.13d Extended Level on this page. (255 level)

http://www.d2mods.info/forum/viewtopic.php?p=482799

Edit:
If that doesn't work for you.. I'll see if I can find the edited binaries. and upload them.
I think you mean this :

Code: Select all

Misc::Patch(CALL, GetDllOffset("D2Common.dll", 0x4F330), (DWORD)ExExtendedLevels::GetActByLevel, 22, "Replace inline GetActByLevel"); //  Ordinal11007
Misc::Patch(CALL, GetDllOffset("D2Common.dll", 0x4F3C7), (DWORD)ExExtendedLevels::GetActByLevel, 26, "Replace inline GetActByLevel"); //  Ordinal11051
Misc::Patch(CALL, GetDllOffset("D2Common.dll", 0x4F160), (DWORD)ExExtendedLevels::GetActByRoom2, 22, "Replace inline GetActByLevel"); //  Ordinal10301

Misc::Patch(CALL, GetDllOffset("D2Common.dll", 0x2AD76), (DWORD)ExExtendedLevels::GetActByLevelNo_STUB1, 20, "Replace inline GetActByLevel"); //  sub_6FD7AD60
Misc::Patch(CALL, GetDllOffset("D2Common.dll", 0x56F40), (DWORD)ExExtendedLevels::GetActByLevelNo_STUB1, 20, "Replace inline GetActByLevel"); //  sub_6FDA6EA0
Misc::Patch(CALL, GetDllOffset("D2Common.dll", 0x510A0), (DWORD)ExExtendedLevels::GetActByLevelNo_STUB2, 20, "Replace inline GetActByLevel"); //  sub_6FDA1070

Misc::Patch(JUMP, GetDllOffset("D2Common.dll", -10864), (DWORD)ExExtendedLevels::GetActByLevelNo, 5, "Replace original GetActByLevelNo");

// The original value is 400
Misc::Patch(CUSTOM, GetDllOffset("D2Client.dll", 0x6FFFB + 1), 4096, 4, "Automap patch I");
Misc::Patch(CUSTOM, GetDllOffset("D2Client.dll", 0x7100B + 1), 4096, 4, "Automap patch I");
Misc::Patch(CUSTOM, GetDllOffset("D2Client.dll", 0x71044 + 1), 4096, 4, "Automap patch I");
Misc::Patch(CUSTOM, GetDllOffset("D2Client.dll", 0x710D9 + 1), 4096, 4, "Automap patch I");
Misc::Patch(CUSTOM, GetDllOffset("D2Client.dll", 0x728EA + 1), 4096, 4, "Automap patch I");

Misc::Patch(CUSTOM, GetDllOffset("D2Client.dll", 0x70FD6 + 2), 4256, 4, "Automap patch II - stack fix"); // The original value is 416
Misc::Patch(CUSTOM, GetDllOffset("D2Client.dll", 0x728A6 + 2), 4172, 4, "Automap patch II - stack fix"); // The original value is 472

// The original value is 99
Misc::Patch(CUSTOM, GetDllOffset("D2Client.dll", 0x70FF6 + 1), 399, 4, "Automap patch III");
Misc::Patch(CUSTOM, GetDllOffset("D2Client.dll", 0x728D9 + 1), 399, 4, "Automap patch III");

// The original value is 400
Misc::Patch(CUSTOM, GetDllOffset("D2Client.dll", 0x7101B + 4), 4096, 4, "Automap patch IV");
Misc::Patch(CUSTOM, GetDllOffset("D2Client.dll", 0x728FE + 4), 4096, 4, "Automap patch IV");
But i Dont know how i can port this to the D2template style

User avatar
devurandom
Forum Regular
Angel
Posts: 632
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: [1.13d] code edits collection

Post by devurandom » Mon Feb 27, 2017 11:59 pm

Not sure that I can help much with porting that to work in D2Template. I use a custom patching method, which is different from either of the 2.
Last edited by devurandom on Tue Feb 28, 2017 12:02 am, edited 1 time in total.
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

“The urge to save humanity is almost always a false-face for the urge to rule it." ― H.L. Mencken 1956

meinerdeiner
Posts: 16
Joined: Sun Feb 26, 2017 8:29 pm
Germany

Re: [1.13d] code edits collection

Post by meinerdeiner » Tue Feb 28, 2017 12:01 am

devurandom" wrote:Not sure that I can help much with porting that to work in D2Template. I use a custom patching method, which is totally different way from the method above and also totally different than D2Template.
Is this Public or Its your own ?

User avatar
devurandom
Forum Regular
Angel
Posts: 632
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: [1.13d] code edits collection

Post by devurandom » Tue Feb 28, 2017 12:22 am

Its Not public... Using my own custom code.
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

“The urge to save humanity is almost always a false-face for the urge to rule it." ― H.L. Mencken 1956

RobertSx
Posts: 1
Joined: Tue Oct 16, 2018 7:07 pm

Re: [1.13d] code edits collection

Post by RobertSx » Tue Oct 16, 2018 7:22 pm

Hello Everyone!

I found this forum a few days ago and it's really useful and interesting.
I myself am not a programmer and don't really have any deep computer knowledge, but sometimes I like to try out things or read upon something new.

I also play some modded Diablo 2 when I have the time and that is how I found this forum.

I have a question:

I'd like to make some of the edits from devurandom's colelction but I can't really figure out the offsets in those files.
For example in the "Remove Ancients Level Up Experience Cap" file the offset I have to make the edit at is 6FC40D7A, but in my D2Game.dll file I found that piece of code at offset 0005bffa.
For another edit the offset listed in the txt is 6FAD7713 but the code in my file is at 0003CB83.

I was able to find these because I had enough code from the txt files to search for, but in some cases there is just not enough.

Like in the "Bypass_intro.txt" the only code piece listed that needs to be edited is 85C0, but there are 500+ exact same bytes in my dll so I couldn't find this exact address.

How can I figure out the right offset to search for from devurandom's edits?

Thank you!

User avatar
devurandom
Forum Regular
Angel
Posts: 632
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: [1.13d] code edits collection

Post by devurandom » Wed Oct 17, 2018 3:50 am

Hello,

For reference you can subtract the address values from the base address for the modules to
get the offset

Offset = Address - Base Address


Base Address for [1.13d] modules

D2Game 6FC20000
D2Common 6FD50000
D2Client 6FAB0000


The base addresses above are the same values listed for v1.11b in this Diablo II Assembly Tutorial. https://d2mods.info/resources/diablo_ii ... 0v2.01.htm
RobertSx wrote:
Tue Oct 16, 2018 7:22 pm
For example in the "Remove Ancients Level Up Experience Cap" file the offset I have to make the edit at is 6FC40D7A, but in my D2Game.dll file I found that piece of code at offset 0005bffa.
For another edit the offset listed in the txt is 6FAD7713 but the code in my file is at 0003CB83.

You may want to double check your math, because something in the offsets you listed doesn't look correct.
;)
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

“The urge to save humanity is almost always a false-face for the urge to rule it." ― H.L. Mencken 1956

darkmage1991
Posts: 2
Joined: Wed Nov 07, 2018 9:28 am
Anguilla

Re: [1.13d] code edits collection

Post by darkmage1991 » Wed Nov 07, 2018 9:40 am

how come when i try to find any of the address's that are listed using ollydbg it cant find them? i can find the address ok with ida7 perfectly fine but ida doesnt let me edit the instruction.

from what i can see ollydbg is messed up somehow and is putting a bunch of 0's infront of the addresses and wont go high enough to reach the listed address's in the file.

unless im missing a setting or using the wrong decompiler for diablo.

any help would be great. would love to try some of these mods.

BTW this is the error i get when i try to go to the listed address for allowing hirelings to equip more: https://imgur.com/a/CzoBFxI

User avatar
devurandom
Forum Regular
Angel
Posts: 632
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: [1.13d] code edits collection

Post by devurandom » Wed Nov 07, 2018 10:29 am

Its usually because the module has relocated itself, in that case you calculate the offset from the base address.
Try editing the module when the game isn't running, and see if that helps.
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

“The urge to save humanity is almost always a false-face for the urge to rule it." ― H.L. Mencken 1956

darkmage1991
Posts: 2
Joined: Wed Nov 07, 2018 9:28 am
Anguilla

Re: [1.13d] code edits collection

Post by darkmage1991 » Thu Nov 08, 2018 1:41 am

i was only opening the dll with the game not running. i was under the impression you only run the game and edit it if you want to test the changes in realtime.

User avatar
devurandom
Forum Regular
Angel
Posts: 632
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: [1.13d] code edits collection

Post by devurandom » Thu Nov 08, 2018 3:11 am

Then I'd suggest learn how to calculate the address using the offset. Address = Base Address + offset.

Code Edit Tutorial
https://d2mods.info/resources/diablo_ii ... 0v2.01.htm

Its a bit long, but covers every aspect. Just use the base addresses for 1.11b from that tutorial for 1.13d. Its the same for both.
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

“The urge to save humanity is almost always a false-face for the urge to rule it." ― H.L. Mencken 1956

Post Reply

Return to “Code Editing”