Add more spaghetti for exe version

This commit is contained in:
Flawed
2023-10-02 20:55:43 -07:00
parent 4bc6cd8ea8
commit da56be172e
2 changed files with 7 additions and 3 deletions
+6 -3
View File
@@ -1,15 +1,18 @@
import click import click
import json import json
import re import re
import semver
fucked_distance = 0xFFFFFFFF fucked_distance = 0xFFFFFFFF
max_size_diff = 10 max_size_diff = 10
def get_zone_proto_down_sig(exe_file: str): def get_zone_proto_down_sig(exe_file: str):
res = re.match(".*ffxiv_dx11\.(.*)\.exe", exe_file) res = re.match(".*ffxiv_dx11\.(\d).(\d)(\d)(\w?)\.exe", exe_file)
ver = res.group(1) sem_ver = f"{res.group(1)}.{res.group(2)}.{res.group(3)}"
if ver == "6.40": if res.group(4) != "":
sem_ver = f"{sem_ver}+{res.group(4)}"
if semver.compare(sem_ver, "6.4.0") >= 0:
return "40 53 56 48 81 EC ? ? ? ? 48 8B 05 ? ? ? ? 48 33 C4 48 89 44 24 ? 8B F2" return "40 53 56 48 81 EC ? ? ? ? 48 8B 05 ? ? ? ? 48 33 C4 48 89 44 24 ? 8B F2"
else: else:
return "48 89 ? 24 ? ? 48 83 EC 50 8B F2 49 8B" return "48 89 ? 24 ? ? 48 83 EC 50 8B F2 49 8B"
+1
View File
@@ -9,6 +9,7 @@ platformdirs==2.6.2
python-Levenshtein==0.20.9 python-Levenshtein==0.20.9
r2pipe==1.7.4 r2pipe==1.7.4
rapidfuzz==2.13.7 rapidfuzz==2.13.7
semver==3.0.1
tomli==2.0.1 tomli==2.0.1
-f https://download.pytorch.org/whl/torch_stable.html -f https://download.pytorch.org/whl/torch_stable.html
torch==1.13.1+cu117 torch==1.13.1+cu117