Tien_huong2002 How do I cheat?
Reputation: 0
Joined: 12 Aug 2008 Posts: 6 Location: Viet Nam
|
Posted: Wed Dec 10, 2008 6:58 am Post subject: [Auto ASM+ C scprips] can't Writing a file ?!? Help! |
|
|
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!)
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 ! |
|