Register for your free account! | Forgot your password?

Go Back   elitepvpers > Shooter > S4 League > S4 League Hacks, Bots, Cheats & Exploits
You last visited: Today at 16:40

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

Advertisement



[Tutorial] Basic Reversing in S4L (KickVote Function)

Discussion on [Tutorial] Basic Reversing in S4L (KickVote Function) within the S4 League Hacks, Bots, Cheats & Exploits forum part of the S4 League category.

Reply
 
Old   #1
 
elite*gold: 225
Join Date: Sep 2014
Posts: 334
Received Thanks: 460
[Tutorial] Basic Reversing in S4L (KickVote Function)

Hello.
Wanna show you how to reverse functions in S4 League.
So let's get started;

First you need the address of the pre-kickvote processing function,
which is located in some class(__thiscall). I found out that it's not a vtable entry, so that's not so good because with vftables you can always grab your functions easier.



PHP Code:
.text:00E5FB12                 push    eax
.text:00E5FB13                 lea     ecx, [ebp+arg_0]
.
text:00E5FB16                 push    ecx
.text:00E5FB17                 push    offset dword_1642368
.text:00E5FB1C                 push    1
.text:00E5FB1E                 mov     edx, [ebp+var_10]
.
text:00E5FB21                 mov     eax, [edx]
.
text:00E5FB23                 mov     ecx, [ebp+var_10]
.
text:00E5FB26                 mov     edx, [eax+20h]
.
text:00E5FB29                 call    edx 
this is the actual kickvote interface invoke, which is ofc in the processing function. you can see it takes five arguments (this ptr, 0x1, an address constant, and eax which is 0x0).

Let's first see how those parameters are accomplished;

- first the this* is passed from another function to this one, then it's going to be copied into a local variable and then processed within another function:

