Skip to content

Instantly share code, notes, and snippets.

View NullExceptionTSB's full-sized avatar
⚙️
She dreamt she was a bulldozer. She dreamt she was alone in an empty field.

NullException NullExceptionTSB

⚙️
She dreamt she was a bulldozer. She dreamt she was alone in an empty field.
  • B800h:029A
View GitHub Profile
#!/bin/bash
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
#
# Copyright (C) 2004 NullException
#
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
beep frequency 247 length 1;delay 1;
beep frequency 311 length 0.1;delay 0.1;
beep frequency 247 length 0.1;delay 0.1;
beep frequency 370 length 0.1;delay 0.1;
beep frequency 247 length 0.1;delay 0.1;
beep frequency 311 length 0.1;delay 0.1;
beep frequency 247 length 0.1;delay 0.1;
beep frequency 370 length 0.1;delay 0.1;
beep frequency 247 length 0.1;delay 0.1;
beep frequency 311 length 0.1;delay 0.1;
@NullExceptionTSB
NullExceptionTSB / costab.h
Created August 7, 2020 16:04
Trigonometry Table Headers
static const double cosin_table[3600] = { 1.0, 0.9998476951563913, 0.9993908270190958, 0.9986295347545738, 0.9975640502598242, 0.9961946980917455, 0.9945218953682733, 0.992546151641322, 0.9902680687415704, 0.9876883405951378, 0.984807753012208, 0.981627183447664, 0.9781476007338057, 0.9743700647852352, 0.9702957262759965, 0.9659258262890683, 0.9612616959383189, 0.9563047559630354, 0.9510565162951535, 0.9455185755993168, 0.9396926207859084, 0.9335804264972017, 0.9271838545667874, 0.9205048534524404, 0.9135454576426009, 0.9063077870366499, 0.898794046299167, 0.8910065241883679, 0.882947592858927, 0.8746197071393957, 0.8660254037844387, 0.8571673007021123, 0.848048096156426, 0.838670567945424, 0.8290375725550416, 0.8191520442889918, 0.8090169943749475, 0.7986355100472928, 0.7880107536067219, 0.7771459614569709, 0.766044443118978, 0.754709580222772, 0.7431448254773942, 0.7313537016191705, 0.7193398003386512, 0.7071067811865476, 0.6946583704589973, 0.6819983600624985, 0.6691306063588582, 0.6560590289905073, 0.6427
@NullExceptionTSB
NullExceptionTSB / dlli.c
Last active April 1, 2020 17:30
3 DLLI implementations (and one that's not implemented yet)
#include <Windows.h>
typedef NTSTATUS(NTAPI* NtCreateThreadExDef) (OUT LPHANDLE hThread, IN ACCESS_MASK DesiredAccess, IN PVOID ObjectAttributes, IN HANDLE ProcessHandle, IN PVOID lpStartAddress, IN PVOID lpParameter, IN ULONG Flags, IN SIZE_T StackZeroBits, IN SIZE_T SizeOfStackCommit, IN SIZE_T SizeOfStackReserve, OUT PVOID lpBytesBuffer);
typedef NTSTATUS(NTAPI* RtlCreateUserThreadDef) (IN HANDLE hProcess, IN LPVOID lpSecurityDescriptor, IN DWORD dwCreateSuspended, IN DWORD dwStackZeroBits, IN OUT LPDWORD lpStackReserved, IN OUT LPDWORD lpStackCommit, IN LPVOID lpStartAddress, IN LPVOID lpParam, OUT LPHANDLE lpThreadHandle , OUT LPDWORD dwThreadID);
typedef enum {
DLLI_BASIC_CREATEREMOTETHREAD,
DLLI_NTCREATETHREADEX,
DLLI_RTLCREATEUSERTHREAD,
DLLI_SUSPENDINJECTRESUME
;Xorshift32:
;state ^= state << 13
;state ^= state >> 17
;state ^= state << 5
xorshift32:
push eax
mov eax, [state32]
shl eax, 13
xor [state32], eax