Posted November 30, 200618 yr grr .... i have a weird problem here ... i was trying to enter a userinput into registry ... .data REG_PATH db 'SOFTWARE\xxx\xxxx\xxxxx\',0 REG_SUB_KEY0 db 'UserName',0 REG_SUB_KEY1 db 'UserCompany',0 REG_VAL0 db ' starzboy',0 REG_VAL1 db ' starzboy',0 .data? hKey PHKEY ? buffer db 512 dup(?) buffer1 db 512 dup(?) invoke GetDlgItemText,hwnd,10021,ADDR buffer,512 ----> copy to 1st buffer invoke GetDlgItemText,hwnd,10022,ADDR buffer1,512 ----> copy to 2nd buffer invoke RegCreateKey,HKEY_LOCAL_MACHINE,addr REG_PATH,addr hKey ----> make the key invoke RegSetValueEx,hKey,addr REG_SUB_KEY0,0,REG_SZ,addr buffer,SIZEOF buffer ----> save 1st input invoke RegSetValueEx,hKey,addr REG_SUB_KEY1,0,REG_SZ,addr buffer1,SIZEOF buffer1 ----> save 2nd input invoke RegCloseKey, hKey ------> close key the values are succesfully written to the registry .... but the appz dosent detect it untill i write it manually ... and when the values are written in registry[for eg. starzboyj] they are seen as "starzboyj..." so i was wondering what could be the problem .... Edited November 30, 200618 yr by starzboy
November 30, 200618 yr listen this is the right way but the problem could be that the keys should be created in the HKEY_LOCAL_MACHINE key File in most apps and you didn't notice that ? but some other apps needs them in other keys like HKEY_CURRENT_USER so perhaps you should be careful for this important situation and one more thing check please the Key File (For User And Name) and see what is it's kind ? like String Value Binary Value DWORD Value.......ect Edited November 30, 200618 yr by Angel-55
November 30, 200618 yr Author nah ... i tested em all ...the place where i pyt them is right place in HKEY_LOCAL_MACHINE and its a string value ...anyways thanks for seeing Edited November 30, 200618 yr by starzboy
November 30, 200618 yr that's ok but listen i got another thing perhaps this application doesn't search for the Registration at startup ??this could be the Problem there are some apps that doesn't check the registry for registrationit might check it in another file like *ini files or *.dat files that where created after you've registred the app ...........!! Edited November 30, 200618 yr by Angel-55
November 30, 200618 yr Hi starz,I think you have to give the exact length of the string and not the total size of the buffer invoke GetDlgItemText,hwnd,10021,ADDR buffer,512 ----> copy to 1st bufferinvoke GetDlgItemText,hwnd,10022,ADDR buffer1,512 ----> copy to 2nd bufferinvoke RegCreateKey,HKEY_LOCAL_MACHINE,addr REG_PATH,addr hKey ----> make the keyinvoke strlen, addr bufferadd eax, 1; To take in account the terminater '\0'invoke RegSetValueEx,hKey,addr REG_SUB_KEY0,0,REG_SZ,addr buffer, eax <- change to eaxinvoke strlen, addr buffer1add eax, 1 invoke RegSetValueEx,hKey,addr REG_SUB_KEY1,0,REG_SZ,addr buffer1,eax <- change to eaxinvoke RegCloseKey, hKey ------> close key
November 30, 200618 yr Author @angel ...the app has to be "cracked to run " .... it reads key to say "Registered to: xyz"@jstorme dosent work ...but i think i needs the exact lenght of string ...lemme try again ... Edited November 30, 200618 yr by starzboy
November 30, 200618 yr Author @jstormehi bro ... thanc for tip ... got it working ...invoke GetDlgItemText,hwnd,10021,ADDR buffer,512invoke GetDlgItemText,hwnd,10022,ADDR buffer1,512invoke RegCreateKey,HKEY_LOCAL_MACHINE,addr REG_PATH,addr hKeyadd buffer,1invoke RegSetValueEx,hKey,addr REG_SUB_KEY0,0,REG_SZ,addr buffer, bufferadd buffer,1invoke RegSetValueEx,hKey,addr REG_SUB_KEY1,0,REG_SZ,addr buffer1,bufferinvoke RegCloseKey, hKeytahnx angel alsocya
Create an account or sign in to comment