PHP Code:
int __thiscall sub_E552E0(void *this)
{
  return (int)((
char *)this 84);

after that the kickvote invoke function ist just called and the function returns 1.

So to get all arguments just follow this:

1. execute sub_562180 with following arguments (0E6D7080h(ds:dword_165E6A0), first passed arg. and second passed argument to the processing function(arg_0 and arg_4 NOT THIS PTR).
2. execute sub_E552E0 and save result into some variable (passed this ptr to processing function)
3. kick invoke implementation:

PHP Code:
(*(void (__thiscall **)(intsigned int_DWORDint *, char *))(*(_DWORD *)v5 32))(v51dword_1642368, &a2, &a4); 
[For v5 use the result from step 2, then pass 1, then pass just 0]

To gather the this ptr from the processing function just hook it:

(in your hook)
PHP Code:
__asm {
    
mov temp_value,ecx

or you can also grab it from the stack because it was pushed before.
just calculate yourself where it should be on the stack.

the class ptr is always saved into the ecx register in case of __thiscall

then you can just make a typdef and invoke it
PHP Code:
typedef void (__thiscall** invoke_Kick_t)(intsigned intDWORDint*, char*);
invoke_Kick_t invoke_Kick_p = (*(void(__thiscall **)(int,signed int,DWORD,int*,char*))(*(DWORD*)processed_this 0x20)); 
Cyrex' is offline  
Thanks
8 Users
Old 03/28/2015, 22:08   #2
 
HaMaDa..'s Avatar
 
elite*gold: 37
Join Date: May 2014
Posts: 1,835
Received Thanks: 9,833
Good Work
HaMaDa.. is offline  
Thanks
4 Users
Old 03/28/2015, 22:09   #3
 
elite*gold: 225
Join Date: Sep 2014
Posts: 334
Received Thanks: 460
Quote:
Originally Posted by HaMaDa.. View Post
Good Work
Thanks
Cyrex' is offline  
Thanks
2 Users
Old 03/28/2015, 22:12   #4
 
HaMaDa..'s Avatar
 
elite*gold: 37
Join Date: May 2014
Posts: 1,835
Received Thanks: 9,833
But i dont have this program :/
HaMaDa.. is offline  
Thanks
1 User
Old 03/28/2015, 22:14   #5
 
elite*gold: 225
Join Date: Sep 2014
Posts: 334
Received Thanks: 460
Quote:
Originally Posted by HaMaDa.. View Post
But i dont have this program :/
Just use Cheat Engine Disassembler or x64dbg.
Cyrex' is offline  
Old 03/29/2015, 14:24   #6
 
Wieso nicht?'s Avatar
 
elite*gold: 0
Join Date: Apr 2014
Posts: 310
Received Thanks: 120
So what I can do, if I reversed a function? Which possibilities exist?
Wieso nicht? is offline  
Old 03/29/2015, 14:59   #7
 
elite*gold: 10
Join Date: Nov 2014
Posts: 89
Received Thanks: 136
nice tuto thx
LeheMan1 is offline  
Old 04/03/2015, 14:45   #8
 
elite*gold: 225
Join Date: Sep 2014
Posts: 334
Received Thanks: 460
Quote:
Originally Posted by Wieso nicht? View Post
So what I can do, if I reversed a function? Which possibilities exist?
You can either call it or you can use it to gather other information like player infos. Also you can understand how the game works and understand how to manipulate the game for your advantage
Cyrex' is offline  
Thanks
3 Users
Old 04/03/2015, 17:06   #9
 
elite*gold: 0
Join Date: Jan 2015
Posts: 137
Received Thanks: 130
Nice Tutorial.
alexprototyp is offline  
Old 04/07/2015, 08:09   #10
 
Neyil's Avatar
 
elite*gold: 0
Join Date: May 2014
Posts: 349
Received Thanks: 174
Quote:
Originally Posted by .Paradox* View Post
Just use Cheat Engine Disassembler or x64dbg.
how tf do you expect the guy to use cheat engine dissembler when it uses ****** ASM..while at the same time it's severely limited as a debugger..

cheat engine dissabembler doesn't use any c++ compilation at all so this guide is kinda useless for cheat engine dbger itself..(You're expecting this dude to convert code to long *** asm)

ollydebug and IDA are the icing of the cake.. while sometimes it gets too sweet
and you over think simple things.

when you say functions.. it's pretty broad since all are not the same. Every class has different attributes. It's better to compile code to change stuff if you're really going to do advanced stuff such as look for player ids.. because cmon you don't just grab player ids just to have player ids unless you are saving them or displaying them through some print class
Neyil is offline  
Old 04/07/2015, 09:39   #11
 
Terrat's Avatar
 
elite*gold: 130
Join Date: Apr 2012
Posts: 1,173
Received Thanks: 670
#removed
Terrat is offline  
Old 04/10/2015, 21:22   #12
 
elite*gold: 225
Join Date: Sep 2014
Posts: 334
Received Thanks: 460
Quote:
Originally Posted by Neyil View Post
how tf do you expect the guy to use cheat engine dissembler when it uses ****** ASM..while at the same time it's severely limited as a debugger..

cheat engine dissabembler doesn't use any c++ compilation at all so this guide is kinda useless for cheat engine dbger itself..(You're expecting this dude to convert code to long *** asm)

ollydebug and IDA are the icing of the cake.. while sometimes it gets too sweet
and you over think simple things.

when you say functions.. it's pretty broad since all are not the same. Every class has different attributes. It's better to compile code to change stuff if you're really going to do advanced stuff such as look for player ids.. because cmon you don't just grab player ids just to have player ids unless you are saving them or displaying them through some print class
decompiling the asm code into pseudo c code is just an example to clarify...
Cyrex' is offline  
Old 04/12/2015, 20:41   #13
 
Numino's Avatar
 
elite*gold: 0
Join Date: Apr 2015
Posts: 56
Received Thanks: 17
Easy to understand and nice feature thanks
Numino is offline  
Old 04/13/2015, 17:01   #14
 
Dominik0330's Avatar
 
elite*gold: 26
Join Date: Nov 2011
Posts: 185
Received Thanks: 113
Work Fine ... Rly nice
Good job
Dominik0330 is offline  
Reply


Similar Threads Similar Threads
[Tutorial-Collection] Metin2 Reversing/Hacking
07/03/2015 - Metin2 Guides & Templates - 149 Replies
Hey Epvp'ler. Ich habe mich dazu entschieden die ungebildete Metin2-Community mal ein bisschen auf Vordermann zu bringen und release hier meine private Playlist mit Reversing-Tutorials für Metin2. Die Tutorials sind so vom Niveau her für Anfänger, jedoch nicht für welche, die keine Ahnung von Memory, Assembler und Cheat Engine und sowas haben. Also WriteProcessMemory() solltet ihr schonmal gehört haben. Wenn ihr Ideen für weitere Videos oder Fragen habt, fragt einfach hier, wenn sie mir...
[Tutorial] Reversing Spell Encryption
06/15/2014 - CO2 Programming - 1 Replies
It has been quite a while since I last wrote a tutorial related to Conquer. This is mostly useless because as far as I know the spell encryption has already been reversed long time ago. The purpose of this post / tutorials is to help people understand how it's possible to find functions and implement them in desired language by reverse engineering. This will also be kind of log for me on how I approach reversing. This reverse engineering was performed on a unnamed private server so I'm not...
[C++]Metin2 How to Hook Game Function(Basic)
08/28/2013 - Metin2 PServer Guides & Strategies - 6 Replies
Here is a video : Metin2 How to Hook Game Function - YouTube Source : // dllmain.cpp : Defines the entry point for the DLL application. #include "stdafx.h" #include <detours.h>
[ C++ / Reversing | Tutorial ] Detour + Code Cave mit WPM
01/03/2010 - Coding Tutorials - 4 Replies
Moin leute, habe hier ein kleines Tutorial geschrieben wie man Funktionen auf seinen eigenen Code umleitet mit WriteProcessMemory. Ihr solltet jedoch schon wissen wie man WriteProcessMemory verwendet. Als Beispiel habe ich das Spiel Counterstrike genommen und Whitewalls gemacht. Das Tutorial ist NICHT dazu da um zu zeigen wie man Hacks schreibt und wie diese Funktionieren. Programme die benutzt werden: OllyDBG Credits für den White Walls code: b2k5



All times are GMT +1. The time now is 16:43.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

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