Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 18:06

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] Assembly in C#

Discussion on [Release] Assembly in C# within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2006
Posts: 49
Received Thanks: 12
[Release] Assembly in C#

Hello,
With this .cs (C# Class) file, you can perform BASIC asm commands, such as
Code:
mov ebp, esp <-- asm.Mov_EBP_ESP();
call dword ptr ds:[00873A1F] <-- asm.Call_DWORD_Ptr(0x00873A1F);
ret <-- asm.Ret();
Assembly in C# is NOT my creation, however, I have modified the source to enable Call's that are not 'Dword Ptr's (this was difficult because to figure out the opcode for jmp ADDY, you have to perform a math sequence on the ADDY (intTohex(((TargetCall - OldAddress) - 10), 8) due to the jmp TARGET being relative to the current address line).

Example:
Code:
            ASM asm = new ASM();
            int CodeCaveAddy = asm.GetAddress(Co2PID);
            MessageBox.Show(asm.IntToHexA(Co2PID));
           asm.Mov_ECX(0x0057FBF0);
           asm.Call(CodeCaveAddy, 0x004C2394);
           asm.Ret();
            asm.RunAsm(Co2PID, CodeCaveAddy);
Replace Co2PID with the process ID of the Conquer Window
If you want the PID worked out for you:

Code:
            Process[] pro = Process.GetProcessesByName("Conquer");
            int conquer = pro[0].Id;
For the 1st active conquer window.


And last but not least, the ASM.cs file! (Attached)
Attached Files
File Type: rar ASM.rar (3.3 KB, 247 views)
null is offline  
Thanks
7 Users
Old 10/27/2008, 19:31   #2
 
elite*gold: 0
Join Date: Sep 2008
Posts: 490
Received Thanks: 595
Quote:
Originally Posted by null View Post
Hello,
With this .cs (C# Class) file, you can perform BASIC asm commands, such as
Code:
mov ebp, esp <-- asm.Mov_EBP_ESP();
call dword ptr ds:[00873A1F] <-- asm.Call_DWORD_Ptr(0x00873A1F);
ret <-- asm.Ret();
Assembly in C# is NOT my creation, however, I have modified the source to enable Call's that are not 'Dword Ptr's (this was difficult because to figure out the opcode for jmp ADDY, you have to perform a math sequence on the ADDY (intTohex(((TargetCall - OldAddress) - 10), 8) due to the jmp TARGET being relative to the current address line).

Example:
Code:
            ASM asm = new ASM();
            int CodeCaveAddy = asm.GetAddress(Co2PID);
            MessageBox.Show(asm.IntToHexA(Co2PID));
           asm.Mov_ECX(0x0057FBF0);
           asm.Call(CodeCaveAddy, 0x004C2394);
           asm.Ret();
            asm.RunAsm(Co2PID, CodeCaveAddy);
Replace Co2PID with the process ID of the Conquer Window
If you want the PID worked out for you:

Code:
            Process[] pro = Process.GetProcessesByName("Conquer");
            int conquer = pro[0].Id;
For the 1st active conquer window.


And last but not least, the ASM.cs file! (Attached)
Good contribution id say Keep it up!
_fobos_ is offline  
Old 10/28/2008, 01:05   #3
 
elite*gold: 0
Join Date: Jun 2006
Posts: 965
Received Thanks: 576
I see you used my disconnect thing as an example XD.

This probably shouldn't be used without changes because anything complicated will be raped by the fact that it stores the data in a string.

Nice idea though.
high6 is offline  
Old 10/28/2008, 02:09   #4
 
elite*gold: 0
Join Date: Sep 2008
Posts: 490
Received Thanks: 595
Quote:
Originally Posted by high6 View Post
I see you used my disconnect thing as an example XD.

This probably shouldn't be used without changes because anything complicated will be raped by the fact that it stores the data in a string.

Nice idea though.
true
_fobos_ is offline  
Old 10/28/2008, 16:39   #5
 
elite*gold: 0
Join Date: Apr 2006
Posts: 49
Received Thanks: 12
Quote:
Originally Posted by high6 View Post
I see you used my disconnect thing as an example XD.

This probably shouldn't be used without changes because anything complicated will be raped by the fact that it stores the data in a string.

Nice idea though.

Heh, I discovered the disconnect thing long before it was posted here, by hooking MessageBoxA ect.. but yeah, to whoever uses this class should really tweak it.
null is offline  
Old 10/28/2008, 16:48   #6
 
elite*gold: 0
Join Date: Jun 2006
Posts: 965
Received Thanks: 576
Quote:
Originally Posted by null View Post
Heh, I discovered the disconnect thing long before it was posted here, by hooking MessageBoxA ect.. but yeah, to whoever uses this class should really tweak it.
I mean you posted this after I posted the CreateRemoteThread example of it.
high6 is offline  
Old 10/29/2008, 16:31   #7
 
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,001
And from now on we shall stay on topic.
tanelipe is offline  
Old 10/29/2008, 17:11   #8
 
MushyPeas's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 800
Received Thanks: 89
Quote:
Originally Posted by tanelipe View Post
And from now on we shall stay on topic.
Psh mean mod, you deleted my post.

Nice topic for anyone using C# who isn't too stupid to use it
MushyPeas is offline  
Reply


Similar Threads Similar Threads
can/how do u go from assembly code to hex?
10/15/2009 - Dekaron - 7 Replies
im trying to find an offset and assembly scan takes forever, could someone tell me if its possible to go from the assembly code to the hex value, if so how do you do it? cmp dword ptr ,13 ----> 83 78 08 13 0F 84
Assembly Help
08/19/2009 - Dekaron - 8 Replies
I am still trying to learn assembly, but I'm getting better. I found a tut that looked really promising (by Lela or something), but it was all about cracking registration things and such, which doesn't really help me with 2Moons. So if anybody has a tut that is more guided to game hacking, a link would be greatly appreciated. Anyway, here is what I need help with. Here is the part of the code I'm looking at: http://i221.photobucket.com/albums/dd193/sachamo5 12/Olly1.jpg What I need...
Assembly code Problem
08/19/2009 - Dekaron - 3 Replies
Hi i have the assembly code for a hack and i want to find the proper adress for the hack but when im searching in CE the assembly scan returns nothing. Btw for the others hacks assembly scan returns something. Why this could be happening? thanks Edit:thats the code im trying to get, movzx eax,word ptr opps sorry didnt saw that questions not allowed.
Questions regarding Ollydbg and Assembly
04/16/2009 - CO2 Programming - 9 Replies
hello guys just wondering, is it possible to run conquer.exe from ollydbg like in a debug mode?, and if so... do you get automatically botjailed because of the timestamps? second and easier, but I just want to confirm what I understood... if you get the message: jump from xxxxx under an instruction, does it really mean you got there because of a jump on xxxx position?



All times are GMT +1. The time now is 18:06.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.