Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9006379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:23:45+00:00 2026-06-16T01:23:45+00:00

I have a function like this: int __stdcall sub_57BBD0(int a1, int a2, int a3,

  • 0

I have a function like this:

int __stdcall sub_57BBD0(int a1, int a2, int a3, char a4)
{
  *(_BYTE *)a3 = *(_BYTE *)a1;
}

*(BYTE*)(a1 + 0) is a pointer to a BYTE*

from the pointer of a1, how can I get the BYTES data that this that pointer points to? or is it impossible?, Because a1 points to a BYTE* in memory, I can ReadProcessMemory to get the data, but can I do it another way?

I’ve tried doing:

BYTE *data = *(BYTE*)&a1;

but it’s not working,

Am I missing something here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T01:23:46+00:00Added an answer on June 16, 2026 at 1:23 am

    Mmmm, this code looks pretty dirty. Is it a disassembly or something?

    Anyway, the value a1 seems to be a pointer that is used as an int. You have this:

    *(_BYTE *)a3 = *(_BYTE *)a1;
    

    That is taking the first _BYTE value from the memory location that a1 points to and storing it in the memory location that a3 points to.

    If you want to get the pointer itself, then just don’t dereference it:

    BYTE *data = (BYTE*)a1;
    

    All you are doing here is type-casting from an integer to a BYTE* (which I assume is the same as _BYTE).

    Now you can reference BYTE values from data as if it was an array (assuming that the memory is actually allocated to your process):

    BYTE secondVal = data[1];
    

    And so on…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a struct that takes a function pointer, like this: typedef int (*node_transition_func)(
If I have a main function like this: int main(int argc, char **argv) {
If I have a function like this: void bla(int size) { while(b){ char tmp[size];
I have a dll which contains this function: int __stdcall PrnText(char *printtext); In Windows
I have a private function like this in my controller. private UserDetails GetUserDetails(int userid)
I have a constexpr function that looks something like this: constexpr int foo(int bar)
I have a function like this void doSmth(Long... paramg){ } But I can't pass
My C++ DLL have a function like this: void func1(int& count, int* pValue); this
I have a file with function prototypes like this: int func1(type1 arg, int x);
Current Code Hi I have a function like this: jj::[Int]->[Int] jj xs = [x|x<-xs,x

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.