summaryrefslogtreecommitdiff
path: root/src/source.cpp
blob: 965820fdfdc209b7369f2bf23d3d0fdeb9433883 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//|_   _   _.     _  ._  |_   _.  _ |
//| | (/_ (_| \/ (/_ | | | | (_| (_ |<

#include "csgo/hack.h"
#include "util.h"
#include "conin.h"
#include "menu.h"
#include "csgo/convar.h"

bool run() {
  con_init();
  PROCESS32* p = hack_init();

  Sleep( 1000 );
  settings.load();
  menu_show_ui( p );

  for( ;; ) {
    if( !hack_run( p ) ) {
      nt_close64( p->get_base() );
      u_sleep( 5 * T_SEC );
      break;
    }
  }

  return false;
}
  
I32 __cdecl main() {
  con_init();
  
  u_set_debug_privilege();
  u_thread_create( &con_hook_handler );
  u_thread_create( &con_handler );

  for( ; !run(); );

  return 0;
}