Solved How do I access process threads - to inject code?

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

SICGames88

Newbie
Full Member
Nobleman
Sep 6, 2015
70
768
0
Well interestingly enough, Huniepop.exe has code on a thread - so if anyone would remember when I showed the module name not being there in the snap shot - this could be the reason.

My steps I've performed for Huniepop was:

I scanned for a number 4 bytes for food. I decreased value until I found the right one.
I then found what accesses the pointer - then I showed up in disasmbler.
Copied the address it pointed at. Attached another process within CE so I can open up OllyDbg.

In Olly i went to the expression address. It pointed to a thread. There's MainThread then their's other thread numbers the game possibly loads.
I did search on the main thread but my question from this post is how do I access the main thread of the process of Huniepop.exe?

The DLL injected is already inside the process. Unsure if OpenProcess willl be actually a good idea.

Any insight?
 

c5

Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
1,187
12,638
76
I am not sure if I am following you correctly, by main thread you mean the parent of all threads?

Off the top of my head, one way would be to hook the main and call GetCurrentThread from your hook to obtain the handle to the main thread.

Or you could enumerate all threads and use GetThreadTimes to see which thread was first created.

All in all, I don't think that's what you want. Sorry if I am wrong but I think you just misinterpreted the ollydbg window label saying "main thread" saying you the code is magically run on a thread and you need to access it through a thread or something along those lines - No it's not, the code is still mapped into memory and you can access it as you would normally access memory.
 

SICGames88

Newbie
Full Member
Nobleman
Sep 6, 2015
70
768
0
Damn, finally got it! I've been tinkering around with this forever! I did a AOB_Scan and was successfully able to obtain an address then I attached olly to the program searched for the addy I got and bam! Bingo was her namo!
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods