Results 1 to 19 of 19

Thread: [RESOLVED] Is vb6 really native ?

  1. #1

    Thread Starter
    New Member graysuit's Avatar
    Join Date
    Apr 2021
    Posts
    14

    Resolved [RESOLVED] Is vb6 really native ?

    From several discussions and reading articles, I got to know vb6 is native.
    And it performance is almost same like a C executable,
    and resources segements are like mfc,wtl ....

    The thing which bothers me that if vb6 is native, then why its code is clear visible in plain text form while seeing its executable via hex editor ?

    Suppose I created event "Form_Load" and inside inserted a Msgbox,
    You can easily see code inside compiled exe.

    Name:  2.jpg
Views: 926
Size:  53.7 KB

    Name:  1.jpg
Views: 834
Size:  23.4 KB

    Whereas native c exe/dll can't be decompiled.
    Nor an android c native libs *.so can be.

  2. #2
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,807

    Re: Is vb6 really native ?

    Hi graysuit, welcome to forum.

    Interesting topic. Could you post larger screenshots? I can't read the text right now. I believe this forum might be automatically resizing the images but I am not sure.

    Peter

  3. #3
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,121

    Re: Is vb6 really native ?

    Quote Originally Posted by graysuit View Post
    Whereas native c exe/dll can't be decompiled.
    Nor an android c native libs *.so can be.
    No, it's the same in C/C++

    When you compile something like printf("%s\n", "IT IS CLEAR VISIBLE"); you can find the string literal with hex editor in the compiled executable just the same.

    Why would anyone want to obfuscate the literals in the final executable? I can think of only one reason. . . two max.

    cheers,
    </wqw>

  4. #4

    Thread Starter
    New Member graysuit's Avatar
    Join Date
    Apr 2021
    Posts
    14

    Talking Re: Is vb6 really native ?

    Hi Peter, Thanks for welcoming !
    Looks like site automatically shrink images to save disk.
    Here are screenshots links, please view:
    https://i.ibb.co/6YP3QQp/1.png
    https://i.ibb.co/hgfVXP3/2.png

    Hola wqweto ! thanks,
    Actually Not just strings, it embed event name as well like "Form_Load", which I don't see in c executable.

    Regards for all helps

  5. #5
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,121

    Re: Is vb6 really native ?

    Quote Originally Posted by graysuit View Post
    Hi Peter, Thanks for welcoming !
    Looks like site automatically shrink images to save disk.
    Here are screenshots links, please view:
    https://i.ibb.co/6YP3QQp/1.png
    https://i.ibb.co/hgfVXP3/2.png

    Hola wqweto ! thanks,
    Actually Not just strings, it embed event name as well like "Form_Load", which I don't see in c executable.

    Regards for all helps
    “Form_Load” literal is probably used by error handling. Bet you would find “main” in C/C++ binary or any function with some kind of error handling which uses __FUNCTION__ built-in constant. Whatever Strings are used will get embedded in the final executable in plain text.

  6. #6
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,419

    Re: Is vb6 really native ?

    From the sidelines: you'll only get a "native" executable, if you actually activate "native" compiling in Project Options
    IIRC, the Default is P-Code

    But i admit: I have no idea if that makes a difference in a HexViewer
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  7. #7
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,997

    Re: Is vb6 really native ?

    Form_Load is visible because he removed the 'Private' declaration.

    Normal Form_Load are not visible:

    Code:
    Private Sub Form_Load()
    instead of

    Code:
    Sub Form_Load()
    that equals to:

    Code:
    Public Sub Form_Load()

  8. #8
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,807

    Re: Is vb6 really native ?

    That is not executable code. Those are string literals. Try viewing other executables, you will see plain text and some other stuff are just embedded in the same file as the executable code.

  9. #9
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,121

    Re: Is vb6 really native ?

    Quote Originally Posted by Zvoni View Post
    IIRC, the Default is P-Code
    It defaults to Native with Optimize for Fast Code option and no Advanced Optimizations.

    cheers,
    </wqw>

  10. #10
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,419

    Re: Is vb6 really native ?

    wqweto, thx.
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  11. #11
    The Idiot
    Join Date
    Dec 2014
    Posts
    2,721

    Re: Is vb6 really native ?

    if its not native or p-code what is it?
    I dont think microsoft would lie to us and have some kind of bytecode instead.

  12. #12
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,419

    Re: Is vb6 really native ?

    Quote Originally Posted by baka View Post
    if its not native or p-code what is it?
    I dont think microsoft would lie to us and have some kind of bytecode instead.
    You want to put money on that statement?
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  13. #13
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Is vb6 really native ?

    I wonder if this entire thread is about the lay interpretation of the word "code." Most people have no programming background and probably have no clue.

    Many see "code" and think it is the same as "cipher" (which they probably mean, but duh). From there they think "secret" and get their panties in a bunch when they find plain text string literals and symbol names in object code.

    I shudder to imagine the safety nightmares similarly perpetrated playing at house wiring, plumbing, auto repairs, etc.

  14. #14

    Thread Starter
    New Member graysuit's Avatar
    Join Date
    Apr 2021
    Posts
    14

    Re: Is vb6 really native ?

    Thanks so much All guys.
    Looks like I'm in between of family coders.

    Yes, Eduardo's advice helps. If set event as `Private`, it won't show under executable .text section.
    And also just string and public members are clear visible. Not whole code. Condition remain same for both P-code and native code.

    But second thing that bothers me that, C uses header documentation files (*.h), because I guess libs can't be decompile. And C uses them to know what functions, sub are inside.

    But at same point, vb6 can parse dll libs without their headers.
    It same like, vb.net uses dotnet dll and can extract members without header.
    Obviously they are decompiled and members are catched.
    greetings !
    I upload useless codes at: https://github.com/graysuit
    And talk at: https://discord.com/invite/Hu5XPGMTuk
    And I exist here due to vb6 love

  15. #15
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,989

    Re: Is vb6 really native ?

    Not necessarily. What would you expect to see? After all, every file is just going to be some string of bytes. In theory, that string of bytes could turn out to be a recognizable string, though that is vanishingly unlikely. Still, every file will be a string of bytes. Any strings in the program are also just a series of bytes, and there is no good reason for them not to be in the order they are found in the string, so if you look at that series of bytes in the source code, you'll see the string. If you notice, some of the other bytes in the file look like letters. That's just because that byte value represents that letter. It isn't meaningful, just coincidence. The bytes in the string also happen to represent the letters in the string, and since they remain in the sequence of the string, the letters appear in the sequence of the string, and thus you see the string. It's not exactly coincidence, since the sequence of bytes is holding the string literal, so it would make sense that you would see the bytes lining up correctly to form the string. It's still your mind that is interpreting it as a string, though. As far as the program that built your display is concerned, it's just a sequence of independent bytes, and those bytes happen to be displayable as the character you see. The fact that they form a string is up to your brain, not the bytes.

    So, what is happening with the Form_Load? Essentially, it's the same thing. It's a sequence of bytes, each byte represents by the character, and your brain recognizes the sequence of characters to be the string. So, why are THOSE bytes in that sequence? As you would expect, there would have to be SOME sequence used, because there would have to be something (even if just a four byte pointer) representing the function address. Why was THAT sequence used? The reasoning is probably somewhat lost to time. I would think that it would have been pretty convenient to know about external functions in lots of places, and using recognizable names, while not the absolutely most compact means to represent them, would have a powerful advantage. It's probably something as simple as that: The name is there because the function is public, and it was thought to be advantageous to be able to get that name out in a recognizable format.
    My usual boring signature: Nothing

  16. #16

    Thread Starter
    New Member graysuit's Avatar
    Join Date
    Apr 2021
    Posts
    14

    Re: Is vb6 really native ?

    Nice, it would be great memory to meet developers that joined here before my birth date.

    Well, everything got cleared.
    Now at last, is it will be hard to reverse or decompile vb6 executable same like an C executable is hard to ?
    greetings !
    I upload useless codes at: https://github.com/graysuit
    And talk at: https://discord.com/invite/Hu5XPGMTuk
    And I exist here due to vb6 love

  17. #17
    The Idiot
    Join Date
    Dec 2014
    Posts
    2,721

    Re: Is vb6 really native ?

    u will never be able to fully decompile an exe to vb6 since a lot is lost when compiling. the decompiler will need to "add" an id to things that are just memory allocations without a title, while in the source could you could have a function name that is obvious for that purpose. it will be hard to understand. the same with variables names could be no-name.
    as you already know from private function names where the name is lost.
    this product is a decompiler and u can read yourself https://www.vb-decompiler.org/products.htm

    usually "hackers" are using live-memory debugger when they hack something, they dont need decompilers.

  18. #18
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,989

    Re: Is vb6 really native ?

    It is possible to decompile anything usable to a sufficient extent. If you are concerned that somebody will steal your magic code, then you have to first decide just how magic your code really is. If it is sufficiently valuable, then yes, somebody will be able to decompile it enough to steal it. If it is mostly only valuable to you, then you could post the source code on a bulletin board and nobody would be interested in it, let alone steal it. The truth lies somewhere along that continuum, you just have to decide where it lies, for you.
    My usual boring signature: Nothing

  19. #19

    Thread Starter
    New Member graysuit's Avatar
    Join Date
    Apr 2021
    Posts
    14

    Re: Is vb6 really native ?

    then great.
    Now I'm pretty sure, vb6 exe is impossible for kids to reverse.
    Even working with different langs for over 3 years, even now I face difficulties while coding in C & asm.
    And rest, I can't fight with knights of knowledge.

    Actually, when you try to code hardware id based commercial software, you don't want it should be presented over crack websites.
    Nor some competitor just decompile and copy paste functions with just different UI and start sell.
    and also native code helps to prevent user giving abuses about performance. lol

    I'm really happy guys.
    From vbforums UI, I thought forum would be dead.
    But I should NOT have judged book from its cover.
    Thanks so much much much GUYSSSSSSSSSS !!!
    greetings !
    I upload useless codes at: https://github.com/graysuit
    And talk at: https://discord.com/invite/Hu5XPGMTuk
    And I exist here due to vb6 love

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width