Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


ZwAllocateVirtualMemory and WriteProcessMemory failed

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
yoyoyip
Cheater
Reputation: 0

Joined: 09 Apr 2006
Posts: 29

PostPosted: Tue Apr 11, 2006 4:08 am    Post subject: ZwAllocateVirtualMemory and WriteProcessMemory failed Reply with quote

I encountered error for autoassembler, it failed at WriteProcessMemory at autoassembler, then a messagebox popup said "Not all instructions could be injected". Below are the OutputDebugString captured,

Switched Process
Calling ZwAllocateVirtualMemory
ntStatus=82106958
BaseAddress=0FC00000
RegionSize=1000
WriteProcessMemory:Getting PEPROCESS
Retrieved peprocess
Checking safety of memory
Memory addr:0FC00000 not safe to write!
Memory addr:0FC00006 not safe to write!
.......

I got 2 questions to ask,
1:
At the IO dispatched routine for IOCTL_CE_ALLOCATEMEM, I saw the line

ZwAllocateVirtualMemory((HANDLE)-1,&BaseAddress,0, &RegionSize, inp->AllocationType, inp->Protect);

is it right to put in the handle -1, instead of the openprocess handle?

2:
Why it failed on WriteProcessMemory.

Appreciate that if anybody can help me on the above problems.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25807
Location: The netherlands

PostPosted: Tue Apr 11, 2006 5:05 am    Post subject: Reply with quote

1: Yes, -1 means current process. And I changed to that process

2: The cvs version has a test where usermode memory is checked as if it's kernelmode. But never accessed memory hasn't been physically assigned so that would cause a error.
solution: remove the check (add it back) or disable kernelmode read/write process memory

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites