flat assembler
Message board for the users of flat assembler.
Index
> Main > RB directive - Reserved Data (was "Reverse Data?") |
Author |
|
revolution 27 Dec 2009, 15:14
rb - reserve byte(s)
PS: Time to delete your AV |
|||
27 Dec 2009, 15:14 |
|
Teehee 27 Dec 2009, 15:20
revolution wrote: rb - reserve byte(s) Yeh, I just want to know 'why' and 'when'. Quote: PS: Time to delete your AV lol revolution, you already said that to me before, haha. But there is something wrong, bc some apps have reverse data and my antivir doesn't alerts. Only if I compile it alerts _________________ Sorry if bad english. |
|||
27 Dec 2009, 15:20 |
|
revolution 27 Dec 2009, 15:26
reserve, not "reverse". Do you see the difference?
|
|||
27 Dec 2009, 15:26 |
|
revolution 27 Dec 2009, 15:28
You reserve space in your code or data. Presumably to put something there later at runtime.
|
|||
27 Dec 2009, 15:28 |
|
Teehee 27 Dec 2009, 15:32
OMG, i did read everything wrong all times.
Sorry _________________ Sorry if bad english. |
|||
27 Dec 2009, 15:32 |
|
Teehee 27 Dec 2009, 15:37
man, I can't believe that! wow...
please delete this topic, i feel ashamed. lol haha |
|||
27 Dec 2009, 15:37 |
|
revolution 27 Dec 2009, 15:42
Must have been a brain fart.
|
|||
27 Dec 2009, 15:42 |
|
Teehee 27 Dec 2009, 17:40
oh well..
so Code: example rb 10 Code: example db 10 dup ? |
|||
27 Dec 2009, 17:40 |
|
Teehee 27 Dec 2009, 18:11
Quote: (PS: My Antivir alerts for virus when I try to compile some amount of reverse data (like more than 60 bytes)). I found it! When I change sections order the AV alerts Virus alert: Code: format PE GUI 4.0 entry _start include 'win32a.inc' section '.data' data readable writeable ; <- data at top example rb 1024 ; !!!!!!!!!!!! virus alert.......... !!!!!!!!!!!! section '.text' code readable executable _start: invoke ExitProcess, 0 section '.idata' import data readable writeable library kernel32,'KERNEL32.DLL', user32,'USER32.DLL' include 'api\user32.inc' include 'api\kernel32.inc' NO virus alert: Code: format PE GUI 4.0 entry _start include 'win32a.inc' section '.text' code readable executable _start: invoke ExitProcess, 0 section '.data' data readable writeable ; <- data at bottom example rb 1024 ; !!!!!!!!!!!! NO virus alert.......... !!!!!!!!!!!! section '.idata' import data readable writeable library kernel32,'KERNEL32.DLL', user32,'USER32.DLL' include 'api\user32.inc' include 'api\kernel32.inc' |
|||
27 Dec 2009, 18:11 |
|
bitshifter 27 Dec 2009, 20:18
Also...
Code: section '.idata' import data readable writeable No need for writeable there... Funny that fasm examples have it... |
|||
27 Dec 2009, 20:18 |
|
Borsuc 27 Dec 2009, 20:48
reserve can be used in an uninitialized section to reserve a given memory (but not initialize it to a given value), it's like allocating that memory.
it doesn't take up size in the executable (on the file) apart from telling it how many bytes to reserve. |
|||
27 Dec 2009, 20:48 |
|
Teehee 27 Dec 2009, 21:13
@bitshifter, now you noticed I take the base code from FASM examples (EXAMPLES/TEMPLATE/TEMPLATE.ASM).
Borsuc, good to know that it doesn't increase exe size. |
|||
27 Dec 2009, 21:13 |
|
windwakr 27 Dec 2009, 22:00
Teehee wrote: @bitshifter, now you noticed I take the base code from FASM examples (EXAMPLES/TEMPLATE/TEMPLATE.ASM). It WILL increase file size if you put anything after it. |
|||
27 Dec 2009, 22:00 |
|
Borsuc 27 Dec 2009, 23:05
That's because it will not be put into the uninitialized section anymore.
Right? |
|||
27 Dec 2009, 23:05 |
|
DOS386 28 Dec 2009, 07:57
bitshifter wrote: Also... Imports in a PE MUST be writable but only when loading ... protection is apparently set AFTER hacking the imports > reserve can be used in an uninitialized section to reserve a > given memory (but not initialize it to a given value), it's like > allocating that memory. You can avoid rb alltogether (or use it just inside virtual) and hog your memory from the kernel (VirtualAlloc, INT $31, INT $21), or reserve your (not too much) memory on the stack > (PS: My Antivir alerts for virus when I try to compile some amount > of reverse data (like more than 60 bytes)). On the subforum top there is a FAQ having 11 entries about this "problem" ... now 12 _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
28 Dec 2009, 07:57 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.