Using 'FileSeek' and 'Inline ASM' in Memory?

Just starting out? Need help? Post your questions and find answers here.
PoorMan
User
User
Posts: 15
Joined: Sat Oct 14, 2023 2:54 pm

Re: Using 'FileSeek' and 'Inline ASM' in Memory?

Post by PoorMan »

Gents,
Sorry for the confusion. I'll explain the issue in detail.
Game is big so I created an alternative sample code, were you can get the 'Correct MessageBox' if you enter "I_Love_PB".

Code: Select all

If InputRequester("PoorMan", "Enter Password:", "") = "I_Love_PB"
  MessageRequester("", "Password is Correct!")
Else
  MessageRequester("", "Password is Incorrect!")
EndIf
Using a debugger, you can simply change the instruction "or eax,eax" at "$10BE" to "mov al,1" to get the correct message whatever your input is, but this is Not what I want (see the picture):
https://ibb.co/jwpjghv

Actually, I need the following DLL Code to change "eax value to 1" once the code leaves RVA $10BE":

Code: Select all

EnableExplicit
ProcedureDll DoASM()          ; Procedure Name will be changed later
  Protected EAX.l  
  ! mov eax, 1
  ! mov dword [p.v_EAX], eax  ; p.v_EAX -> pointer to variable EAX
EndProcedure

DoASM()
Olli
Addict
Addict
Posts: 1200
Joined: Wed May 27, 2020 12:26 pm

Re: Using 'FileSeek' and 'Inline ASM' in Memory?

Post by Olli »

You can make a virtual machin on pureBasic :

Code: Select all

Procedure.S myVM(OpCode, arg.s)
Repeat
 Select OpCode
  Case 0: End
  Case 1: ProcedureReturn InputRequester("", "", "")
  Case 2: ProcedureReturn Str(Bool(Len(arg) )
  Case 3: ProcedureReturn StringField(arg, ";", Val(StringField(arg, ";", 1) + 1) )
  ; etc...
EndSelect
ForEver
EndProcedure
Also, a program is a values serial (1, 2, 5, 1, 0, or whatever).
And this serial is "crypted" by a string.

factice encryption : (simple addition modulo 10)

(password = 056
program = 12510)

Code: Select all

05605 password looped
+++++
12510 program
"""""
17115 encrypted program
PoorMan
User
User
Posts: 15
Joined: Sat Oct 14, 2023 2:54 pm

Re: Using 'FileSeek' and 'Inline ASM' in Memory?

Post by PoorMan »

virtual machin .. !
Nor in my dreams, I expected to find a GENIUS same as you in this form!
Olli
Addict
Addict
Posts: 1200
Joined: Wed May 27, 2020 12:26 pm

Re: Using 'FileSeek' and 'Inline ASM' in Memory?

Post by Olli »

Image
Is this your image ?
PoorMan
User
User
Posts: 15
Joined: Sat Oct 14, 2023 2:54 pm

Re: Using 'FileSeek' and 'Inline ASM' in Memory?

Post by PoorMan »

Forget about my image Mr. "virtual machine"
I've solved the issue by myself!
Olli
Addict
Addict
Posts: 1200
Joined: Wed May 27, 2020 12:26 pm

Re: Using 'FileSeek' and 'Inline ASM' in Memory?

Post by Olli »

And this :

Code: Select all

If InputRequester("PoorMan", "Enter Password:", "") = "I_Love_PB"
  MessageRequester("", "Password is Correct!")
Else
  MessageRequester("", "Password is Incorrect!")
EndIf
Is this your source code ?
User avatar
Mijikai
Addict
Addict
Posts: 1517
Joined: Sun Sep 11, 2016 2:17 pm

Re: Using 'FileSeek' and 'Inline ASM' in Memory?

Post by Mijikai »

PoorMan wrote: Wed Oct 18, 2023 5:49 pm ...
I've solved the issue by myself!
PG/VEH ?
Post Reply