[1.13c] Add "Spaces" and "Numbers" to character names

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
Conqueror
Posts: 40
Joined: Mon Oct 23, 2017 8:03 pm
Argentina

[1.13c] Add "Spaces" and "Numbers" to character names

Post by Conqueror » Sat Dec 07, 2019 9:51 pm

Hi.
I wanted to share experienced based on viewtopic.php?f=8&t=56163

1.13c

D2Launch.dll

Change intervals ans JL - JLE

Code: Select all

6FA52360   . 8B4424 0C      MOV EAX,DWORD PTR SS:[ESP+C]
6FA52364   . 8A00           MOV AL,BYTE PTR DS:[EAX]
6FA52366   . 83EC 20        SUB ESP,20
6FA52369   . 3C 61          CMP AL,61						<---- <'a'
6FA5236B   . 7C 04          JL SHORT D2Launch.6FA52371
6FA5236D   . 3C 7A          CMP AL,7A						<---- <='z'
6FA5236F   . 7E 4F          JLE SHORT D2Launch.6FA523C0
6FA52371   > 3C 41          CMP AL,41						<---- <'A'
6FA52373   . 7C 04          JL SHORT D2Launch.6FA52379
6FA52375   . 3C 5A          CMP AL,5A						<---- <='Z'
6FA52377   . 7E 47          JLE SHORT D2Launch.6FA523C0
6FA52379   > 3C 2D          CMP AL,2D						<---- ='-'
6FA5237B   . 74 04          JE SHORT D2Launch.6FA52381
6FA5237D   . 3C 5F          CMP AL,5F						<---- ='_'
6FA5237F   . 75 4A          JNZ SHORT D2Launch.6FA523CB
6FA52381   > 8B4424 28      MOV EAX,DWORD PTR SS:[ESP+28]
6FA52385   . 85C0           TEST EAX,EAX
6FA52387   . 74 42          JE SHORT D2Launch.6FA523CB
6FA52389   . 8B4C24 24      MOV ECX,DWORD PTR SS:[ESP+24]
6FA5238D   . E8 3075FFFF    CALL <JMP.&D2Win.#10166>
6FA52392   . 6A 20          PUSH 20
6FA52394   . 8BD0           MOV EDX,EAX
6FA52396   . 8D4C24 04      LEA ECX,DWORD PTR SS:[ESP+4]
6FA5239A   . FF15 34C0A56F  CALL DWORD PTR DS:[<&D2Lang.?toUtf@Unico>
6FA523A0   . 8A0424         MOV AL,BYTE PTR SS:[ESP]
6FA523A3   . 84C0           TEST AL,AL
6FA523A5   . 74 19          JE SHORT D2Launch.6FA523C0
6FA523A7   . 8D0C24         LEA ECX,DWORD PTR SS:[ESP]
6FA523AA   . 8D9B 00000000  LEA EBX,DWORD PTR DS:[EBX]
6FA523B0   > 3C 2D          CMP AL,2D
6FA523B2   . 74 17          JE SHORT D2Launch.6FA523CB
6FA523B4   . 3C 5F          CMP AL,5F
6FA523B6   . 74 13          JE SHORT D2Launch.6FA523CB
6FA523B8   . 8A41 01        MOV AL,BYTE PTR DS:[ECX+1]
6FA523BB   . 41             INC ECX
6FA523BC   . 84C0           TEST AL,AL
6FA523BE   .^75 F0          JNZ SHORT D2Launch.6FA523B0
6FA523C0   > B8 01000000    MOV EAX,1
6FA523C5   . 83C4 20        ADD ESP,20
6FA523C8   . C2 0C00        RETN 0C
6FA523CB     33C0           XOR EAX,EAX						<----Verify
6FA523CD   . 83C4 20        ADD ESP,20
6FA523D0   . C2 0C00        RETN 0C
Modify

Code: Select all

6FA52360   . 8B4424 0C      MOV EAX,DWORD PTR SS:[ESP+C]
6FA52364   . 8A00           MOV AL,BYTE PTR DS:[EAX]
6FA52366   . 83EC 20        SUB ESP,20
6FA52369   . E9 BA900000    JMP D2Launch.6FA5B428
6FA5236E     90             NOP							<----Move intervals to 6FA5B428
6FA5236F     90             NOP
6FA52370     90             NOP
6FA52371     90             NOP
6FA52372     90             NOP
6FA52373     90             NOP
6FA52374     90             NOP
6FA52375     90             NOP
6FA52376     90             NOP
6FA52377     90             NOP
6FA52378     90             NOP	
6FA52379   > 3C 2D          CMP AL,2D						<----Return Code = '-'
6FA5237B   . 74 43          JE SHORT D2Launch.6FA523C0
6FA5237D   . EB 54          JMP SHORT D2Launch.6FA523D3				<---- jmp space 6FA523D3
6FA5237F   . 75 3F          JNZ SHORT D2Launch.6FA523C0
6FA52381   > 8B4424 28      MOV EAX,DWORD PTR SS:[ESP+28]
6FA52385   . 85C0           TEST EAX,EAX
6FA52387   . 74 42          JE SHORT D2Launch.6FA523CB
6FA52389   . 8B4C24 24      MOV ECX,DWORD PTR SS:[ESP+24]
6FA5238D   . E8 3075FFFF    CALL <JMP.&D2Win.#10166>
6FA52392   . 6A 20          PUSH 20
6FA52394   . 8BD0           MOV EDX,EAX
6FA52396   . 8D4C24 04      LEA ECX,DWORD PTR SS:[ESP+4]
6FA5239A   . FF15 34C0A56F  CALL DWORD PTR DS:[<&D2Lang.?toUtf@Unico>
6FA523A0   . 8A0424         MOV AL,BYTE PTR SS:[ESP]
6FA523A3   . 84C0           TEST AL,AL
6FA523A5   . 74 19          JE SHORT D2Launch.6FA523C0
6FA523A7   . 8D0C24         LEA ECX,DWORD PTR SS:[ESP]
6FA523AA   . 8D9B 00000000  LEA EBX,DWORD PTR DS:[EBX]
6FA523B0   > 3C 2D          CMP AL,2D
6FA523B2   . 74 17          JE SHORT D2Launch.6FA523CB
6FA523B4   . 3C 20          CMP AL,20
6FA523B6   . 74 13          JE SHORT D2Launch.6FA523CB
6FA523B8   . 8A41 01        MOV AL,BYTE PTR DS:[ECX+1]
6FA523BB   . 41             INC ECX
6FA523BC   . 84C0           TEST AL,AL
6FA523BE   .^75 F0          JNZ SHORT D2Launch.6FA523B0
6FA523C0   > B8 01000000    MOV EAX,1
6FA523C5   . 83C4 20        ADD ESP,20
6FA523C8   . C2 0C00        RETN 0C
6FA523CB   > 33C0           XOR EAX,EAX
6FA523CD   . 83C4 20        ADD ESP,20
6FA523D0   . C2 0C00        RETN 0C
Now, add:

Code: Select all

6FA523D3   > 3C 5F          CMP AL,5F					<--- = '_'
6FA523D5   .^74 AA          JE SHORT D2Launch.6FA52381
6FA523D7   . 3C 20          CMP AL,20					<--- = ' '
6FA523D9   .^75 F0          JNZ SHORT D2Launch.6FA523CB
6FA523DB   .^EB A4          JMP SHORT D2Launch.6FA52381			<--- "simulate" return
and

Code: Select all

6FA5B428   > 3C 61          CMP AL,61						<----  <'a'
6FA5B42A   . 7C 08          JL SHORT D2Launch.6FA5B434
6FA5B42C   . 3C 7A          CMP AL,7A						<----  <='z'
6FA5B42E   .^0F8E 8C6FFFFF  JLE D2Launch.6FA523C0
6FA5B434   > 3C 41          CMP AL,41						<----  <'A'
6FA5B436   . 7C 08          JL SHORT D2Launch.6FA5B440
6FA5B438   . 3C 5A          CMP AL,5A						<----  <'Z'
6FA5B43A   .^0F8E 806FFFFF  JLE D2Launch.6FA523C0
6FA5B440   > 3C 30          CMP AL,30						<----  <'0'
6FA5B442   .^0F8C 316FFFFF  JL D2Launch.6FA52379
6FA5B448   . 3C 39          CMP AL,39						<----  <'9'
6FA5B44A   .^0F8E 706FFFFF  JLE D2Launch.6FA523C0
6FA5B450   .^E9 246FFFFF    JMP D2Launch.6FA52379				<---- "simulate" return

Now, delete TCP/IP verify

D2GAME.DLL

Modify:

Code: Select all

6FC4A793  |. 33C0           XOR EAX,EAX   <---- NOP
6FC4A795  |. 5D             POP EBP
6FC4A796  |. 83C4 10        ADD ESP,10
6FC4A799  |. C2 2C00        RETN 2C
6FC4A79C  |> 55             PUSH EBP
6FC4A79D  |. E8 0EFCFFFF    CALL d2game_-.6FC4A3B0
6FC4A7A2  |. 85C0           TEST EAX,EAX
6FC4A7A4  |.^74 EC          JE SHORT d2game_-.6FC4A792
6FC4A7A6  |. 807C24 24 07   CMP BYTE PTR SS:[ESP+24],7   <---- NOP
6FC4A7AB  |.^73 E5          JNB SHORT d2game_-.6FC4A792   <---- NOP
6FC4A7AD  |. BF 10000000    MOV EDI,10
finaly modify:

Code: Select all

6FC4A110  /$ 33D2           XOR EDX,EDX   <---- NOP
6FC4A112  |. 33C9           XOR ECX,ECX   <---- NOP
6FC4A114  |. 85FF           TEST EDI,EDI
6FC4A116  |. 56             PUSH ESI
6FC4A117  |. 8BF0           MOV ESI,EAX
6FC4A119  |. 7E 33          JLE SHORT d2game_-.6FC4A14E
6FC4A11B  |. EB 03          JMP SHORT d2game_-.6FC4A120
6FC4A11D  |  8D49 00        LEA ECX,DWORD PTR DS:[ECX]
6FC4A120  |> 0FBE06         /MOVSX EAX,BYTE PTR DS:[ESI]
6FC4A123  |. 46             |INC ESI
6FC4A124  |. 83F8 7A        |CMP EAX,7A                              ;  Switch (cases 0..7A)
6FC4A127  |. 77 25          |JA SHORT d2game_-.6FC4A14E
6FC4A129  |. 0FB680 6CA1C46>|MOVZX EAX,BYTE PTR DS:[EAX+6FC4A16C]
6FC4A130  |. FF2485 5CA1C46>|JMP DWORD PTR DS:[EAX*4+6FC4A15C]
6FC4A137  |> 85D2           |TEST EDX,EDX                            ;  Cases 27 ('''),2D ('-'),5F ('_') of switch 6FC4A124
6FC4A139  |. 75 13          |JNZ SHORT d2game_-.6FC4A14E
6FC4A13B  |. 85C9           |TEST ECX,ECX
6FC4A13D  |. 74 0F          |JE SHORT d2game_-.6FC4A14E
6FC4A13F  |. 803E 00        |CMP BYTE PTR DS:[ESI],0
6FC4A142  |. 74 0A          |JE SHORT d2game_-.6FC4A14E
6FC4A144  |. BA 01000000    |MOV EDX,1
6FC4A149  |> 41             |INC ECX                                 ;  Cases 41 ('A'),42 ('B'),43 ('C'),44 ('D'),45 ('E'),46 ('F'),47 ('G'),48 ('H'),49 ('I'),4A ('J'),4B ('K'),4C ('L'),4D ('M'),4E ('N'),4F ('O'),50 ('P'),51 ('Q'),52 ('R'),53 ('S'),54 ('T')... of switch 6FC4A124
6FC4A14A  |. 3BCF           |CMP ECX,EDI
6FC4A14C  |.^7C D2          \JL SHORT d2game_-.6FC4A120
6FC4A14E  |> 33C0           XOR EAX,EAX   <---- NOP
6FC4A150  |. 5E             POP ESI
6FC4A151  |. C3             RETN
6FC4A152  |> 33C0           XOR EAX,EAX   <---- NOP
6FC4A154  |. 85C9           TEST ECX,ECX
6FC4A156  |. 0F95C0         SETNE AL
6FC4A159  |. 5E             POP ESI
6FC4A15A  \. C3             RETN
Result?

http://prntscr.com/q7o1ou
http://prntscr.com/q7o293

Post Reply

Return to “Code Editing”