Skip to content

Instantly share code, notes, and snippets.

@usualsuspect
Created March 8, 2024 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save usualsuspect/26639fb07a100bdacca92a5e7c3ad403 to your computer and use it in GitHub Desktop.
Save usualsuspect/26639fb07a100bdacca92a5e7c3ad403 to your computer and use it in GitHub Desktop.
Unknown 64bit hash used for API lookup
#
# Used in custom import table to lookup APIs via hash instead of name
#
def hash_str64(s):
h = 0x1111111111111111
for i in range(len(s)):
h = h*0xABFFF385ABFFF386
h &= 0xFFFFFFFFFFFFFFFF
h += s[i]
h &= 0xFFFFFFFFFFFFFFFF
return h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment