From deb33f23279f041e2b729c969bddabc5c28c94fa Mon Sep 17 00:00:00 2001 From: Willi Ballenthin Date: Thu, 16 Jan 2025 15:42:48 +0000 Subject: [PATCH] sequence: better collect sequence-related addresses from Range statements --- capa/render/vverbose.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/capa/render/vverbose.py b/capa/render/vverbose.py index 3b907a37c..c7e376155 100644 --- a/capa/render/vverbose.py +++ b/capa/render/vverbose.py @@ -328,6 +328,13 @@ def collect_sequence_locations( child_mode = MODE_FAILURE if mode == MODE_SUCCESS else MODE_SUCCESS for child in match.children: yield from collect_sequence_locations(child, child_mode) + elif isinstance(match.node.statement, rd.RangeStatement): + for location in match.locations: + if location.type not in (frz.AddressType.CALL, ): + continue + if mode == MODE_FAILURE: + continue + yield location else: for child in match.children: yield from collect_sequence_locations(child, mode)