flat assembler
Message board for the users of flat assembler.
Index
> Windows > [Source]Simulate GetWindowsDirectory |
Author |
|
baldr 07 Sep 2008, 15:05
krackwar,
Doesn't include 'win32ax.inc' contradicts the cmp word[bp],':'? Hint: A vs. W. It's always good to try to compile example and run it. |
|||
07 Sep 2008, 15:05 |
|
krackwar 08 Sep 2008, 02:40
baldr wrote: krackwar, |
|||
08 Sep 2008, 02:40 |
|
LocoDelAssembly 08 Sep 2008, 03:02
WinXP SP3 without source modification
Code: --------------------------- Error --------------------------- C:\WINDOWS --------------------------- Aceptar --------------------------- With baldr suggestion: Code: --------------------------- Error --------------------------- C:\WINDOWS\WinSxs\:\WINDOWS\WinSxs\ --------------------------- Aceptar --------------------------- I suppose it works* because lstrcatA is copying char by char and krackwar's algorithm stops at the second slash so this algorithm has some kind of Unicode to ASCII built-in functionality. (If someone can verify my "claims" please do it since I have spent too few time on OllyDgb with this snippet so it is just a guess). *works in the sense that it shows "C:\WINDOWS" but I'm not assuring that this snippet will always provide the correct path. |
|||
08 Sep 2008, 03:02 |
|
f0dder 08 Sep 2008, 17:01
Code that depends on initial register value on program startup? Yay, that's never going to break.
|
|||
08 Sep 2008, 17:01 |
|
baldr 27 Sep 2008, 20:03
krackwar wrote:
There are more to find in userspace, as Windows™ extensively uses it for dirty tricks. Do you want to believe that this will not change at [their] will? f0dder, His code depends on previous function's (BaseProcessStart to be exact) stack frame base pointer, that's OK for some time. BP in DOS is as predictable as EBP in Windows™… _________________ "Don't belong. Never join. Think for yourself. Peace." – Victor Stone. |
|||
27 Sep 2008, 20:03 |
|
r22 28 Sep 2008, 07:56
Entertaining little hack.
On the same level as GetCurrentProcess always returning -1 and GetCurrentThread always returning -2 (Making the actual api calls dubious). Take it for whats it's worth, an interesting hacky snippet. |
|||
28 Sep 2008, 07:56 |
|
f0dder 28 Sep 2008, 13:49
r22 wrote: Entertaining little hack. (I find it weird that MSDN does mention the value -1, but still say that's how they're currently handled... one shouldn't really be documentation implementation details. MSDN also does say "it is best to call GetCurrentProcess instead of hard-coding this constant value"). r22 wrote: Take it for whats it's worth, an interesting hacky snippet. _________________ - carpe noctem |
|||
28 Sep 2008, 13:49 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.