From e4f43ffd06ca7f5a22203cde13e85ca61ff10f91 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 26 May 2019 06:22:28 -0400 Subject: native api custom import table: added table-generation reference. --- src/refs/nthash.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 src/refs/nthash.sh (limited to 'src/refs/nthash.sh') diff --git a/src/refs/nthash.sh b/src/refs/nthash.sh new file mode 100755 index 0000000..fc9d3ba --- /dev/null +++ b/src/refs/nthash.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +printf '#define __NTAPI_HASH_TABLE %s\n' '\' + +N=0; for f in $(cat NTHASH); do + HASH="0x$(printf "%s\n" $f | mdso -c32 - | cut -d' ' -f1)"; + printf "\t{0x%08x,\t(%d)},\t/* %s */ %s\n" $HASH $N $f '\'; + N=$((N + 1)); +done | sort -k2 -g + +printf '\n#define __NT_IMPORTED_SYMBOLS_ARRAY_SIZE\t%d\n' "$(cat NTHASH | wc -l)" -- cgit v1.2.3