📚 OpenRCE is preserved as a read-only archive. Launched at RECon Montreal in 2005. Registration and posting are disabled.








Flag: Tornado! Hurricane!

 Forums >>  Brainstorms - General  >>  WritePrivateProfileString

Topic created on: April 14, 2006 14:53 CDT by xorbyte .

Is there someone who could help me understand why my comparison isn't working.
Thanks.

; priv_str.asm Show use of WritePrivateProfileString
;              Check a value in win1.ini
;  (If no path specified, file is put in windows dir)

.486                      
    .model flat, stdcall       ; 32 bit memory model
    option casemap :none       ; case sensitive

    include \masm32\include\windows.inc
    include \masm32\include\masm32.inc
    include \masm32\include\gdi32.inc
    include \masm32\include\user32.inc
    include \masm32\include\kernel32.inc
    include \masm32\include\Comctl32.inc
    include \masm32\include\comdlg32.inc
    include \masm32\include\shell32.inc
    include \masm32\include\oleaut32.inc
    include \masm32\macros\macros.asm

    includelib \masm32\lib\masm32.lib
    includelib \masm32\lib\gdi32.lib
    includelib \masm32\lib\user32.lib
    includelib \masm32\lib\kernel32.lib
    includelib \masm32\lib\Comctl32.lib
    includelib \masm32\lib\comdlg32.lib  
    includelib \masm32\lib\shell32.lib
    includelib \masm32\lib\oleaut32.lib

.data
      sec     BYTE    "Wieviel",0          ; [Section]
      key     BYTE    "Nummer",0          ; Nummer=0E9h                        
      ;value   BYTE    "123456789",0   ;0E9h,00h             ; Null term string  Alt 233,234 0E9h 0EAh                                  
      value   BYTE    0E9h,00h
      file    BYTE    "win1.ini",0
      valueOK BYTE    "Value is OK.",0  
      Sample  BYTE    "Box",0
.code

start:
              

fn WritePrivateProfileString, Offset sec, ADDR key, ADDR value, ADDR file
fn GetPrivateProfileInt,Offset sec,ADDR key,0,ADDR file

; the comparison is failing for some reason

.if EAX==0E9h   ;Show a message if stored value is OK

invoke MessageBox, 0, ADDR valueOK, ADDR Sample,MB_ICONINFORMATION

.endif

    invoke ExitProcess,0

end start

No posts found under this topic.
Note: Registration is required to post to the forums.

There are 31,328 total registered users.


Recently Created Topics
[help] Unpacking VMP...
Mar/12
Reverse Engineering ...
Jul/06
let 'IDAPython' impo...
Sep/24
set 'IDAPython' as t...
Sep/24
GuessType return une...
Sep/20
About retrieving the...
Sep/07
How to find specific...
Aug/15
How to get data depe...
Jul/07
Identify RVA data in...
May/06
Question about memor...
Dec/12


Recent Forum Posts
Finding the procedur...
rolEYder
Question about debbu...
rolEYder
Identify RVA data in...
sohlow
let 'IDAPython' impo...
sohlow
How to find specific...
hackgreti
Problem with ollydbg
sh3dow
How can I write olly...
sh3dow
New LoadMAP plugin v...
mefisto...
Intel pin in loaded ...
djnemo
OOP_RE tool available?
Bl4ckm4n


Recent Blog Entries
halsten
Mar/14
Breaking IonCUBE VM

oleavr
Oct/24
Anatomy of a code tracer

hasherezade
Sep/24
IAT Patcher - new tool for ...

oleavr
Aug/27
CryptoShark: code tracer ba...

oleavr
Jun/25
Build a debugger in 5 minutes

More ...


Recent Blog Comments
nieo on:
Mar/22
IAT Patcher - new tool for ...

djnemo on:
Nov/17
Kernel debugger vs user mod...

acel on:
Nov/14
Kernel debugger vs user mod...

pedram on:
Dec/21
frida.github.io: scriptable...

capadleman on:
Jun/19
Using NtCreateThreadEx for ...

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit