├── README.md ├── RW ├── RW.vcxproj ├── RW.vcxproj.filters ├── Resource.aps ├── Resource.rc ├── dependencies │ ├── curl │ │ ├── curl.h │ │ ├── curlver.h │ │ ├── easy.h │ │ ├── libcurl_a.lib │ │ ├── mprintf.h │ │ ├── multi.h │ │ ├── stdcheaders.h │ │ ├── system.h │ │ ├── typecheck-gcc.h │ │ └── urlapi.h │ ├── exception_handler │ │ ├── ExceptionHandler.cpp │ │ └── ExceptionHandler.hpp │ ├── imgui │ │ ├── imconfig.h │ │ ├── imgui.cpp │ │ ├── imgui.h │ │ ├── imgui.ini │ │ ├── imgui_demo.cpp │ │ ├── imgui_draw.cpp │ │ ├── imgui_impl_dx11.cpp │ │ ├── imgui_impl_dx11.h │ │ ├── imgui_impl_dx9.cpp │ │ ├── imgui_impl_dx9.h │ │ ├── imgui_impl_win32.cpp │ │ ├── imgui_impl_win32.h │ │ ├── imgui_internal.h │ │ ├── imgui_tables.cpp │ │ ├── imgui_widgets.cpp │ │ ├── imstb_rectpack.h │ │ ├── imstb_textedit.h │ │ └── imstb_truetype.h │ ├── inst_size │ │ └── InstructionSize.h │ ├── json │ │ └── json.hpp │ └── oxorany │ │ ├── oxorany.cpp │ │ └── oxorany.h ├── dllmain.cpp ├── features │ ├── aimbot │ │ ├── aimbot.cpp │ │ └── aimbot.hpp │ ├── misc │ │ ├── misc.cpp │ │ └── misc.hpp │ └── visuals │ │ ├── visuals.cpp │ │ └── visuals.hpp ├── games │ ├── arsenal │ │ ├── arsenal.cpp │ │ └── arsenal.hpp │ ├── bad_business │ │ ├── bad_business.cpp │ │ └── bad_business.hpp │ ├── base_game │ │ ├── base_game.cpp │ │ └── base_game.hpp │ ├── front_lines │ │ ├── front_lines.cpp │ │ └── front_lines.hpp │ ├── games.cpp │ ├── games.hpp │ ├── phantom_forces │ │ ├── phantom_forces.cpp │ │ └── phantom_forces.hpp │ └── rush_point │ │ ├── rush_point.cpp │ │ └── rush_point.hpp ├── math │ ├── math.cpp │ └── math.hpp ├── renderer │ ├── menu │ │ ├── config │ │ │ ├── config.cpp │ │ │ └── config.hpp │ │ ├── fonts │ │ │ └── poppins.hpp │ │ ├── libs │ │ │ ├── imgui_tricks.cpp │ │ │ ├── imgui_tricks.hpp │ │ │ └── keys.hpp │ │ ├── ui.cpp │ │ └── ui.hpp │ ├── renderer.cpp │ └── renderer.hpp ├── resource.h ├── roblox │ ├── roblox.cpp │ └── roblox.hpp └── task_scheduler │ ├── task_scheduler.cpp │ └── task_scheduler.hpp ├── RWB ├── RWB.sln └── RWB │ ├── RWB.vcxproj │ ├── RWB.vcxproj.filters │ ├── Resource.rc │ ├── dllmain.cpp │ └── resource.h └── RWI └── RWI ├── RWI.cpp ├── RWI.vcxproj ├── Resource.rc ├── dependencies └── curl │ ├── curl.h │ ├── curlver.h │ ├── easy.h │ ├── libcurl_a.lib │ ├── mprintf.h │ ├── multi.h │ ├── stdcheaders.h │ ├── system.h │ ├── typecheck-gcc.h │ └── urlapi.h ├── memory ├── memory.cpp └── memory.hpp ├── mmap ├── manual_map.cpp └── manual_map.hpp └── resource.h /README.md: -------------------------------------------------------------------------------- 1 | # RoWare 2 | 3 | Popular RoWare Aimbot/ESP creating by the ScriptWare development team 4 | 5 | 6 | Special thanks to the ScriptWare for letting me release, and thank you Azul and JDP personally for letting me be apart of the ScriptWare Development Team even if we ended on bad terms. 7 | -------------------------------------------------------------------------------- /RW/Resource.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RiisDev/RoWare/358437940ad8530d9946fb32f907533ea306b73f/RW/Resource.aps -------------------------------------------------------------------------------- /RW/Resource.rc: -------------------------------------------------------------------------------- 1 | 1 VERSIONINFO 2 | FILEVERSION 1, 0, 0, 60 3 | PRODUCTVERSION 1, 0, 0 4 | 5 | BEGIN 6 | BLOCK "StringFileInfo" 7 | BEGIN 8 | BLOCK "040904b0" 9 | BEGIN 10 | VALUE "CompanyName", "ScriptWare Software LTD" 11 | VALUE "FileDescription", "Ro-Ware Core" 12 | VALUE "FileVersion", "1.0.0.60" 13 | VALUE "InternalName", "ScriptWare" 14 | VALUE "LegalCopyright", "Copyright (C) 2022 ScriptWare Software LTD. All rights reserved." 15 | VALUE "LegalTrademarks", "ScriptWare Software LTD" 16 | VALUE "ProductName", "Ro-Ware" 17 | VALUE "ProductVersion", "1.0.0" 18 | END 19 | END 20 | BLOCK "VarFileInfo" 21 | BEGIN 22 | VALUE "Translation", 0x409, 1200 23 | END 24 | END -------------------------------------------------------------------------------- /RW/dependencies/curl/curlver.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_CURLVER_H 2 | #define CURLINC_CURLVER_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | /* This header file contains nothing but libcurl version info, generated by 26 | a script at release-time. This was made its own header file in 7.11.2 */ 27 | 28 | /* This is the global package copyright */ 29 | #define LIBCURL_COPYRIGHT "1996 - 2020 Daniel Stenberg, ." 30 | 31 | /* This is the version number of the libcurl package from which this header 32 | file origins: */ 33 | #define LIBCURL_VERSION "7.69.1" 34 | 35 | /* The numeric version number is also available "in parts" by using these 36 | defines: */ 37 | #define LIBCURL_VERSION_MAJOR 7 38 | #define LIBCURL_VERSION_MINOR 69 39 | #define LIBCURL_VERSION_PATCH 1 40 | 41 | /* This is the numeric version of the libcurl version number, meant for easier 42 | parsing and comparions by programs. The LIBCURL_VERSION_NUM define will 43 | always follow this syntax: 44 | 45 | 0xXXYYZZ 46 | 47 | Where XX, YY and ZZ are the main version, release and patch numbers in 48 | hexadecimal (using 8 bits each). All three numbers are always represented 49 | using two digits. 1.2 would appear as "0x010200" while version 9.11.7 50 | appears as "0x090b07". 51 | 52 | This 6-digit (24 bits) hexadecimal number does not show pre-release number, 53 | and it is always a greater number in a more recent release. It makes 54 | comparisons with greater than and less than work. 55 | 56 | Note: This define is the full hex number and _does not_ use the 57 | CURL_VERSION_BITS() macro since curl's own configure script greps for it 58 | and needs it to contain the full number. 59 | */ 60 | #define LIBCURL_VERSION_NUM 0x074501 61 | 62 | /* 63 | * This is the date and time when the full source package was created. The 64 | * timestamp is not stored in git, as the timestamp is properly set in the 65 | * tarballs by the maketgz script. 66 | * 67 | * The format of the date follows this template: 68 | * 69 | * "2007-11-23" 70 | */ 71 | #define LIBCURL_TIMESTAMP "2020-03-11" 72 | 73 | #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z)) 74 | #define CURL_AT_LEAST_VERSION(x,y,z) \ 75 | (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z)) 76 | 77 | #endif /* CURLINC_CURLVER_H */ 78 | -------------------------------------------------------------------------------- /RW/dependencies/curl/easy.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_EASY_H 2 | #define CURLINC_EASY_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | CURL_EXTERN CURL *curl_easy_init(void); 29 | CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); 30 | CURL_EXTERN CURLcode curl_easy_perform(CURL *curl); 31 | CURL_EXTERN void curl_easy_cleanup(CURL *curl); 32 | 33 | /* 34 | * NAME curl_easy_getinfo() 35 | * 36 | * DESCRIPTION 37 | * 38 | * Request internal information from the curl session with this function. The 39 | * third argument MUST be a pointer to a long, a pointer to a char * or a 40 | * pointer to a double (as the documentation describes elsewhere). The data 41 | * pointed to will be filled in accordingly and can be relied upon only if the 42 | * function returns CURLE_OK. This function is intended to get used *AFTER* a 43 | * performed transfer, all results from this function are undefined until the 44 | * transfer is completed. 45 | */ 46 | CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); 47 | 48 | 49 | /* 50 | * NAME curl_easy_duphandle() 51 | * 52 | * DESCRIPTION 53 | * 54 | * Creates a new curl session handle with the same options set for the handle 55 | * passed in. Duplicating a handle could only be a matter of cloning data and 56 | * options, internal state info and things like persistent connections cannot 57 | * be transferred. It is useful in multithreaded applications when you can run 58 | * curl_easy_duphandle() for each new thread to avoid a series of identical 59 | * curl_easy_setopt() invokes in every thread. 60 | */ 61 | CURL_EXTERN CURL *curl_easy_duphandle(CURL *curl); 62 | 63 | /* 64 | * NAME curl_easy_reset() 65 | * 66 | * DESCRIPTION 67 | * 68 | * Re-initializes a CURL handle to the default values. This puts back the 69 | * handle to the same state as it was in when it was just created. 70 | * 71 | * It does keep: live connections, the Session ID cache, the DNS cache and the 72 | * cookies. 73 | */ 74 | CURL_EXTERN void curl_easy_reset(CURL *curl); 75 | 76 | /* 77 | * NAME curl_easy_recv() 78 | * 79 | * DESCRIPTION 80 | * 81 | * Receives data from the connected socket. Use after successful 82 | * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. 83 | */ 84 | CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, 85 | size_t *n); 86 | 87 | /* 88 | * NAME curl_easy_send() 89 | * 90 | * DESCRIPTION 91 | * 92 | * Sends data over the connected socket. Use after successful 93 | * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. 94 | */ 95 | CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, 96 | size_t buflen, size_t *n); 97 | 98 | 99 | /* 100 | * NAME curl_easy_upkeep() 101 | * 102 | * DESCRIPTION 103 | * 104 | * Performs connection upkeep for the given session handle. 105 | */ 106 | CURL_EXTERN CURLcode curl_easy_upkeep(CURL *curl); 107 | 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | 112 | #endif 113 | -------------------------------------------------------------------------------- /RW/dependencies/curl/libcurl_a.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RiisDev/RoWare/358437940ad8530d9946fb32f907533ea306b73f/RW/dependencies/curl/libcurl_a.lib -------------------------------------------------------------------------------- /RW/dependencies/curl/mprintf.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_MPRINTF_H 2 | #define CURLINC_MPRINTF_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include 26 | #include /* needed for FILE */ 27 | #include "curl.h" /* for CURL_EXTERN */ 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | CURL_EXTERN int curl_mprintf(const char *format, ...); 34 | CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); 35 | CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); 36 | CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, 37 | const char *format, ...); 38 | CURL_EXTERN int curl_mvprintf(const char *format, va_list args); 39 | CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args); 40 | CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args); 41 | CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, 42 | const char *format, va_list args); 43 | CURL_EXTERN char *curl_maprintf(const char *format, ...); 44 | CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif /* CURLINC_MPRINTF_H */ 51 | -------------------------------------------------------------------------------- /RW/dependencies/curl/stdcheaders.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_STDCHEADERS_H 2 | #define CURLINC_STDCHEADERS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include 26 | 27 | size_t fread(void *, size_t, size_t, FILE *); 28 | size_t fwrite(const void *, size_t, size_t, FILE *); 29 | 30 | int strcasecmp(const char *, const char *); 31 | int strncasecmp(const char *, const char *, size_t); 32 | 33 | #endif /* CURLINC_STDCHEADERS_H */ 34 | -------------------------------------------------------------------------------- /RW/dependencies/curl/urlapi.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_URLAPI_H 2 | #define CURLINC_URLAPI_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 2018 - 2019, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl.h" 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | /* the error codes for the URL API */ 32 | typedef enum { 33 | CURLUE_OK, 34 | CURLUE_BAD_HANDLE, /* 1 */ 35 | CURLUE_BAD_PARTPOINTER, /* 2 */ 36 | CURLUE_MALFORMED_INPUT, /* 3 */ 37 | CURLUE_BAD_PORT_NUMBER, /* 4 */ 38 | CURLUE_UNSUPPORTED_SCHEME, /* 5 */ 39 | CURLUE_URLDECODE, /* 6 */ 40 | CURLUE_OUT_OF_MEMORY, /* 7 */ 41 | CURLUE_USER_NOT_ALLOWED, /* 8 */ 42 | CURLUE_UNKNOWN_PART, /* 9 */ 43 | CURLUE_NO_SCHEME, /* 10 */ 44 | CURLUE_NO_USER, /* 11 */ 45 | CURLUE_NO_PASSWORD, /* 12 */ 46 | CURLUE_NO_OPTIONS, /* 13 */ 47 | CURLUE_NO_HOST, /* 14 */ 48 | CURLUE_NO_PORT, /* 15 */ 49 | CURLUE_NO_QUERY, /* 16 */ 50 | CURLUE_NO_FRAGMENT /* 17 */ 51 | } CURLUcode; 52 | 53 | typedef enum { 54 | CURLUPART_URL, 55 | CURLUPART_SCHEME, 56 | CURLUPART_USER, 57 | CURLUPART_PASSWORD, 58 | CURLUPART_OPTIONS, 59 | CURLUPART_HOST, 60 | CURLUPART_PORT, 61 | CURLUPART_PATH, 62 | CURLUPART_QUERY, 63 | CURLUPART_FRAGMENT, 64 | CURLUPART_ZONEID /* added in 7.65.0 */ 65 | } CURLUPart; 66 | 67 | #define CURLU_DEFAULT_PORT (1<<0) /* return default port number */ 68 | #define CURLU_NO_DEFAULT_PORT (1<<1) /* act as if no port number was set, 69 | if the port number matches the 70 | default for the scheme */ 71 | #define CURLU_DEFAULT_SCHEME (1<<2) /* return default scheme if 72 | missing */ 73 | #define CURLU_NON_SUPPORT_SCHEME (1<<3) /* allow non-supported scheme */ 74 | #define CURLU_PATH_AS_IS (1<<4) /* leave dot sequences */ 75 | #define CURLU_DISALLOW_USER (1<<5) /* no user+password allowed */ 76 | #define CURLU_URLDECODE (1<<6) /* URL decode on get */ 77 | #define CURLU_URLENCODE (1<<7) /* URL encode on set */ 78 | #define CURLU_APPENDQUERY (1<<8) /* append a form style part */ 79 | #define CURLU_GUESS_SCHEME (1<<9) /* legacy curl-style guessing */ 80 | #define CURLU_NO_AUTHORITY (1<<10) /* Allow empty authority when the 81 | scheme is unknown. */ 82 | 83 | typedef struct Curl_URL CURLU; 84 | 85 | /* 86 | * curl_url() creates a new CURLU handle and returns a pointer to it. 87 | * Must be freed with curl_url_cleanup(). 88 | */ 89 | CURL_EXTERN CURLU *curl_url(void); 90 | 91 | /* 92 | * curl_url_cleanup() frees the CURLU handle and related resources used for 93 | * the URL parsing. It will not free strings previously returned with the URL 94 | * API. 95 | */ 96 | CURL_EXTERN void curl_url_cleanup(CURLU *handle); 97 | 98 | /* 99 | * curl_url_dup() duplicates a CURLU handle and returns a new copy. The new 100 | * handle must also be freed with curl_url_cleanup(). 101 | */ 102 | CURL_EXTERN CURLU *curl_url_dup(CURLU *in); 103 | 104 | /* 105 | * curl_url_get() extracts a specific part of the URL from a CURLU 106 | * handle. Returns error code. The returned pointer MUST be freed with 107 | * curl_free() afterwards. 108 | */ 109 | CURL_EXTERN CURLUcode curl_url_get(CURLU *handle, CURLUPart what, 110 | char **part, unsigned int flags); 111 | 112 | /* 113 | * curl_url_set() sets a specific part of the URL in a CURLU handle. Returns 114 | * error code. The passed in string will be copied. Passing a NULL instead of 115 | * a part string, clears that part. 116 | */ 117 | CURL_EXTERN CURLUcode curl_url_set(CURLU *handle, CURLUPart what, 118 | const char *part, unsigned int flags); 119 | 120 | 121 | #ifdef __cplusplus 122 | } /* end of extern "C" */ 123 | #endif 124 | 125 | #endif /* CURLINC_URLAPI_H */ 126 | -------------------------------------------------------------------------------- /RW/dependencies/exception_handler/ExceptionHandler.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef _EH32_INCLUDE 3 | #define _EH32_INCLUDE 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #pragma comment(lib, "DbgHelp.lib") 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #define EH_REPORTSIZE 16384 19 | 20 | namespace ExceptionManager 21 | { 22 | struct EHReport 23 | { 24 | char* report_string; 25 | size_t report_size; 26 | bool clipped; 27 | }; 28 | 29 | typedef void(*eh_callback)(EHReport); 30 | struct EHSettings 31 | { 32 | std::vector blacklist_code; 33 | std::vector blacklist_sym; 34 | std::optional prog_name; 35 | std::uintptr_t prog_base; /* handle */ 36 | std::uintptr_t prog_size; 37 | eh_callback callback; 38 | char* report_dst; 39 | size_t report_dst_size; 40 | bool is_prog_dll; 41 | bool use_seh; 42 | bool use_veh; 43 | }; 44 | 45 | extern EHSettings g_ehsettings; 46 | extern char g_ehreportbuffer[EH_REPORTSIZE]; 47 | 48 | void Init(EHSettings* settings); 49 | 50 | std::string getBack(const std::string& s, char delim); 51 | std::string ResolveModuleFromAddress(DWORD Address); 52 | std::string StackWalkReport(PEXCEPTION_POINTERS pExceptionRecord); 53 | PCHAR GetExceptionSymbol(PEXCEPTION_POINTERS pExceptionRecord); 54 | PCHAR GetExceptionMessage(PEXCEPTION_POINTERS pExceptionRecord); 55 | BOOL ExceptionNotify(bool isVEH, PEXCEPTION_POINTERS pExceptionRecord); 56 | LONG WINAPI TopLevelExceptionHandler(PEXCEPTION_POINTERS pExceptionRecord); 57 | LONG WINAPI VectoredExceptionHandler(PEXCEPTION_POINTERS pExceptionRecord); 58 | }; 59 | 60 | #endif -------------------------------------------------------------------------------- /RW/dependencies/imgui/imconfig.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // COMPILE-TIME OPTIONS FOR DEAR IMGUI 3 | // Runtime options (clipboard callbacks, enabling various features, etc.) can generally be set via the ImGuiIO structure. 4 | // You can use ImGui::SetAllocatorFunctions() before calling ImGui::CreateContext() to rewire memory allocation functions. 5 | //----------------------------------------------------------------------------- 6 | // A) You may edit imconfig.h (and not overwrite it when updating Dear ImGui, or maintain a patch/rebased branch with your modifications to it) 7 | // B) or '#define IMGUI_USER_CONFIG "my_imgui_config.h"' in your project and then add directives in your own file without touching this template. 8 | //----------------------------------------------------------------------------- 9 | // You need to make sure that configuration settings are defined consistently _everywhere_ Dear ImGui is used, which include the imgui*.cpp 10 | // files but also _any_ of your code that uses Dear ImGui. This is because some compile-time options have an affect on data structures. 11 | // Defining those options in imconfig.h will ensure every compilation unit gets to see the same data structure layouts. 12 | // Call IMGUI_CHECKVERSION() from your .cpp files to verify that the data structures your files are using are matching the ones imgui.cpp is using. 13 | //----------------------------------------------------------------------------- 14 | 15 | #pragma once 16 | 17 | //---- Define assertion handler. Defaults to calling assert(). 18 | // If your macro uses multiple statements, make sure is enclosed in a 'do { .. } while (0)' block so it can be used as a single statement. 19 | //#define IM_ASSERT(_EXPR) MyAssert(_EXPR) 20 | //#define IM_ASSERT(_EXPR) ((void)(_EXPR)) // Disable asserts 21 | 22 | //---- Define attributes of all API symbols declarations, e.g. for DLL under Windows 23 | // Using Dear ImGui via a shared library is not recommended, because of function call overhead and because we don't guarantee backward nor forward ABI compatibility. 24 | // DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() 25 | // for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details. 26 | //#define IMGUI_API __declspec( dllexport ) 27 | //#define IMGUI_API __declspec( dllimport ) 28 | 29 | //---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names. 30 | //#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS 31 | 32 | //---- Disable all of Dear ImGui or don't implement standard windows. 33 | // It is very strongly recommended to NOT disable the demo windows during development. Please read comments in imgui_demo.cpp. 34 | //#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty. 35 | //#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty. Not recommended. 36 | //#define IMGUI_DISABLE_METRICS_WINDOW // Disable metrics/debugger window: ShowMetricsWindow() will be empty. 37 | 38 | //---- Don't implement some functions to reduce linkage requirements. 39 | //#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. (user32.lib/.a, kernel32.lib/.a) 40 | //#define IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] [Default with Visual Studio] Implement default IME handler (require imm32.lib/.a, auto-link for Visual Studio, -limm32 on command-line for MinGW) 41 | //#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] [Default with non-Visual Studio compilers] Don't implement default IME handler (won't require imm32.lib/.a) 42 | //#define IMGUI_DISABLE_WIN32_FUNCTIONS // [Win32] Won't use and link with any Win32 function (clipboard, ime). 43 | //#define IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS // [OSX] Implement default OSX clipboard handler (need to link with '-framework ApplicationServices', this is why this is not the default). 44 | //#define IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS // Don't implement ImFormatString/ImFormatStringV so you can implement them yourself (e.g. if you don't want to link with vsnprintf) 45 | //#define IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS // Don't implement ImFabs/ImSqrt/ImPow/ImFmod/ImCos/ImSin/ImAcos/ImAtan2 so you can implement them yourself. 46 | //#define IMGUI_DISABLE_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle at all (replace them with dummies) 47 | //#define IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle so you can implement them yourself if you don't want to link with fopen/fclose/fread/fwrite. This will also disable the LogToTTY() function. 48 | //#define IMGUI_DISABLE_DEFAULT_ALLOCATORS // Don't implement default allocators calling malloc()/free() to avoid linking with them. You will need to call ImGui::SetAllocatorFunctions(). 49 | //#define IMGUI_DISABLE_SSE // Disable use of SSE intrinsics even if available 50 | 51 | //---- Include imgui_user.h at the end of imgui.h as a convenience 52 | //#define IMGUI_INCLUDE_IMGUI_USER_H 53 | 54 | //---- Pack colors to BGRA8 instead of RGBA8 (to avoid converting from one to another) 55 | //#define IMGUI_USE_BGRA_PACKED_COLOR 56 | 57 | //---- Use 32-bit for ImWchar (default is 16-bit) to support unicode planes 1-16. (e.g. point beyond 0xFFFF like emoticons, dingbats, symbols, shapes, ancient languages, etc...) 58 | //#define IMGUI_USE_WCHAR32 59 | 60 | //---- Avoid multiple STB libraries implementations, or redefine path/filenames to prioritize another version 61 | // By default the embedded implementations are declared static and not available outside of Dear ImGui sources files. 62 | //#define IMGUI_STB_TRUETYPE_FILENAME "my_folder/stb_truetype.h" 63 | //#define IMGUI_STB_RECT_PACK_FILENAME "my_folder/stb_rect_pack.h" 64 | //#define IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION 65 | //#define IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION 66 | 67 | //---- Use stb_printf's faster implementation of vsnprintf instead of the one from libc (unless IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS is defined) 68 | // Requires 'stb_sprintf.h' to be available in the include path. Compatibility checks of arguments and formats done by clang and GCC will be disabled in order to support the extra formats provided by STB sprintf. 69 | // #define IMGUI_USE_STB_SPRINTF 70 | 71 | //---- Use FreeType to build and rasterize the font atlas (instead of stb_truetype which is embedded by default in Dear ImGui) 72 | // Requires FreeType headers to be available in the include path. Requires program to be compiled with 'misc/freetype/imgui_freetype.cpp' (in this repository) + the FreeType library (not provided). 73 | // On Windows you may use vcpkg with 'vcpkg install freetype --triplet=x64-windows' + 'vcpkg integrate install'. 74 | //#define IMGUI_ENABLE_FREETYPE 75 | 76 | //---- Use stb_truetype to build and rasterize the font atlas (default) 77 | // The only purpose of this define is if you want force compilation of the stb_truetype backend ALONG with the FreeType backend. 78 | //#define IMGUI_ENABLE_STB_TRUETYPE 79 | 80 | //---- Define constructor and implicit cast operators to convert back<>forth between your math types and ImVec2/ImVec4. 81 | // This will be inlined as part of ImVec2 and ImVec4 class declarations. 82 | /* 83 | #define IM_VEC2_CLASS_EXTRA \ 84 | ImVec2(const MyVec2& f) { x = f.x; y = f.y; } \ 85 | operator MyVec2() const { return MyVec2(x,y); } 86 | 87 | #define IM_VEC4_CLASS_EXTRA \ 88 | ImVec4(const MyVec4& f) { x = f.x; y = f.y; z = f.z; w = f.w; } \ 89 | operator MyVec4() const { return MyVec4(x,y,z,w); } 90 | */ 91 | 92 | //---- Use 32-bit vertex indices (default is 16-bit) is one way to allow large meshes with more than 64K vertices. 93 | // Your renderer backend will need to support it (most example renderer backends support both 16/32-bit indices). 94 | // Another way to allow large meshes while keeping 16-bit indices is to handle ImDrawCmd::VtxOffset in your renderer. 95 | // Read about ImGuiBackendFlags_RendererHasVtxOffset for details. 96 | //#define ImDrawIdx unsigned int 97 | 98 | //---- Override ImDrawCallback signature (will need to modify renderer backends accordingly) 99 | //struct ImDrawList; 100 | //struct ImDrawCmd; 101 | //typedef void (*MyImDrawCallback)(const ImDrawList* draw_list, const ImDrawCmd* cmd, void* my_renderer_user_data); 102 | //#define ImDrawCallback MyImDrawCallback 103 | 104 | //---- Debug Tools: Macro to break in Debugger 105 | // (use 'Metrics->Tools->Item Picker' to pick widgets with the mouse and break into them for easy debugging.) 106 | //#define IM_DEBUG_BREAK IM_ASSERT(0) 107 | //#define IM_DEBUG_BREAK __debugbreak() 108 | 109 | //---- Debug Tools: Have the Item Picker break in the ItemAdd() function instead of ItemHoverable(), 110 | // (which comes earlier in the code, will catch a few extra items, allow picking items other than Hovered one.) 111 | // This adds a small runtime cost which is why it is not enabled by default. 112 | //#define IMGUI_DEBUG_TOOL_ITEM_PICKER_EX 113 | 114 | //---- Debug Tools: Enable slower asserts 115 | //#define IMGUI_DEBUG_PARANOID 116 | 117 | //---- Tip: You can add extra functions within the ImGui:: namespace, here or in your own headers files. 118 | /* 119 | namespace ImGui 120 | { 121 | void MyFunction(const char* name, const MyMatrix44& v); 122 | } 123 | */ 124 | -------------------------------------------------------------------------------- /RW/dependencies/imgui/imgui.ini: -------------------------------------------------------------------------------- 1 | [Window][Debug##Default] 2 | Pos=1793,701 3 | Size=650,711 4 | Collapsed=1 5 | 6 | [Window][Dear ImGui Demo] 7 | Pos=650,20 8 | Size=550,680 9 | Collapsed=0 10 | 11 | [Window][Hello, world!] 12 | Pos=60,60 13 | Size=339,180 14 | Collapsed=0 15 | 16 | [Window][Interface] 17 | Pos=1013,519 18 | Size=650,575 19 | Collapsed=0 20 | 21 | [Window][Exploits] 22 | Pos=514,612 23 | Size=255,250 24 | Collapsed=0 25 | 26 | -------------------------------------------------------------------------------- /RW/dependencies/imgui/imgui_impl_dx11.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer Backend for DirectX11 2 | // This needs to be used along with a Platform Backend (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'ID3D11ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices. 7 | 8 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 9 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. 10 | // If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp. 11 | // Read online: https://github.com/ocornut/imgui/tree/master/docs 12 | 13 | #pragma once 14 | #include "imgui.h" // IMGUI_IMPL_API 15 | 16 | struct ID3D11Device; 17 | struct ID3D11DeviceContext; 18 | 19 | IMGUI_IMPL_API bool ImGui_ImplDX11_Init(ID3D11Device* device, ID3D11DeviceContext* device_context); 20 | IMGUI_IMPL_API void ImGui_ImplDX11_Shutdown(); 21 | IMGUI_IMPL_API void ImGui_ImplDX11_NewFrame(); 22 | IMGUI_IMPL_API void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data); 23 | 24 | // Use if you want to reset your rendering device without losing Dear ImGui state. 25 | IMGUI_IMPL_API void ImGui_ImplDX11_InvalidateDeviceObjects(); 26 | IMGUI_IMPL_API bool ImGui_ImplDX11_CreateDeviceObjects(); 27 | -------------------------------------------------------------------------------- /RW/dependencies/imgui/imgui_impl_dx9.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer Backend for DirectX9 2 | // This needs to be used along with a Platform Backend (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'LPDIRECT3DTEXTURE9' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices. 7 | 8 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 9 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. 10 | // If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp. 11 | // Read online: https://github.com/ocornut/imgui/tree/master/docs 12 | 13 | #pragma once 14 | #include "imgui.h" // IMGUI_IMPL_API 15 | 16 | struct IDirect3DDevice9; 17 | 18 | IMGUI_IMPL_API bool ImGui_ImplDX9_Init(IDirect3DDevice9* device); 19 | IMGUI_IMPL_API void ImGui_ImplDX9_Shutdown(); 20 | IMGUI_IMPL_API void ImGui_ImplDX9_NewFrame(); 21 | IMGUI_IMPL_API void ImGui_ImplDX9_RenderDrawData(ImDrawData* draw_data); 22 | 23 | // Use if you want to reset your rendering device without losing Dear ImGui state. 24 | IMGUI_IMPL_API bool ImGui_ImplDX9_CreateDeviceObjects(); 25 | IMGUI_IMPL_API void ImGui_ImplDX9_InvalidateDeviceObjects(); 26 | -------------------------------------------------------------------------------- /RW/dependencies/imgui/imgui_impl_win32.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Platform Backend for Windows (standard windows API for 32 and 64 bits applications) 2 | // This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..) 3 | 4 | // Implemented features: 5 | // [X] Platform: Clipboard support (for Win32 this is actually part of core dear imgui) 6 | // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. 7 | // [X] Platform: Keyboard arrays indexed using VK_* Virtual Key Codes, e.g. ImGui::IsKeyPressed(VK_SPACE). 8 | // [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'. 9 | 10 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 11 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. 12 | // If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp. 13 | // Read online: https://github.com/ocornut/imgui/tree/master/docs 14 | 15 | #pragma once 16 | #include "imgui.h" // IMGUI_IMPL_API 17 | 18 | IMGUI_IMPL_API bool ImGui_ImplWin32_Init(void* hwnd); 19 | IMGUI_IMPL_API void ImGui_ImplWin32_Shutdown(); 20 | IMGUI_IMPL_API void ImGui_ImplWin32_NewFrame(); 21 | 22 | // Win32 message handler your application need to call. 23 | // - Intentionally commented out in a '#if 0' block to avoid dragging dependencies on from this helper. 24 | // - You should COPY the line below into your .cpp code to forward declare the function and then you can call it. 25 | #if 0 26 | extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); 27 | #endif 28 | 29 | // DPI-related helpers (optional) 30 | // - Use to enable DPI awareness without having to create an application manifest. 31 | // - Your own app may already do this via a manifest or explicit calls. This is mostly useful for our examples/ apps. 32 | // - In theory we could call simple functions from Windows SDK such as SetProcessDPIAware(), SetProcessDpiAwareness(), etc. 33 | // but most of the functions provided by Microsoft require Windows 8.1/10+ SDK at compile time and Windows 8/10+ at runtime, 34 | // neither we want to require the user to have. So we dynamically select and load those functions to avoid dependencies. 35 | IMGUI_IMPL_API void ImGui_ImplWin32_EnableDpiAwareness(); 36 | IMGUI_IMPL_API float ImGui_ImplWin32_GetDpiScaleForHwnd(void* hwnd); // HWND hwnd 37 | IMGUI_IMPL_API float ImGui_ImplWin32_GetDpiScaleForMonitor(void* monitor); // HMONITOR monitor 38 | 39 | // Transparency related helpers (optional) [experimental] 40 | // - Use to enable alpha compositing transparency with the desktop. 41 | // - Use together with e.g. clearing your framebuffer with zero-alpha. 42 | IMGUI_IMPL_API void ImGui_ImplWin32_EnableAlphaCompositing(void* hwnd); // HWND hwnd 43 | -------------------------------------------------------------------------------- /RW/dependencies/inst_size/InstructionSize.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 oblique. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without modification, are 4 | * permitted provided that the following conditions are met: 5 | * 6 | * 1. Redistributions of source code must retain the above copyright notice, this list of 7 | * conditions and the following disclaimer. 8 | * 9 | * 2. Redistributions in binary form must reproduce the above copyright notice, this list 10 | * of conditions and the following disclaimer in the documentation and/or other materials 11 | * provided with the distribution. 12 | * 13 | * THIS SOFTWARE IS PROVIDED BY OBLIQUE ``AS IS'' AND ANY EXPRESS OR IMPLIED 14 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 15 | * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OBLIQUE OR 16 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 17 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 18 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 19 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 20 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 21 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 | * 23 | * The views and conclusions contained in the software and documentation are those of the 24 | * authors and should not be interpreted as representing official policies, either expressed 25 | * or implied, of oblique. 26 | */ 27 | #ifndef INSN_LEN_H 28 | #define INSN_LEN_H 29 | 30 | /* References: 31 | * Intel 64 and IA-32 Architectures Software Developer's Manuals - Volume 2A Ch. 2 32 | * http://ref.x86asm.net 33 | * http://sandpile.org 34 | */ 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | #define Mod_M 0xc0 41 | #define RM_M 0x7 42 | #define Base_M 0x7 43 | #define REX_W 0x8 44 | 45 | #define MAX_INSN_LEN_x86 15 46 | #define MAX_INSN_LEN_x86_32 MAX_INSN_LEN_x86 47 | #define MAX_INSN_LEN_x86_64 MAX_INSN_LEN_x86 48 | 49 | enum __bits { __b16, __b32, __b64 }; 50 | 51 | #ifdef __i386__ 52 | #define insn_len(insn) insn_len_x86_32(insn) 53 | #define MAX_INSN_LEN MAX_INSN_LEN_x86_32 54 | #elif defined(__x86_64__) 55 | #define insn_len(insn) insn_len_x86_64(insn) 56 | #define MAX_INSN_LEN MAX_INSN_LEN_x86_64 57 | #endif 58 | 59 | /* This function returns the length of an x86 instruction. 60 | * I assume that instruction is valid. 61 | */ 62 | static inline int __insn_len_x86(void* insn, enum __bits bits) { 63 | int len = 0, twobytes = 0, has_modrm = 0; 64 | enum __bits operand_bits = __b32, addr_bits = bits; 65 | unsigned char* c = (unsigned char*)insn, modrm, opcode; 66 | 67 | /* prefixes 68 | * 69 | * 0xf0, 0xf2, 0xf3, 0x2e, 0x36 70 | * 0x3e, 0x26, 0x64, 0x65, 0x66, 0x67 71 | */ 72 | 73 | // skip prefixes 74 | while (*c == 0xf0 || *c == 0xf2 || *c == 0xf3 || 75 | *c == 0x2e || *c == 0x36 || *c == 0x3e || *c == 0x26 || 76 | (*c & 0xfc) == 0x64) { 77 | if (*c == 0x66) // 16bits operands 78 | operand_bits = __b16; 79 | if (*c == 0x67) // 16bits addressing (x86-32), 32bits addressing (x86-64) 80 | addr_bits = bits == __b32 ? __b16 : __b32; 81 | c++; 82 | len++; 83 | } 84 | 85 | if (bits == __b64 && (*c & 0xf0) == 0x40) { // x86-64 && REX byte 86 | if (*c & REX_W) 87 | operand_bits = __b64; 88 | c++; 89 | len++; 90 | } 91 | 92 | /* 0x9b prefix is used only by the following 1byte opcodes 93 | * 94 | * 0xd9 Mod != 11 Reg/Op = 110 or 111 95 | * 0xdb ModR/M = 0xe2 or 0xe3 96 | * 0xdd Reg/Op = 110 or 111 97 | * 0xdf ModR/M = 0xe0 98 | */ 99 | 100 | // check for 2bytes opcodes (0x0f prefix) 101 | if (*c == 0x0f) { 102 | twobytes = 1; 103 | c++; 104 | len++; 105 | } 106 | else if (*c == 0x9b && // check 0x9b prefix 107 | ((c[1] == 0xd9 && (c[2] & Mod_M) != Mod_M && (c[2] & 0x30) == 0x30) || 108 | (c[1] == 0xdb && (c[2] == 0xe2 || c[2] == 0xe3)) || 109 | (c[1] == 0xdd && (c[2] & 0x30) == 0x30) || 110 | (c[1] == 0xdf && c[2] == 0xe0) 111 | )) { 112 | c++; 113 | len++; 114 | } 115 | 116 | opcode = *c++; 117 | len++; 118 | 119 | /* 1byte opcodes that use ModR/M byte: 120 | * 121 | * 0x00 - 0x03, 0x08 - 0x0b, 122 | * 0x10 - 0x13, 0x18 - 0x1b, 123 | * 0x20 - 0x23, 0x28 - 0x2b, 124 | * 0x30 - 0x33, 0x38 - 0x3b, 125 | * 0x62, 0x63, 0x69, 0x6b, 126 | * 0x80 - 0x8f, 0xc0, 0xc1, 127 | * 0xc4 - 0xc7, 128 | * 0xd0 - 0xd3, 0xd8 - 0xdf 129 | * 0xf6, 0xf7, 0xfe, 0xff 130 | */ 131 | 132 | if (!twobytes && 133 | ((opcode & 0xf4) == 0 || (opcode & 0xf4) == 0x10 || 134 | (opcode & 0xf4) == 0x20 || (opcode & 0xf4) == 0x30 || 135 | opcode == 0x62 || opcode == 0x63 || opcode == 0x69 || opcode == 0x6b || 136 | (opcode & 0xf0) == 0x80 || opcode == 0xc0 || opcode == 0xc1 || 137 | (opcode & 0xfc) == 0xc4 || (opcode & 0xfc) == 0xd0 || 138 | (opcode & 0xf8) == 0xd8 || opcode == 0xf6 || opcode == 0xf7 || 139 | opcode == 0xfe || opcode == 0xff)) 140 | has_modrm = 1; 141 | 142 | /* 2bytes opcodes that they *don't* use ModR/M byte: 143 | * 144 | * 0x05 - 0x09, 0x0b, 0x0e, 145 | * 0x30 - 0x37, 0x77, 0x80 - 0x8f, 146 | * 0xa0 - 0xa2, 0xa8 - 0xaa, 0xb9 147 | * 0xc8 - 0xcf 148 | */ 149 | 150 | if (twobytes) { 151 | if (!((opcode >= 0x05 && opcode <= 0x09) || opcode == 0x0b || 152 | opcode == 0x0e || (opcode & 0xf8) == 0x30 || opcode == 0x77 || 153 | (opcode & 0xf0) == 0x80 || (opcode >= 0xa0 && opcode <= 0xa2) || 154 | (opcode >= 0xa8 && opcode <= 0xaa) || (opcode & 0xf8) == 0xc8 || 155 | opcode == 0xb9)) 156 | has_modrm = 1; 157 | 158 | // 3bytes opcodes 159 | if (opcode == 0x38 || opcode == 0x3a) { 160 | c++; 161 | len++; 162 | } 163 | 164 | // 3DNow! opcode 165 | if (opcode == 0x0f) 166 | len++; 167 | } 168 | 169 | if (has_modrm) { 170 | len++; 171 | modrm = *c++; 172 | if (addr_bits != __b16 && (modrm & (Mod_M | RM_M)) == 5) // Mod = 00 R/M = 101 173 | len += 4; 174 | if (addr_bits == __b16 && (modrm & (Mod_M | RM_M)) == 6) // Mod = 00 R/M = 110 and 16bits addressing 175 | len += 2; 176 | if ((modrm & Mod_M) == 0x40) // Mod = 01 177 | len += 1; 178 | if ((modrm & Mod_M) == 0x80) // Mod = 10 179 | len += addr_bits == __b16 ? 2 : 4; 180 | 181 | // check SIB byte 182 | if (addr_bits != __b16 && (modrm & Mod_M) != Mod_M && (modrm & RM_M) == 4) { // if it has SIB 183 | len++; 184 | if ((modrm & Mod_M) == 0 && (*c & Base_M) == 5) // Mod = 00 SIB Base = 101 185 | len += 4; 186 | c++; 187 | } 188 | } 189 | 190 | /* Immediate operands 191 | * 192 | * 1byte opcode list: 193 | * 194 | * imm8 (1 byte) 195 | * 196 | * 0x04, 0x0c, 0x14, 0x1c, 0x24, 0x2c, 0x34, 0x3c, 0x6a, 0x6b, 0x70 - 0x7f, 197 | * 0x80, 0x82, 0x83, 0xa8, 0xb0 - 0xb7, 0xc0, 0xc1, 0xc6, 0xcd, 0xd4, 198 | * 0xd5, 0xe0 - 0xe7, 0xeb, 0xf6 (Reg/Op = 000 or Reg/Op = 001) 199 | * 200 | * imm16 (2 bytes) 201 | * 202 | * 0xc2, 0xca 203 | * 204 | * imm16/32 (2 bytes if operand_bits == __b16 else 4 bytes) 205 | * 206 | * 0x05, 0x0d, 0x15, 0x1d, 0x25, 0x2d, 0x35, 0x3d, 0x68, 0x69, 0x81, 0xa9 207 | * 0xc7, 0xe8, 0xe9 208 | * 209 | * imm16/32/64 (2 bytes if operand_bits == __b16, 4 bytes if __b32, 8 bytes if __b64) 210 | * 211 | * 0xb8 - 0xbf, 0xf7 (Reg/Op = 000 or Reg/Op = 001) 212 | * 213 | * moffs (2 bytes if addr_bits == __b16, 4 bytes if __b32, 8 bytes if __b64) 214 | * 215 | * 0xa0, 0xa1, 0xa2, 0xa3 216 | * 217 | * others 218 | * 219 | * 0xea, 0x9a: imm16 + imm16/32 220 | * 0xc8: imm16 + imm8 221 | * 222 | * 223 | * 2bytes opcode list: 224 | * 225 | * imm8 (1 byte) 226 | * 227 | * 0x70 - 0x73, 0xa4, 0xac, 0xba, 0xc2, 0xc4 - 0xc6 228 | * 229 | * imm16/32 (2 bytes if operand_bits == __b16 else 4 bytes) 230 | * 231 | * 0x80 - 0x8f 232 | * 233 | * 234 | * all 3bytes opcodes with 0x3a prefix have imm8 235 | */ 236 | if (!twobytes) { // 1byte opcodes 237 | // imm8 238 | if (((opcode & 7) == 4 && (opcode & 0xf0) <= 0x30) || 239 | opcode == 0x6a || opcode == 0x6b || (opcode & 0xf0) == 0x70 || 240 | opcode == 0x80 || opcode == 0x82 || opcode == 0x83 || 241 | opcode == 0xa8 || (opcode & 0xf8) == 0xb0 || opcode == 0xc0 || 242 | opcode == 0xc1 || opcode == 0xc6 || opcode == 0xcd || 243 | opcode == 0xd4 || opcode == 0xd5 || (opcode & 0xf8) == 0xe0 || 244 | opcode == 0xeb || (opcode == 0xf6 && (modrm & 0x30) == 0)) 245 | len += 1; 246 | 247 | // imm16 248 | if (opcode == 0xc2 || opcode == 0xca) 249 | len += 2; 250 | 251 | // imm16/32 252 | if (((opcode & 7) == 5 && (opcode & 0xf0) <= 0x30) || 253 | opcode == 0x68 || opcode == 0x69 || opcode == 0x81 || 254 | opcode == 0xa9 || opcode == 0xc7 || opcode == 0xe8 || 255 | opcode == 0xe9) 256 | len += operand_bits == __b16 ? 2 : 4; 257 | 258 | // imm16/32/64 259 | if ((opcode & 0xf8) == 0xb8 || (opcode == 0xf7 && (modrm & 0x30) == 0)) 260 | len += operand_bits == __b16 ? 2 : operand_bits == __b32 ? 4 : 8; 261 | 262 | // moffs 263 | if ((opcode & 0xfc) == 0xa0) 264 | len += addr_bits == __b16 ? 2 : addr_bits == __b32 ? 4 : 8; 265 | 266 | // others 267 | if (opcode == 0xea || opcode == 0x9a) 268 | len += 2 + (operand_bits == __b16 ? 2 : 4); 269 | if (opcode == 0xc8) 270 | len += 3; 271 | } 272 | else { // 2bytes opcodes 273 | // imm8 274 | if ((opcode & 0xfc) == 0x70 || opcode == 0xa4 || 275 | opcode == 0xac || opcode == 0xba || opcode == 0xc2 || 276 | (opcode >= 0xc4 && opcode <= 0xc6)) 277 | len += 1; 278 | 279 | // imm16/32 280 | if ((opcode & 0xf0) == 0x80) 281 | len += operand_bits == __b16 ? 2 : 4; 282 | 283 | // 3bytes opcodes with 0x3a prefix 284 | if (opcode == 0x3a) 285 | len += 1; 286 | } 287 | 288 | // wrong length 289 | if (len > MAX_INSN_LEN_x86) 290 | len = 1; 291 | 292 | return len; 293 | } 294 | 295 | static int insn_len_x86_32(void* insn) { 296 | return __insn_len_x86(insn, __b32); 297 | } 298 | 299 | static int insn_len_x86_64(void* insn) { 300 | return __insn_len_x86(insn, __b64); 301 | } 302 | 303 | 304 | #ifdef __cplusplus 305 | } 306 | #endif 307 | 308 | #endif -------------------------------------------------------------------------------- /RW/dependencies/oxorany/oxorany.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | @author llxiaoyuan https://github.com/llxiaoyuan/oxorany 4 | 5 | MIT License 6 | 7 | Copyright (c) 2021 Chase 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the Software is 14 | furnished to do so, subject to the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be included in all 17 | copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 25 | SOFTWARE. 26 | 27 | */ 28 | 29 | 30 | #include "oxorany.h" 31 | 32 | size_t& _lxy_oxor_any_::X() { 33 | static size_t x = 0; 34 | return x; 35 | } 36 | 37 | size_t& _lxy_oxor_any_::Y() { 38 | static size_t y = 0; 39 | return y; 40 | } 41 | -------------------------------------------------------------------------------- /RW/dllmain.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "roblox/roblox.hpp" 4 | #include "task_scheduler/task_scheduler.hpp" 5 | 6 | #include "dependencies/exception_handler/ExceptionHandler.hpp" 7 | #include "dependencies/oxorany/oxorany.h" 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #ifdef MAIN_DEBUG 15 | 16 | #define Log printf 17 | 18 | #define VMProtectDecryptStringA 19 | 20 | #else 21 | 22 | #define Log __noop 23 | 24 | #endif 25 | 26 | HMODULE mod; 27 | 28 | std::uintptr_t jmp; 29 | 30 | void open_console() 31 | { 32 | const auto lib = LoadLibraryA("KERNEL32.dll"); 33 | 34 | if (!lib) 35 | return; 36 | 37 | const auto free_console = reinterpret_cast(GetProcAddress(lib, "FreeConsole")); 38 | 39 | if (free_console) 40 | { 41 | jmp = free_console + 0x6; 42 | 43 | DWORD old{}; 44 | 45 | VirtualProtect(reinterpret_cast(free_console), 0x6, PAGE_EXECUTE_READWRITE, &old); 46 | 47 | *reinterpret_cast(free_console + 0x2) = &jmp; 48 | *reinterpret_cast(free_console + 0x6) = 0xC3; 49 | 50 | VirtualProtect(reinterpret_cast(free_console), 0x6, old, &old); 51 | } 52 | 53 | AllocConsole(); 54 | 55 | FILE* file_stream; 56 | 57 | freopen_s(&file_stream, "CONIN$", "r", stdin); 58 | freopen_s(&file_stream, "CONOUT$", "w", stdout); 59 | freopen_s(&file_stream, "CONOUT$", "w", stderr); 60 | 61 | fclose(file_stream); 62 | 63 | SetConsoleTitleA("Ro-Ware"); 64 | } 65 | 66 | void callback(ExceptionManager::EHReport report) 67 | { 68 | std::string messageString = report.report_string;/* ( 69 | "You've encountered a crash! :(\n" 70 | "\n" 71 | "In order for us to look into this crash, please DM this crash log to a RoWare developer gogo1000#1977 or iivillian#7652 (https://script-ware.com/discord)" 72 | "\n" 73 | "-------------------------------------" 74 | "\n" 75 | + AES::encryption(report.report_string, oxorany("5ujTDzHuH3kRJzMt4Sns5g8v5M4VY95+t7HrwnhJhko="), oxorany("QmI4WlBxd00xSnFzck5SejNwV0ZXUT09")));*/ 76 | 77 | auto autogeneratedCrashReportName = [&]() 78 | { 79 | time_t t = time(0); // get time now 80 | struct tm* now = localtime(&t); 81 | 82 | wchar_t buffer[80]; 83 | wcsftime(buffer, 80, oxorany(L"\\%d-%m-%Y_%H-%M-%S_RoWareCrash.txt"), now); 84 | return std::wstring(buffer); 85 | }; 86 | 87 | auto path = std::filesystem::temp_directory_path() 88 | .parent_path() 89 | .parent_path(); 90 | 91 | path /= "Local"; 92 | 93 | std::wstring crash_folder = path.append(L"\\crashlogs"); 94 | if (!std::filesystem::is_directory(crash_folder)) 95 | std::filesystem::create_directory(crash_folder); 96 | else 97 | { 98 | for (auto const& dir_entry : std::filesystem::directory_iterator{ crash_folder }) 99 | { 100 | if (!dir_entry.is_directory() 101 | && dir_entry.path().string().find(oxorany("RoWareCrash")) != std::string::npos) 102 | { 103 | struct _stat fileInfo; 104 | _wstat(dir_entry.path().c_str(), &fileInfo); 105 | char* string_result = std::ctime(&fileInfo.st_ctime); 106 | 107 | // Delete all logs older than 48 hours 108 | if (time(NULL) - fileInfo.st_ctime > 86400 * 2) // seconds in a day 109 | { 110 | // So we dont get exception 111 | std::error_code error; 112 | std::filesystem::remove(dir_entry, error); 113 | } 114 | } 115 | } 116 | } 117 | 118 | auto fileName = autogeneratedCrashReportName(); 119 | fileName = crash_folder + fileName; 120 | 121 | if (!std::filesystem::exists(fileName)) 122 | { 123 | std::ofstream F(fileName.c_str(), std::ios::binary); 124 | if (F.is_open()) 125 | { 126 | F.write(messageString.c_str(), messageString.size()); 127 | F.close(); 128 | } 129 | 130 | else 131 | Log("Failed to create file: %08x\n", GetLastError()); 132 | } 133 | 134 | else Log("Something failed very badly\n"); 135 | 136 | STARTUPINFOW stinfo = { 0 }; 137 | PROCESS_INFORMATION prinfo = { 0 }; 138 | CreateProcessW( 139 | oxorany(L"C:\\Windows\\System32\\notepad.exe"), 140 | (LPWSTR)((oxorany(L"notepad.exe ") + fileName).c_str()), 141 | NULL, 142 | NULL, 143 | NULL, 144 | NULL, 145 | NULL, 146 | NULL, 147 | &stinfo, 148 | &prinfo 149 | ); 150 | } 151 | 152 | bool d_main() 153 | { 154 | //open_console(); 155 | 156 | //PostToServer(oxorany("https://script-ware.com/api/roware/init"), "LOG"); 157 | 158 | /*MEMORY_BASIC_INFORMATION mbi; 159 | 160 | VirtualQuery(mod, &mbi, sizeof(mbi)); 161 | 162 | ExceptionManager::EHSettings settings{}; 163 | 164 | std::vector blacklist_code = { 0x80000004, 0x80000006, 0x406D1388, 0xE06D7363, 0x40010006, 0x4001000A }; 165 | std::vector blacklist_sym; 166 | 167 | settings.use_veh = true; 168 | settings.use_seh = false; 169 | settings.is_prog_dll = true; 170 | settings.callback = callback; 171 | settings.prog_name = "Ro-Ware.dll"; 172 | settings.prog_base = reinterpret_cast(mod); 173 | settings.prog_size = mbi.RegionSize; 174 | settings.blacklist_code = blacklist_code; 175 | settings.blacklist_sym = blacklist_sym; 176 | 177 | ExceptionManager::Init(&settings);*/ 178 | 179 | if (roblox::offsets::fflags::is_in_beta()) 180 | std::thread{ [] { while (!task_scheduler::init()) { std::this_thread::sleep_for(std::chrono::milliseconds(100)); } } }.detach(); 181 | else 182 | { 183 | std::uint32_t attempts = 0; 184 | 185 | while (!task_scheduler::init()) 186 | { 187 | std::this_thread::sleep_for(std::chrono::milliseconds(100)); 188 | 189 | ++attempts; 190 | 191 | if (attempts > 30) 192 | return false; 193 | } 194 | } 195 | 196 | return true; 197 | } 198 | 199 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 200 | { 201 | if (ul_reason_for_call == DLL_PROCESS_ATTACH) 202 | { 203 | mod = hModule; 204 | 205 | return d_main(); 206 | } 207 | 208 | return TRUE; 209 | } -------------------------------------------------------------------------------- /RW/features/aimbot/aimbot.cpp: -------------------------------------------------------------------------------- 1 | #include "aimbot.hpp" 2 | 3 | #include "../../renderer/menu/config/config.hpp" 4 | #include "../../renderer/renderer.hpp" 5 | #include "../../games/games.hpp" 6 | 7 | #include 8 | 9 | roblox::structs::player_t* modules::aimbot::get_closest_alive_player() 10 | { 11 | float closest_distance = (std::numeric_limits::max)(); 12 | roblox::structs::player_t* player = nullptr; 13 | 14 | if (!roblox::globals::players || !roblox::functions::is_valid_ptr(roblox::globals::players)) 15 | return nullptr; 16 | 17 | for (const auto& child : roblox::games::game->get_players()) 18 | { 19 | const auto local_player = roblox::games::game->get_local_player(); 20 | 21 | if (!child || child == local_player || !roblox::functions::is_valid_ptr(child) || !local_player || child == roblox::games::game->get_local_player_character()) 22 | continue; 23 | 24 | if (child->class_descriptor->id != 0x4A && child->class_descriptor->id != 0x23) //checks if class is either player or model instance 25 | continue; 26 | 27 | if (std::get(menu::config::config_map["enable_team_check"])) 28 | if (roblox::games::game->is_same_team(child)) 29 | continue; 30 | 31 | const auto parts = roblox::games::game->get_part(child); 32 | 33 | if (parts.has_value()) 34 | { 35 | const auto& [torso_opt, head_part_opt] = parts.value(); 36 | 37 | if (!head_part_opt || !torso_opt) 38 | continue; 39 | 40 | const auto head_part = head_part_opt; 41 | const auto torso = torso_opt; 42 | 43 | const auto head_part_primitive = head_part->primitive; 44 | 45 | if (!head_part_primitive) 46 | continue; 47 | 48 | const auto head_part_pv = roblox::functions::pv::get_pv_from_part_instance(head_part); 49 | 50 | if (!head_part_pv) 51 | continue; 52 | const auto head_position = math::functions::world_to_screen(head_part_pv->translation); 53 | 54 | if (!head_position.has_value() || !roblox::functions::is_valid_ptr(torso)) 55 | continue; 56 | 57 | if (std::get(menu::config::config_map["enable_wall_check"])) 58 | if (roblox::games::game->is_behind_wall(child, parts.value())) 59 | continue; 60 | 61 | if (std::get(menu::config::config_map["max_distance_aim_enabled"])) 62 | if (roblox::games::game->check_distance(parts.value())) 63 | continue; 64 | 65 | const auto& head_screen_position = head_position.value(); 66 | 67 | POINT p; 68 | 69 | if (!GetCursorPos(&p)) 70 | continue; 71 | 72 | if (!ScreenToClient(renderer::values::roblox_window, &p)) 73 | continue; 74 | 75 | // Fix for dpi scaling 76 | p.x /= renderer::values::dpi_scale; 77 | p.y /= renderer::values::dpi_scale; 78 | 79 | const math::types::vector2_t mouse_loc{ static_cast(p.x), static_cast(p.y) }; 80 | 81 | const auto distance = mouse_loc.distance(head_screen_position); 82 | 83 | if (std::get< bool >(menu::config::config_map["enable_fov_check"])) 84 | if (std::get(menu::config::config_map["fov_amount"]) * 10.f < distance) 85 | continue; 86 | 87 | if (distance < closest_distance) 88 | { 89 | closest_distance = distance; 90 | 91 | player = child; 92 | } 93 | 94 | } 95 | } 96 | 97 | return player; 98 | } 99 | 100 | void modules::aimbot::callback() 101 | { 102 | if (!roblox::globals::players || !roblox::globals::data_model || !roblox::globals::data_model->is_loaded) 103 | return; 104 | 105 | const auto smoothing_max = std::get< int >(menu::config::config_map["smoothing_amount"]); 106 | 107 | static bool locked = false; 108 | 109 | static bool head = false; 110 | 111 | static roblox::structs::player_t* player = nullptr; 112 | 113 | if (!GetAsyncKeyState(std::get< int >(menu::config::config_map["aim_hotkey"])) || !std::get< bool >(menu::config::config_map["enable_aimbot"])) 114 | { 115 | locked = false; 116 | 117 | player = nullptr; 118 | 119 | return; 120 | } 121 | 122 | if (!locked || !player || !roblox::functions::is_valid_ptr(player)) 123 | { 124 | player = get_closest_alive_player(); 125 | 126 | locked = true; 127 | 128 | std::random_device rd; 129 | std::mt19937 mt(rd()); 130 | std::bernoulli_distribution dist(0.5); 131 | 132 | head = dist(mt); 133 | } 134 | 135 | if(player->aim_at(!std::get< int >(menu::config::config_map["aimbot_type"]), smoothing_max, std::get(menu::config::config_map["target_bone"]) == 2 ? head : !std::get(menu::config::config_map["target_bone"]))) 136 | { 137 | locked = false; 138 | 139 | player = nullptr; 140 | 141 | return; 142 | } 143 | } 144 | 145 | void modules::aimbot::draw_fov() 146 | { 147 | if (!std::get(menu::config::config_map["draw_fov"])) 148 | return; 149 | 150 | POINT p; 151 | 152 | if (GetCursorPos(&p)) 153 | { 154 | if (ScreenToClient(renderer::values::roblox_window, &p)) 155 | { 156 | const auto radius = std::get(menu::config::config_map["fov_amount"]) * 10; 157 | 158 | const auto draw_list = ImGui::GetBackgroundDrawList(); 159 | 160 | // Fix for dpi scaling 161 | p.x /= renderer::values::dpi_scale; 162 | p.y /= renderer::values::dpi_scale; 163 | 164 | draw_list->AddCircleFilled({ static_cast(p.x), static_cast(p.y) }, radius, ImColor{ 0.0f, 0.0f, 0.0f, 0.2f }); 165 | } 166 | } 167 | } -------------------------------------------------------------------------------- /RW/features/aimbot/aimbot.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../../roblox/roblox.hpp" 4 | 5 | namespace modules::aimbot 6 | { 7 | roblox::structs::player_t* get_closest_alive_player(); 8 | 9 | void callback(); 10 | 11 | void draw_fov(); 12 | } -------------------------------------------------------------------------------- /RW/features/misc/misc.cpp: -------------------------------------------------------------------------------- 1 | #include "misc.hpp" 2 | 3 | #include "../../roblox/roblox.hpp" 4 | #include "../../renderer/renderer.hpp" 5 | #include "../../games/games.hpp" 6 | 7 | bool shoot_flag = false; 8 | 9 | void features::misc::callback() 10 | { 11 | if (!roblox::globals::data_model || !roblox::globals::data_model->is_loaded) 12 | return; 13 | 14 | features::misc::trigger_bot(); 15 | 16 | features::misc::reset_delay_timer(roblox::games::game->get_local_player()); 17 | } 18 | 19 | void features::misc::reset_delay_timer(roblox::structs::player_t* local_player) 20 | { 21 | if (local_player && std::get(menu::config::config_map["anti_idle_kick"])) 22 | local_player->idle_time = *reinterpret_cast(roblox::offsets::time::current_time); 23 | } 24 | 25 | void features::misc::trigger_bot() 26 | { 27 | INPUT input{}; 28 | 29 | if (shoot_flag) 30 | { 31 | input.type = INPUT_MOUSE; 32 | input.mi.dwFlags = MOUSEEVENTF_LEFTUP; 33 | 34 | SendInput(1, &input, sizeof(INPUT)); 35 | 36 | shoot_flag = false; 37 | } 38 | 39 | if (renderer::is_roblox_on_top() && !ui::Static::render_interface && std::get(menu::config::config_map["enable_trigger_bot"])) 40 | { 41 | const auto triggered = roblox::games::game->is_mouse_over_player(); 42 | 43 | if (triggered) 44 | { 45 | input.type = INPUT_MOUSE; 46 | input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN; 47 | 48 | SendInput(1, &input, sizeof(INPUT)); 49 | 50 | shoot_flag = true; 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /RW/features/misc/misc.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "../../renderer/menu/ui.hpp" 9 | #include "../../roblox/roblox.hpp" 10 | 11 | namespace features::misc 12 | { 13 | void callback(); 14 | 15 | void reset_delay_timer(roblox::structs::player_t* local_player); 16 | 17 | void trigger_bot(); 18 | } -------------------------------------------------------------------------------- /RW/features/visuals/visuals.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "../../renderer/menu/ui.hpp" 9 | #include "../../roblox/roblox.hpp" 10 | 11 | namespace features::visuals 12 | { 13 | void callback(); 14 | 15 | void draw_3D_square(ImDrawList* draw_list, roblox::structs::part_instance_t* humanoid_root_part); 16 | 17 | void draw_look_line(ImDrawList* draw_list, roblox::structs::part_instance_t* head_part); 18 | 19 | void draw_3D_cube(ImDrawList* draw_list, roblox::structs::part_instance_t* humanoid_root_part); 20 | 21 | void draw_2D_box(ImDrawList* draw_list, roblox::structs::part_instance_t* humanoid_root_part); 22 | 23 | void draw_head_marker(ImDrawList* draw_list, roblox::structs::part_instance_t* head_part); 24 | 25 | void draw_tracers(ImDrawList* draw_list, roblox::structs::part_instance_t* humanoid_root_part); 26 | 27 | void draw_distance(ImDrawList* draw_list, roblox::structs::part_instance_t* head_part, std::uint32_t distance); 28 | 29 | void draw_name(ImDrawList* draw_list, roblox::structs::player_t* player, roblox::structs::part_instance_t* humanoid_root_part); 30 | 31 | void draw_custom_box(ImDrawList* draw_list, roblox::structs::part_instance_t* humanoid_root_part); 32 | 33 | void draw_tool_name(ImDrawList* draw_list, roblox::structs::player_t* player, roblox::structs::part_instance_t* humanoid_root_part); 34 | 35 | void draw_health(ImDrawList* draw_list, roblox::structs::player_t* player, roblox::structs::part_instance_t* humanoid_root_part); 36 | } -------------------------------------------------------------------------------- /RW/games/arsenal/arsenal.cpp: -------------------------------------------------------------------------------- 1 | #include "arsenal.hpp" 2 | 3 | #include "../../roblox/roblox.hpp" 4 | 5 | std::optional roblox::games::arsenal_t::get_health(const roblox::structs::player_t* player) const 6 | { 7 | const auto stats = player->find_first_child("NRPBS"); 8 | 9 | if (!stats || !roblox::functions::is_valid_ptr(stats)) 10 | return std::nullopt; 11 | 12 | const auto health = stats->find_first_child("Health"); 13 | 14 | if (!health || !roblox::functions::is_valid_ptr(health)) 15 | return std::nullopt; 16 | 17 | return health->read_value(*reinterpret_cast(roblox::offsets::number_xor::xor_offset)); 18 | } 19 | 20 | std::optional roblox::games::arsenal_t::get_max_health(const roblox::structs::player_t* player) const 21 | { 22 | const auto stats = player->find_first_child("NRPBS"); 23 | 24 | if (!stats || !roblox::functions::is_valid_ptr(stats)) 25 | return std::nullopt; 26 | 27 | const auto health = stats->find_first_child("MaxHealth"); 28 | 29 | if (!health || !roblox::functions::is_valid_ptr(health)) 30 | return std::nullopt; 31 | 32 | return health->read_value(*reinterpret_cast(roblox::offsets::number_xor::xor_offset)); 33 | } -------------------------------------------------------------------------------- /RW/games/arsenal/arsenal.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include "../base_game/base_game.hpp" 6 | 7 | namespace roblox::games 8 | { 9 | struct arsenal_t : public base_game_t 10 | { 11 | [[nodiscard]] bool is_base() const override { return false; }; 12 | 13 | [[nodiscard]] std::optional get_health(const roblox::structs::player_t* player) const override; 14 | 15 | [[nodiscard]] std::optional get_max_health(const roblox::structs::player_t* player) const override; 16 | }; 17 | } -------------------------------------------------------------------------------- /RW/games/bad_business/bad_business.cpp: -------------------------------------------------------------------------------- 1 | #include "bad_business.hpp" 2 | 3 | #include "../games.hpp" 4 | 5 | void roblox::games::bad_business_t::toggle_features() const 6 | { 7 | enabled_map["enable_esp_name"] = false; 8 | enabled_map["allow_memory_aimbot"] = false; 9 | enabled_map["allow_esp_tools"] = false; 10 | enabled_map["allow_triggerbot"] = false; 11 | } 12 | 13 | roblox::structs::player_t* lp = nullptr; 14 | 15 | auto start = std::chrono::steady_clock::now(); 16 | 17 | std::optional roblox::games::bad_business_t::get_local_player_character() const 18 | { 19 | if (lp && (std::chrono::duration_cast(std::chrono::steady_clock::now() - start) < std::chrono::seconds(1))) 20 | return lp; 21 | 22 | float closest_distance = 9999.f; 23 | 24 | const auto cam_pos = roblox::globals::data_model->find_first_class("Workspace")->current_camera->cframe.position; 25 | 26 | for (const auto players = get_players(); const auto player : players) 27 | { 28 | const auto parts = get_part(player); 29 | 30 | if (!parts.has_value()) 31 | continue; 32 | 33 | const auto [head, body] = parts.value(); 34 | 35 | const auto head_dist = head->primitive->cframe.position.distance(cam_pos); 36 | 37 | if (head_dist < closest_distance) 38 | { 39 | lp = player; 40 | 41 | closest_distance = head_dist; 42 | } 43 | } 44 | 45 | start = std::chrono::steady_clock::now(); 46 | 47 | return lp; 48 | } 49 | 50 | std::vector roblox::games::bad_business_t::get_players() const 51 | { 52 | std::vector bb_children; 53 | 54 | const auto bb_players_folder = roblox::globals::data_model->workspace->find_first_child("Characters"); 55 | 56 | if (!bb_players_folder || !roblox::functions::is_valid_ptr(bb_players_folder)) 57 | return bb_children; 58 | 59 | for (const auto& plr : bb_players_folder->get_children()) 60 | { 61 | if (!plr || !roblox::functions::is_valid_ptr(plr)) 62 | continue; 63 | 64 | bb_children.push_back(plr); 65 | } 66 | 67 | return bb_children; 68 | } 69 | 70 | std::optional roblox::games::bad_business_t::get_part(const roblox::structs::player_t* player) const 71 | { 72 | const auto body = player->find_first_child("Body"); 73 | 74 | if (!body || !roblox::functions::is_valid_ptr(body)) 75 | return std::nullopt; 76 | 77 | if (const auto head_part = body->find_first_child("Head"); roblox::functions::is_valid_ptr(head_part)) 78 | if (const auto torso_part = body->find_first_child("Chest"); roblox::functions::is_valid_ptr(torso_part)) 79 | return roblox::games::part_data_t{ head_part, torso_part }; 80 | 81 | return std::nullopt; 82 | } 83 | 84 | std::optional roblox::games::bad_business_t::get_health(const roblox::structs::player_t* player) const 85 | { 86 | const auto stats = player->find_first_child< roblox::structs::number_value>("Health"); 87 | 88 | if (!stats || !roblox::functions::is_valid_ptr(stats)) 89 | return std::nullopt; 90 | 91 | return stats->read_value(*reinterpret_cast(roblox::offsets::number_xor::xor_offset)); 92 | } 93 | 94 | std::optional roblox::games::bad_business_t::get_max_health(const roblox::structs::player_t* player) const 95 | { 96 | const auto stats = player->find_first_child("Health"); 97 | 98 | if (!stats || !roblox::functions::is_valid_ptr(stats)) 99 | return std::nullopt; 100 | 101 | const auto health = stats->find_first_child("MaxHealth"); 102 | 103 | if (!health || !roblox::functions::is_valid_ptr(health)) 104 | return std::nullopt; 105 | 106 | return health->read_value(*reinterpret_cast(roblox::offsets::number_xor::xor_offset)); 107 | } 108 | 109 | bool roblox::games::bad_business_t::is_behind_wall(const roblox::structs::player_t* player, roblox::games::part_data_t parts) const 110 | { 111 | const auto player_character = player; 112 | 113 | if (!player_character || !roblox::functions::is_valid_ptr(player_character)) 114 | return true; 115 | 116 | const auto local_player_character = get_local_player_character(); 117 | 118 | if (!local_player_character.has_value()) 119 | return true; 120 | 121 | const auto body = local_player_character.value()->find_first_child("Body"); 122 | 123 | if (!body || !roblox::functions::is_valid_ptr(body)) 124 | return true; 125 | 126 | const auto head_prim = body->find_first_child("Head"); 127 | 128 | if (!head_prim || !roblox::functions::is_valid_ptr(head_prim)) 129 | return true; 130 | 131 | const auto head_pv = roblox::functions::pv::get_pv_from_part_instance(head_prim); 132 | 133 | if (!head_pv || !roblox::functions::is_valid_ptr(head_pv)) 134 | return true; 135 | 136 | const auto& [head_part, torso] = parts; 137 | 138 | if (!head_part || !roblox::functions::is_valid_ptr(head_part) || !torso || !roblox::functions::is_valid_ptr(torso)) 139 | return true; 140 | 141 | const auto enemy_head_pv = roblox::functions::pv::get_pv_from_part_instance(head_part); 142 | 143 | if (!enemy_head_pv || !roblox::functions::is_valid_ptr(enemy_head_pv)) 144 | return true; 145 | 146 | auto start = math::types::vector_t{ head_pv->translation.x, head_pv->translation.y + 1, head_pv->translation.z }; 147 | auto dir = enemy_head_pv->translation - start; 148 | 149 | auto hit_instance = roblox::functions::raycast::fire_raycast_helper(roblox::globals::data_model->find_first_class("Workspace"), start, dir, local_player_character.value()); 150 | 151 | if (!hit_instance) 152 | return true; 153 | 154 | const auto is_hit = [&]() -> bool 155 | { 156 | while (hit_instance && hit_instance->parent) 157 | { 158 | if (hit_instance->self == player_character->self) 159 | return true; 160 | 161 | hit_instance = hit_instance->parent; 162 | } 163 | 164 | return false; 165 | }; 166 | 167 | return !is_hit(); 168 | } 169 | 170 | std::vector teammates; 171 | 172 | auto teammates_start = std::chrono::steady_clock::now(); 173 | 174 | bool roblox::games::bad_business_t::is_same_team(const roblox::structs::player_t* player) const 175 | { 176 | if (std::chrono::duration_cast(std::chrono::steady_clock::now() - teammates_start) < std::chrono::seconds(1)) 177 | { 178 | for (const auto teammate : teammates) 179 | if (player == teammate) 180 | return true; 181 | 182 | return false; 183 | } 184 | 185 | std::vector temp_teammates; 186 | 187 | const auto lp = roblox::games::game->get_local_player(); 188 | 189 | if (lp) 190 | { 191 | const auto guis = lp->find_first_child("PlayerGui"); 192 | 193 | if (!guis) 194 | return false; 195 | 196 | const auto childs = guis->get_children(); 197 | 198 | for (const auto child : childs) 199 | { 200 | if (child->name == "NameGui") 201 | { 202 | const auto billboard = static_cast(child); 203 | 204 | const auto head = billboard->adornee; 205 | 206 | const auto character = head->parent; 207 | 208 | if (character) 209 | temp_teammates.push_back(static_cast(character->parent)); 210 | } 211 | } 212 | 213 | teammates = temp_teammates; 214 | } 215 | 216 | teammates_start = std::chrono::steady_clock::now(); 217 | 218 | return false; 219 | } -------------------------------------------------------------------------------- /RW/games/bad_business/bad_business.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include "../base_game/base_game.hpp" 6 | 7 | namespace roblox::games 8 | { 9 | struct bad_business_t : public base_game_t 10 | { 11 | [[nodiscard]] bool is_base() const override { return false; }; 12 | 13 | [[nodiscard]] std::vector get_players() const override; 14 | 15 | [[nodiscard]] std::optional get_part(const roblox::structs::player_t* player) const override; 16 | 17 | [[nodiscard]] bool is_behind_wall(const roblox::structs::player_t* player, roblox::games::part_data_t parts) const override; 18 | 19 | [[nodiscard]] bool is_mouse_over_player() const override { return false; }; 20 | 21 | [[nodiscard]] std::optional get_local_player_character() const override; 22 | 23 | [[nodiscard]] std::optional get_health(const roblox::structs::player_t* player) const override; 24 | 25 | [[nodiscard]] std::optional get_max_health(const roblox::structs::player_t* player) const override; 26 | 27 | [[nodiscard]] bool is_same_team(const roblox::structs::player_t* player) const override; 28 | 29 | void toggle_features() const override; 30 | }; 31 | } -------------------------------------------------------------------------------- /RW/games/base_game/base_game.cpp: -------------------------------------------------------------------------------- 1 | #include "base_game.hpp" 2 | 3 | #include "../../renderer/menu/config/config.hpp" 4 | #include "../../roblox/roblox.hpp" 5 | #include "../games.hpp" 6 | 7 | #include 8 | 9 | std::vector roblox::games::base_game_t::get_players() const 10 | { 11 | const auto players = roblox::globals::players->get_children(); 12 | 13 | if (!players.empty()) 14 | return players; 15 | 16 | return {}; 17 | } 18 | 19 | std::optional roblox::games::base_game_t::get_part(const roblox::structs::player_t* player) const 20 | { 21 | if (!player || !roblox::functions::is_valid_ptr(player)) 22 | return std::nullopt; 23 | 24 | if (const auto character = player->character; roblox::functions::is_valid_ptr(character)) 25 | if (const auto head_part = character->find_first_child("Head")) 26 | if (const auto torso_part = character->find_first_child("HumanoidRootPart")) 27 | if (torso_part->is_instance_part_instance() && head_part->is_instance_part_instance()) 28 | return roblox::games::part_data_t{ head_part, torso_part }; 29 | 30 | return std::nullopt; 31 | } 32 | 33 | std::optional roblox::games::base_game_t::get_health(const roblox::structs::player_t* player) const 34 | { 35 | if (const auto character = player->character; roblox::functions::is_valid_ptr(character)) 36 | if (const auto humanoid = character->find_first_child("Humanoid")) 37 | return humanoid->get_health(); 38 | 39 | return std::nullopt; 40 | } 41 | 42 | std::optional roblox::games::base_game_t::get_max_health(const roblox::structs::player_t* player) const 43 | { 44 | if (const auto character = player->character; roblox::functions::is_valid_ptr(character)) 45 | if (const auto humanoid = character->find_first_child("Humanoid")) 46 | return humanoid->get_max_health(); 47 | 48 | return std::nullopt; 49 | } 50 | 51 | std::optional roblox::games::base_game_t::get_player_name(const roblox::structs::player_t* player) const 52 | { 53 | return player->name.c_str(); 54 | } 55 | 56 | bool roblox::games::base_game_t::check_distance(roblox::games::part_data_t parts) const 57 | { 58 | const auto& [head_part, torso] = parts; 59 | 60 | const auto lp_pos = roblox::games::game->get_local_player_position(); 61 | 62 | if (lp_pos.has_value()) 63 | if (head_part->primitive->cframe.position.distance(lp_pos.value()) >= std::get(menu::config::config_map["max_distance_aim"])) 64 | return true; 65 | 66 | return false; 67 | } 68 | 69 | bool roblox::games::base_game_t::is_mouse_over_player() const 70 | { 71 | const auto is_hit_player = [](const roblox::structs::instance_t* model) -> bool 72 | { 73 | const auto players = roblox::games::game->get_players(); 74 | 75 | for (const auto player : players) 76 | if (const auto character = player->character; roblox::functions::is_valid_ptr(character)) 77 | if (character == model) 78 | { 79 | if (std::get(menu::config::config_map["enable_team_check"])) 80 | if (roblox::games::game->is_same_team(player)) 81 | return false; 82 | 83 | if (std::get(menu::config::config_map["enable_aim_health_check"])) 84 | { 85 | const auto health_optional = roblox::games::game->get_health(player); 86 | 87 | if (health_optional.has_value()) 88 | { 89 | const auto health = health_optional.value(); 90 | 91 | if (health <= 0) 92 | return false; 93 | } 94 | } 95 | 96 | return true; 97 | } 98 | 99 | return false; 100 | }; 101 | 102 | if (const auto mouse = get_local_player()->mouse; roblox::functions::is_valid_ptr(mouse)) 103 | { 104 | auto hit = roblox::functions::mouse::get_hit(mouse); 105 | 106 | if (hit && roblox::functions::is_valid_ptr(hit)) 107 | { 108 | while (true) 109 | { 110 | if (hit->class_descriptor->name == "Model") 111 | if (is_hit_player(hit)) 112 | return true; 113 | 114 | if (!hit->parent) 115 | break; 116 | 117 | hit = hit->parent; 118 | } 119 | } 120 | } 121 | 122 | return false; 123 | } 124 | 125 | roblox::structs::player_t* roblox::games::base_game_t::get_local_player() const 126 | { 127 | if (globals::data_model) 128 | if (const auto players = globals::data_model->find_first_class("Players")) 129 | if (players && players->local_player && roblox::functions::is_valid_ptr(players->local_player)) 130 | return players->local_player; 131 | 132 | return nullptr; 133 | } 134 | 135 | std::optional roblox::games::base_game_t::get_local_player_character() const 136 | { 137 | const auto lp = get_local_player(); 138 | 139 | if (!lp) 140 | return std::nullopt; 141 | 142 | if (const auto lp_character = get_local_player()->character) 143 | return lp_character; 144 | 145 | return std::nullopt; 146 | } 147 | 148 | std::optional roblox::games::base_game_t::get_local_player_position() const 149 | { 150 | const auto character = roblox::games::game->get_local_player_character(); 151 | 152 | if (character.has_value()) 153 | { 154 | const auto head_prim = character.value()->find_first_child("Head"); 155 | 156 | if (!head_prim->is_instance_part_instance()) 157 | return std::nullopt; 158 | 159 | if (!head_prim || !roblox::functions::is_valid_ptr(head_prim)) 160 | { 161 | const auto workspace = roblox::globals::data_model->find_first_class("Workspace"); 162 | 163 | const auto camera = workspace->current_camera; 164 | 165 | return camera->cframe.position; 166 | } 167 | 168 | return head_prim->primitive->cframe.position; 169 | } 170 | 171 | return std::nullopt; 172 | } 173 | 174 | int roblox::games::base_game_t::get_stride() const 175 | { 176 | return 44; 177 | } 178 | 179 | std::optional roblox::games::base_game_t::get_index() const 180 | { 181 | return std::nullopt; 182 | } 183 | 184 | std::optional roblox::games::base_game_t::get_indesc() const 185 | { 186 | return std::nullopt; 187 | } 188 | 189 | std::optional roblox::games::base_game_t::get_player_tool_name(const roblox::structs::player_t* player) const 190 | { 191 | if (player && roblox::functions::is_valid_ptr(player)) 192 | if (const auto character = player->character; roblox::functions::is_valid_ptr(character)) 193 | if (const auto tool = character->find_first_class("Tool"); roblox::functions::is_valid_ptr(tool)) 194 | return tool->name.c_str(); 195 | 196 | return std::nullopt; 197 | } 198 | 199 | bool roblox::games::base_game_t::is_behind_wall(const roblox::structs::player_t* player, roblox::games::part_data_t parts) const 200 | { 201 | if (!player || !roblox::functions::is_valid_ptr(player)) 202 | return true; 203 | 204 | const auto player_character = player->character; 205 | 206 | if (!player_character || !roblox::functions::is_valid_ptr(player_character)) 207 | return true; 208 | 209 | const auto local_player_character = get_local_player_character(); 210 | 211 | if (!local_player_character.has_value()) 212 | return true; 213 | 214 | const auto head_prim = local_player_character.value()->find_first_child("Head"); 215 | 216 | if (!head_prim->is_instance_part_instance()) 217 | return true; 218 | 219 | if (!head_prim || !roblox::functions::is_valid_ptr(head_prim)) 220 | return true; 221 | 222 | const auto head_pv = roblox::functions::pv::get_pv_from_part_instance(head_prim); 223 | 224 | if (!head_pv || !roblox::functions::is_valid_ptr(head_pv)) 225 | return true; 226 | 227 | const auto& [head_part, torso] = parts; 228 | 229 | if (!head_part || !roblox::functions::is_valid_ptr(head_part) || !torso || !roblox::functions::is_valid_ptr(torso)) 230 | return true; 231 | 232 | const auto enemy_head_pv = roblox::functions::pv::get_pv_from_part_instance(head_part); 233 | 234 | if (!enemy_head_pv || !roblox::functions::is_valid_ptr(enemy_head_pv)) 235 | return true; 236 | 237 | auto start = head_pv->translation; 238 | auto dir = enemy_head_pv->translation - start; 239 | 240 | auto hit_instance = roblox::functions::raycast::fire_raycast_helper(roblox::globals::data_model->find_first_class("Workspace"), start, dir, local_player_character.value()); 241 | 242 | if (!hit_instance) 243 | return true; 244 | 245 | const auto is_hit = [&]() -> bool 246 | { 247 | while (hit_instance && hit_instance->parent) 248 | { 249 | if (hit_instance->self == player_character->self) 250 | return true; 251 | 252 | hit_instance = hit_instance->parent; 253 | } 254 | 255 | return false; 256 | }; 257 | 258 | return !is_hit(); 259 | } 260 | 261 | bool roblox::games::base_game_t::is_same_team(const roblox::structs::player_t* player) const 262 | { 263 | const auto lp = get_local_player(); 264 | 265 | if (!lp) 266 | return false; 267 | 268 | return player->team == lp->team; 269 | } -------------------------------------------------------------------------------- /RW/games/base_game/base_game.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include "../../roblox/roblox.hpp" 6 | 7 | namespace roblox::games 8 | { 9 | struct part_data_t 10 | { 11 | roblox::structs::part_instance_t* head; 12 | roblox::structs::part_instance_t* torso; 13 | }; 14 | 15 | struct base_game_t 16 | { 17 | [[nodiscard]] virtual bool is_base() const { return true; }; 18 | 19 | [[nodiscard]] virtual std::vector get_players() const; 20 | 21 | [[nodiscard]] virtual std::optional get_part(const roblox::structs::player_t* player) const; 22 | 23 | [[nodiscard]] virtual std::optional get_health(const roblox::structs::player_t* player) const; 24 | 25 | [[nodiscard]] virtual std::optional get_max_health(const roblox::structs::player_t* player) const; 26 | 27 | [[nodiscard]] virtual bool is_behind_wall(const roblox::structs::player_t* player, roblox::games::part_data_t parts) const; 28 | 29 | [[nodiscard]] virtual bool is_same_team(const roblox::structs::player_t* player) const; 30 | 31 | [[nodiscard]] virtual std::optional get_player_name(const roblox::structs::player_t* player) const; 32 | 33 | [[nodiscard]] virtual std::optional get_player_tool_name(const roblox::structs::player_t* player) const; 34 | 35 | [[nodiscard]] virtual bool is_mouse_over_player() const; 36 | 37 | [[nodiscard]] virtual int get_stride() const; 38 | 39 | [[nodiscard]] virtual std::optional get_index() const; 40 | 41 | [[nodiscard]] virtual std::optional get_indesc() const; 42 | 43 | [[nodiscard]] virtual bool check_distance(roblox::games::part_data_t parts) const; 44 | 45 | [[nodiscard]] virtual std::optional get_local_player_character() const; 46 | 47 | [[nodiscard]] virtual std::optional get_local_player_position() const; 48 | 49 | [[nodiscard]] virtual structs::player_t* get_local_player() const; 50 | 51 | virtual void toggle_features() const {}; 52 | }; 53 | } -------------------------------------------------------------------------------- /RW/games/front_lines/front_lines.cpp: -------------------------------------------------------------------------------- 1 | #include "front_lines.hpp" 2 | 3 | #include "../games.hpp" 4 | 5 | std::vector roblox::games::front_lines_t::get_players() const 6 | { 7 | std::vector fl_children; 8 | 9 | for (const auto& plr : roblox::globals::data_model->workspace->get_children()) 10 | { 11 | if (!plr || *reinterpret_cast(plr->name.c_str()) != '_51r') 12 | continue; 13 | 14 | fl_children.push_back(plr); 15 | } 16 | 17 | return fl_children; 18 | } 19 | 20 | std::optional roblox::games::front_lines_t::get_part(const roblox::structs::player_t* player) const 21 | { 22 | if (const auto head_part = player->find_first_child("Head"); roblox::functions::is_valid_ptr(head_part)) 23 | if (const auto torso_part = player->find_first_child("HumanoidRootPart"); roblox::functions::is_valid_ptr(torso_part)) 24 | return roblox::games::part_data_t{ head_part, torso_part }; 25 | 26 | return std::nullopt; 27 | } 28 | 29 | std::optional roblox::games::front_lines_t::get_health(const roblox::structs::player_t* player) const 30 | { 31 | return std::nullopt; 32 | } 33 | 34 | std::optional roblox::games::front_lines_t::get_max_health(const roblox::structs::player_t* player) const 35 | { 36 | return std::nullopt; 37 | } 38 | 39 | //bool roblox::games::front_lines_t::is_mouse_over_player() const 40 | //{ 41 | // return false; 42 | //} 43 | 44 | bool roblox::games::front_lines_t::is_same_team(const roblox::structs::player_t* player) const 45 | { 46 | return player->find_first_child("friendly_marker") != 0; 47 | } 48 | 49 | bool roblox::games::front_lines_t::is_behind_wall(const roblox::structs::player_t* player, roblox::games::part_data_t parts) const 50 | { 51 | if (!player || !roblox::functions::is_valid_ptr(player)) 52 | return true; 53 | 54 | const auto player_character = player; 55 | 56 | if (!player_character || !roblox::functions::is_valid_ptr(player_character)) 57 | return true; 58 | 59 | const auto local_player_character = get_local_player_character(); 60 | 61 | if (!local_player_character.has_value()) 62 | return true; 63 | 64 | const auto head_prim = local_player_character.value()->find_first_child("Head"); 65 | 66 | if (!head_prim || !roblox::functions::is_valid_ptr(head_prim)) 67 | return true; 68 | 69 | const auto head_pv = roblox::functions::pv::get_pv_from_part_instance(head_prim); 70 | 71 | if (!head_pv || !roblox::functions::is_valid_ptr(head_pv)) 72 | return true; 73 | 74 | const auto& [head_part, torso] = parts; 75 | 76 | if (!head_part || !roblox::functions::is_valid_ptr(head_part) || !torso || !roblox::functions::is_valid_ptr(torso)) 77 | return true; 78 | 79 | const auto enemy_head_pv = roblox::functions::pv::get_pv_from_part_instance(head_part); 80 | 81 | if (!enemy_head_pv || !roblox::functions::is_valid_ptr(enemy_head_pv)) 82 | return true; 83 | 84 | auto start = head_pv->translation; 85 | auto dir = enemy_head_pv->translation - start; 86 | 87 | auto hit_instance = roblox::functions::raycast::fire_raycast_helper(roblox::globals::data_model->find_first_class("Workspace"), start, dir, local_player_character.value()); 88 | 89 | if (!hit_instance) 90 | return true; 91 | 92 | const auto is_hit = [&]() -> bool 93 | { 94 | while (hit_instance && hit_instance->parent) 95 | { 96 | if (hit_instance->self == player_character->self) 97 | return true; 98 | 99 | hit_instance = hit_instance->parent; 100 | } 101 | 102 | return false; 103 | }; 104 | 105 | return !is_hit(); 106 | } 107 | 108 | std::optional roblox::games::front_lines_t::get_local_player_character() const 109 | { 110 | return get_local_player(); 111 | } 112 | 113 | roblox::structs::player_t* roblox::games::front_lines_t::get_local_player() const 114 | { 115 | for (const auto players = get_players(); const auto player : players) 116 | if (player->find_first_child("Humanoid")) 117 | return player; 118 | 119 | return nullptr; 120 | } 121 | 122 | void roblox::games::front_lines_t::toggle_features() const 123 | { 124 | enabled_map["enable_esp_name"] = false; 125 | enabled_map["allow_memory_aimbot"] = false; 126 | enabled_map["allow_esp_health"] = false; 127 | enabled_map["allow_esp_tools"] = false; 128 | enabled_map["allow_aimbot_health"] = false; 129 | enabled_map["allow_triggerbot"] = false; 130 | enabled_map["allow_wallcheck"] = false; 131 | } -------------------------------------------------------------------------------- /RW/games/front_lines/front_lines.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include "../base_game/base_game.hpp" 6 | 7 | namespace roblox::games 8 | { 9 | struct front_lines_t : public base_game_t 10 | { 11 | [[nodiscard]] virtual std::vector get_players() const; 12 | 13 | [[nodiscard]] std::optional get_part(const roblox::structs::player_t* player) const override; 14 | 15 | [[nodiscard]] std::optional get_health(const roblox::structs::player_t* player) const override; 16 | 17 | [[nodiscard]] std::optional get_max_health(const roblox::structs::player_t* player) const override; 18 | 19 | [[nodiscard]] bool is_same_team(const roblox::structs::player_t* player) const override; 20 | 21 | [[nodiscard]] bool is_behind_wall(const roblox::structs::player_t* player, roblox::games::part_data_t parts) const override; 22 | 23 | [[nodiscard]] virtual std::optional get_local_player_character() const; 24 | 25 | [[nodiscard]] virtual structs::player_t* get_local_player() const; 26 | 27 | void toggle_features() const override; 28 | }; 29 | } -------------------------------------------------------------------------------- /RW/games/games.cpp: -------------------------------------------------------------------------------- 1 | #include "games.hpp" 2 | 3 | #include "../games/bad_business/bad_business.hpp" 4 | #include "../games/rush_point/rush_point.hpp" 5 | #include "../games/arsenal/arsenal.hpp" 6 | #include "../games/front_lines/front_lines.hpp" 7 | #include "../games/phantom_forces/phantom_forces.hpp" 8 | 9 | std::shared_ptr roblox::games::game = nullptr; 10 | 11 | std::unordered_map> game_map = 12 | { 13 | {roblox::games::game_t::phantom_forces, std::make_shared()}, 14 | {roblox::games::game_t::arsenal, std::make_shared()}, 15 | {roblox::games::game_t::bad_business, std::make_shared()}, 16 | {roblox::games::game_t::rush_point, std::make_shared()}, 17 | {roblox::games::game_t::front_lines, std::make_shared()} 18 | }; 19 | 20 | std::unordered_map roblox::games::enabled_map 21 | { 22 | {"enable_esp_name", true}, 23 | {"allow_memory_aimbot", true}, 24 | {"allow_esp_health", true}, 25 | {"allow_aimbot_health", true}, 26 | {"allow_esp_tools", true}, 27 | {"allow_triggerbot", true}, 28 | {"allow_wallcheck", true} 29 | }; 30 | 31 | void roblox::games::init_game() 32 | { 33 | if (game_map.contains(roblox::globals::place_id)) 34 | roblox::games::game = game_map[roblox::globals::place_id]; 35 | else 36 | roblox::games::game = std::make_shared(); 37 | } -------------------------------------------------------------------------------- /RW/games/games.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "base_game/base_game.hpp" 8 | 9 | namespace roblox::games 10 | { 11 | enum class game_t : std::uint64_t 12 | { 13 | phantom_forces = 292439477, 14 | arsenal = 286090429, 15 | bad_business = 3233893879, 16 | rush_point = 7113341058, 17 | front_lines = 5938036553 18 | }; 19 | 20 | extern std::unordered_map enabled_map; 21 | 22 | extern std::shared_ptr game; 23 | 24 | void init_game(); 25 | } -------------------------------------------------------------------------------- /RW/games/phantom_forces/phantom_forces.cpp: -------------------------------------------------------------------------------- 1 | #include "phantom_forces.hpp" 2 | 3 | #include "../../renderer/menu/config/config.hpp" 4 | #include "../games.hpp" 5 | 6 | std::vector roblox::games::phantom_forces_t::get_players() const 7 | { 8 | std::vector pf_children; 9 | 10 | const auto pf_players_folder = roblox::globals::data_model->workspace->find_first_child("Players"); 11 | 12 | if (!pf_players_folder || !roblox::functions::is_valid_ptr(pf_players_folder)) 13 | return pf_children; 14 | 15 | for (const auto& team : pf_players_folder->get_children()) 16 | { 17 | if (!team || !roblox::functions::is_valid_ptr(team)) 18 | continue; 19 | 20 | for (const auto& child : team->get_children()) 21 | { 22 | if (!child || !roblox::functions::is_valid_ptr(child)) 23 | continue; 24 | 25 | pf_children.push_back(child); 26 | } 27 | } 28 | 29 | return pf_children; 30 | } 31 | 32 | std::optional roblox::games::phantom_forces_t::get_part(const roblox::structs::player_t* player) const 33 | { 34 | if (const auto head_part = player->find_first_child("Head"); roblox::functions::is_valid_ptr(head_part)) 35 | if (const auto torso_part = player->find_first_child("Torso"); roblox::functions::is_valid_ptr(torso_part)) 36 | return roblox::games::part_data_t{ head_part, torso_part }; 37 | 38 | return std::nullopt; 39 | } 40 | 41 | void roblox::games::phantom_forces_t::toggle_features() const 42 | { 43 | enabled_map["enable_esp_name"] = false; 44 | enabled_map["allow_memory_aimbot"] = false; 45 | enabled_map["allow_esp_health"] = false; 46 | enabled_map["allow_esp_tools"] = false; 47 | } 48 | 49 | bool roblox::games::phantom_forces_t::is_behind_wall(const roblox::structs::player_t* player, roblox::games::part_data_t parts) const 50 | { 51 | if (!player || !roblox::functions::is_valid_ptr(player)) 52 | return true; 53 | 54 | const auto player_character = player; 55 | 56 | if (!player_character || !roblox::functions::is_valid_ptr(player_character)) 57 | return true; 58 | 59 | const auto local_player_character = get_local_player_character(); 60 | 61 | if (!local_player_character.has_value()) 62 | return true; 63 | 64 | const auto head_prim = local_player_character.value()->find_first_child("Head"); 65 | 66 | if (!head_prim || !roblox::functions::is_valid_ptr(head_prim)) 67 | return true; 68 | 69 | const auto head_pv = roblox::functions::pv::get_pv_from_part_instance(head_prim); 70 | 71 | if (!head_pv || !roblox::functions::is_valid_ptr(head_pv)) 72 | return true; 73 | 74 | const auto& [head_part, torso] = parts; 75 | 76 | if (!head_part || !roblox::functions::is_valid_ptr(head_part) || !torso || !roblox::functions::is_valid_ptr(torso)) 77 | return true; 78 | 79 | const auto enemy_head_pv = roblox::functions::pv::get_pv_from_part_instance(head_part); 80 | 81 | if (!enemy_head_pv || !roblox::functions::is_valid_ptr(enemy_head_pv)) 82 | return true; 83 | 84 | auto start = head_pv->translation + math::types::vector_t{ 0, 1, 0 }; 85 | auto dir = enemy_head_pv->translation - start; 86 | 87 | auto hit_instance = roblox::functions::raycast::fire_raycast_helper(roblox::globals::data_model->find_first_class("Workspace"), start, dir, local_player_character.value()); 88 | 89 | if (!hit_instance) 90 | return true; 91 | 92 | const auto is_hit = [&]() -> bool 93 | { 94 | while (hit_instance && hit_instance->parent) 95 | { 96 | if (hit_instance->self == player_character->self) 97 | return true; 98 | 99 | hit_instance = hit_instance->parent; 100 | } 101 | 102 | return false; 103 | }; 104 | 105 | return !is_hit(); 106 | } 107 | 108 | bool roblox::games::phantom_forces_t::is_mouse_over_player() const 109 | { 110 | const auto local_player_character = get_local_player_character(); 111 | 112 | if (!local_player_character.has_value()) 113 | return false; 114 | 115 | const auto head_prim = local_player_character.value()->find_first_child("Head"); 116 | 117 | if (!head_prim || !roblox::functions::is_valid_ptr(head_prim)) 118 | return false; 119 | 120 | const auto workspace = roblox::globals::data_model->find_first_class("Workspace"); 121 | 122 | const auto camera = workspace->current_camera; 123 | 124 | if (!camera) 125 | return false; 126 | 127 | auto start = camera->cframe.position; 128 | auto dir = math::types::vector_t{ -camera->cframe.right_vector.z, -camera->cframe.up_vector.z, -camera->cframe.back_vector.z } *1000.f; 129 | 130 | auto hit_instance = roblox::functions::raycast::fire_raycast_helper(roblox::globals::data_model->find_first_class("Workspace"), start, dir, local_player_character.value()); 131 | 132 | if (!hit_instance) 133 | return false; 134 | 135 | const auto is_hit = [&]() -> bool 136 | { 137 | if (hit_instance && hit_instance->parent) 138 | { 139 | if (std::strstr(hit_instance->parent->name.c_str(), "Player") != 0) 140 | { 141 | if (std::get(menu::config::config_map["enable_team_check"])) 142 | if (roblox::games::game->is_same_team(static_cast(hit_instance->parent))) 143 | return false; 144 | 145 | return true; 146 | } 147 | 148 | hit_instance = hit_instance->parent; 149 | } 150 | 151 | return false; 152 | }; 153 | 154 | return is_hit(); 155 | } 156 | 157 | bool roblox::games::phantom_forces_t::is_same_team(const roblox::structs::player_t* player) const 158 | { 159 | const auto lp = get_local_player(); 160 | 161 | if (!lp || !player || !player->parent) 162 | return false; 163 | 164 | const auto team = reinterpret_cast(lp->team); 165 | 166 | const auto enemy_team_color = player->parent->name; 167 | 168 | auto enemy_team_name = ""; 169 | 170 | if (enemy_team_color == "Bright blue") 171 | enemy_team_name = "Phantoms"; 172 | else 173 | enemy_team_name = "Ghosts"; 174 | 175 | return std::strcmp(enemy_team_name, team->name.c_str()) == 0; 176 | } 177 | 178 | int roblox::games::phantom_forces_t::get_stride() const 179 | { 180 | return 32; 181 | } 182 | 183 | std::optional roblox::games::phantom_forces_t::get_index() const 184 | { 185 | return 132; 186 | } 187 | 188 | std::optional roblox::games::phantom_forces_t::get_indesc() const 189 | { 190 | return 264; 191 | } -------------------------------------------------------------------------------- /RW/games/phantom_forces/phantom_forces.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include "../base_game/base_game.hpp" 6 | 7 | namespace roblox::games 8 | { 9 | struct phantom_forces_t : public base_game_t 10 | { 11 | [[nodiscard]] bool is_base() const override { return false; }; 12 | 13 | [[nodiscard]] std::vector get_players() const override; 14 | 15 | [[nodiscard]] std::optional get_part(const roblox::structs::player_t* player) const override; 16 | 17 | [[nodiscard]] std::optional get_health(const roblox::structs::player_t* player) const override { return std::nullopt; } 18 | 19 | [[nodiscard]] std::optional get_max_health(const roblox::structs::player_t* player) const override { return std::nullopt; } 20 | 21 | [[nodiscard]] std::optional get_player_name(const roblox::structs::player_t* player) const override { return std::nullopt; } 22 | 23 | [[nodiscard]] std::optional get_player_tool_name(const roblox::structs::player_t* player) const override { return std::nullopt; } 24 | 25 | [[nodiscard]] bool is_behind_wall(const roblox::structs::player_t* player, roblox::games::part_data_t parts) const override; 26 | 27 | [[nodiscard]] bool is_mouse_over_player() const override; 28 | 29 | [[nodiscard]] int get_stride() const override; 30 | 31 | [[nodiscard]] std::optional get_index() const override; 32 | 33 | [[nodiscard]] std::optional get_indesc() const override; 34 | 35 | [[nodiscard]] bool is_same_team(const roblox::structs::player_t* player) const override; 36 | 37 | void toggle_features() const override; 38 | }; 39 | } -------------------------------------------------------------------------------- /RW/games/rush_point/rush_point.cpp: -------------------------------------------------------------------------------- 1 | #include "rush_point.hpp" 2 | 3 | #include "../../renderer/menu/config/config.hpp" 4 | #include "../games.hpp" 5 | 6 | std::vector roblox::games::rush_point_t::get_players() const 7 | { 8 | std::vector rp_children; 9 | 10 | const auto map = roblox::globals::data_model->workspace->find_first_child("MapFolder"); 11 | 12 | if (!map) 13 | return rp_children; 14 | 15 | const auto rp_players_folder = map->find_first_child("Players"); 16 | 17 | if (!rp_players_folder || !roblox::functions::is_valid_ptr(rp_players_folder)) 18 | return rp_children; 19 | 20 | for (const auto& plr : rp_players_folder->get_children()) 21 | { 22 | if (!plr || !roblox::functions::is_valid_ptr(plr) || !plr->find_first_class("Humanoid")) 23 | continue; 24 | 25 | rp_children.push_back(plr); 26 | } 27 | 28 | return rp_children; 29 | } 30 | 31 | std::optional roblox::games::rush_point_t::get_part(const roblox::structs::player_t* player) const 32 | { 33 | if (const auto head_part = player->find_first_child("Head"); roblox::functions::is_valid_ptr(head_part)) 34 | if (const auto torso_part = player->find_first_child("HumanoidRootPart"); roblox::functions::is_valid_ptr(torso_part)) 35 | return roblox::games::part_data_t{ head_part, torso_part }; 36 | 37 | return std::nullopt; 38 | } 39 | 40 | std::optional roblox::games::rush_point_t::get_health(const roblox::structs::player_t* player) const 41 | { 42 | if (const auto humanoid = player->find_first_child("Humanoid")) 43 | return humanoid->get_health(); 44 | 45 | return std::nullopt; 46 | } 47 | 48 | std::optional roblox::games::rush_point_t::get_max_health(const roblox::structs::player_t* player) const 49 | { 50 | if (const auto humanoid = player->find_first_child("Humanoid")) 51 | return humanoid->get_max_health(); 52 | 53 | return std::nullopt; 54 | } 55 | 56 | void roblox::games::rush_point_t::toggle_features() const 57 | { 58 | enabled_map["allow_esp_tools"] = false; 59 | } 60 | 61 | bool roblox::games::rush_point_t::is_mouse_over_player() const 62 | { 63 | const auto is_hit_player = [](const roblox::structs::instance_t* model) -> bool 64 | { 65 | if (model->parent && std::strstr(model->parent->name.c_str(), "Players") != 0) 66 | { 67 | const auto player = static_cast(model); 68 | 69 | if (std::get(menu::config::config_map["enable_team_check"])) 70 | if (roblox::games::game->is_same_team(player)) 71 | return false; 72 | 73 | if (std::get(menu::config::config_map["enable_aim_health_check"])) 74 | { 75 | const auto health_optional = roblox::games::game->get_health(player); 76 | 77 | if (health_optional.has_value()) 78 | { 79 | const auto health = health_optional.value(); 80 | 81 | if (health <= 0) 82 | return false; 83 | } 84 | } 85 | 86 | return true; 87 | } 88 | 89 | return false; 90 | }; 91 | 92 | if (const auto mouse = get_local_player()->mouse; roblox::functions::is_valid_ptr(mouse)) 93 | { 94 | auto hit = roblox::functions::mouse::get_hit(mouse); 95 | 96 | if (hit && roblox::functions::is_valid_ptr(hit)) 97 | { 98 | while (true) 99 | { 100 | if (hit->class_descriptor->name == "Model") 101 | if (is_hit_player(hit)) 102 | return true; 103 | 104 | if (!hit->parent) 105 | break; 106 | 107 | hit = hit->parent; 108 | } 109 | } 110 | } 111 | 112 | return false; 113 | } 114 | 115 | bool roblox::games::rush_point_t::is_same_team(const roblox::structs::player_t* player) const 116 | { 117 | const auto lp = get_local_player(); 118 | 119 | if (!lp) 120 | return false; 121 | 122 | const auto lp_char = lp->character; 123 | 124 | if (!lp_char || !player->character) 125 | return false; 126 | 127 | const auto lp_team = lp_char->find_first_child("Team"); 128 | const auto plr_team = player->find_first_child("Team"); 129 | 130 | if (!lp_team || !plr_team) 131 | return false; 132 | 133 | const auto lp_team_name = *reinterpret_cast(lp_team->self + 0x6C); 134 | const auto plr_team_name = *reinterpret_cast(plr_team->self + 0x6C); 135 | 136 | return lp_team_name == plr_team_name; 137 | } 138 | 139 | bool roblox::games::rush_point_t::is_behind_wall(const roblox::structs::player_t* player, roblox::games::part_data_t parts) const 140 | { 141 | if (!player || !roblox::functions::is_valid_ptr(player)) 142 | return true; 143 | 144 | const auto player_character = player; 145 | 146 | if (!player_character || !roblox::functions::is_valid_ptr(player_character)) 147 | return true; 148 | 149 | const auto local_player_character = get_local_player_character(); 150 | 151 | if (!local_player_character.has_value()) 152 | return true; 153 | 154 | const auto head_prim = local_player_character.value()->find_first_child("Head"); 155 | 156 | if (!head_prim || !roblox::functions::is_valid_ptr(head_prim)) 157 | return true; 158 | 159 | const auto head_pv = roblox::functions::pv::get_pv_from_part_instance(head_prim); 160 | 161 | if (!head_pv || !roblox::functions::is_valid_ptr(head_pv)) 162 | return true; 163 | 164 | const auto& [head_part, torso] = parts; 165 | 166 | if (!head_part || !roblox::functions::is_valid_ptr(head_part) || !torso || !roblox::functions::is_valid_ptr(torso)) 167 | return true; 168 | 169 | const auto enemy_head_pv = roblox::functions::pv::get_pv_from_part_instance(head_part); 170 | 171 | if (!enemy_head_pv || !roblox::functions::is_valid_ptr(enemy_head_pv)) 172 | return true; 173 | 174 | auto start = head_pv->translation; 175 | auto dir = enemy_head_pv->translation - start; 176 | 177 | auto hit_instance = roblox::functions::raycast::fire_raycast_helper(roblox::globals::data_model->find_first_class("Workspace"), start, dir, local_player_character.value()); 178 | 179 | if (!hit_instance) 180 | return true; 181 | 182 | const auto is_hit = [&]() -> bool 183 | { 184 | while (hit_instance && hit_instance->parent) 185 | { 186 | if (hit_instance->self == player_character->self) 187 | return true; 188 | 189 | hit_instance = hit_instance->parent; 190 | } 191 | 192 | return false; 193 | }; 194 | 195 | return !is_hit(); 196 | } -------------------------------------------------------------------------------- /RW/games/rush_point/rush_point.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include "../base_game/base_game.hpp" 6 | 7 | namespace roblox::games 8 | { 9 | struct rush_point_t : public base_game_t 10 | { 11 | [[nodiscard]] virtual std::vector get_players() const; 12 | 13 | [[nodiscard]] std::optional get_part(const roblox::structs::player_t* player) const override; 14 | 15 | [[nodiscard]] std::optional get_health(const roblox::structs::player_t* player) const override; 16 | 17 | [[nodiscard]] std::optional get_max_health(const roblox::structs::player_t* player) const override; 18 | 19 | [[nodiscard]] bool is_mouse_over_player() const override; 20 | 21 | [[nodiscard]] bool is_same_team(const roblox::structs::player_t* player) const override; 22 | 23 | [[nodiscard]] bool is_behind_wall(const roblox::structs::player_t* player, roblox::games::part_data_t parts) const override; 24 | 25 | void toggle_features() const override; 26 | }; 27 | } -------------------------------------------------------------------------------- /RW/math/math.cpp: -------------------------------------------------------------------------------- 1 | #include "math.hpp" 2 | 3 | #include "../roblox/roblox.hpp" 4 | 5 | std::optional math::functions::world_to_screen(const math::types::vector_t& in) 6 | { 7 | const auto visual_engine = *reinterpret_cast(roblox::offsets::visual_engine::visual_engine); 8 | 9 | const auto matrix = visual_engine->view_matrix; 10 | 11 | const auto& [width, height] = visual_engine->screen_size; 12 | 13 | math::types::vector4_t comp = matrix * in; 14 | 15 | if ( comp.w < 0.001f) 16 | return std::nullopt; 17 | 18 | comp.x /= comp.w; 19 | comp.y /= comp.w; 20 | 21 | comp.x = ( width / 2.0f ) + (comp.x * width ) / 2.0f; 22 | comp.y = ( height / 2.0f ) - (comp.y * height ) / 2.0f; 23 | 24 | math::types::vector2_t ret; 25 | ret.x = comp.x; 26 | ret.y = comp.y; 27 | 28 | return std::optional(ret); 29 | } -------------------------------------------------------------------------------- /RW/math/math.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | namespace math::types 10 | { 11 | struct vector_t 12 | { 13 | float x, y, z; 14 | 15 | vector_t() = default; 16 | vector_t(float x, float y, float z) : x{ x }, y{ y }, z{ z } {} 17 | 18 | auto operator*(vector_t mul) const noexcept 19 | { 20 | vector_t ret; 21 | 22 | ret.x = x * mul.x; 23 | ret.y = y * mul.y; 24 | ret.z = z * mul.z; 25 | return ret; 26 | } 27 | 28 | vector_t operator*(float f) const { 29 | return vector_t(x * f, y * f, z * f); 30 | } 31 | 32 | vector_t& operator-= (const vector_t& rkVector) { 33 | x -= rkVector.x; 34 | y -= rkVector.y; 35 | z -= rkVector.z; 36 | return *this; 37 | } 38 | 39 | float unitize(float fTolerance) { 40 | float fMagnitude = magnitude(); 41 | 42 | if (fMagnitude > fTolerance) { 43 | float fInvMagnitude = 1.0f / fMagnitude; 44 | x *= fInvMagnitude; 45 | y *= fInvMagnitude; 46 | z *= fInvMagnitude; 47 | } 48 | else { 49 | fMagnitude = 0.0f; 50 | } 51 | 52 | return fMagnitude; 53 | } 54 | 55 | float dot(const vector_t & rkVector) const { 56 | return x * rkVector.x + y * rkVector.y + z * rkVector.z; 57 | } 58 | 59 | float squaredMagnitude() const { 60 | return x * x + y * y + z * z; 61 | } 62 | 63 | vector_t direction() const { 64 | const float lenSquared = squaredMagnitude(); 65 | const float invSqrt = 1.0f / sqrtf(lenSquared); 66 | return vector_t(x * invSqrt, y * invSqrt, z * invSqrt); 67 | } 68 | 69 | auto operator+(vector_t add) const noexcept 70 | { 71 | vector_t ret; 72 | 73 | ret.x = x + add.x; 74 | ret.y = y + add.y; 75 | ret.z = z + add.z; 76 | 77 | return ret; 78 | } 79 | 80 | auto operator-(vector_t sub) const noexcept 81 | { 82 | vector_t ret; 83 | 84 | ret.x = x - sub.x; 85 | ret.y = y - sub.y; 86 | ret.z = z - sub.z; 87 | 88 | return ret; 89 | } 90 | 91 | auto operator=(vector_t other) noexcept 92 | { 93 | this->x = other.x; 94 | this->y = other.y; 95 | this->z = other.z; 96 | } 97 | 98 | const float magnitude() const 99 | { 100 | return sqrtf(powf(x, 2) + powf(y, 2) + powf(z, 2)); 101 | } 102 | 103 | const float distance(vector_t vector) const 104 | { 105 | return (*this - vector).magnitude(); 106 | } 107 | 108 | const vector_t normalize() const 109 | { 110 | vector_t ret; 111 | float mag = this->magnitude(); 112 | ret.x = x / mag; 113 | ret.y = y / mag; 114 | ret.z = z / mag; 115 | return ret; 116 | } 117 | 118 | auto cross(vector_t vec) const 119 | { 120 | vector_t ret; 121 | ret.x = y * vec.z - z * vec.y; 122 | ret.y = -(x * vec.z - z * vec.x); 123 | ret.z = x * vec.y - y * vec.x; 124 | return ret; 125 | } 126 | 127 | /* 128 | local watcher = game.Workspace.watcher 129 | 130 | function abc(a, b) 131 | local x = a.Y * b.Z - a.Z * b.Y 132 | local y = -(a.X * b.Z - a.Z * b.X) 133 | local z = a.X * b.Y - a.Y * b.X 134 | return Vector3.new(x, y, z) 135 | end 136 | 137 | function unit(a) 138 | local mag = math.sqrt(math.pow(a.X, 2) + math.pow(a.Y, 2) + math.pow(a.Z, 2)); 139 | local x = a.X / mag; 140 | local y = a.Y / mag; 141 | local z = a.Z / mag; 142 | return Vector3.new(x,y,z) 143 | end 144 | 145 | while wait() do 146 | local lookvector = (watcher.position - game.Workspace.CurrentCamera.CFrame.position).Unit 147 | local right_vector = Vector3.new(0, 1, 0):Cross(lookvector) 148 | local up_vector = lookvector:Cross(right_vector) 149 | 150 | watcher.CFrame = CFrame.fromMatrix( 151 | watcher.position, 152 | right_vector, 153 | Vector3.new(0,1,0), 154 | lookvector 155 | ) 156 | 157 | local a = watcher.position - game.Workspace.CurrentCamera.CFrame.position 158 | 159 | print(lookvector, unit(a), lookvector == unit(a)) 160 | end 161 | */ 162 | }; 163 | 164 | struct vector2_t 165 | { 166 | float x, y; 167 | 168 | vector2_t() = default; 169 | vector2_t(float x, float y) : x{ x }, y{ y } {} 170 | 171 | const float distance(const vector2_t& vector) const 172 | { 173 | return std::sqrtf(std::powf(x - vector.x, 2.0) + std::powf(y - vector.y, 2.0)); 174 | } 175 | }; 176 | 177 | struct vector4_t 178 | { 179 | float x, y, z, w; 180 | 181 | vector4_t() = default; 182 | vector4_t(float x, float y, float z, float w) : x{ x }, y{ y }, z{ z }, w{ w } {} 183 | }; 184 | 185 | struct matrix4_t 186 | { 187 | float mat[4][4]; 188 | 189 | constexpr auto operator[](int i) const noexcept { return mat[i]; } 190 | auto operator*(vector_t mul) const noexcept 191 | { 192 | vector4_t ret; 193 | 194 | ret.x = mat[0][0] * mul.x + mat[0][1] * mul.y + mat[0][2] * mul.z + mat[0][3]; 195 | ret.y = mat[1][0] * mul.x + mat[1][1] * mul.y + mat[1][2] * mul.z + mat[1][3]; 196 | ret.z = mat[2][0] * mul.x + mat[2][1] * mul.y + mat[2][2] * mul.z + mat[2][3]; 197 | ret.w = mat[3][0] * mul.x + mat[3][1] * mul.y + mat[3][2] * mul.z + mat[3][3]; 198 | 199 | return ret; 200 | } 201 | }; 202 | 203 | struct cframe_t 204 | { 205 | vector_t right_vector = { 1, 0, 0 }; 206 | vector_t up_vector = { 0, 1, 0 }; 207 | vector_t back_vector = { 0, 0, 1 }; 208 | vector_t position = { 0, 0, 0 }; 209 | 210 | cframe_t() = default; 211 | cframe_t(vector_t position) : position{ position } {} 212 | cframe_t(vector_t right_vector, vector_t up_vector, vector_t back_vector, vector_t position) : right_vector{ right_vector }, up_vector{ up_vector }, back_vector{ back_vector }, position{ position } {} 213 | 214 | public: 215 | void look_at_locked(vector_t point) noexcept // NOTE: Y DIRECTION IS LOCKED 216 | { 217 | vector_t look_vector = (this->position - point).normalize() * vector_t{1, 0, 1}; // simulate as if aligned with y axis 218 | vector_t right_vector = vector_t{0, 1, 0}.cross(look_vector); // this is a must since I need a 90* angle still 219 | vector_t up_vector = { 0, 1, 0 }; // since we've simulated as if y was on same level, no point to do this cross calculation 220 | 221 | this->right_vector = right_vector; 222 | this->up_vector = up_vector; 223 | this->back_vector = look_vector * vector_t{ -1, -1, -1 }; 224 | } 225 | 226 | cframe_t look_at(vector_t point) noexcept 227 | { 228 | vector_t look_vector = (position - point).normalize() * vector_t { -1, -1, -1 }; 229 | vector_t right_vector = vector_t(0, 1, 0).cross(look_vector); 230 | vector_t up_vector = look_vector.cross(right_vector); 231 | 232 | return cframe_t{ right_vector, up_vector, look_vector, this->position }; 233 | } 234 | 235 | auto operator*(cframe_t cframe) const noexcept 236 | { 237 | cframe_t ret; 238 | 239 | ret.right_vector = 240 | { 241 | right_vector.x * cframe.right_vector.x + right_vector.y * cframe.up_vector.x + right_vector.z * cframe.back_vector.x, 242 | right_vector.x * cframe.right_vector.y + right_vector.y * cframe.up_vector.y + right_vector.z * cframe.back_vector.y, 243 | right_vector.x * cframe.right_vector.z + right_vector.y * cframe.up_vector.z + right_vector.z * cframe.back_vector.z 244 | }; 245 | ret.up_vector = 246 | { 247 | up_vector.x * cframe.right_vector.x + up_vector.y * cframe.up_vector.x + up_vector.z * cframe.back_vector.x, 248 | up_vector.x * cframe.right_vector.y + up_vector.y * cframe.up_vector.y + up_vector.z * cframe.back_vector.y, 249 | up_vector.x * cframe.right_vector.z + up_vector.y * cframe.up_vector.z + up_vector.z * cframe.back_vector.z 250 | }; 251 | ret.back_vector = 252 | { 253 | back_vector.x * cframe.right_vector.x + back_vector.y * cframe.up_vector.x + back_vector.z * cframe.back_vector.x, 254 | back_vector.x * cframe.right_vector.y + back_vector.y * cframe.up_vector.y + back_vector.z * cframe.back_vector.y, 255 | back_vector.x * cframe.right_vector.z + back_vector.y * cframe.up_vector.z + back_vector.z * cframe.back_vector.z 256 | }; 257 | ret.position = 258 | { 259 | right_vector.x * cframe.position.x + right_vector.y * cframe.position.y + right_vector.z * cframe.position.z + position.x, 260 | up_vector.x * cframe.position.x + up_vector.y * cframe.position.y + up_vector.z * cframe.position.z + position.y, 261 | back_vector.x * cframe.position.x + back_vector.y * cframe.position.y + back_vector.z * cframe.position.z + position.z 262 | }; 263 | 264 | return ret; 265 | } 266 | 267 | auto operator*(vector_t vec) const noexcept 268 | { 269 | vector_t ret; 270 | 271 | ret.x = right_vector.x * vec.x + right_vector.y * vec.y + right_vector.z * vec.z + position.x; 272 | ret.y = up_vector.x * vec.x + up_vector.y * vec.y + up_vector.z * vec.z + position.y; 273 | ret.z = back_vector.x * vec.x + back_vector.y * vec.y + back_vector.z * vec.z + position.z; 274 | 275 | return ret; 276 | } 277 | }; 278 | 279 | struct matrix3_t 280 | { 281 | float mat[3][3]; 282 | 283 | constexpr auto operator[](int i) const noexcept { return mat[i]; } 284 | }; 285 | } 286 | 287 | namespace math::functions 288 | { 289 | std::optional world_to_screen(const math::types::vector_t& in); 290 | } -------------------------------------------------------------------------------- /RW/renderer/menu/config/config.cpp: -------------------------------------------------------------------------------- 1 | #include "config.hpp" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "../../../dependencies/json/json.hpp" 8 | 9 | #include "../ui.hpp" 10 | #include "../../../task_scheduler/task_scheduler.hpp" 11 | 12 | std::vector menu::config::configs = { "default" }; 13 | 14 | std::unordered_map< const char*, std::variant< bool, int, float, ImU32 > > menu::config::config_map 15 | { 16 | {"enable_aimbot", false}, 17 | {"aimbot_type", 0}, 18 | {"enable_smoothing", false}, 19 | {"smoothing_amount", 1}, 20 | {"enable_fov_check", false}, 21 | {"fov_amount", 0}, 22 | {"target_bone", 0}, 23 | {"aim_hotkey", VK_RBUTTON}, 24 | {"open_menu", VK_INSERT}, 25 | 26 | {"enable_rcs", false}, 27 | {"rcs_pitch", 0}, 28 | {"rcs_yaw", 0}, 29 | 30 | {"enable_trigger_bot", false}, 31 | {"enable_team_check", false}, 32 | 33 | {"enable_head_hitbox", false}, 34 | {"enable_esp_distance", false}, 35 | {"enable_tracers", false}, 36 | 37 | {"esp_distance", 750}, 38 | 39 | {"modified_speed", 16}, 40 | {"enable_forced_speed", false}, 41 | 42 | {"enable_3d_square", false}, 43 | {"enable_3d_cube", false}, 44 | {"enable_2d_but_good", false}, 45 | {"enable_look_direction", false}, 46 | {"enable_custom_esp", false}, 47 | 48 | {"enable_rainbow", false}, 49 | {"enable_wall_check", false}, 50 | {"enable_esp_name", false}, 51 | {"enable_trigger_bot", false}, 52 | 53 | {"enable_chams", false}, 54 | {"chams_color", ImColor{1.0f, 1.0f, 1.0f, 1.0f}}, 55 | 56 | {"custom_line_count", 0}, 57 | {"waypoint_count", 0}, 58 | 59 | 60 | {"max_distance_aim", 0}, 61 | {"max_distance_aim_enabled", false}, 62 | {"enable_tool_esp", false}, 63 | {"enemy_only_esp", false}, 64 | {"anti_idle_kick", false}, 65 | {"enable_aim_health_check", false}, 66 | {"enable_esp_health", false}, 67 | {"enable_info", false}, 68 | 69 | {"3d_square_color", ImColor{1.0f, 1.0f, 1.0f, 1.0f}}, 70 | {"3d_cube_color", ImColor{1.0f, 1.0f, 1.0f, 1.0f}}, 71 | {"2d_color", ImColor{1.0f, 1.0f, 1.0f, 1.0f} }, 72 | {"look_direction_color", ImColor{1.0f, 1.0f, 1.0f, 1.0f}}, 73 | {"custom_color", ImColor{1.0f, 1.0f, 1.0f, 1.0f}}, 74 | {"tracers_color", ImColor{1.0f, 1.0f, 1.0f, 1.0f}}, 75 | 76 | {"obs_hide", false}, 77 | {"fps_limit", 60} 78 | }; 79 | 80 | std::unordered_map< const char*, std::variant< bool, int, float, ImU32 > > menu::config::default_config = { 81 | {"enable_aimbot", false}, 82 | {"aimbot_type", 0}, 83 | {"enable_smoothing", false}, 84 | {"smoothing_amount", 1}, 85 | {"enable_fov_check", false}, 86 | {"draw_fov", false}, 87 | {"fov_amount", 0}, 88 | {"target_bone", 0}, 89 | {"aim_hotkey", VK_RBUTTON}, 90 | {"open_menu", VK_INSERT}, 91 | 92 | {"enable_rcs", false}, 93 | {"rcs_pitch", 0}, 94 | {"rcs_yaw", 0}, 95 | 96 | {"enable_trigger_bot", false}, 97 | {"enable_team_check", false}, 98 | 99 | {"enable_head_hitbox", false}, 100 | {"enable_esp_distance", false}, 101 | {"enable_tracers", false}, 102 | 103 | {"esp_distance", 750}, 104 | 105 | {"modified_speed", 16}, 106 | {"enable_forced_speed", false}, 107 | 108 | {"enable_3d_square", false}, 109 | {"enable_3d_cube", false}, 110 | {"enable_2d_but_good", false}, 111 | {"enable_look_direction", false}, 112 | {"enable_custom_esp", false}, 113 | 114 | {"enable_rainbow", false}, 115 | {"enable_wall_check", false}, 116 | {"enable_esp_name", false}, 117 | {"enable_trigger_bot", false}, 118 | 119 | {"enable_chams", false}, 120 | {"chams_color", ImColor{1.0f, 1.0f, 1.0f, 1.0f}}, 121 | 122 | {"custom_line_count", 0}, 123 | {"waypoint_count", 0}, 124 | 125 | {"max_distance_aim", 0}, 126 | {"max_distance_aim_enabled", false}, 127 | {"enable_tool_esp", false}, 128 | {"enemy_only_esp", false}, 129 | {"anti_idle_kick", false}, 130 | {"enable_aim_health_check", false}, 131 | {"enable_esp_health", false}, 132 | {"enable_info", false}, 133 | 134 | {"3d_square_color", ImColor{1.0f, 1.0f, 1.0f, 1.0f}}, 135 | {"3d_cube_color", ImColor{1.0f, 1.0f, 1.0f, 1.0f}}, 136 | {"2d_color", ImColor{1.0f, 1.0f, 1.0f, 1.0f} }, 137 | {"look_direction_color", ImColor{1.0f, 1.0f, 1.0f, 1.0f}}, 138 | {"custom_color", ImColor{1.0f, 1.0f, 1.0f, 1.0f}}, 139 | {"tracers_color", ImColor{1.0f, 1.0f, 1.0f, 1.0f}}, 140 | 141 | {"obs_hide", false}, 142 | {"fps_limit", 60} 143 | }; 144 | 145 | void menu::config::dump_to_cfg(const char* const name) //todo: switch to chilkat cuz this lib fucking sucks and throws 9999999 exceptions 146 | { 147 | 148 | } 149 | 150 | void menu::config::delete_cfg(const char* const name) 151 | { 152 | 153 | } 154 | 155 | void menu::config::load_cfg(const char* const name) 156 | { 157 | 158 | } 159 | 160 | void menu::config::refresh_configs() 161 | { 162 | 163 | } -------------------------------------------------------------------------------- /RW/renderer/menu/config/config.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | 7 | #include "../../../roblox/roblox.hpp" 8 | 9 | #include "../../dependencies/imgui/imgui.h" 10 | 11 | namespace menu::config 12 | { 13 | extern std::vector configs; 14 | 15 | extern std::unordered_map< const char*, std::variant< bool, int, float, ImU32 > > config_map; 16 | 17 | extern std::unordered_map< const char*, std::variant< bool, int, float, ImU32 > > default_config; 18 | 19 | void dump_to_cfg(const char* const name); 20 | 21 | void delete_cfg(const char* const name); 22 | 23 | void load_cfg(const char* const name); 24 | 25 | void refresh_configs(); 26 | } 27 | 28 | -------------------------------------------------------------------------------- /RW/renderer/menu/libs/imgui_tricks.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ImGui Tricks v1.02 3 | * ImTricks is a library that simplifies and increases the functionality of ImGui. 4 | * At the moment, Imtrucks adds functions to speed up the creation of animated menus, 5 | * adds a notification system, and also adds support for ImColor in ColorEdit3/ColorEdit4. 6 | * 7 | * Made with love by pers0na2. 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #include "../../../dependencies/imgui/imgui.h" 20 | #define IMGUI_DEFINE_MATH_OPERATORS 21 | #include "../../../dependencies/imgui/imgui_internal.h" 22 | 23 | #ifndef IMGUI_TRICK_ONCE 24 | #define IMGUI_TRICK_ONCE 25 | 26 | 27 | /* 28 | // A customized ImColor structure with an additional constructor from the HEX HTML color code 29 | // and a method for obtaining HEX HTML from an already existing color. 30 | */ 31 | struct ImTrickyColor 32 | { 33 | float values[4]; 34 | 35 | ImTrickyColor() { values[0] = 0.f; values[1] = 0.f; values[2] = 0.f; values[3] = 0.f; }; 36 | 37 | ImTrickyColor(float r, float g, float b, float a = 1.f) { values[0] = r; values[1] = g; values[2] = b; values[3] = a; }; 38 | ImTrickyColor(int r, int g, int b, int a = 255) { values[0] = r / 255.f; values[1] = g / 255.f; values[2] = b / 255.f; values[3] = a / 255.f; }; 39 | ImTrickyColor(std::string html) { 40 | auto SplitByCharacters = [](const std::string& str, int splitLength) { 41 | 42 | int NumSubstrings = str.length() / splitLength; 43 | std::vector ret; 44 | 45 | for (int i = 0; i < NumSubstrings; i++) { 46 | ret.push_back(str.substr(i * splitLength, splitLength)); 47 | } 48 | if (str.length() % splitLength != 0) { 49 | ret.push_back(str.substr(splitLength * NumSubstrings)); 50 | } 51 | 52 | return ret; 53 | }; 54 | 55 | if (html.at(0) == '#') { 56 | html.erase(0, 1); 57 | } 58 | 59 | while (html.length() != 8) { 60 | html.append("0"); 61 | } 62 | 63 | std::vector colori = SplitByCharacters(html, 2); 64 | 65 | values[0] = stoi(colori[0], nullptr, 16) / 255.f; 66 | values[1] = stoi(colori[1], nullptr, 16) / 255.f; 67 | values[2] = stoi(colori[2], nullptr, 16) / 255.f; 68 | values[3] = stoi(colori[3], nullptr, 16) / 255.f; 69 | }; 70 | ImTrickyColor(ImColor col) { values[0] = col.Value.x; values[1] = col.Value.y; values[2] = col.Value.z; values[3] = col.Value.w; }; 71 | 72 | inline operator ImU32() const { return ImGui::ColorConvertFloat4ToU32(ImVec4(values[0], values[1], values[2], values[3])); } 73 | inline operator ImVec4() const { return ImVec4(values[0], values[1], values[2], values[3]); } 74 | inline operator ImColor() const { return ImColor(values[0], values[1], values[2], values[3]); } 75 | inline float operator[](std::size_t idx) const { return values[idx]; } 76 | 77 | inline void SetHSV(float h, float s, float v, float a = 1.0f) { ImGui::ColorConvertHSVtoRGB(h, s, v, values[0], values[1], values[2]); values[3] = a; } 78 | inline ImTrickyColor HSV(float h, float s, float v, float a = 1.0f) { float r, g, b; ImGui::ColorConvertHSVtoRGB(h, s, v, r, g, b); return ImTrickyColor(r, g, b, a); } 79 | }; 80 | 81 | enum NotifyState : int { 82 | ImTrickNotify_Success = 0, 83 | ImTrickNotify_Warning = 1, 84 | ImTrickNotify_Danger = 2, 85 | ImTrickNotify_Default = 3 86 | }; 87 | 88 | namespace ImTricks { 89 | 90 | /* 91 | // The Animations namespace contains everything you need to easily create animations in your ImGui menus. 92 | */ 93 | namespace Animations { 94 | 95 | /* 96 | // Usage: 97 | // int trickInt = ImTricks::Animations::FastLerpInt("trickInt", enable_animation, 0, 255, 15); 98 | // draw->AddRectFilled(p, p + ImVec2(30, 30), ImColor(255, 255, 255, trickInt)); 99 | */ 100 | extern int FastIntLerp(const char* identifier, bool state, int min, int max, int speed); 101 | 102 | /* 103 | // Usage: 104 | // float trickFloat = ImTricks::Animations::FastLerpInt("trickFloat", enable_animation, 0.f, 1.f, 0.05f); 105 | // draw->AddRectFilled(p, p + ImVec2(30, 30), ImColor(1.f, 1.f, 1.f, trickFloat)); 106 | */ 107 | extern float FastFloatLerp(const char* identifier, bool state, float min, float max, float speed); 108 | 109 | extern float FastFloatLerp(ImGuiID identifier, bool state, float min, float max, float speed); 110 | 111 | 112 | /* 113 | // Usage: 114 | // float trickFloat = ImTricks::Animations::FastFloatLerp("header", enable_animation, 0.f, 1.f, 0.05f); 115 | // ImVec2 pos1 = ImTricks::Animations::FastImVec2Lerp("pos1", enable_animation, ImVec2(0, 50), ImVec2(100, 50), 5); 116 | // ImVec2 pos2 = ImTricks::Animations::FastImVec2Lerp("pos2", enable_animation, ImVec2(413, 80), ImVec2(513, 80), 5); 117 | // draw->AddRectFilled(p + pos1, p + pos2, ImTricks::Animations::FastColorLerp(ImColor(255, 0, 0), ImColor(0, 255, 0), trickFloat)); 118 | */ 119 | extern ImVec2 FastImVec2Lerp(const char* identifier, bool state, ImVec2 min, ImVec2 max, float speed); 120 | 121 | /* 122 | // Usage: 123 | // float trickFloat = ImTricks::Animations::FastLerpFloat("header", check, 0.f, 1.f, 0.05f); 124 | // draw->AddRectFilled(p, p + ImVec2(513, 30), ImTricks::Animations::FastColorLerp(ImColor(255, 0, 0), ImColor(0, 255, 0), trickFloat)); 125 | */ 126 | extern ImColor FastColorLerp(ImColor start, ImColor end, float stage); 127 | extern ImTrickyColor FastColorLerp(ImTrickyColor start, ImTrickyColor end, float stage); 128 | } 129 | 130 | /* 131 | // The NotifyManager namespace contains everything you need to easily create notifications in your interface. 132 | */ 133 | namespace NotifyManager { 134 | 135 | struct NotifyStruct { 136 | const char* message; 137 | NotifyState state; 138 | ULONGLONG time; 139 | }; 140 | 141 | extern std::vector notifies; 142 | 143 | /* 144 | // Description: 145 | // Responsible for adding notifications to the display queue. 146 | // 147 | // Usage: 148 | // if (ImGui::Button("Create Notify", { 120, 25 })) 149 | // ImTricks::NotifyManager::AddNotify("The notification was displayed successfully.", ImTrickNotify_Success); 150 | */ 151 | extern void AddNotify(const char* message, NotifyState state); 152 | 153 | /* 154 | // Description: 155 | // Call a function in your render. This function is responsible for displaying and monitoring notifications. 156 | // 157 | // Usage: 158 | // ImTricks::NotifyManager::HandleNotifies(ImGui::GetOverlayDrawList()); 159 | */ 160 | extern void HandleNotifies(ImDrawList* draw = ImGui::GetForegroundDrawList()); 161 | 162 | } 163 | 164 | 165 | namespace Widgets { 166 | 167 | // I don't understand why ocornut didn't add ImColor support to ColorEdit. 168 | extern void ColorEdit3(const char* label, ImColor& color, ImGuiColorEditFlags flags = NULL); 169 | extern void ColorEdit4(const char* label, ImColor& color, ImGuiColorEditFlags flags = NULL); 170 | extern void ColorEdit3(const char* label, ImTrickyColor& color, ImGuiColorEditFlags flags = NULL); 171 | extern void ColorEdit4(const char* label, ImTrickyColor& color, ImGuiColorEditFlags flags = NULL); 172 | 173 | } 174 | 175 | namespace DrawList { 176 | 177 | /* 178 | // The original author of the code is nathanvoglsam 179 | // https://github.com/nathanvoglsam 180 | // 181 | // Usage: 182 | // ImTricks::DrawList::AddTriangleFilledMultiColor(draw, p + ImVec2(0, 0), p + ImVec2(150, 150), p + ImVec2(300, 0), ImTrickyColor("#32a877ff"), ImTrickyColor("#3246a8ff"), ImTrickyColor("#a83232ff")); 183 | */ 184 | extern void AddTriangleFilledMultiColor(ImDrawList* draw, const ImVec2& a, const ImVec2& b, const ImVec2& c, ImTrickyColor col_a, ImTrickyColor col_b, ImTrickyColor col_c); 185 | 186 | /* 187 | // Usage: 188 | // ImVec2 points[] = { p + ImVec2(0, 75),p + ImVec2(75, 0), p + ImVec2(150, 25), p + ImVec2(150, 150), p + ImVec2(75, 200), p + ImVec2(0, 150) }; 189 | // ImTrickyColor colors[] = { ImTrickyColor("#00ffffff"), ImTrickyColor("#00ffffff"),ImTrickyColor("#00ffffff"), ImTrickyColor("#e600ffff"),ImTrickyColor("#e600ffff"), ImTrickyColor("#e600ffff") }; 190 | // ImTricks::DrawList::AddConvexPolyFilledMultiColor(draw, points, colors, 6); 191 | */ 192 | extern void AddConvexPolyFilledMultiColor(ImDrawList* draw, const ImVec2* verts, ImTrickyColor* colors, int points); 193 | } 194 | } 195 | 196 | static inline ImVec2 operator+(const ImVec2& lhs, const float rhs) { return ImVec2(lhs.x + rhs, lhs.y + rhs); } 197 | static inline ImVec2 operator-(const ImVec2& lhs, const float rhs) { return ImVec2(lhs.x - rhs, lhs.y - rhs); } 198 | static inline ImVec4 operator+(const ImVec4& lhs, const float rhs) { return ImVec4(lhs.x + rhs, lhs.y + rhs, lhs.z + rhs, lhs.w + rhs); } 199 | static inline ImVec4 operator-(const ImVec4& lhs, const float rhs) { return ImVec4(lhs.x - rhs, lhs.y - rhs, lhs.z - rhs, lhs.w - rhs); } 200 | 201 | 202 | #endif -------------------------------------------------------------------------------- /RW/renderer/menu/libs/keys.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | const char* const KeyNames[] = { 4 | "Unknown", 5 | "VK_LBUTTON", 6 | "VK_RBUTTON", 7 | "VK_CANCEL", 8 | "VK_MBUTTON", 9 | "VK_XBUTTON1", 10 | "VK_XBUTTON2", 11 | "Unknown", 12 | "VK_BACK", 13 | "VK_TAB", 14 | "Unknown", 15 | "Unknown", 16 | "VK_CLEAR", 17 | "VK_RETURN", 18 | "Unknown", 19 | "Unknown", 20 | "VK_SHIFT", 21 | "VK_CONTROL", 22 | "VK_MENU", 23 | "VK_PAUSE", 24 | "VK_CAPITAL", 25 | "VK_KANA", 26 | "Unknown", 27 | "VK_JUNJA", 28 | "VK_FINAL", 29 | "VK_KANJI", 30 | "Unknown", 31 | "VK_ESCAPE", 32 | "VK_CONVERT", 33 | "VK_NONCONVERT", 34 | "VK_ACCEPT", 35 | "VK_MODECHANGE", 36 | "VK_SPACE", 37 | "VK_PRIOR", 38 | "VK_NEXT", 39 | "VK_END", 40 | "VK_HOME", 41 | "VK_LEFT", 42 | "VK_UP", 43 | "VK_RIGHT", 44 | "VK_DOWN", 45 | "VK_SELECT", 46 | "VK_PRINT", 47 | "VK_EXECUTE", 48 | "VK_SNAPSHOT", 49 | "VK_INSERT", 50 | "VK_DELETE", 51 | "VK_HELP", 52 | "0", 53 | "1", 54 | "2", 55 | "3", 56 | "4", 57 | "5", 58 | "6", 59 | "7", 60 | "8", 61 | "9", 62 | "Unknown", 63 | "Unknown", 64 | "Unknown", 65 | "Unknown", 66 | "Unknown", 67 | "Unknown", 68 | "Unknown", 69 | "A", 70 | "B", 71 | "C", 72 | "D", 73 | "E", 74 | "F", 75 | "G", 76 | "H", 77 | "I", 78 | "J", 79 | "K", 80 | "L", 81 | "M", 82 | "N", 83 | "O", 84 | "P", 85 | "Q", 86 | "R", 87 | "S", 88 | "T", 89 | "U", 90 | "V", 91 | "W", 92 | "X", 93 | "Y", 94 | "Z", 95 | "VK_LWIN", 96 | "VK_RWIN", 97 | "VK_APPS", 98 | "Unknown", 99 | "VK_SLEEP", 100 | "VK_NUMPAD0", 101 | "VK_NUMPAD1", 102 | "VK_NUMPAD2", 103 | "VK_NUMPAD3", 104 | "VK_NUMPAD4", 105 | "VK_NUMPAD5", 106 | "VK_NUMPAD6", 107 | "VK_NUMPAD7", 108 | "VK_NUMPAD8", 109 | "VK_NUMPAD9", 110 | "VK_MULTIPLY", 111 | "VK_ADD", 112 | "VK_SEPARATOR", 113 | "VK_SUBTRACT", 114 | "VK_DECIMAL", 115 | "VK_DIVIDE", 116 | "VK_F1", 117 | "VK_F2", 118 | "VK_F3", 119 | "VK_F4", 120 | "VK_F5", 121 | "VK_F6", 122 | "VK_F7", 123 | "VK_F8", 124 | "VK_F9", 125 | "VK_F10", 126 | "VK_F11", 127 | "VK_F12", 128 | "VK_F13", 129 | "VK_F14", 130 | "VK_F15", 131 | "VK_F16", 132 | "VK_F17", 133 | "VK_F18", 134 | "VK_F19", 135 | "VK_F20", 136 | "VK_F21", 137 | "VK_F22", 138 | "VK_F23", 139 | "VK_F24", 140 | "Unknown", 141 | "Unknown", 142 | "Unknown", 143 | "Unknown", 144 | "Unknown", 145 | "Unknown", 146 | "Unknown", 147 | "Unknown", 148 | "VK_NUMLOCK", 149 | "VK_SCROLL", 150 | "VK_OEM_NEC_EQUAL", 151 | "VK_OEM_FJ_MASSHOU", 152 | "VK_OEM_FJ_TOUROKU", 153 | "VK_OEM_FJ_LOYA", 154 | "VK_OEM_FJ_ROYA", 155 | "Unknown", 156 | "Unknown", 157 | "Unknown", 158 | "Unknown", 159 | "Unknown", 160 | "Unknown", 161 | "Unknown", 162 | "Unknown", 163 | "Unknown", 164 | "VK_LSHIFT", 165 | "VK_RSHIFT", 166 | "VK_LCONTROL", 167 | "VK_RCONTROL", 168 | "VK_LMENU", 169 | "VK_RMENU" 170 | }; -------------------------------------------------------------------------------- /RW/renderer/menu/ui.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include "../../dependencies/imgui/imgui.h" 5 | #include "libs/imgui_tricks.hpp" 6 | #include "config/config.hpp" 7 | 8 | namespace ui 9 | { 10 | namespace Static { 11 | inline std::string current_tab = "LEGIT"; 12 | extern bool render_interface; 13 | } 14 | 15 | extern std::string logged_in; 16 | 17 | extern std::vector> lines; 18 | 19 | extern std::vector> waypoints; 20 | 21 | void set_style(); 22 | void render(); 23 | 24 | bool tab_button(const char* label, const char* icon, int& tab, int index); 25 | 26 | bool button(const char* label); 27 | 28 | bool centered_button(const char* label); 29 | 30 | void check_box(const char* label, bool* v); 31 | 32 | bool slider_scalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format, float power, bool non_interactable = false); 33 | 34 | bool slider_int(const char* label, int* v, int v_min, int v_max, const char* format, bool non_interactable = false); 35 | 36 | bool begin_combo(const char* label, const char* preview_value, ImGuiComboFlags flags); 37 | 38 | bool BeginComboPopup(ImGuiID popup_id, const ImRect& bb, ImGuiComboFlags flags); 39 | 40 | bool Selectable(const char* label, bool selected); 41 | 42 | bool hotkey(const char* label, int* k); 43 | 44 | void color_picker(const char* identifier, ImU32* col); 45 | 46 | ImVec2 calc_text_size(const char* text, float font_size, const char* text_end = NULL, bool hide_text_after_double_hash = false, float wrap_width = -1.0f); 47 | } -------------------------------------------------------------------------------- /RW/renderer/renderer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | 6 | #include 7 | #pragma comment(lib, "d3d11.lib") 8 | 9 | #include "../dependencies/imgui/imgui.h" 10 | #include "../dependencies/imgui/imgui_impl_win32.h" 11 | #include "../dependencies/imgui/imgui_impl_dx11.h" 12 | #include "../dependencies/imgui/imgui_internal.h" 13 | 14 | using present_t = HRESULT(__stdcall*)(IDXGISwapChain* pThis, UINT SyncInterval, UINT Flags); 15 | 16 | using resize_buffers_t = HRESULT(__stdcall*)(IDXGISwapChain* this_ptr, UINT buffer_count, UINT width, UINT height, DXGI_FORMAT new_format, UINT swap_chain_flags); 17 | 18 | using d3d11_capture_t = void(*)(void*, void*); 19 | 20 | using d3d11_ps_set_shader_resources = void(__stdcall*)(ID3D11DeviceContext*, UINT, UINT, ID3D11ShaderResourceView* const*); 21 | 22 | using d3d11_draw_indexed_instanced_t = void(__stdcall*)(ID3D11DeviceContext* pContext, UINT IndexCountPerInstance, UINT InstanceCount, UINT StartIndexLocation, INT BaseVertexLocation, UINT StartInstanceLocation); 23 | 24 | using d3d11_draw_indexed_t = void(__stdcall*)(ID3D11DeviceContext* pContext, UINT IndexCount, UINT StartIndexLocation, INT BaseVertexLocation); 25 | 26 | extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); 27 | 28 | namespace renderer::values 29 | { 30 | extern float dpi_scale; 31 | 32 | extern WNDPROC original_wnd_proc; 33 | 34 | extern DXGI_SWAP_CHAIN_DESC sd; 35 | 36 | extern HWND roblox_window; 37 | 38 | extern HWND window; 39 | 40 | extern RECT screen_bounds; 41 | 42 | extern ID3D11Device* global_device; 43 | extern ID3D11DeviceContext* global_context; 44 | extern ID3D11RenderTargetView* main_render_target_view; 45 | extern ID3D11Texture2D* back_buffer; 46 | extern IDXGISwapChain* global_swapchain; 47 | 48 | extern present_t d3d11_present; 49 | extern resize_buffers_t d3d11_resize_buffers; 50 | 51 | extern d3d11_capture_t d3d11_capture; 52 | 53 | extern d3d11_ps_set_shader_resources set_shader_resources_orig; 54 | 55 | extern d3d11_draw_indexed_instanced_t draw_indexed_instanced; 56 | 57 | extern d3d11_draw_indexed_t draw_indexed; 58 | 59 | extern bool hooked; 60 | } 61 | 62 | namespace renderer 63 | { 64 | void render(IDXGISwapChain* swap_chain, void* backbuffer_ptr, bool is_from_present); 65 | 66 | void __cdecl prestent_cpy(void*, void*); 67 | 68 | std::pair get_screen_metrics(); 69 | 70 | HRESULT __stdcall present_hook(IDXGISwapChain* swap_chain, UINT sync_interval, UINT flags); 71 | 72 | HRESULT __stdcall resize_buffers_hook(IDXGISwapChain* this_ptr, UINT buffer_count, UINT width, UINT height, DXGI_FORMAT new_format, UINT swap_chain_flags); 73 | void __stdcall d3d11_ps_set_shader_resources_hook(ID3D11DeviceContext* p_context, UINT start_slot, UINT num_view, ID3D11ShaderResourceView* const* shader_resource_views); 74 | 75 | void __stdcall d3d11_draw_indexed_instanced(ID3D11DeviceContext*, UINT, UINT, UINT, INT, UINT); 76 | 77 | void __stdcall d3d11_draw_indexed(ID3D11DeviceContext*, UINT, UINT, INT); 78 | 79 | void initialize(); 80 | 81 | void initialize_chams(); 82 | 83 | inline bool is_roblox_on_top() { return renderer::values::roblox_window == GetForegroundWindow(); } 84 | } -------------------------------------------------------------------------------- /RW/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Resource.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /RW/roblox/roblox.cpp: -------------------------------------------------------------------------------- 1 | #include "roblox.hpp" 2 | 3 | #include "../renderer/renderer.hpp" 4 | #include "../features/visuals/visuals.hpp" 5 | #include "../renderer/menu/config/config.hpp" 6 | 7 | #include "../games/games.hpp" 8 | 9 | roblox::structs::data_model_t* roblox::globals::data_model; 10 | 11 | roblox::structs::players_t* roblox::globals::players; 12 | 13 | roblox::structs::instance_t* roblox::globals::mouse_service; 14 | 15 | roblox::games::game_t roblox::globals::place_id; 16 | 17 | math::types::matrix4_t roblox::globals::view_matrix; 18 | 19 | bool roblox::init(std::uintptr_t job) 20 | { 21 | roblox::globals::place_id = *reinterpret_cast(roblox::offsets::data_model::place_id); 22 | const auto script_context_reference = *reinterpret_cast(job + roblox::offsets::waiting_script_job::task_scheduler::script_context); 23 | 24 | roblox::globals::data_model = static_cast(script_context_reference->instance->parent); 25 | 26 | std::printf("[Init] DataModel: %p\n", roblox::globals::data_model); 27 | 28 | std::printf("[Init] WorkSpace: %p\n", roblox::globals::data_model->workspace); 29 | 30 | while (!roblox::globals::data_model->is_loaded) 31 | return false; 32 | 33 | std::printf("[Init] data_model->is_loaded = true\n"); 34 | 35 | roblox::games::init_game(); 36 | 37 | roblox::games::game->toggle_features(); 38 | 39 | roblox::globals::players = roblox::globals::data_model->find_first_class("Players"); 40 | 41 | roblox::globals::mouse_service = roblox::globals::data_model->find_first_class("MouseService"); 42 | 43 | if (!roblox::globals::players || !roblox::functions::is_valid_ptr(roblox::globals::players)) 44 | return false; 45 | 46 | std::printf("[Init] Initialized\n\n"); 47 | 48 | static std::once_flag rbx_init; 49 | 50 | std::call_once(rbx_init, renderer::initialize); 51 | 52 | return true; 53 | } 54 | 55 | bool roblox::functions::is_valid_ptr(const void* const address) 56 | { 57 | MEMORY_BASIC_INFORMATION mbi{}; 58 | 59 | if (VirtualQuery(address, &mbi, sizeof(MEMORY_BASIC_INFORMATION))) 60 | return !(mbi.Protect & (PAGE_GUARD | PAGE_NOACCESS)) && (mbi.Protect & (PAGE_READONLY | PAGE_READWRITE | PAGE_WRITECOPY | PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_WRITECOPY)); 61 | 62 | return false; 63 | } 64 | 65 | float roblox::structs::humanoid_t::get_health() 66 | { 67 | using health_get_function = float(__thiscall*)(roblox::structs::humanoid_t*); 68 | 69 | const auto health_property = *reinterpret_cast(roblox::offsets::humanoid::properties::health); 70 | 71 | return static_cast(health_property->get_function)(this); 72 | } 73 | 74 | float roblox::structs::humanoid_t::get_max_health() 75 | { 76 | using maxhealth_get_function = float(__thiscall*)(roblox::structs::humanoid_t*); 77 | 78 | const auto health_property = *reinterpret_cast(roblox::offsets::humanoid::properties::max_health); 79 | 80 | return static_cast(health_property->get_function)(this); 81 | } 82 | 83 | bool roblox::structs::player_t::aim_at(bool is_mouse, float smooth_amount, bool head) const //ADD BACK TEAMCHEKC 84 | { 85 | const auto parts = roblox::games::game->get_part(this); 86 | 87 | if (parts.has_value()) 88 | { 89 | const auto& [head_part, torso] = parts.value(); 90 | 91 | const auto head_root_part_pv = roblox::functions::pv::get_pv_from_part_instance(head ? head_part : torso); 92 | 93 | if (!head_root_part_pv || !roblox::functions::is_valid_ptr(head_root_part_pv)) 94 | return true; 95 | 96 | const auto head_position = math::functions::world_to_screen(head_root_part_pv->translation); 97 | 98 | if (!head_position.has_value()) 99 | return true; 100 | 101 | const auto& head_screen_position = head_position.value(); 102 | 103 | if (!torso) 104 | return true; 105 | 106 | if (std::get(menu::config::config_map["enable_wall_check"])) 107 | if (roblox::games::game->is_behind_wall(this, parts.value())) 108 | return true; 109 | 110 | if (std::get(menu::config::config_map["enable_team_check"])) 111 | if (roblox::games::game->is_same_team(this)) 112 | return true; 113 | 114 | if (std::get(menu::config::config_map["max_distance_aim_enabled"])) 115 | if (roblox::games::game->check_distance(parts.value())) 116 | return true; 117 | 118 | if (std::get(menu::config::config_map["enable_aim_health_check"])) 119 | { 120 | const auto health_optional = roblox::games::game->get_health(this); 121 | 122 | if (health_optional.has_value()) 123 | { 124 | const auto health = health_optional.value(); 125 | 126 | if (health <= 0) 127 | return true; 128 | } 129 | } 130 | 131 | POINT p; 132 | 133 | if (!is_mouse) 134 | { 135 | const auto workspace = roblox::globals::data_model->find_first_class("Workspace"); 136 | 137 | const auto camera = workspace->current_camera; 138 | 139 | auto current = camera->cframe; 140 | auto pos = camera->cframe; 141 | 142 | roblox::functions::cframe::look_at_helper(&pos, head_root_part_pv->translation); 143 | 144 | math::types::cframe_t ret; 145 | 146 | const auto smoothing = std::get< bool >(menu::config::config_map["enable_smoothing"]) ? 1.0f - (static_cast(std::get< int >(menu::config::config_map["smoothing_amount"])) / 100.0f) : 1.0f; 147 | 148 | roblox::functions::cframe::lerp_helper(¤t, &camera->cframe, pos, smoothing); 149 | 150 | return false; 151 | } 152 | else 153 | { 154 | if (renderer::is_roblox_on_top() && GetCursorPos(&p) && !ui::Static::render_interface) 155 | { 156 | if (ScreenToClient(renderer::values::roblox_window, &p)) 157 | { 158 | // Fix for dpi scaling 159 | p.x /= renderer::values::dpi_scale; 160 | p.y /= renderer::values::dpi_scale; 161 | 162 | const math::types::vector2_t mouse_loc{ static_cast(p.x), static_cast(p.y) }; 163 | 164 | const auto distance = mouse_loc.distance(head_screen_position); 165 | 166 | if (std::get< bool >(menu::config::config_map["enable_fov_check"])) 167 | if (std::get(menu::config::config_map["fov_amount"]) * 50.f < distance) 168 | return true; 169 | 170 | INPUT i{}; 171 | i.type = INPUT_MOUSE; 172 | i.mi.dwFlags = MOUSEEVENTF_MOVE; 173 | 174 | i.mi.dx = (head_screen_position.x - p.x); 175 | i.mi.dy = (head_screen_position.y - p.y); 176 | 177 | const auto smooth = [&](float amt) 178 | { 179 | amt = amt >= 3.f ? amt : 3.f; 180 | 181 | const auto old = amt; 182 | 183 | auto x = i.mi.dx; if (x < 0) { x = ~x; } 184 | 185 | auto y = i.mi.dy; if (y < 0) { y = ~y; } 186 | 187 | while (x <= amt && x != 0 && amt > 10) 188 | amt /= 2; 189 | 190 | i.mi.dx /= amt; 191 | 192 | amt = old; 193 | 194 | while (y <= amt && y != 0 && amt > 10) 195 | amt /= 2; 196 | 197 | i.mi.dy /= amt; 198 | }; 199 | 200 | smooth(std::get< bool >(menu::config::config_map["enable_smoothing"]) ? smooth_amount : 5.f); 201 | 202 | SendInput(1, &i, sizeof(INPUT)); 203 | 204 | return false; 205 | } 206 | } 207 | } 208 | } 209 | 210 | return true; 211 | 212 | } 213 | 214 | double roblox::functions::time::get_current_idle_time() 215 | { 216 | if (!roblox::games::game->get_local_player()) 217 | return 0.0; 218 | 219 | return get_current_time() - roblox::games::game->get_local_player()->idle_time; 220 | } 221 | 222 | double roblox::functions::time::get_biggest_idle_time() 223 | { 224 | if (!roblox::games::game->get_local_player()) 225 | return max_idle_time; 226 | 227 | const auto current_time = get_current_time(); 228 | const auto idle_time = roblox::games::game->get_local_player()->idle_time; 229 | 230 | if (current_time - idle_time > max_idle_time) 231 | max_idle_time = current_time - idle_time; 232 | 233 | return max_idle_time; 234 | } 235 | 236 | bool roblox::structs::part_instance_t::is_instance_part_instance() 237 | { 238 | if (!this || this->class_descriptor->id != 0x75 && this->class_descriptor->id != 0x6A) 239 | return false; 240 | 241 | return true; 242 | } -------------------------------------------------------------------------------- /RW/task_scheduler/task_scheduler.cpp: -------------------------------------------------------------------------------- 1 | #include "task_scheduler.hpp" 2 | #include "../features/aimbot/aimbot.hpp" 3 | 4 | #include 5 | #include 6 | #include "../features/misc/misc.hpp" 7 | 8 | using job_callback_t = std::uint32_t(__thiscall*)(std::uintptr_t job, std::uintptr_t stats); 9 | job_callback_t waiting_script_job_original; 10 | 11 | using job_callback_destroy_t = std::uint32_t(__thiscall*)(std::uintptr_t job, std::uintptr_t arg); 12 | job_callback_destroy_t waiting_script_job_destroy_original; 13 | 14 | std::uint32_t state = 2; 15 | 16 | int __fastcall stealth_thread(const std::uintptr_t job, std::uintptr_t, const std::uintptr_t arg) 17 | { 18 | if (state == 1 && task_scheduler::init()) 19 | state = 2; 20 | 21 | return 1; 22 | } 23 | 24 | std::uint32_t __fastcall waiting_script_job_destroy_hook(const std::uintptr_t job, std::uintptr_t, const std::uintptr_t arg) 25 | { 26 | std::printf("[TH] Teleport\n"); 27 | 28 | roblox::globals::players = 0; 29 | 30 | roblox::globals::mouse_service = 0; 31 | 32 | const auto ret = waiting_script_job_destroy_original(job, arg); 33 | 34 | state = 1; 35 | 36 | return ret; 37 | } 38 | 39 | void append_job() 40 | { 41 | std::uintptr_t* space = new std::uintptr_t[0x160]; 42 | 43 | roblox::functions::task_scheduler::data_model_job(space, "Ro-Ware Teleport Handler", 1, 0, 5, 0, 0); 44 | 45 | auto virtual_function_table = new void* [6]; 46 | 47 | std::memcpy(virtual_function_table, reinterpret_cast(space[0]), 6 * sizeof(void*)); 48 | 49 | space[0] = reinterpret_cast(virtual_function_table); 50 | 51 | virtual_function_table[2] = stealth_thread; 52 | 53 | roblox::functions::task_scheduler::add_job(space, 0); 54 | } 55 | 56 | int to_lock = -1; 57 | 58 | std::uint32_t __fastcall waiting_script_job_hook(const std::uintptr_t job, std::uintptr_t, const std::uintptr_t stats) 59 | { 60 | static std::once_flag rbx_init; 61 | 62 | std::call_once(rbx_init, append_job); 63 | 64 | if (state == 2 && roblox::init(job)) 65 | state = 0; 66 | 67 | modules::aimbot::callback(); 68 | features::misc::callback(); 69 | 70 | //if (ui::Static::render_interface && roblox::globals::mouse_service) 71 | //{ 72 | // if (to_lock == -1) 73 | // to_lock = *reinterpret_cast(roblox::globals::mouse_service->self + 0xCC); 74 | 75 | // *reinterpret_cast(roblox::globals::mouse_service->self + 0xCC) = 0; 76 | //} 77 | 78 | //if (to_lock != -1 && roblox::globals::mouse_service && !ui::Static::render_interface) 79 | //{ 80 | // *reinterpret_cast(roblox::globals::mouse_service->self + 0xCC) = to_lock; 81 | 82 | // to_lock = -1; 83 | //} 84 | 85 | return waiting_script_job_original(job, stats); 86 | } 87 | 88 | std::uint32_t find_cap_offset(std::uintptr_t task_scheduler) 89 | { 90 | for (auto i = 0u; i < 0x1000; i += 0x4) 91 | { 92 | const auto offset = *reinterpret_cast(task_scheduler + i); 93 | 94 | if (1.0 / offset == 60.0) 95 | return i; 96 | } 97 | 98 | return 0; 99 | } 100 | 101 | bool task_scheduler::init() 102 | { 103 | std::uintptr_t waiting_script_job = roblox::functions::task_scheduler::get_job("WaitingHybridScriptsJob", false); // roblox::offsets::fflags::is_in_beta() 104 | 105 | std::printf("[TS] Job: %X\n", waiting_script_job); 106 | 107 | if (!waiting_script_job) 108 | return false; 109 | 110 | constexpr std::uint8_t virtual_function_table_size = 7, waiting_script_job_hook_index = 5, waiting_script_job_destroy_hook_index = 0; 111 | 112 | auto virtual_function_table = new void* [virtual_function_table_size]; 113 | 114 | std::memcpy(virtual_function_table, *reinterpret_cast(waiting_script_job), virtual_function_table_size * sizeof(void*)); 115 | 116 | waiting_script_job_original = reinterpret_cast(virtual_function_table[waiting_script_job_hook_index]); 117 | waiting_script_job_destroy_original = reinterpret_cast(virtual_function_table[waiting_script_job_destroy_hook_index]); 118 | 119 | virtual_function_table[waiting_script_job_hook_index] = waiting_script_job_hook; 120 | virtual_function_table[waiting_script_job_destroy_hook_index] = waiting_script_job_destroy_hook; 121 | 122 | *reinterpret_cast(waiting_script_job) = reinterpret_cast(virtual_function_table); 123 | 124 | std::printf("[TS] Hooked\n"); 125 | 126 | return true; 127 | } 128 | 129 | std::uint32_t cap_offset = 0; 130 | 131 | void task_scheduler::set_fps_cap(double fps) 132 | { 133 | const auto task_scheduler = roblox::functions::task_scheduler::get_task_scheduler(); 134 | 135 | if (!cap_offset) 136 | cap_offset = find_cap_offset(task_scheduler); 137 | 138 | *reinterpret_cast(task_scheduler + cap_offset) = 1.0 / fps; 139 | } -------------------------------------------------------------------------------- /RW/task_scheduler/task_scheduler.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | 6 | #include "../roblox/roblox.hpp" 7 | 8 | namespace task_scheduler 9 | { 10 | bool init(); 11 | 12 | void set_fps_cap(double fps); 13 | } -------------------------------------------------------------------------------- /RWB/RWB.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.32002.261 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RWB", "RWB\RWB.vcxproj", "{7339B3D9-809D-4710-9523-F440DD55F1A1}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {7339B3D9-809D-4710-9523-F440DD55F1A1}.Debug|x64.ActiveCfg = Debug|x64 17 | {7339B3D9-809D-4710-9523-F440DD55F1A1}.Debug|x64.Build.0 = Debug|x64 18 | {7339B3D9-809D-4710-9523-F440DD55F1A1}.Debug|x86.ActiveCfg = Debug|Win32 19 | {7339B3D9-809D-4710-9523-F440DD55F1A1}.Debug|x86.Build.0 = Debug|Win32 20 | {7339B3D9-809D-4710-9523-F440DD55F1A1}.Release|x64.ActiveCfg = Release|x64 21 | {7339B3D9-809D-4710-9523-F440DD55F1A1}.Release|x64.Build.0 = Release|x64 22 | {7339B3D9-809D-4710-9523-F440DD55F1A1}.Release|x86.ActiveCfg = Release|Win32 23 | {7339B3D9-809D-4710-9523-F440DD55F1A1}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {E8D2B334-20CA-49A5-B1FF-7FD7381B8CA4} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /RWB/RWB/RWB.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 16.0 23 | Win32Proj 24 | {7339b3d9-809d-4710-9523-f440dd55f1a1} 25 | RWB 26 | 10.0 27 | 28 | 29 | 30 | DynamicLibrary 31 | true 32 | v143 33 | Unicode 34 | 35 | 36 | DynamicLibrary 37 | false 38 | v142 39 | true 40 | Unicode 41 | 42 | 43 | DynamicLibrary 44 | true 45 | v143 46 | Unicode 47 | 48 | 49 | DynamicLibrary 50 | false 51 | v143 52 | true 53 | Unicode 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | true 75 | 76 | 77 | false 78 | $(SolutionDir)$(Configuration)\Bin 79 | RoWareHelper 80 | 81 | 82 | true 83 | 84 | 85 | false 86 | 87 | 88 | 89 | Level3 90 | true 91 | WIN32;_DEBUG;RWB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 92 | true 93 | NotUsing 94 | pch.h 95 | stdcpp20 96 | 97 | 98 | Windows 99 | true 100 | false 101 | true 102 | 103 | 104 | 105 | 106 | Level3 107 | true 108 | true 109 | true 110 | WIN32;NDEBUG;RWB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 111 | true 112 | NotUsing 113 | pch.h 114 | stdcpp20 115 | 116 | 117 | Windows 118 | true 119 | true 120 | true 121 | false 122 | true 123 | 124 | 125 | 126 | 127 | Level3 128 | true 129 | _DEBUG;RWB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 130 | true 131 | NotUsing 132 | pch.h 133 | stdcpp20 134 | 135 | 136 | Windows 137 | true 138 | false 139 | true 140 | 141 | 142 | 143 | 144 | Level3 145 | true 146 | true 147 | true 148 | NDEBUG;RWB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 149 | true 150 | NotUsing 151 | pch.h 152 | stdcpp20 153 | 154 | 155 | Windows 156 | true 157 | true 158 | true 159 | false 160 | true 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | -------------------------------------------------------------------------------- /RWB/RWB/RWB.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | 23 | 24 | Header Files 25 | 26 | 27 | 28 | 29 | Resource Files 30 | 31 | 32 | -------------------------------------------------------------------------------- /RWB/RWB/Resource.rc: -------------------------------------------------------------------------------- 1 | 1 VERSIONINFO 2 | FILEVERSION 1, 0, 0, 1 3 | PRODUCTVERSION 1, 0, 0 4 | 5 | BEGIN 6 | BLOCK "StringFileInfo" 7 | BEGIN 8 | BLOCK "040904b0" 9 | BEGIN 10 | VALUE "CompanyName", "ScriptWare Software LTD" 11 | VALUE "FileDescription", "Ro-Ware Helper" 12 | VALUE "FileVersion", "1.0.0.1" 13 | VALUE "InternalName", "ScriptWare" 14 | VALUE "LegalCopyright", "Copyright (C) 2022 ScriptWare Software LTD. All rights reserved." 15 | VALUE "LegalTrademarks", "ScriptWare Software LTD" 16 | VALUE "ProductName", "Ro-Ware" 17 | VALUE "ProductVersion", "1.0.0" 18 | END 19 | END 20 | BLOCK "VarFileInfo" 21 | BEGIN 22 | VALUE "Translation", 0x409, 1200 23 | END 24 | END -------------------------------------------------------------------------------- /RWB/RWB/dllmain.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define BYPASS_DEBUG 0 5 | 6 | void open_console() 7 | { 8 | const auto lib = LoadLibraryA("KERNEL32.dll"); 9 | 10 | if (!lib) 11 | return; 12 | 13 | const auto free_console = reinterpret_cast(GetProcAddress(lib, "FreeConsole")); 14 | 15 | if (free_console) 16 | { 17 | static std::uintptr_t jmp = free_console + 0x6; 18 | 19 | DWORD old{}; 20 | 21 | VirtualProtect(reinterpret_cast(free_console), 0x6, PAGE_EXECUTE_READWRITE, &old); 22 | 23 | *reinterpret_cast(free_console + 0x2) = &jmp; 24 | *reinterpret_cast(free_console + 0x6) = 0xC3; 25 | 26 | VirtualProtect(reinterpret_cast(free_console), 0x6, old, &old); 27 | } 28 | 29 | AllocConsole(); 30 | 31 | FILE* file_stream; 32 | 33 | freopen_s(&file_stream, "CONIN$", "r", stdin); 34 | freopen_s(&file_stream, "CONOUT$", "w", stdout); 35 | freopen_s(&file_stream, "CONOUT$", "w", stderr); 36 | 37 | fclose(file_stream); 38 | 39 | SetConsoleTitleA("Ro-Ware-Hook"); 40 | } 41 | 42 | std::vector get_wow64_clones() 43 | { 44 | std::vector allocations; 45 | 46 | std::uintptr_t addr = 0; 47 | 48 | MEMORY_BASIC_INFORMATION mbi; 49 | 50 | while (VirtualQuery(reinterpret_cast(addr), &mbi, sizeof(mbi))) 51 | { 52 | if (mbi.State == MEM_COMMIT && mbi.Protect == PAGE_EXECUTE_READ && mbi.RegionSize == 0x1000) 53 | { 54 | const auto data = reinterpret_cast(mbi.BaseAddress); 55 | 56 | if (data[0] == 0xFF && data[1] == 0x25 && data[10] == 0xEA) 57 | for (auto i = 0; i < 0x50; ++i) 58 | if ((data + i)[0] == 0x00 && (data + i)[3] == 0x23) 59 | allocations.push_back(reinterpret_cast(mbi.BaseAddress) + i + 2); 60 | } 61 | 62 | addr += mbi.RegionSize; 63 | } 64 | 65 | return allocations; 66 | } 67 | 68 | std::uintptr_t tramp_hook(std::uintptr_t func, std::uintptr_t new_func, std::size_t inst_size) 69 | { 70 | constexpr auto extra_size = 5; 71 | 72 | auto clone = reinterpret_cast(VirtualAlloc(nullptr, inst_size + extra_size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE)); 73 | 74 | if (!clone) 75 | return 0; 76 | 77 | std::memmove(reinterpret_cast(clone), reinterpret_cast(func), inst_size); 78 | 79 | *reinterpret_cast(clone + inst_size) = 0xE9; 80 | *reinterpret_cast(clone + inst_size + 1) = (func - clone - extra_size); 81 | 82 | DWORD old_protect{ 0 }; 83 | 84 | VirtualProtect(reinterpret_cast(func), inst_size, PAGE_EXECUTE_READWRITE, &old_protect); 85 | 86 | std::memset(reinterpret_cast(func), 0x90, inst_size); 87 | 88 | *reinterpret_cast(func) = 0xE9; 89 | *reinterpret_cast(func + 1) = (new_func - func - extra_size); 90 | 91 | VirtualProtect(reinterpret_cast(func), inst_size, old_protect, &old_protect); 92 | 93 | return clone; 94 | } 95 | 96 | const auto query_vir_mem_address = reinterpret_cast(GetProcAddress(LoadLibraryA("ntdll.dll"), "NtQueryVirtualMemory")); 97 | 98 | using nt_query_virtual_memory_t = NTSTATUS(__stdcall*)(HANDLE process_handle, std::uintptr_t base_address, std::uint32_t mem_info_class, MEMORY_BASIC_INFORMATION* mem_info, std::size_t memory_info_length, std::size_t* return_len); 99 | auto nt_query_virtual_memory = reinterpret_cast(query_vir_mem_address); 100 | 101 | std::uintptr_t base_of_dll = 0; 102 | std::size_t size_of_dll = 0; 103 | 104 | struct rbx_data 105 | { 106 | std::uintptr_t base; 107 | std::size_t size; 108 | }; 109 | 110 | _declspec(dllexport) void __stdcall gamer(std::uintptr_t data) 111 | { 112 | const auto infos = reinterpret_cast(data); 113 | 114 | base_of_dll = infos->base; 115 | size_of_dll = infos->size; 116 | } 117 | 118 | NTSTATUS __stdcall nt_query_virtual_memory_hook(HANDLE process_handle, std::uintptr_t base_address, std::uint32_t mem_info_class, MEMORY_BASIC_INFORMATION* mem_info, std::size_t memory_info_length, std::size_t* return_len) 119 | { 120 | const auto ret = nt_query_virtual_memory(process_handle, base_address, mem_info_class, mem_info, memory_info_length, return_len); 121 | 122 | if (!base_of_dll || !mem_info || !base_address) 123 | return ret; 124 | 125 | if (reinterpret_cast(mem_info->BaseAddress) == base_of_dll) 126 | { 127 | #if BYPASS_DEBUG 128 | std::printf("Allocation Skipped\n"); 129 | #endif 130 | 131 | mem_info->AllocationProtect = 0; 132 | mem_info->Protect = PAGE_NOACCESS; 133 | mem_info->State = MEM_FREE; 134 | mem_info->Type = 0; 135 | mem_info->RegionSize = size_of_dll; 136 | } 137 | 138 | return ret; 139 | } 140 | 141 | void d_main() 142 | { 143 | #if BYPASS_DEBUG 144 | open_console(); 145 | #endif 146 | 147 | auto allocs = get_wow64_clones(); 148 | 149 | while (true) 150 | { 151 | allocs = get_wow64_clones(); 152 | 153 | if (allocs.size() != 2) 154 | std::this_thread::sleep_for(std::chrono::seconds(1)); 155 | else 156 | break; 157 | } 158 | 159 | for (const auto alloc : allocs) 160 | { 161 | DWORD old_protect{ 0 }; 162 | 163 | VirtualProtect(reinterpret_cast(alloc), 5, PAGE_EXECUTE_READWRITE, &old_protect); 164 | 165 | *reinterpret_cast(alloc) = 0xE9; 166 | *reinterpret_cast(alloc + 1) = (query_vir_mem_address - alloc - 5); 167 | 168 | VirtualProtect(reinterpret_cast(alloc), 5, old_protect, &old_protect); 169 | 170 | #if BYPASS_DEBUG 171 | std::printf("Patched Clone: %x\n", alloc); 172 | #endif 173 | } 174 | 175 | nt_query_virtual_memory = reinterpret_cast(tramp_hook(query_vir_mem_address, reinterpret_cast(nt_query_virtual_memory_hook), 5)); 176 | } 177 | 178 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 179 | { 180 | if (ul_reason_for_call == DLL_PROCESS_ATTACH) 181 | std::thread{ d_main }.detach(); 182 | 183 | return TRUE; 184 | } -------------------------------------------------------------------------------- /RWB/RWB/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Resource.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /RWI/RWI/RWI.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "memory/memory.hpp" 4 | #include "mmap/manual_map.hpp" 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | HANDLE get_process_handle(const wchar_t* process_name, bool check_text = false) 11 | { 12 | HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); 13 | HANDLE process = nullptr; 14 | 15 | PROCESSENTRY32W process_entry; 16 | 17 | process_entry.dwSize = sizeof(process_entry); 18 | 19 | if (Process32FirstW(snapshot, &process_entry)) 20 | { 21 | do 22 | { 23 | if (std::wcscmp(process_entry.szExeFile, process_name) == 0) 24 | { 25 | HANDLE new_handle = OpenProcess(PROCESS_ALL_ACCESS, false, process_entry.th32ProcessID); 26 | 27 | auto mem = erw(new_handle); 28 | 29 | const auto text = mem.get_section_by_name("RobloxPlayerBeta.exe", ".text"); 30 | 31 | if ((check_text && text.size != 0) || (!check_text && text.size == 0)) 32 | { 33 | process = OpenProcess(PROCESS_ALL_ACCESS, false, process_entry.th32ProcessID); 34 | 35 | break; 36 | } 37 | } 38 | 39 | } while (Process32NextW(snapshot, &process_entry)); 40 | } 41 | 42 | CloseHandle(snapshot); 43 | 44 | return process; 45 | } 46 | 47 | struct rbx_data 48 | { 49 | std::uintptr_t base; 50 | std::size_t size; 51 | }; 52 | 53 | struct MemoryStruct 54 | { 55 | char* memory; 56 | size_t size; 57 | }; 58 | 59 | static size_t write_memory_callback(void* contents, size_t size, size_t nmemb, void* userp) 60 | { 61 | size_t realsize = size * nmemb; 62 | struct MemoryStruct* mem = (struct MemoryStruct*)userp; 63 | 64 | char* ptr = (char*)realloc(mem->memory, mem->size + realsize + 1); 65 | if (ptr == NULL) 66 | { 67 | printf("not enough memory (realloc returned NULL)\n"); 68 | 69 | return 0; 70 | } 71 | 72 | mem->memory = ptr; 73 | memcpy(&(mem->memory[mem->size]), contents, realsize); 74 | 75 | mem->size += realsize; 76 | mem->memory[mem->size] = 0; 77 | 78 | return realsize; 79 | } 80 | 81 | const char* send_get_request(const char* url) 82 | { 83 | static bool init = false; 84 | 85 | if (!init) 86 | { 87 | curl_global_init(CURL_GLOBAL_ALL); 88 | 89 | init = true; 90 | } 91 | 92 | CURL* curl_handle; 93 | CURLcode res; 94 | 95 | struct MemoryStruct chunk; 96 | 97 | chunk.memory = (char*)malloc(1); 98 | chunk.size = 0; 99 | 100 | curl_handle = curl_easy_init(); 101 | 102 | curl_easy_setopt(curl_handle, CURLOPT_URL, url); 103 | curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1L); 104 | curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, write_memory_callback); 105 | curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, reinterpret_cast(&chunk)); 106 | curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "libcurl-agent/1.0"); 107 | 108 | res = curl_easy_perform(curl_handle); 109 | 110 | curl_easy_cleanup(curl_handle); 111 | 112 | return chunk.memory; 113 | } 114 | 115 | extern "C" 116 | { 117 | __declspec(dllexport) int __stdcall GetPid() 118 | { 119 | auto handle = get_process_handle(L"RobloxPlayerBeta.exe", true); 120 | 121 | if (!handle || handle == INVALID_HANDLE_VALUE) 122 | return 0; 123 | 124 | const auto pid = GetProcessId(handle); 125 | 126 | CloseHandle(handle); 127 | 128 | return pid; 129 | } 130 | 131 | __declspec(dllexport) int __stdcall InjectRoWare() 132 | { 133 | std::uintptr_t base{}; 134 | std::size_t size{}; 135 | 136 | if (!std::filesystem::exists(".\\bin\\RoWareCore.dll") || !std::filesystem::exists(".\\bin\\RoWareHelper.dll")) 137 | return 1; 138 | 139 | const auto res = send_get_request("https://script-ware.com/api/roware/info"); 140 | 141 | if (!res) 142 | return 1; 143 | 144 | const auto text_size_server = std::atoi(res); 145 | 146 | { 147 | std::uint32_t attempts = 0; 148 | 149 | auto handle = get_process_handle(L"RobloxPlayerBeta.exe", true); 150 | 151 | while (!handle) 152 | { 153 | std::this_thread::sleep_for(std::chrono::milliseconds(100)); 154 | 155 | handle = get_process_handle(L"RobloxPlayerBeta.exe", true); 156 | 157 | ++attempts; 158 | 159 | if (attempts > 30) 160 | return 1; 161 | } 162 | 163 | if (!handle || handle == INVALID_HANDLE_VALUE) 164 | return 3; 165 | 166 | auto mem = erw(handle); 167 | 168 | auto base_address = mem.get_process_module("RobloxPlayerBeta.exe"); 169 | 170 | const auto dos_header = mem.read_memory(base_address); 171 | 172 | const auto nt_headers = mem.read_memory(base_address + dos_header.e_lfanew); 173 | 174 | auto text_section = mem.read_memory(base_address + dos_header.e_lfanew + sizeof(IMAGE_NT_HEADERS)); 175 | 176 | const auto text_size = text_section.Misc.VirtualSize; 177 | 178 | if (text_size_server != text_size) 179 | return 2; 180 | 181 | const auto inj_status = manual_map::map_dll(mem, ".\\bin\\RoWareCore.dll", "RobloxPlayerBeta.exe", 0, base, size); 182 | 183 | //if (!inj_status) 184 | //return 1; 185 | } 186 | 187 | /*{ 188 | std::uint32_t attempts = 0; 189 | 190 | auto handle = get_process_handle(L"RobloxPlayerBeta.exe", false); 191 | 192 | while (!handle) 193 | { 194 | std::this_thread::sleep_for(std::chrono::milliseconds(100)); 195 | 196 | handle = get_process_handle(L"RobloxPlayerBeta.exe", false); 197 | 198 | ++attempts; 199 | 200 | if (attempts > 30) 201 | return 1; 202 | } 203 | 204 | if (!handle || handle == INVALID_HANDLE_VALUE) 205 | return 3; 206 | 207 | auto mem = erw(handle); 208 | 209 | mem.load_dll("bin\\RoWareHelper.dll"); 210 | 211 | const auto gamer = mem.get_export("RoWareHelper.dll", "?gamer@@YGXI@Z"); 212 | 213 | rbx_data data; 214 | 215 | data.base = base; 216 | data.size = size; 217 | 218 | mem.call_function(gamer, { mem.allocate_object(data) }); 219 | }*/ 220 | 221 | return 0; 222 | } 223 | } 224 | 225 | // 226 | //BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 227 | //{ 228 | // return TRUE; 229 | //} -------------------------------------------------------------------------------- /RWI/RWI/RWI.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 16.0 23 | Win32Proj 24 | {e4a70a7b-58e1-4520-9b03-d0aa49b18022} 25 | RWI 26 | 10.0 27 | 28 | 29 | 30 | Application 31 | true 32 | v143 33 | Unicode 34 | 35 | 36 | DynamicLibrary 37 | false 38 | v142 39 | true 40 | Unicode 41 | 42 | 43 | Application 44 | true 45 | v143 46 | Unicode 47 | 48 | 49 | Application 50 | false 51 | v143 52 | true 53 | Unicode 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | true 75 | 76 | 77 | false 78 | $(SolutionDir)$(Configuration)\Bin 79 | RoWareInit 80 | $(ProjectDir)dependencies\curl\;$(LibraryPath) 81 | 82 | 83 | true 84 | 85 | 86 | false 87 | 88 | 89 | 90 | Level3 91 | true 92 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 93 | true 94 | stdcpp20 95 | 96 | 97 | Console 98 | true 99 | true 100 | 101 | 102 | 103 | 104 | Level3 105 | true 106 | true 107 | true 108 | WIN32;NDEBUG;_CONSOLE;CURL_STATICLIB;%(PreprocessorDefinitions) 109 | true 110 | stdcpplatest 111 | $(ProjectDir)dependencies/curl/include;$(ProjectDir)dependencies/;%(AdditionalIncludeDirectories) 112 | 113 | 114 | Console 115 | true 116 | true 117 | true 118 | true 119 | libcurl_a.lib;Shlwapi.lib;Normaliz.lib;Ws2_32.lib;Crypt32.lib;Wldap32.lib;Winmm.lib;Comctl32.lib;comsupp.lib;%(AdditionalDependencies) 120 | 121 | 122 | 123 | 124 | Level3 125 | true 126 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 127 | true 128 | stdcpp20 129 | 130 | 131 | Console 132 | true 133 | true 134 | 135 | 136 | 137 | 138 | Level3 139 | true 140 | true 141 | true 142 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 143 | true 144 | stdcpp20 145 | 146 | 147 | Console 148 | true 149 | true 150 | true 151 | true 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | -------------------------------------------------------------------------------- /RWI/RWI/Resource.rc: -------------------------------------------------------------------------------- 1 | 1 VERSIONINFO 2 | FILEVERSION 1, 0, 0, 7 3 | PRODUCTVERSION 1, 0, 0 4 | 5 | BEGIN 6 | BLOCK "StringFileInfo" 7 | BEGIN 8 | BLOCK "040904b0" 9 | BEGIN 10 | VALUE "CompanyName", "ScriptWare Software LTD" 11 | VALUE "FileDescription", "Ro-Ware Init" 12 | VALUE "FileVersion", "1.0.0.7" 13 | VALUE "InternalName", "ScriptWare" 14 | VALUE "LegalCopyright", "Copyright (C) 2022 ScriptWare Software LTD. All rights reserved." 15 | VALUE "LegalTrademarks", "ScriptWare Software LTD" 16 | VALUE "ProductName", "Ro-Ware" 17 | VALUE "ProductVersion", "1.0.0" 18 | END 19 | END 20 | BLOCK "VarFileInfo" 21 | BEGIN 22 | VALUE "Translation", 0x409, 1200 23 | END 24 | END -------------------------------------------------------------------------------- /RWI/RWI/dependencies/curl/curlver.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_CURLVER_H 2 | #define CURLINC_CURLVER_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | /* This header file contains nothing but libcurl version info, generated by 26 | a script at release-time. This was made its own header file in 7.11.2 */ 27 | 28 | /* This is the global package copyright */ 29 | #define LIBCURL_COPYRIGHT "1996 - 2020 Daniel Stenberg, ." 30 | 31 | /* This is the version number of the libcurl package from which this header 32 | file origins: */ 33 | #define LIBCURL_VERSION "7.69.1" 34 | 35 | /* The numeric version number is also available "in parts" by using these 36 | defines: */ 37 | #define LIBCURL_VERSION_MAJOR 7 38 | #define LIBCURL_VERSION_MINOR 69 39 | #define LIBCURL_VERSION_PATCH 1 40 | 41 | /* This is the numeric version of the libcurl version number, meant for easier 42 | parsing and comparions by programs. The LIBCURL_VERSION_NUM define will 43 | always follow this syntax: 44 | 45 | 0xXXYYZZ 46 | 47 | Where XX, YY and ZZ are the main version, release and patch numbers in 48 | hexadecimal (using 8 bits each). All three numbers are always represented 49 | using two digits. 1.2 would appear as "0x010200" while version 9.11.7 50 | appears as "0x090b07". 51 | 52 | This 6-digit (24 bits) hexadecimal number does not show pre-release number, 53 | and it is always a greater number in a more recent release. It makes 54 | comparisons with greater than and less than work. 55 | 56 | Note: This define is the full hex number and _does not_ use the 57 | CURL_VERSION_BITS() macro since curl's own configure script greps for it 58 | and needs it to contain the full number. 59 | */ 60 | #define LIBCURL_VERSION_NUM 0x074501 61 | 62 | /* 63 | * This is the date and time when the full source package was created. The 64 | * timestamp is not stored in git, as the timestamp is properly set in the 65 | * tarballs by the maketgz script. 66 | * 67 | * The format of the date follows this template: 68 | * 69 | * "2007-11-23" 70 | */ 71 | #define LIBCURL_TIMESTAMP "2020-03-11" 72 | 73 | #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z)) 74 | #define CURL_AT_LEAST_VERSION(x,y,z) \ 75 | (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z)) 76 | 77 | #endif /* CURLINC_CURLVER_H */ 78 | -------------------------------------------------------------------------------- /RWI/RWI/dependencies/curl/easy.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_EASY_H 2 | #define CURLINC_EASY_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | CURL_EXTERN CURL *curl_easy_init(void); 29 | CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); 30 | CURL_EXTERN CURLcode curl_easy_perform(CURL *curl); 31 | CURL_EXTERN void curl_easy_cleanup(CURL *curl); 32 | 33 | /* 34 | * NAME curl_easy_getinfo() 35 | * 36 | * DESCRIPTION 37 | * 38 | * Request internal information from the curl session with this function. The 39 | * third argument MUST be a pointer to a long, a pointer to a char * or a 40 | * pointer to a double (as the documentation describes elsewhere). The data 41 | * pointed to will be filled in accordingly and can be relied upon only if the 42 | * function returns CURLE_OK. This function is intended to get used *AFTER* a 43 | * performed transfer, all results from this function are undefined until the 44 | * transfer is completed. 45 | */ 46 | CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); 47 | 48 | 49 | /* 50 | * NAME curl_easy_duphandle() 51 | * 52 | * DESCRIPTION 53 | * 54 | * Creates a new curl session handle with the same options set for the handle 55 | * passed in. Duplicating a handle could only be a matter of cloning data and 56 | * options, internal state info and things like persistent connections cannot 57 | * be transferred. It is useful in multithreaded applications when you can run 58 | * curl_easy_duphandle() for each new thread to avoid a series of identical 59 | * curl_easy_setopt() invokes in every thread. 60 | */ 61 | CURL_EXTERN CURL *curl_easy_duphandle(CURL *curl); 62 | 63 | /* 64 | * NAME curl_easy_reset() 65 | * 66 | * DESCRIPTION 67 | * 68 | * Re-initializes a CURL handle to the default values. This puts back the 69 | * handle to the same state as it was in when it was just created. 70 | * 71 | * It does keep: live connections, the Session ID cache, the DNS cache and the 72 | * cookies. 73 | */ 74 | CURL_EXTERN void curl_easy_reset(CURL *curl); 75 | 76 | /* 77 | * NAME curl_easy_recv() 78 | * 79 | * DESCRIPTION 80 | * 81 | * Receives data from the connected socket. Use after successful 82 | * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. 83 | */ 84 | CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, 85 | size_t *n); 86 | 87 | /* 88 | * NAME curl_easy_send() 89 | * 90 | * DESCRIPTION 91 | * 92 | * Sends data over the connected socket. Use after successful 93 | * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. 94 | */ 95 | CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, 96 | size_t buflen, size_t *n); 97 | 98 | 99 | /* 100 | * NAME curl_easy_upkeep() 101 | * 102 | * DESCRIPTION 103 | * 104 | * Performs connection upkeep for the given session handle. 105 | */ 106 | CURL_EXTERN CURLcode curl_easy_upkeep(CURL *curl); 107 | 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | 112 | #endif 113 | -------------------------------------------------------------------------------- /RWI/RWI/dependencies/curl/libcurl_a.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RiisDev/RoWare/358437940ad8530d9946fb32f907533ea306b73f/RWI/RWI/dependencies/curl/libcurl_a.lib -------------------------------------------------------------------------------- /RWI/RWI/dependencies/curl/mprintf.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_MPRINTF_H 2 | #define CURLINC_MPRINTF_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include 26 | #include /* needed for FILE */ 27 | #include "curl.h" /* for CURL_EXTERN */ 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | CURL_EXTERN int curl_mprintf(const char *format, ...); 34 | CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); 35 | CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); 36 | CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, 37 | const char *format, ...); 38 | CURL_EXTERN int curl_mvprintf(const char *format, va_list args); 39 | CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args); 40 | CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args); 41 | CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, 42 | const char *format, va_list args); 43 | CURL_EXTERN char *curl_maprintf(const char *format, ...); 44 | CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif /* CURLINC_MPRINTF_H */ 51 | -------------------------------------------------------------------------------- /RWI/RWI/dependencies/curl/stdcheaders.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_STDCHEADERS_H 2 | #define CURLINC_STDCHEADERS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include 26 | 27 | size_t fread(void *, size_t, size_t, FILE *); 28 | size_t fwrite(const void *, size_t, size_t, FILE *); 29 | 30 | int strcasecmp(const char *, const char *); 31 | int strncasecmp(const char *, const char *, size_t); 32 | 33 | #endif /* CURLINC_STDCHEADERS_H */ 34 | -------------------------------------------------------------------------------- /RWI/RWI/dependencies/curl/urlapi.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_URLAPI_H 2 | #define CURLINC_URLAPI_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 2018 - 2019, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl.h" 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | /* the error codes for the URL API */ 32 | typedef enum { 33 | CURLUE_OK, 34 | CURLUE_BAD_HANDLE, /* 1 */ 35 | CURLUE_BAD_PARTPOINTER, /* 2 */ 36 | CURLUE_MALFORMED_INPUT, /* 3 */ 37 | CURLUE_BAD_PORT_NUMBER, /* 4 */ 38 | CURLUE_UNSUPPORTED_SCHEME, /* 5 */ 39 | CURLUE_URLDECODE, /* 6 */ 40 | CURLUE_OUT_OF_MEMORY, /* 7 */ 41 | CURLUE_USER_NOT_ALLOWED, /* 8 */ 42 | CURLUE_UNKNOWN_PART, /* 9 */ 43 | CURLUE_NO_SCHEME, /* 10 */ 44 | CURLUE_NO_USER, /* 11 */ 45 | CURLUE_NO_PASSWORD, /* 12 */ 46 | CURLUE_NO_OPTIONS, /* 13 */ 47 | CURLUE_NO_HOST, /* 14 */ 48 | CURLUE_NO_PORT, /* 15 */ 49 | CURLUE_NO_QUERY, /* 16 */ 50 | CURLUE_NO_FRAGMENT /* 17 */ 51 | } CURLUcode; 52 | 53 | typedef enum { 54 | CURLUPART_URL, 55 | CURLUPART_SCHEME, 56 | CURLUPART_USER, 57 | CURLUPART_PASSWORD, 58 | CURLUPART_OPTIONS, 59 | CURLUPART_HOST, 60 | CURLUPART_PORT, 61 | CURLUPART_PATH, 62 | CURLUPART_QUERY, 63 | CURLUPART_FRAGMENT, 64 | CURLUPART_ZONEID /* added in 7.65.0 */ 65 | } CURLUPart; 66 | 67 | #define CURLU_DEFAULT_PORT (1<<0) /* return default port number */ 68 | #define CURLU_NO_DEFAULT_PORT (1<<1) /* act as if no port number was set, 69 | if the port number matches the 70 | default for the scheme */ 71 | #define CURLU_DEFAULT_SCHEME (1<<2) /* return default scheme if 72 | missing */ 73 | #define CURLU_NON_SUPPORT_SCHEME (1<<3) /* allow non-supported scheme */ 74 | #define CURLU_PATH_AS_IS (1<<4) /* leave dot sequences */ 75 | #define CURLU_DISALLOW_USER (1<<5) /* no user+password allowed */ 76 | #define CURLU_URLDECODE (1<<6) /* URL decode on get */ 77 | #define CURLU_URLENCODE (1<<7) /* URL encode on set */ 78 | #define CURLU_APPENDQUERY (1<<8) /* append a form style part */ 79 | #define CURLU_GUESS_SCHEME (1<<9) /* legacy curl-style guessing */ 80 | #define CURLU_NO_AUTHORITY (1<<10) /* Allow empty authority when the 81 | scheme is unknown. */ 82 | 83 | typedef struct Curl_URL CURLU; 84 | 85 | /* 86 | * curl_url() creates a new CURLU handle and returns a pointer to it. 87 | * Must be freed with curl_url_cleanup(). 88 | */ 89 | CURL_EXTERN CURLU *curl_url(void); 90 | 91 | /* 92 | * curl_url_cleanup() frees the CURLU handle and related resources used for 93 | * the URL parsing. It will not free strings previously returned with the URL 94 | * API. 95 | */ 96 | CURL_EXTERN void curl_url_cleanup(CURLU *handle); 97 | 98 | /* 99 | * curl_url_dup() duplicates a CURLU handle and returns a new copy. The new 100 | * handle must also be freed with curl_url_cleanup(). 101 | */ 102 | CURL_EXTERN CURLU *curl_url_dup(CURLU *in); 103 | 104 | /* 105 | * curl_url_get() extracts a specific part of the URL from a CURLU 106 | * handle. Returns error code. The returned pointer MUST be freed with 107 | * curl_free() afterwards. 108 | */ 109 | CURL_EXTERN CURLUcode curl_url_get(CURLU *handle, CURLUPart what, 110 | char **part, unsigned int flags); 111 | 112 | /* 113 | * curl_url_set() sets a specific part of the URL in a CURLU handle. Returns 114 | * error code. The passed in string will be copied. Passing a NULL instead of 115 | * a part string, clears that part. 116 | */ 117 | CURL_EXTERN CURLUcode curl_url_set(CURLU *handle, CURLUPart what, 118 | const char *part, unsigned int flags); 119 | 120 | 121 | #ifdef __cplusplus 122 | } /* end of extern "C" */ 123 | #endif 124 | 125 | #endif /* CURLINC_URLAPI_H */ 126 | -------------------------------------------------------------------------------- /RWI/RWI/memory/memory.cpp: -------------------------------------------------------------------------------- 1 | #include "memory.hpp" 2 | 3 | #include 4 | 5 | erw::erw(const char* const process_name) 6 | { 7 | const auto hwnd = FindWindowA(nullptr, process_name); 8 | 9 | GetWindowThreadProcessId(hwnd, &pid); 10 | 11 | process_handle = smart_handle{ OpenProcess(PROCESS_ALL_ACCESS, false, pid) }; 12 | } 13 | 14 | erw::erw(HANDLE handle) 15 | { 16 | pid = GetProcessId(handle); 17 | 18 | process_handle = smart_handle{ handle }; 19 | } 20 | 21 | std::uintptr_t erw::get_process_module(const char* const module_name) const 22 | { 23 | MODULEENTRY32W me32; 24 | 25 | auto snapshot = smart_handle{ CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pid) }; 26 | 27 | me32.dwSize = sizeof(MODULEENTRY32W); 28 | 29 | auto mod_res = Module32FirstW(snapshot.get(), &me32); 30 | 31 | while (mod_res) 32 | { 33 | if (std::equal(module_name, module_name + strlen(module_name), std::wstring(me32.szModule).begin())) 34 | return reinterpret_cast(me32.modBaseAddr); 35 | 36 | mod_res = Module32NextW(snapshot.get(), &me32); 37 | } 38 | 39 | return {}; 40 | } 41 | 42 | section_data erw::get_section_by_name(const char* const module_name, const char* const section_name) 43 | { 44 | const auto mod_base = get_process_module(module_name); 45 | 46 | const auto dos_header = read_memory(mod_base); 47 | const auto nt_headers = read_memory(mod_base + dos_header.e_lfanew); 48 | 49 | auto section = reinterpret_cast((mod_base + dos_header.e_lfanew) + sizeof(IMAGE_NT_HEADERS)); 50 | 51 | for (auto iteration = 0u; iteration < nt_headers.FileHeader.NumberOfSections; ++iteration, ++section) 52 | { 53 | const auto segment_name = section->Name; 54 | 55 | auto buffer = reinterpret_cast(segment_name); 56 | 57 | std::string string_buffer; 58 | 59 | do 60 | string_buffer.push_back(read_memory(buffer++)); 61 | while (read_memory(buffer) != '\0'); 62 | 63 | if (std::strcmp(string_buffer.c_str(), section_name) == 0) 64 | { 65 | const auto section_start = mod_base + read_memory(reinterpret_cast(section) + 0xC); 66 | const auto section_size = read_memory(reinterpret_cast(section) + 0x8); 67 | 68 | return { section_start, section_size }; 69 | } 70 | } 71 | 72 | return {}; 73 | } 74 | 75 | std::uintptr_t erw::get_export(const char* const module_name, const char* const function_name) 76 | { 77 | const auto base_address = get_process_module(module_name); 78 | 79 | const auto dos_header = read_memory(base_address); 80 | 81 | const auto nt_headers = read_memory(base_address + dos_header.e_lfanew); 82 | 83 | const auto export_directory = read_memory(base_address + nt_headers.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress); 84 | 85 | const auto functions = base_address + export_directory.AddressOfFunctions; 86 | const auto names = base_address + export_directory.AddressOfNames; 87 | const auto ordinals = base_address + export_directory.AddressOfNameOrdinals; 88 | 89 | for (auto i = 0u; i < export_directory.NumberOfNames; ++i) 90 | { 91 | auto buffer = reinterpret_cast(reinterpret_cast(base_address) + read_memory(names + i * sizeof(std::uint32_t))); 92 | 93 | std::string string_buffer; 94 | 95 | do 96 | string_buffer.push_back(read_memory(buffer++)); 97 | while (read_memory(buffer) != '\0'); 98 | 99 | if (std::strcmp(string_buffer.c_str(), function_name) == 0) 100 | return base_address + read_memory(functions + read_memory(ordinals + i * sizeof(std::uint16_t)) * sizeof(std::uint32_t)); 101 | } 102 | 103 | return {}; 104 | } 105 | 106 | bool erw::load_dll(const char* const path) 107 | { 108 | auto current_directory = std::filesystem::current_path().string().append("/"); 109 | 110 | for (auto i = 0u; i < current_directory.length(); ++i) 111 | if (current_directory[i] == '/') 112 | current_directory[i] = '\\'; 113 | 114 | const auto str_addr = reinterpret_cast(allocate_string(current_directory.append(path).c_str())); 115 | const auto payload_alloc = reinterpret_cast(VirtualAllocEx(process_handle.get(), 0, 0x100, MEM_COMMIT, PAGE_EXECUTE_READWRITE)); 116 | const auto loadlib_addr = get_export("KERNELBASE.dll", "LoadLibraryA"); 117 | 118 | if (!payload_alloc) 119 | return false; 120 | 121 | #ifdef _M_X64 122 | std::uint8_t payload[] = 123 | { 124 | 0x48, 0x83, 0xEC, 0x28, 0x48, 125 | 0xB9, 0x50, 0x23, 0xC4, 0x29, 126 | 0xF6, 0x7F, 0x00, 0x00, 0xFF, 127 | 0x15, 0x02, 0x00, 0x00, 0x00, 128 | 0xEB, 0x08, 0x30, 0x8C, 0xDF, 129 | 0x24, 0xF8, 0x7F, 0x00, 0x00, 130 | 0x33, 0xC0, 0x48, 0x83, 0xC4, 131 | 0x28, 0xC3 132 | }; 133 | 134 | *reinterpret_cast(payload + 6) = str_addr; 135 | *reinterpret_cast(payload + 22) = loadlib_addr; 136 | #else 137 | std::uint8_t payload[] = 138 | { 139 | 0x55, 0x89, 0xE5, 0x68, 0x00, 140 | 0x00, 0x00, 0x00, 0xE8, 0x00, 141 | 0x00, 0x00, 0x00, 0x5D, 0xC2, 142 | 0x00, 0x00 143 | }; 144 | 145 | *reinterpret_cast(payload + 4) = str_addr; 146 | *reinterpret_cast(payload + 9) = loadlib_addr - (payload_alloc + 8) - 5; 147 | #endif 148 | 149 | WriteProcessMemory(process_handle.get(), reinterpret_cast(payload_alloc), payload, sizeof(payload), 0); 150 | 151 | const auto handle = CreateRemoteThread(process_handle.get(), nullptr, 0, reinterpret_cast(payload_alloc), nullptr, 0, nullptr); 152 | 153 | if (handle != nullptr) 154 | { 155 | DWORD res = WaitForSingleObject(handle, 5000); 156 | 157 | VirtualFreeEx(process_handle.get(), reinterpret_cast(payload_alloc), 0, MEM_RELEASE); 158 | VirtualFreeEx(process_handle.get(), reinterpret_cast(str_addr), 0, MEM_RELEASE); 159 | 160 | return res != 0; 161 | } 162 | 163 | return false; 164 | } 165 | 166 | const char* erw::allocate_string(const char* const str, std::uint32_t size) 167 | { 168 | std::uint32_t str_size; 169 | 170 | if (size == 0) 171 | str_size = strlen(str) + 1; 172 | else 173 | str_size = size; 174 | 175 | void* memory = VirtualAllocEx(process_handle.get(), 0, str_size, MEM_COMMIT, PAGE_EXECUTE_READWRITE); 176 | 177 | if (!memory) 178 | return nullptr; 179 | 180 | WriteProcessMemory(process_handle.get(), memory, str, str_size, nullptr); 181 | 182 | return static_cast(memory); 183 | } 184 | 185 | std::uintptr_t erw::pattern_scan(std::string_view module_name, std::string_view section_name, std::string_view pattern, std::string_view mask) 186 | { 187 | const auto data = get_section_by_name(module_name.data(), section_name.data()); 188 | 189 | auto buffer = std::make_unique(0x1000); 190 | 191 | for (auto at = data.start; at < data.start + data.size; at += sizeof(buffer)) 192 | { 193 | ReadProcessMemory(process_handle.get(), reinterpret_cast(at), buffer.get(), 0x1000, nullptr); 194 | 195 | for (auto b = 0u; b < sizeof(buffer); ++b) 196 | { 197 | const auto is_same = [&]() -> bool 198 | { 199 | for (auto i = 0u; i < mask.length(); ++i) 200 | if (buffer[b + i] != static_cast(pattern[i]) && mask[i] == 'x') 201 | return false; 202 | 203 | return true; 204 | }; 205 | 206 | if (is_same()) 207 | return at + b; 208 | } 209 | } 210 | 211 | return {}; 212 | } 213 | 214 | void* erw::map_function(void* src) 215 | { 216 | const auto size = get_function_size(src); 217 | 218 | auto memory = VirtualAllocEx(process_handle.get(), nullptr, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE); 219 | 220 | if (!memory) 221 | return {}; 222 | 223 | auto buffer = std::make_unique(size); 224 | 225 | for (auto i = 0u; i < size; ++i) 226 | buffer[i] = static_cast(src)[i]; 227 | 228 | WriteProcessMemory(process_handle.get(), memory, buffer.get(), size, nullptr); 229 | 230 | return memory; 231 | } 232 | 233 | DWORD erw::set_protection(std::uintptr_t address, std::uint16_t protection) 234 | { 235 | DWORD old; 236 | 237 | VirtualProtectEx(process_handle.get(), reinterpret_cast(address), sizeof(address), protection, &old); 238 | 239 | return old; 240 | } 241 | 242 | std::size_t erw::get_function_size(void* src) 243 | { 244 | std::uint8_t* bytes = static_cast(src); 245 | 246 | do 247 | ++bytes; 248 | while (!(bytes[0] == 0xCC && bytes[1] == 0xCC)); 249 | 250 | return bytes - src; 251 | } -------------------------------------------------------------------------------- /RWI/RWI/memory/memory.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | struct section_data 10 | { 11 | std::uintptr_t start; 12 | std::uint32_t size; 13 | }; 14 | 15 | enum cc : std::uint32_t 16 | { 17 | cc_cdecl, 18 | cc_stdcall, 19 | cc_fastcall 20 | }; 21 | 22 | struct func_data 23 | { 24 | std::uintptr_t tuple_address; 25 | std::uintptr_t func_address; 26 | }; 27 | 28 | template 29 | ret __stdcall caller(func_data* data) 30 | { 31 | const auto tuple = *reinterpret_cast*>(data->tuple_address); 32 | 33 | if constexpr (convention == cc_cdecl) 34 | { 35 | typedef ret(__cdecl* def)(args...); 36 | def func = reinterpret_cast(data->func_address); 37 | 38 | return std::apply(func, tuple); 39 | } 40 | 41 | else if constexpr (convention == cc_stdcall) 42 | { 43 | typedef ret(__stdcall* def)(args...); 44 | def func = reinterpret_cast(data->func_address); 45 | 46 | return std::apply(func, tuple); 47 | } 48 | 49 | else if constexpr (convention == cc_fastcall) 50 | { 51 | typedef ret(__fastcall* def)(args...); 52 | def func = reinterpret_cast(data->func_address); 53 | 54 | return std::apply(func, tuple); 55 | } 56 | } 57 | 58 | class erw 59 | { 60 | private: 61 | template 62 | using constant_t = std::integral_constant; 63 | 64 | using smart_handle = std::unique_ptr, constant_t>; 65 | 66 | smart_handle process_handle; 67 | 68 | DWORD pid; 69 | 70 | std::size_t get_function_size(void* src); 71 | 72 | public: 73 | erw(const char* const process_name); 74 | erw(DWORD process_id) : pid{ process_id } { process_handle = smart_handle{ OpenProcess(PROCESS_ALL_ACCESS, false, process_id) }; }; 75 | erw(HANDLE handle); 76 | erw(const erw&) = delete; 77 | 78 | std::uintptr_t get_process_module(const char* const module_name) const; 79 | 80 | section_data get_section_by_name(const char* const module_name, const char* const section_name); 81 | 82 | std::uintptr_t get_export(const char* const module_name, const char* const function_name); 83 | 84 | bool load_dll(const char* const path); 85 | 86 | const char* allocate_string(const char* const str, std::uint32_t size = 0); 87 | 88 | std::uintptr_t pattern_scan(std::string_view module_name, std::string_view section_name, std::string_view pattern, std::string_view mask); 89 | 90 | void* map_function(void* src); 91 | 92 | DWORD set_protection(std::uintptr_t address, std::uint16_t protection); 93 | 94 | bool is_handle_open() { return process_handle.get() != INVALID_HANDLE_VALUE && process_handle.get() != 0; }; 95 | 96 | HANDLE get_handle() { return process_handle.get(); } 97 | 98 | template 99 | type read_memory(std::uintptr_t address) const 100 | { 101 | type buffer; 102 | 103 | bool result = ReadProcessMemory(process_handle.get(), reinterpret_cast(address), &buffer, sizeof(buffer), nullptr); 104 | 105 | if (result) 106 | return buffer; 107 | 108 | return {}; 109 | } 110 | 111 | template 112 | void read_buffer(std::uintptr_t address, t(&buffer)[n]) const { ReadProcessMemory(process_handle.get(), reinterpret_cast(address), &buffer, n, nullptr); } 113 | 114 | template 115 | bool write_memory(std::uintptr_t address, type buffer) const 116 | { 117 | bool result = WriteProcessMemory(process_handle.get(), reinterpret_cast(address), &buffer, sizeof(buffer), nullptr); 118 | 119 | return result; 120 | } 121 | 122 | template 123 | type* allocate_object(type src) 124 | { 125 | type* obj = static_cast(VirtualAllocEx(process_handle.get(), 0, sizeof(src), MEM_COMMIT, PAGE_READWRITE)); 126 | 127 | if (!obj) 128 | return nullptr; 129 | 130 | WriteProcessMemory(process_handle.get(), obj, &src, sizeof(src), nullptr); 131 | 132 | return obj; 133 | } 134 | 135 | template 136 | ret call_function(std::uintptr_t address, std::tuple tup, bool wait_for_exit = true) 137 | { 138 | const auto func = map_function(caller); 139 | const auto tuple = allocate_object(tup); 140 | 141 | func_data data; 142 | data.func_address = address; 143 | data.tuple_address = reinterpret_cast(tuple); 144 | 145 | const auto func_data = this->allocate_object(data); 146 | 147 | const auto handle = CreateRemoteThread(process_handle.get(), nullptr, 0, static_cast(func), func_data, 0, nullptr); 148 | 149 | if (handle) 150 | { 151 | WaitForSingleObject(handle, wait_for_exit ? 5000 : 100); 152 | 153 | DWORD return_val{}; 154 | 155 | GetExitCodeThread(handle, &return_val); 156 | 157 | if (wait_for_exit) 158 | { 159 | VirtualFreeEx(process_handle.get(), func, 0, MEM_RELEASE); 160 | VirtualFreeEx(process_handle.get(), func_data, 0, MEM_RELEASE); 161 | VirtualFreeEx(process_handle.get(), tuple, 0, MEM_RELEASE); 162 | } 163 | 164 | return return_val; 165 | } 166 | 167 | return {}; 168 | } 169 | }; -------------------------------------------------------------------------------- /RWI/RWI/mmap/manual_map.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | #include "manual_map.hpp" 8 | 9 | struct dll_data 10 | { 11 | std::uintptr_t base; 12 | 13 | HMODULE(__stdcall* load_library)(const char*); 14 | 15 | FARPROC(__stdcall* get_proc_address)(HMODULE, const char*); 16 | }; 17 | 18 | void __stdcall mapper(const dll_data* data) 19 | { 20 | const auto dos_header = reinterpret_cast(data->base)->e_lfanew; 21 | const auto nt_headers = reinterpret_cast(data->base + dos_header); 22 | 23 | auto reallocs = reinterpret_cast(data->base + nt_headers->OptionalHeader.DataDirectory[5].VirtualAddress); 24 | auto imports = reinterpret_cast(data->base + nt_headers->OptionalHeader.DataDirectory[1].VirtualAddress); 25 | 26 | while (reallocs->VirtualAddress) 27 | { 28 | for (std::uint32_t i = 0u, iteration = (reallocs->SizeOfBlock - 8) / 2; i < iteration; ++i) 29 | if (reinterpret_cast(reallocs + 1)[i] >> 12 == 3) 30 | *reinterpret_cast(data->base + (reallocs->VirtualAddress + (reinterpret_cast(reallocs + 1)[i] & 0xFFF))) += data->base - nt_headers->OptionalHeader.ImageBase; 31 | 32 | reallocs = reinterpret_cast(reinterpret_cast(reallocs) + reallocs->SizeOfBlock); 33 | } 34 | 35 | while (imports->Characteristics) 36 | { 37 | PIMAGE_THUNK_DATA original_first_thunk = reinterpret_cast(data->base + imports->OriginalFirstThunk); 38 | PIMAGE_THUNK_DATA first_thunk = reinterpret_cast(data->base + imports->FirstThunk); 39 | 40 | HMODULE module = data->load_library(reinterpret_cast(data->base) + imports->Name); 41 | 42 | while (original_first_thunk->u1.AddressOfData) 43 | { 44 | std::uintptr_t function; 45 | 46 | if (original_first_thunk->u1.Ordinal & IMAGE_ORDINAL_FLAG) 47 | function = reinterpret_cast(data->get_proc_address(module, reinterpret_cast(original_first_thunk->u1.Ordinal & 0xFFF))); 48 | else 49 | function = reinterpret_cast(data->get_proc_address(module, (reinterpret_cast(reinterpret_cast(data->base) + original_first_thunk->u1.AddressOfData))->Name)); 50 | 51 | first_thunk->u1.Function = function; 52 | original_first_thunk++; 53 | first_thunk++; 54 | } 55 | 56 | imports++; 57 | } 58 | 59 | if (nt_headers->OptionalHeader.AddressOfEntryPoint) 60 | { 61 | const auto entry_point = data->base + nt_headers->OptionalHeader.AddressOfEntryPoint; 62 | 63 | reinterpret_cast(entry_point)(reinterpret_cast(data->base), DLL_PROCESS_ATTACH, 0); 64 | } 65 | } 66 | 67 | bool manual_map::map_dll(erw& mem, const char* const dll_name, const char* process_name, std::uintptr_t base_of_stub, std::uintptr_t& base, std::size_t& size) 68 | { 69 | const auto handle = mem.get_handle(); 70 | 71 | FILE* file; 72 | 73 | fopen_s(&file, dll_name, "rb"); 74 | 75 | if (!file) 76 | return false; 77 | 78 | std::uint32_t start = ftell(file); 79 | 80 | fseek(file, 0, 2); 81 | 82 | std::uint32_t end = ftell(file); 83 | 84 | fseek(file, start, 0); 85 | 86 | auto binary = std::make_unique(end); 87 | 88 | fread(binary.get(), end, 1, file); 89 | 90 | fclose(file); 91 | 92 | DWORD pid{}; 93 | 94 | const auto dos_header = reinterpret_cast(binary.get())->e_lfanew; 95 | const auto nt_headers = reinterpret_cast(binary.get() + dos_header); 96 | 97 | const auto section_headers = reinterpret_cast(nt_headers + 1); 98 | 99 | const auto raw_dll = VirtualAllocEx(handle, 0, nt_headers->OptionalHeader.SizeOfImage, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE); 100 | const auto inj_stub = VirtualAllocEx(handle, 0, 0x1000, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE); 101 | 102 | size = nt_headers->OptionalHeader.SizeOfImage; 103 | 104 | const auto dll_data_allocation = VirtualAllocEx(handle, 0, 0x1000, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); 105 | 106 | if (!raw_dll || !dll_data_allocation) 107 | return false; 108 | 109 | WriteProcessMemory(handle, raw_dll, binary.get(), nt_headers->OptionalHeader.SizeOfHeaders, 0); 110 | 111 | for (auto i = 0u; i < nt_headers->FileHeader.NumberOfSections; ++i) 112 | WriteProcessMemory(handle, reinterpret_cast(reinterpret_cast(raw_dll) + section_headers[i].VirtualAddress), binary.get() + section_headers[i].PointerToRawData, section_headers[i].SizeOfRawData, 0); 113 | 114 | dll_data data_struct; 115 | 116 | data_struct.base = reinterpret_cast(raw_dll); 117 | data_struct.load_library = reinterpret_cast(mem.get_export("KERNEL32.DLL", "LoadLibraryA")); 118 | data_struct.get_proc_address = reinterpret_cast(mem.get_export("KERNEL32.DLL", "GetProcAddress")); 119 | 120 | base = reinterpret_cast(raw_dll); 121 | 122 | WriteProcessMemory(handle, dll_data_allocation, &data_struct, sizeof(data_struct), 0); 123 | WriteProcessMemory(handle, reinterpret_cast(inj_stub), mapper, 0x200, 0); 124 | 125 | HANDLE thread_handle = CreateRemoteThread(handle, 0, 0, reinterpret_cast(inj_stub), dll_data_allocation, 0, 0); 126 | 127 | if (!thread_handle || thread_handle == INVALID_HANDLE_VALUE) 128 | return false; 129 | 130 | WaitForSingleObject(thread_handle, 4000); 131 | 132 | DWORD return_val{}; 133 | 134 | GetExitCodeThread(thread_handle, &return_val); 135 | 136 | return return_val; 137 | } -------------------------------------------------------------------------------- /RWI/RWI/mmap/manual_map.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "../memory/memory.hpp" 4 | 5 | namespace manual_map 6 | { 7 | bool map_dll(erw& mem, const char* const dll_name, const char* process_name, std::uintptr_t base_of_stub, std::uintptr_t& base, std::size_t& size); 8 | } -------------------------------------------------------------------------------- /RWI/RWI/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Resource.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | --------------------------------------------------------------------------------