Skip to content

Instantly share code, notes, and snippets.

View twist84's full-sized avatar
☠️
Finding buried treasure

Twister twist84

☠️
Finding buried treasure
View GitHub Profile
bool __cdecl multiplayer_game_hopper_set_active_hopper_and_request_game_set(word hopper_identifier, bool a2, c_network_session_membership const* session_membership)
{
c_url_string game_set_url{};
c_hopper_configuration* hopper_configuration = multiplayer_game_hoppers_get_hopper_configuration(hopper_identifier);
if (!hopper_configuration && a2)
{
ASSERT(session_membership);
long hopper_configuration_index;
@twist84
twist84 / console.cpp
Created May 3, 2024 21:30
WIP `c_status_line_string_cache` Implementation
#include "console.hpp"
c_status_line_string_cache::c_status_line_string_cache() :
m_font_cache(),
m_string(),
m_alpha(),
m_color(),
m_text_justification()
{
m_text_justifications8.set_all(0);
@twist84
twist84 / strings_ids.cpp
Created March 17, 2024 22:33
strings ids
#include "strings_ids.hpp"
#include <cassert>
#include <cstdio>
#include <string>
#define IN_RANGE_INCLUSIVE(value, begin, end) (((value) >= (begin)) && ((value) <= (end)))
#define VALID_INDEX(index, count) ((index) >= 0 && (index) < (count))
#define ASSERT_STRING_ID(NAMESPACE, STRING) string_id_get_string_const(STRING_ID(NAMESPACE, STRING)); assert(strcmp(NAMESPACE##_##STRING, #STRING) == 0)
@twist84
twist84 / XeCrypt.cpp
Last active March 11, 2024 20:47
Statically compiled external lib addresses in Halo Online MS23
//.text:00D4A156 ; XeCryptShaInit
//.text:00D4A183 ; XeCryptShaUpdate
//.text:00D4A26E ; XeCryptShaFinal
//.text:00D4A31C ; XeCryptSha
//.text:00D4A37D ; XeCryptHmacShaInit
//.text:00D4A42F ;
//.text:00D4A434 ; XeCryptHmacShaFinal
//.text:00D4A466 ; XeCryptHmacSha
//.text:00D4A4D5 ; XeCryptHmacShaVerify
//.text:00D4A51F ;
powershell -ExecutionPolicy Bypass -File something.ps1
#define IDD_CHOOSE_RASTERIZER_DIALOG 101
#define ID_CHOOSE_RASTERIZER_BUTTON_OK IDOK
#define ID_CHOOSE_RASTERIZER_BUTTON_CANCEL IDCANCEL
#define ID_CHOOSE_RASTERIZER_LISTBOX_RENDERER 1001
#define ID_CHOOSE_RASTERIZER_LISTBOX_SELECTED_DEVICE_CHARACTERISTICS 1002
#define ID_CHOOSE_RASTERIZER_LISTBOX_SELECTED_DEVICE_DISPLAY_MODES 1003
#define ID_CHOOSE_RASTERIZER_LISTBOX_DEVICE 1004
#define ID_CHOOSE_RASTERIZER_BUTTON_RUN_WINDOWED 1005
#define ID_CHOOSE_RASTERIZER_BUTTON_DO_NOT_SHOW_THIS_AGAIN 1007
#define ID_CHOOSE_RASTERIZER_BUTTON_DISABLE_MULTITEXTURING_D3D_ONLY 1008
void apply_bubble_fix()
{
if (pixel_shader* shader = static_cast<pixel_shader*>tag_get('pixl', "shaders\particle_templates\_0_8_1_0_0_1_1_0_0_0")))
{
if (shader->compiled_shaders.count() >= 1)
{
compiled_pixel_shader& compiled_shader = shader->compiled_shaders[0];
csmemcpy(compiled_shader.compiled_shader_splut.dx9_compiled_shader.address, bubble_fix_compiled_shader_splut0, sizeof(bubble_fix_compiled_shader_splut0));
}
@twist84
twist84 / adb.txt
Created May 20, 2023 23:47
Fuck You Samsung Pay
adb shell cmd package list packages -e
adb shell cmd package uninstall --user 0 <package>
address function
006D0440 game_engine_ally_bias_spawn_influence_try_and_get
006D04A0 game_engine_build_equipment_spawn_influencer
006D0590 game_engine_build_player_spawn_influencer
006D0670 game_engine_build_player_spawn_influencer (dup)
006D0750 game_engine_build_projectile_spawn_influencer
006D0890 game_engine_build_respawn_zone_influencer
006D09C0 game_engine_build_vehicle_spawn_influencer
006D0B50 game_engine_build_weapon_spawn_influencer
006D0C50 game_engine_calculate_cumulative_spawn_location_weight
@twist84
twist84 / source\tls_client.cpp
Last active April 13, 2023 12:46 — forked from mmozeiko/tls_client.c
simple example of TLS socket client using win32 schannel api
#include "tls_client.hpp"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock2.h>
#define SECURITY_WIN32
#include <security.h>
#include <schannel.h>
#include <shlwapi.h>
#include <assert.h>