This commit is contained in:
Pratham Chauhan
2023-04-04 18:28:43 +05:30
parent c04774b4b1
commit a260b35c9d
7 changed files with 119 additions and 140 deletions

View File

@@ -4,20 +4,20 @@ import capa.features.insn
def test_function_id_simple_match(pma16_01_extractor):
assert pma16_01_extractor.is_library_function(0x407490) == True
assert pma16_01_extractor.is_library_function(4224144) is True
assert pma16_01_extractor.get_function_name(0x407490) == "__aulldiv"
def test_function_id_gz_pat(pma16_01_extractor):
# aullrem is stored in `test_aullrem.pat.gz`
assert pma16_01_extractor.is_library_function(0x407500) == True
assert pma16_01_extractor.is_library_function(4224256) is True
assert pma16_01_extractor.get_function_name(0x407500) == "__aullrem"
def test_function_id_complex_match(pma16_01_extractor):
# 0x405714 is __spawnlp which requires recursive match of __spawnvp at 0x407FAB
# (and __spawnvpe at 0x409DE8)
assert pma16_01_extractor.is_library_function(0x405714) == True
assert pma16_01_extractor.is_library_function(4216596) is True
assert pma16_01_extractor.get_function_name(0x405714) == "__spawnlp"