Flag: Tornado! Hurricane!

Error: Authentication required to access requested resource.

 Forums >>    >> 

Topic created on: by .


  dennis   September 7, 2009 02:40.24 CDT
hi,

the GetPrivateProfileString() function doesn't need a file handle to be passed to, it just opens the file itself (check last param of the API function, first push in the disassembly respectively: http://msdn.microsoft.com/en-us/library/ms724353(VS.85).aspx)

If you were looking for how CreateFile() works internally, you might want to have a look at its callchains (https://www.openrce.org/reference_library/win32_call_chains/XPSP2/KERNEL32/GetPrivateProfileStringA) or disassemble it yourself.
If you disassemble it yourself, you can see the function calling: BaseDllReadWriteIniFile() -> BaseDllReadWriteIniFileOnDisk() -> BaseDllOpenIniFileOnDisk() -> NtOpenFile() and NtReadFile()

  fundoo     September 7, 2009 03:32.00 CDT
hi Dennis,

Thanks for your quick reply. Actually while debugging it, I could find CrateFile getting called for the ini file. Another question why cant I see BaseDllReadWriteIniFile, BaseDllReadWriteIniFileOnDisk etc. in my kernel32.dll? :-(

  dennis   September 7, 2009 13:30.54 CDT
hi,

you probably haven't loaded any symbols for kernel32.dll if you can't see BaseDllReadWriteIniFile() and the like. But putting a breakpoint on NtOpenFile() could do the trick if you're debugging the application.

  fundoo     September 7, 2009 22:07.05 CDT
Thanks a lot for your inputs. It really helped.

Note: Registration is required to post to the forums.

There are 28,224 total registered users.


Recently Created Topics
Reverse Engineering ...
Jan/23
Career: DoD Agency I...
Jan/22
"Disappearing&q...
Jan/17
Career: Software Sec...
Jan/11
Where is the call st...
Jan/07
IDA Pro 6.1 Breakpoi...
Jan/01
How to create data s...
Dec/30
can i search all mod...
Dec/23
IDA symbol table exp...
Dec/20
An anti-attach trick
Dec/17


Recent Forum Posts
Reverse Engineering ...
NirIzr
"Disappearing&q...
NirIzr
Reverse Engineering ...
charlie
"Disappearing&q...
charlie
An anti-attach trick
Bass
An anti-attach trick
waleeda...
An anti-attach trick
Bass
An anti-attach trick
waleeda...
An anti-attach trick
Bass
Looking for value in...
NirIzr


Recent Blog Entries
cmathieu
Feb/07
Hacker Carnival

waleedassar
Feb/06
OllyDbg v1.10 And Hardware ...

waleedassar
Jan/31
Yet Another Anti-Debug Trick

RolfRolles
Jan/22
Finding Bugs in VMs with a ...

waleedassar
Jan/13
An OllyDbg Bug Disables Sof...

More ...


Recent Blog Comments
waleedassar on:
Feb/07
OllyDbg v1.10 And Hardware ...

NirIzr on:
Feb/07
OllyDbg v1.10 And Hardware ...

NirIzr on:
Feb/05
Yet Another Anti-Debug Trick

trolotou on:
Feb/05
Doudoune Moncler -Pennies F...

waleedassar on:
Feb/01
Yet Another Anti-Debug Trick

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit