Kangsoo Kim

131 papers A* 23A 1B 8Journal 38Unranked 60
YearRankTypeTitle / Venue / Authors
2026 J jnl
IEEE Trans. Vis. Comput. Graph.
Zhuang Chang, Dominik O. W. Hirschberg, Kunal Gupta, Mehak Sharma, Kangsoo Kim, Huidong Bai, Li Shao, Mark Billinghurst
2026 conf
CHI Extended Abstracts
Zaid Ahmed, Omar Khan, Hyeongil Nam, Kangsoo Kim
2026 J jnl
CoRR
Zaid Ahmed, Omar Khan, Hyeongil Nam, Kangsoo Kim
2026 J jnl
Comput. Graph.
Dongyun Han, DongHoon Kim, Hyeongil Nam, Kangsoo Kim, Isaac Cho
2026 J jnl
CoRR
Seoyoung Kang, Seokhwan Yang, Hail Song, Boram Yoon, Jinwook Kim, Kangsoo Kim, Woontack Woo
2026 A* conf
CHI
Taeyeon Kim, Hyeongil Nam, Sunghun Jung, Ahmad Fouad, Kangsoo Kim, Myungho Lee
2025 conf
VR Workshops
Omar Khan, Hyeongil Nam, Kangsoo Kim
2025 conf
VR Workshops
Laura Battistel, Kangsoo Kim, Riccardo Parin, Massimiliano Zampini, Gerd Bruder, Gregory F. Welch
2025 J jnl
IEEE Trans. Vis. Comput. Graph.
Hyeongil Nam, Kisub Lee, Jong-Il Park, Kangsoo Kim
2025 conf
VR Workshops
Hyeongil Nam, Seoyoung Kang, Woontack Woo, Kangsoo Kim
2025 conf
ISMAR-Adjunct
Mehdi Marzban, Muskan Sarvesh, Charbel Maroun, Brody Wells, Nanjia Wang, Hyeongil Nam, Frank Maurer, Kangsoo Kim
2025 conf
VR Workshops
Dooyoung Kim, Kangsoo Kim, Cláudio T. Silva, Qi Sun, Dishita G. Turakhia, Zhu Wang, Keru Wang, Ken Perlin, Steven Feiner, Woontack Woo
2025 conf
ISMAR-Adjunct
Hyun-Ho Choi, Kangsoo Kim, Ki-Ho Lee, Kisong Lee
2025 J jnl
CoRR
Hyun-Ho Choi, Kangsoo Kim, Ki-Ho Lee, Kisong Lee
2025 J jnl
IEEE Trans. Commun.
Hyun-Ho Choi, Kangsoo Kim, Ki-Ho Lee, Kisong Lee
2025 conf
ISMAR-Adjunct
Arjun Chatha, Hyeongil Nam, Kara Sealock, Kangsoo Kim
2025 conf
VR Workshops
Nanjia Wang, Muskan Sarvesh, Bryson Lawton, Brody Wells, Kangsoo Kim, Frank Maurer
2025 J jnl
IEEE Trans. Vis. Comput. Graph.
Hyeongil Nam, Muskan Sarvesh, Seoyoung Kang, Woontack Woo, Kangsoo Kim
2025 J jnl
IEEE Trans. Vis. Comput. Graph.
Jeewoo Kim, Svara Patel, Hyeongil Nam, Janghee Cho, Kangsoo Kim
2025 conf
VR Workshops
Taeyeon Kim, Hyeongil Nam, Ahmad Fouad, Kangsoo Kim, Myungho Lee
2025 J jnl
Comput. Graph.
Bernardo Marques, Paulo Dias, Kangsoo Kim, Heejin Jeong
2025 J jnl
Comput. Graph.
Isaac Cho, Heejin Jeong, Kangsoo Kim, Hyungil Kim, Myounghoon Jeon
2025 A* conf
ISMAR
Hyeongil Nam, Seoyoung Kang, Anh Nguyen, Isaac Cho, Woontack Woo, Kangsoo Kim
2025 J jnl
IEEE Trans. Vis. Comput. Graph.
Seoyoung Kang, Boram Yoon, Kangsoo Kim, Jonathan Gratch, Woontack Woo
2025 J jnl
IEEE Trans. Vis. Comput. Graph.
Omar Khan, Hyeongil Nam, Kangsoo Kim
2025 conf
VR Workshops
Omar Khan, Anh Nguyen, Hyeongil Nam, Kangsoo Kim
2025 B conf
VRST
Junyeong Kum, Sunghun Jung, Hyeongil Nam, Kangsoo Kim, Myungho Lee
2025 B ed.
VRST
Anil Ufuk Batmaz, Mayra Donaji Barrera Machuca, Francisco Ortega, Daniel Zielasko, Kangsoo Kim, Rick Skarbez, Lucas Plabst, Amy Banic, Mine Stroppa
2025 conf
VR Workshops
Nanjia Wang, Muskan Sarvesh, Bryson Lawton, Brody Wells, Ryan Kang, Hyeongil Nam, Sina Rezvani, Kangsoo Kim, Ron Hugo, Simon S. Park, Bob Brennan, Frank Maurer
2025 conf
VR Workshops
Omar Khan, Zaid Ahmed, Hyeongil Nam, Kangsoo Kim
2025 A* conf
ISMAR
Ahmad Fouad, Hyeongil Nam, Anh Nguyen, Dongyun Han, DongHoon Kim, Isaac Cho, Kangsoo Kim
2025 A* conf
ISMAR
Dongyun Han, Siyeon Bak, So-Hui Kim, Kangsoo Kim, Sun-Jeong Kim, Isaac Cho
2025 J jnl
CoRR
Dongyun Han, Siyeon Bak, So-Hui Kim, Kangsoo Kim, Sun-Jeong Kim, Isaac Cho
2025 A* conf
ISMAR
Mehakdeep Kaur, Hyeongil Nam, Ryan Kang, Dongyun Han, DongHoon Kim, Isaac Cho, Kangsoo Kim
2024 conf
AIxVR
Roghayeh Leila Barmaki, Kangsoo Kim, Zhang Guo, Qile Wang, Kevin Yu, Rebecca Pearlman, Nassir Navab
2024 conf
VR Workshops
Muskan Sarvesh, Mehdi Marzban, Ryan Kang, Simon Park, Ron Hugo, Kangsoo Kim
2024 conf
VR Workshops
Isaac Cho, Kangsoo Kim, Dongyun Han, Allison Bayro, Heejin Jeong, Hyungil Kim, Hayoun Moon, Myounghoon Jeon
2024 conf
VR Workshops
Hyeongil Nam, Ji-Young Yeo, Kisub Lee, Kangsoo Kim, Jong-Il Park
2024 J jnl
Comput. Graph.
Anh Nguyen, Michael Francis, Emma Windfeld, Guillaume Lhermie, Kangsoo Kim
2024 J jnl
J. Robotics Mechatronics
Akihiro Okamoto, Masahiko Sasano, Kangsoo Kim, Toshifumi Fujiwara
2024 conf
ISMAR-Adjunct
Chae-Heon Lim, Kangsoo Kim, Changgu Kang, Seul Chan Lee
2024 conf
VR Workshops
Minseok Kang, Chae-Heon Lim, Seul Chan Lee, Changgu Kang, Kangsoo Kim
2024 conf
VR Workshops
Omar Khan, Anh Nguyen, Michael Francis, Kangsoo Kim
2024 A* conf
ISMAR
Muskan Sarvesh, Ryan Kang, Hyeongil Nam, Simon Park, Ron Hugo, Frank Maurer, Kangsoo Kim
2024 A* conf
ISMAR
Seoyoung Kang, Anh Nguyen, Boram Yoon, Kangsoo Kim, Woontack Woo
2024 conf
VR Workshops
Muskan Sarvesh, Ryan Kang, Mehdi Marzban, Isaac Cho, Simon Park, Ron Hugo, Kangsoo Kim
2024 conf
VR Workshops
Anh Nguyen, Seoyoung Kang, Woontack Woo, Kangsoo Kim
2024 A* conf
ISMAR
Zhuang Chang, Kangsoo Kim, Kunal Gupta, Jamila Abouelenin, Zirui Xiao, Boyang Gu, Huidong Bai, Mark Billinghurst
2024 A* conf
ISMAR
Seoyoung Kang, Hail Song, Boram Yoon, Kangsoo Kim, Woontack Woo
2024 conf
ISMAR-Adjunct
Anh Nguyen, Hyeongil Nam, Emma Windfeld, Michael Francis, Guillaume Lhermie, Kangsoo Kim
2024 J jnl
Comput. Graph.
Sydney Segear, Vuthea Chheang, Lauren Baron, Jicheng Li, Kangsoo Kim, Roghayeh Leila Barmaki
2024 A* conf
ISMAR
Hyeongil Nam, Kisub Lee, Muskan Sarvesh, Sangwoo Cho, Jong-Il Park, Kangsoo Kim
2023 conf
VR Workshops
Dongyun Han, DongHoon Kim, Kangsoo Kim, Isaac Cho
2023 J jnl
CoRR
Roghayeh Leila Barmaki, Kangsoo Kim, Zhang Guo, Qile Wang, Kevin Yu, Rebecca Pearlman, Nassir Navab
2023 conf
VR Workshops
Anh Nguyen, Emma Windfeld, Michael Francis, Guillaume Lhermie, Kangsoo Kim
2023 J jnl
Virtual Real.
Qile Wang, Qinqi Zhang, Weitong Sun, Chadwick B. Boulay, Kangsoo Kim, Roghayeh Leila Barmaki
2023 conf
VR Workshops
Kangsoo Kim, Bernardo Marques, Heejin Jeong, Samuel S. Silva, Isaac Cho, Carlos Ferreira, Hyungil Kim, Paulo Dias, Myounghoon Jeon, Beatriz Sousa Santos
2023 J jnl
IEEE Access
Changgu Kang, Meejin Kim, Kangsoo Kim, Sukwon Lee
2023 conf
ISMAR-Adjunct
Seoyoung Kang, Hail Song, Boram Yoon, Kangsoo Kim, Woontack Woo
2023 conf
VR Workshops
Yifan Li, Byung-Kuk Seo, Kangsoo Kim
2023 A* conf
ISMAR
Dongyun Han, DongHoon Kim, Kangsoo Kim, Isaac Cho
2023 J jnl
CoRR
Dongyun Han, DongHoon Kim, Kangsoo Kim, Isaac Cho
2023 A* conf
ISMAR
Dongyun Han, DongHoon Kim, Kangsoo Kim, Isaac Cho
2023 J jnl
CoRR
Dongyun Han, DongHoon Kim, Kangsoo Kim, Isaac Cho
2023 conf
ICINCO (1)
Kangsoo Kim
2023 conf
BMSB
Sungho Jeon, Seongman Min, Dawoon Chung, Kangsoo Kim, Jahoon Ku, Sunhyung Kwon, Sung-Ik Park
2023 J jnl
ACM Trans. Appl. Percept.
Zubin Datta Choudhary, Austin Erickson, Nahal Norouzi, Kangsoo Kim, Gerd Bruder, Gregory F. Welch
2022 J jnl
ACM Trans. Access. Comput.
Yifan Li, Kangsoo Kim, Austin Erickson, Nahal Norouzi, Jonathan Jules, Gerd Bruder, Gregory F. Welch
2022 A* conf
ISMAR
Hyeongil Nam, Chanhee Kim, Kangsoo Kim, Ji-Young Yeo, Jong-Il Park
2022 conf
VR Workshops
Heejin Jeong, Isaac Cho, Kangsoo Kim, Hyungil Kim, Myounghoon Jeon
2022 J jnl
Int. J. Hum. Comput. Stud.
Nahal Norouzi, Kangsoo Kim, Gerd Bruder, Jeremy N. Bailenson, Pamela J. Wisniewski, Gregory F. Welch
2021 B conf
ICMI
Zhang Guo, Kangsoo Kim, Anjana Bhat, Roghayeh Barmaki
2021 J jnl
ACM Trans. Appl. Percept.
Austin Erickson, Kangsoo Kim, Alexis Lambert, Gerd Bruder, Michael P. Browne, Gregory F. Welch
2021 conf
SUI
Qile Wang, Vincent J. Beardsley, Qinqi Zhang, Kangsoo Kim, Roghayeh Barmaki
2021 conf
CHI Extended Abstracts
Hiroshi Furuya, Kangsoo Kim, Gerd Bruder, Pamela J. Wisniewski, Gregory F. Welch
2021 conf
HCI (9)
Austin Erickson, Kangsoo Kim, Gerd Bruder, Gregory F. Welch
2021 A* conf
ISMAR
Matthew Gottsacker, Nahal Norouzi, Kangsoo Kim, Gerd Bruder, Greg Welch
2021 conf
SUI
Lauren Baron, Qile Wang, Sydney Segear, Brian A. Cohn, Kangsoo Kim, Roghayeh Barmaki
2021 A* conf
VR
Zubin Datta Choudhary, Matthew Gottsacker, Kangsoo Kim, Ryan Schubert, Jeanine K. Stefanucci, Gerd Bruder, Gregory F. Welch
2021 J jnl
IEEE Trans. Vis. Comput. Graph.
Nahal Norouzi, Gerd Bruder, Austin Erickson, Kangsoo Kim, Jeremy N. Bailenson, Pamela J. Wisniewski, Charles E. Hughes, Greg Welch
2020 ed.
ICAT-EGVE (Posters and Demos)
Alexander Kulik, Misha Sra, Kangsoo Kim, Byung-Kuk Seo
2020 conf
ICAT-EGVE
Austin Erickson, Kangsoo Kim, Gerd Bruder, Gregory F. Welch
2020 conf
ICAT-EGVE
Nahal Norouzi, Kangsoo Kim, Gerd Bruder, Austin Erickson, Zubin Datta Choudhary, Yifan Li, Greg Welch
2020 conf
ICAT-EGVE (Posters and Demos)
Sharare Zehtabian, Siavash Khodadadeh, Kangsoo Kim, Gerd Bruder, Greg Welch, Ladislau Bölöni, Damla Turgut
2020 conf
ICAT-EGVE (Posters and Demos)
Austin Erickson, Kangsoo Kim, Gerd Bruder, Gregory F. Welch
2020 conf
VR Workshops
Kangsoo Kim, Austin Erickson, Nahal Norouzi
2020 A* conf
VR
Austin Erickson, Kangsoo Kim, Gerd Bruder, Gregory F. Welch
2020 J jnl
IEEE Trans. Vis. Comput. Graph.
Austin Erickson, Nahal Norouzi, Kangsoo Kim, Joseph J. LaViola, Gerd Bruder, Gregory F. Welch
2020 conf
SUI
Austin Erickson, Kangsoo Kim, Gerd Bruder, Gregory F. Welch
2020 J jnl
J. Multimodal User Interfaces
Seungwon Kim, Mark Billinghurst, Kangsoo Kim
2020 A* conf
VR
Kangsoo Kim, Celso M. de Melo, Nahal Norouzi, Gerd Bruder, Gregory F. Welch
2020 J jnl
J. Multimodal User Interfaces
Austin Erickson, Nahal Norouzi, Kangsoo Kim, Ryan Schubert, Jonathan Jules, Joseph J. LaViola, Gerd Bruder, Gregory F. Welch
2020 conf
ICAT-EGVE (Posters and Demos)
Nahal Norouzi, Kangsoo Kim, Gerd Bruder, Greg Welch
2020 A* conf
VR
Zubin Datta Choudhary, Kangsoo Kim, Ryan Schubert, Gerd Bruder, Gregory F. Welch
2019 conf
SUI
Kendra Richards, Nikhil Mahalanobis, Kangsoo Kim, Ryan Schubert, Myungho Lee, Salam Daher, Nahal Norouzi, Jason Hochreiter, Gerd Bruder, Greg Welch
2019 J jnl
Comput. Graph.
Kangsoo Kim, Ryan Schubert, Jason Hochreiter, Gerd Bruder, Gregory F. Welch
2019 conf
SUI
Kangsoo Kim, Austin Erickson, Alexis Lambert, Gerd Bruder, Greg Welch
2019 conf
AIVR
Kangsoo Kim, Nahal Norouzi, Tiffany Losekamp, Gerd Bruder, Mindi Anderson, Gregory F. Welch
2019 conf
SUI
Nahal Norouzi, Austin Erickson, Kangsoo Kim, Ryan Schubert, Joseph J. LaViola, Gerd Bruder, Greg Welch
2019 A* conf
ISMAR
Austin Erickson, Kangsoo Kim, Ryan Schubert, Gerd Bruder, Greg Welch
2019 conf
ICINCO (2)
Kangsoo Kim
2019 A* conf
ISMAR
Nahal Norouzi, Kangsoo Kim, Myungho Lee, Ryan Schubert, Austin Erickson, Jeremy N. Bailenson, Gerd Bruder, Greg Welch
2018 conf
ICINCO (2)
Kangsoo Kim
2018 B conf
IVA
Nahal Norouzi, Kangsoo Kim, Jason Hochreiter, Myungho Lee, Salam Daher, Gerd Bruder, Greg Welch
2018 conf
ICAT-EGVE
Kangsoo Kim, Gerd Bruder, Gregory F. Welch
2018 A* conf
ISMAR
Kangsoo Kim, Luke Boelling, Steffen Haesler, Jeremy N. Bailenson, Gerd Bruder, Gregory F. Welch
2018 conf
CHI Extended Abstracts
Kangsoo Kim
2018 J jnl
IEEE Trans. Vis. Comput. Graph.
Kangsoo Kim, Mark Billinghurst, Gerd Bruder, Henry Been-Lirn Duh, Gregory F. Welch
2018 conf
ISMAR Adjunct
Steffen Haesler, Kangsoo Kim, Gerd Bruder, Greg Welch
2017 J jnl
Frontiers Robotics AI
Kangsoo Kim, Arjun Nagendran, Jeremy N. Bailenson, Andrew Raij, Gerd Bruder, Myungho Lee, Ryan Schubert, Xin Yan, Gregory F. Welch
2017 conf
3DUI
Salam Daher, Kangsoo Kim, Myungho Lee, Gerd Bruder, Ryan Schubert, Jeremy N. Bailenson, Gregory F. Welch
2017 B conf
IVA
Salam Daher, Kangsoo Kim, Myungho Lee, Ryan Schubert, Gerd Bruder, Jeremy N. Bailenson, Greg Welch
2017 B conf
VRST
Kangsoo Kim, Gerd Bruder, Greg Welch
2017 J jnl
Comput. Animat. Virtual Worlds
Kangsoo Kim, Divine Maloney, Gerd Bruder, Jeremy N. Bailenson, Gregory F. Welch
2017 B conf
VRST
Dongsik Jo, Kangsoo Kim, Gregory F. Welch, Woojin Jeon, Yongwan Kim, Ki-Hong Kim, Gerard Jounghyun Kim
2016 A* conf
VR
Salam Daher, Kangsoo Kim, Myungho Lee, Andrew Raij, Ryan Schubert, Jeremy N. Bailenson, Greg Welch
2016 B conf
IVA
Kangsoo Kim, Ryan Schubert, Greg Welch
2016 conf
ICAT-EGVE
Kangsoo Kim, Gerd Bruder, Divine Maloney, Greg Welch
2016 A* conf
VR
Myungho Lee, Kangsoo Kim, Salam Daher, Andrew Raij, Ryan Schubert, Jeremy N. Bailenson, Greg Welch
2016 J jnl
J. Robotics Mechatronics
Yuya Nishida, Junichi Kojima, Yuzuru Itoh, Kenkichi Tamura, Harumi Sugimatsu, Kangsoo Kim, Taku Sudo, Tamaki Ura
2015 conf
ISMAR Workshops
Kangsoo Kim, Greg Welch
2014 J jnl
J. Robotics Mechatronics
Kangsoo Kim, Tamaki Ura
2014 J jnl
J. Robotics Mechatronics
Yuya Nishida, Tamaki Ura, Takeshi Nakatani, Takashi Sakamaki, Junichi Kojima, Yuzuru Itoh, Kangsoo Kim
2014 conf
CHI Extended Abstracts
Myungho Lee, Kangsoo Kim, Hyunghwan Rho, Si Jung Kim
2012 conf
IC-NIDC
Eun Joo Rhee, Kangsoo Kim, Byung-Kuk Seo, Jong-Il Park
2010 conf
VRCAI
Byung-Kuk Seo, Kangsoo Kim, Jungsik Park, Jong-Il Park
2010 conf
ACCV Workshops (2)
Byung-Kuk Seo, Kangsoo Kim, Jong-Il Park
2009 conf
VRCAI
Kangsoo Kim, Byung-Kuk Seo, Jae-Hyek Han, Jong-Il Park
2009 J jnl
Adv. Robotics
Kangsoo Kim, Tamaki Ura
2008 A conf
IROS
Kangsoo Kim, Tamaki Ura
2006 conf
ICHIT
Hye-Jin Cho, Kangsoo Kim
redb/extractors/macho_extractors/macho_universal.py
← Index redb/extractors/macho_extractors/macho_universal.py python
import hashlib
import inspect
import json
from datetime import datetime, timezone
from typing import Any, List

from redb.extractors.enum import Tag
from redb.extractors.macho_extractor import MachOExtractor
from redb.models.dataclasses import MachOUniversal


class MachOUniversalExtractor(MachOExtractor):

    def __init__(
        self,
        filepath,
        log,
        exporters=None,
        index_prefix=None,
        elastic_index=None,
        known_benign=False,
        known_malicious=False,
        macho=None,
    ):
        super().__init__(
            filepath,
            log,
            exporters,
            index_prefix,
            elastic_index,
            known_benign,
            known_malicious,
            macho,
        )
        self.elastic_index = self.index_prefix + "-macho_universal"
        self.log.debug(inspect.currentframe().f_code.co_name)

    def tag(self):
        return Tag.MACHO_UNIVERSAL.value

    def _extract_universal_info(self):
        """Extract Universal/FAT binary architecture information using new API."""
        self.log.debug(inspect.currentframe().f_code.co_name)

        if not self.macho:
            return None

        try:
            # Parse at Universal level first (new API requirement)
            self.macho.parse()

            # Get architectures using new API
            architectures = self.macho.get_architectures()
            if not architectures:
                return None

            # Check if this is a FAT binary
            is_fat = len(architectures) > 1

            architecture_info = []

            # Extract info for each architecture
            for arch_name in architectures:
                try:
                    # Get general info for this architecture
                    general_info = self.macho.get_general_info(arch=arch_name)

                    # Get header info for this architecture
                    header_info = self.macho.get_macho_header(arch=arch_name)

                    # Get architecture-specific MachO instance for detailed analysis
                    arch_macho = self.macho.get_macho_for_arch(arch_name)

                    # Calculate architecture slice hash (if we can access the raw data)
                    arch_sha256 = None
                    arch_md5 = None
                    arch_sha1 = None

                    # For FAT binaries, try to get slice-specific info
                    if is_fat and arch_macho:
                        try:
                            # This would require access to the slice data
                            # For now, we'll use the general file info
                            arch_sha256 = general_info.get('SHA256', '') if general_info else ''
                            arch_md5 = general_info.get('MD5', '') if general_info else ''
                            arch_sha1 = general_info.get('SHA1', '') if general_info else ''
                        except Exception as e:
                            self.log.debug(f"Could not extract slice hash for {arch_name}: {e}")

                    architecture_info.append({
                        'architecture': arch_name,
                        'arch_sha256': arch_sha256,
                        'arch_md5': arch_md5,
                        'arch_sha1': arch_sha1,
                        'cputype': header_info.get('cputype') if header_info else None,
                        'cpusubtype': header_info.get('cpusubtype') if header_info else None,
                        'filetype': header_info.get('filetype') if header_info else None
                    })

                except Exception as e:
                    self.log.warning(f"Error extracting info for architecture {arch_name}: {e}")
                    continue

            # Create Universal dataclass
            macho_universal = MachOUniversal(
                is_fat=is_fat,
                architecture_count=len(architectures),
                architectures=architectures,
                architecture_info=architecture_info,
                fat_hash=self.sha256,
                fat_md5=self.md5,
                fat_sha1=self.sha1
            )

            return macho_universal

        except Exception as e:
            self.log.error(f"Error extracting MachO Universal info: {e}")
            return None

    def _extract_fat_architecture_mappings(self):
        """Extract detailed FAT binary architecture mappings for database relationships."""
        self.log.debug(inspect.currentframe().f_code.co_name)

        if not self.macho:
            return []

        try:
            # Parse at Universal level first
            self.macho.parse()

            # Get architectures using new API
            architectures = self.macho.get_architectures()
            if not architectures or len(architectures) <= 1:
                return []  # Not a FAT binary

            mappings = []
            current_time = datetime.now(timezone.utc)

            # For each architecture, create a mapping record
            for arch_name in architectures:
                try:
                    # Get general info
                    general_info = self.macho.get_general_info()

                    # Create mapping record for FAT binary architecture table
                    mapping = {
                        'fat_hash': self.sha256,  # SHA256 of the FAT binary
                        'architecture': arch_name,
                        'arch_sha256': general_info.get('SHA256', '') if general_info else '',  # Will need proper slice extraction
                        'arch_md5': general_info.get('MD5', '') if general_info else '',
                        'arch_sha1': general_info.get('SHA1', '') if general_info else '',
                        'arch_filename': f"{general_info.get('Filename', '')}.{arch_name}" if general_info else '',
                        'analysis_date': current_time
                    }
                    mappings.append(mapping)

                except Exception as e:
                    self.log.warning(f"Error creating mapping for architecture {arch_name}: {e}")
                    continue

            return mappings

        except Exception as e:
            self.log.error(f"Error extracting FAT architecture mappings: {e}")
            return []

    def extract(self):
        self.log.debug(inspect.currentframe().f_code.co_name)
        try:
            universal_info = self._extract_universal_info()
            return universal_info
        except Exception as e:
            self.log.error(f"Error extracting MachO Universal info: {e}")
            return None

    def extract_fat_binary_basic_properties_data(self):
        """Extract data needed for creating multiple BasicProperties records for FAT binaries.

        Returns:
            Tuple: (is_fat, fat_sha256, architectures_info) where:
                - is_fat: bool indicating if this is a FAT binary
                - fat_sha256: SHA256 of the FAT wrapper
                - architectures_info: dict with arch names and their hashes
        """
        self.log.debug(inspect.currentframe().f_code.co_name)

        if not self.macho:
            return False, None, {}

        try:
            # Parse at Universal level first
            self.macho.parse()

            # Get architectures using new API
            architectures = self.macho.get_architectures()
            if not architectures or len(architectures) <= 1:
                return False, None, {}  # Not a FAT binary

            # This is a FAT binary
            architectures_info = {}

            for arch_name in architectures:
                try:
                    # Get general info for this architecture
                    general_info = self.macho.get_general_info(arch=arch_name)

                    if general_info:
                        architectures_info[arch_name] = {
                            'sha256': general_info.get('SHA256', ''),
                            'md5': general_info.get('MD5', ''),
                            'sha1': general_info.get('SHA1', ''),
                            'filename': general_info.get('Filename', ''),
                            'filesize': general_info.get('Filesize', 0)
                        }
                except Exception as e:
                    self.log.warning(f"Error extracting info for architecture {arch_name}: {e}")
                    continue

            return True, self.sha256, architectures_info

        except Exception as e:
            self.log.error(f"Error extracting FAT binary data: {e}")
            return False, None, {}

    def prepare_export_data(self, exporter_type: str) -> Any:
        if exporter_type == "ElasticsearchExporter":
            return self.extract()
        elif exporter_type == "ClickHouseExporter":
            universal_info = self.extract()
            if universal_info is None:
                return None

            data = []
            current_time = datetime.now(timezone.utc)

            # Get architecture info for the binary
            try:
                if universal_info.is_fat:
                    # For FAT binaries, architecture fields should be NULL since it contains multiple
                    architecture_raw = None
                    architecture_str = None
                else:
                    # For single-arch binaries, get the actual architecture info
                    header_info = self.macho.get_macho_header()
                    architecture_raw = header_info.get('cputype', 0) if header_info else 0
                    architecture_str = universal_info.architectures[0] if universal_info.architectures else None
            except Exception as e:
                self.log.warning(f"Could not get architecture info for binary: {e}")
                architecture_raw = None
                architecture_str = None

            # Main Universal binary record
            data.append([
                self.sha256,                              # sha256
                self.md5,                                 # md5
                self.sha1,                                # sha1
                None,                                     # parent_sha256 (always None for main FAT binary)
                architecture_raw,                         # architecture (raw CPU type)
                architecture_str,                         # architecture_str (human-readable)
                universal_info.is_fat,                    # is_fat
                universal_info.architecture_count,       # architecture_count
                universal_info.architectures,            # architectures (array)
                json.dumps(universal_info.architecture_info[0] if len(universal_info.architecture_info) == 1 else {"architectures": universal_info.architecture_info}) if universal_info.architecture_info else None,  # architecture_info (JSON)
                current_time,                             # analysis_date
            ])

            column_names = [
                'sha256', 'md5', 'sha1', 'parent_sha256', 'architecture', 'architecture_str',
                'is_fat', 'architecture_count', 'architectures', 'architecture_info',
                'analysis_date'
            ]

            column_type_names = [
                'FixedString(64)', 'FixedString(32)', 'FixedString(40)',
                'Nullable(FixedString(64))', 'Nullable(UInt32)', 'LowCardinality(Nullable(String))',
                'UInt8', 'UInt32', 'Array(LowCardinality(String))', 'JSON',
                'DateTime64(3, \'UTC\')'
            ]

            return (data, column_names, column_type_names)

        return None

    def prepare_fat_architecture_export_data(self) -> Any:
        """Prepare export data for the FAT binary architecture mapping table."""
        mappings = self._extract_fat_architecture_mappings()
        if not mappings:
            return None

        data = []
        for mapping in mappings:
            data.append([
                mapping['fat_hash'],
                mapping['architecture'],
                mapping['arch_sha256'],
                mapping['arch_md5'],
                mapping['arch_sha1'],
                mapping['arch_filename'],
                mapping['analysis_date'],
            ])

        column_names = [
            'fat_hash', 'architecture', 'arch_sha256', 'arch_md5', 'arch_sha1',
            'arch_filename', 'analysis_date'
        ]

        column_type_names = [
            'FixedString(64)', 'LowCardinality(String)', 'FixedString(64)',
            'FixedString(32)', 'FixedString(40)', 'String',
            'DateTime64(3, \'UTC\')'
        ]

        return (data, column_names, column_type_names)

    def get_clickhouse_table(self) -> str:
        return "redb_macho_universal"

    # def get_fat_architecture_table(self) -> str:
    #     """Return table name for FAT binary architecture mappings."""
    #     return "redb_fat_binary_architectures"