Skip to content

Instantly share code, notes, and snippets.

View Trass3r's full-sized avatar

Trass3r

View GitHub Profile
@Trass3r
Trass3r / add_debug_section.py
Created September 4, 2026 21:57
add .pdb reference debug section to .exe
#!/usr/bin/env python3
"""Add a minimal RSDS CodeView debug section to a PE file.
Appends a new ".debug" section containing a single IMAGE_DEBUG_DIRECTORY
entry of type IMAGE_DEBUG_TYPE_CODEVIEW (2) whose RSDS record points to a
.pdb file that shares the base name of the target executable, e.g.
time.exe -> time.pdb
If the executable already carries any debug information, the script reports

Enable X11, PulseAudio, dxg:

docker run --rm -it --net=host \
  -e DISPLAY -e XDG_RUNTIME_DIR -v /tmp/.X11-unix:/tmp/.X11-unix \
  -e PULSE_SERVER -v /mnt/wslg:/mnt/wslg \
  --device /dev/dxg -v /usr/lib/wsl:/usr/lib/wsl \
  -v `pwd`:/workspace ubuntu:rolling

export DEBIAN_FRONTEND=noninteractive
apt update && apt install -y libopenal1 libpulse0
@Trass3r
Trass3r / DKII_ddraw.log
Created February 14, 2026 16:38
windowed mode, with IsCurrentRenderTarget "fix"
This file has been truncated, but you can view the full file.
>>>>>>> LOADING D7VK >>>>>>>
<<< DirectDrawEnumerateA: Proxy
>>> GetProxiedDDrawModule: Loaded ddraw.dll from system path
>>> DirectDrawCreate
Game: DKII.EXE
D7VK: v1.3-5-g72056bc8+
Build: x86 msvc 19.50.35724
Found config file: dxvk.conf
Found built-in config:
ddraw.forceProxiedPresent = True
@Trass3r
Trass3r / anti-unpacking-tricks.md
Last active August 25, 2026 10:05
unpacking dgvoodoo

Unpacking an Executable using UPX + Anti-Unpacking Tricks

  1. Restore Section Header Names

    • The section header names had been erased.
    • Rename the relevant sections to UPX0 and UPX1 to match the original UPX convention.
  2. Restore the UPX! Magic

    • The UPX! magic signature was zeroed out.
    • It is normally located 32 bytes before the start of the actual UPX1 section data.
  • Use a hex editor to write UPX! at this location.
@Trass3r
Trass3r / ObjSeqImport.py
Created June 16, 2025 08:48
Blender addon to import .OBJ with morph targets
bl_info = {
"name": "Import OBJ with morph targets",
"author": "Trass3r",
"version": (1, 0, 0),
"blender": (3, 2, 0),
"location": "File > Import/Export",
"description": "Import OBJ with morph targets",
"doc_url": "",
"support": "COMMUNITY",
"category": "Import-Export",
#version 450
#extension GL_KHR_shader_subgroup_shuffle : require
#extension GL_EXT_samplerless_texture_functions : require
layout(local_size_x = 4, local_size_y = 4, local_size_z = 4) in;
layout(set = 0, binding = 0, rgba8) writeonly uniform image2D uOutput;
layout(set = 0, binding = 1) uniform utexture2D uInput;
@Trass3r
Trass3r / torch.ts
Last active September 2, 2024 14:15
Babylon Playground Torch
class Torch {
private holderInstance: BABYLON.InstancedMesh; // Instance of the torch holder
private flameSprite: BABYLON.Sprite; // Sprite for the flame
private torchLight: BABYLON.PointLight; // Light for the torch flame
private torchTransform: BABYLON.TransformNode; // Transform node for grouping
private static torchHolderBaseMesh: BABYLON.Mesh;
private static flameManager: BABYLON.SpriteManager;
constructor(
scene: BABYLON.Scene,
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOGEN_ORIGIN_DEPENDS OFF)
set(CMAKE_GLOBAL_AUTOGEN_TARGET ON)
set(CMAKE_UNITY_BUILD OFF CACHE BOOL "")
set(CMAKE_UNITY_BUILD_BATCH_SIZE 4)
add_compile_options("$<$<CONFIG:Debug>:-Og;-fno-omit-frame-pointer>" -fvisibility-inlines-hidden) # -ftime-trace) # ;-gsplit-dwarf
link_libraries(debug -Wl,--gdb-index)
link_libraries(debug -Wl,--gc-sections)
[
"-i",
"VID.mp4",
"-map", "0:a", "-c:a", "copy",
"rec.m4a"
]
cd %USERPROFILE%\Desktop\ViVeTool-v0.3.3
ViVeTool.exe /query /id:36354489,37634385,39145991
vivetool /fullreset
vivetool /disable /id:40729001,37634385