Jump to content
Tuts 4 You

Hi All, Get Reg Key


5k3l3t0r

Recommended Posts

Quickly stolen from lena, sorry xD

RegCreateKeyA

RegCloseKeyA

RegOpenKeyA

RegQueryValueA

RegQueryValueExA

RegDeleteKeyA

Are you trying to reverse registry checks or are you trying to code that yourself ?

In case you're coding, take a look at the MSDN, for reversing you can place BPs on almost all of them,

mainly RegQueryValue(Ex)A does the job.

Edited by KillBoy-PowerHead
Link to comment

hi KillBoy-PowerHea...

could you help me a litle more?

supose i have a button - ID 1015 and a edittext ID 1014 and what i need is when i click my butt the editbox show the value of a reg key

i use this:

.elseif eax==1015

invoke RegQueryValue,HKEY_CURRENT_USER,addr RegSubkey2,offset buffer,100

invoke SetDlgItemText,hWnd,1014,offset buffer

but... it doesn?t work, could you hellp me?

Edited by 5k3l3t0r
Link to comment
  • 1 year later...
3f4dz6tgds5dq

i'm a noob in asm i need help for making reg patch in asm

i search an exemple, i dont know RegCreateKeyA

someone can explain me how to create a new key in registre (REG_SZ) on masm32 ?

Link to comment

MSDN will also help you whenever you dont know the details around a particular API - its an unbeatable reference.

If you want a reference with ASM examples for patchers and other things, check out Goppit's tutorial over at ARTeam and Icezilion's tutorials in MASM.

Link to comment
MSDN will also help you whenever you dont know the details around a particular API - its an unbeatable reference.

If you want a reference with ASM examples for patchers and other things, check out Goppit's tutorial over at ARTeam and Icezilion's tutorials in MASM.

ASM my preferred lang. and MSDN is useless for me :{ (most times) i usually end up passing the source im working on to my buddy. and he helps me out :D

Link to comment
MSDN will also help you whenever you dont know the details around a particular API - its an unbeatable reference.

exactly!.

i'm a noob in asm i need help for making reg patch in asm

i search an exemple, i dont know RegCreateKeyA

someone can explain me how to create a new key in registre (REG_SZ) on masm32 ?

Here's an example i found lying around on my hdd. Contains what you need(RegCreateKey,RegOpenKey etc.)

_http://www.zshare.net/download/83985761641cc6/

Link to comment

To access the registry you have to open the registry first.

You can open the registry by :

RegOpenKey -- If the Key path exists.

or

RegCreateKey -- Key will be created if it does not exists.

If this function is a success the we get a 0 in eax.

Example:

mov cbData,512h ; cbdata is a local dword.

invoke RegOpenKeyEx,HKEY_LOCAL_MACHINE,chr$("SOFTWARE\crap\crap1"),0,KEY_READ,addr hKey ; create the key.

cmp eax,00h

jne _error ; jump to error if not 0.

mov hKey,eax ; store key handle = 0

invoke RegQueryValueEx,hKey,chr$("Crappier"),0,0,addr buffer,addr cbData ; get the value data into buffer.

invoke RegCloseKey,hKey ; close handle

_error:

Hope it helps.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...