def __CompareString(ql: Qiling, address: int, params) -> int: lpString1 = params["lpString1"] lpString2 = params["lpString2"] cchCount1 = params["cchCount1"] cchCount2 = params["cchCount2"] if cchCount1 > 0: lpString1 = lpString1[:cchCount1] if cchCount2 > 0: lpString2 = lpString2[:cchCount2] return cmp(lpString1, lpString2)
def __lstrcmpi(ql: Qiling, address: int, params): str1 = params["lpString1"].lower() str2 = params["lpString2"].lower() return cmp(str1, str2)
def __lstrcmp(ql: Qiling, address: int, params): str1 = params["lpString1"] str2 = params["lpString2"] return cmp(str1, str2)
def hook_StrCmpIW(ql: Qiling, address: int, params): str1 = params["psz1"].lower() str2 = params["psz2"].lower() return cmp(str1, str2)
def hook_StrCmpW(ql: Qiling, address: int, params): str1 = params["psz1"] str2 = params["psz2"] return cmp(str1, str2)