Skip to content

Instantly share code, notes, and snippets.

View kanadeblisst00's full-sized avatar

KanadeBlisst kanadeblisst00

View GitHub Profile
@ess7
ess7 / thiscall.py
Last active August 19, 2024 12:42
Calling a thiscall DLL function in Python ctypes (x86)
import ctypes
kernel32 = ctypes.windll.kernel32
# __declspec(dllexport) __thiscall int add3(int a, int b, int c) {
# return a + b + c;
# }
_add3 = ctypes.cdll.lib.add3
buf = kernel32.VirtualAlloc(0, 4096, 0x3000, 0x40)