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 


[Auto ASM+ C scprips] can't Writing a file ?!? Help!

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Tien_huong2002
How do I cheat?
Reputation: 0

Joined: 12 Aug 2008
Posts: 6
Location: Viet Nam

PostPosted: Wed Dec 10, 2008 6:58 am    Post subject: [Auto ASM+ C scprips] can't Writing a file ?!? Help! Reply with quote

This is my auto ASM code:
Code:

[ENABLE]
alloc(BaseAddress,4)
alloc(newmem,512)
alloc(Gotten,1)

label(ReCheck)     
label(Prepare)     
label(BeginMain) 
label(returnhere)
label(originalcode)
label(originalcode0)
label(exit)
 

004103E5:
jmp newmem
returnhere:

newmem:
jne 004103ea  //this is a part of original code nothing wrong here

cmp byte ptr [Gotten],00  //one-shot ensure
jne exit
pushfd
pushad
cmp [BaseAddress],00000000
jne ReCheck               
mov eax,ebx
shl eax,10
shr eax,10
cmp eax,E7F8
jne originalcode0
Call Prepare
BeginMain: 
//diasble for non-arguments mode
/*
mov eax,[BaseAddress]
sub eax,2841C00         //begin strings address
push 000023D8  //ScanSize
push eax       //Begin address
*/
call 00F90281  //call get ID list function Scripted under C langue
mov byte ptr [Gotten],01
test eax,eax
jz originalcode0
/*this only for check eax ==0? if no <=> can't execute C++ Scrips <=> a symbol in game will make me known that */
mov eax,[BaseAddress]
add eax,E7F8
mov byte ptr [eax],03
originalcode0:
popad   
popfd
originalcode: 
exit:
mov eax,[ebx]
ret



ReCheck:
mov eax,ebx
sub eax,[BaseAddress]
cmp eax,E7F8
je BeginMain



jmp originalcode0


Prepare:
//Prepare BaseAddress
mov eax,ebx
shr eax,10
shl eax,10   
mov [BaseAddress],eax
ret
 
[DISABLE]           
dealloc(newmem)
dealloc(Gotten)
dealloc(SpaceCount)
004103E5:
jne 004103ea
mov eax,[ebx]
ret


And this is my C++ scrips:
Code:

#include <fstream.h>
void WriteFile()//char *BeginAddr ,unsigned int ScanSize
{
  unsigned int j = 0;
  char *BeginAddr;
  BeginAddr = 0x076FE400; //this is a tmp right address at that moment
  unsigned int ScanSize = 32; //full is 9176. but test for small range
   char filename[20]={"C:\\code.txt"}; //dir: C:\code.txt
   ofstream Fout(filename);
  Fout << "0 = ";           //This is first Name
   for (unsigned int i = 0;i<=ScanSize;i++)
   {
      if (*BeginAddr == '\0')
      {
         Fout << "\n" << ++j << " = ";  //replace null char by '\n' & write next name number
      }
      else
      {
         Fout << *BeginAddr;
      }
      if (i%255 ==0)    Fout.flush(); //Avoid overflow   
      BeginAddr++;
   }
   Fout.close();
};


But Nothing happen! after scrip execute (It not create my txt file!) Shocked Shocked Shocked
Anybody pro known this problem can help me ?!?!??
How to fix this problem !?! Can you show me what's wrong ?!??!
Thanks you very much!!!!

P/S: I think this bug may generated because of the IO File streams ! But i don't known much about this major ?!?! So Someone can explain for me? Sorry for my bad English !!!

_________________
Go everywhere to learn How To Make Something Called the Greatest.
You using a convenient soft ? This isn't means :you are a chicken !
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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