{"type": "func", "start": 5372983760, "end": 5372984005, "name": "SetupCameraEdgePopup::determineStartValues", "pseudocode": "// \n// SetupCameraEdgePopup::determineStartValues from 0x1404139d0 to 0x140413ac5 (245 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x1405ded90\n// > <???> @ 0x14069f898\n// > <???> @ 0x14069f8a8\n// > <???> @ 0x1406d8d5c\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid SetupCameraEdgePopup::determineStartValues(SetupCameraEdgePopup *a1)\n{\n  __int64 v2; // rcx\n  cocos2d::CCArray *m_gameObjects; // rsi\n  unsigned int v4; // edi\n  struct cocos2d::CCObject *v5; // rax\n  int m_targetID; // edx\n  int m_uAutoReleaseCount; // ecx\n  int m_edgeDirection; // ecx\n  int m_nTag; // eax\n\n  SetupTriggerPopup::determineStartValues(a1);\n  if ( a1->m_gameObject )\n  {\n    m_gameObjects = (cocos2d::CCArray *)cocos2d::CCArray::create(v2);\n    cocos2d::CCArray::addObject(m_gameObjects, a1->m_gameObject);\n  }\n  else\n  {\n    m_gameObjects = a1->m_gameObjects;\n  }\n  if ( m_gameObjects )\n  {\n    if ( cocos2d::CCArray::count(m_gameObjects) )\n    {\n      v4 = 0;\n      for ( *(_QWORD *)&a1->m_targetID = -1; v4 < cocos2d::CCArray::count(m_gameObjects); ++v4 )\n      {\n        v5 = cocos2d::CCArray::objectAtIndex(m_gameObjects, v4);\n        m_targetID = a1->m_targetID;\n        m_uAutoReleaseCount = v5[26].m_uAutoReleaseCount;\n        if ( m_targetID == -1 )\n        {\n          a1->m_targetID = m_uAutoReleaseCount;\n        }\n        else if ( m_targetID != m_uAutoReleaseCount )\n        {\n          a1->m_targetID = 0;\n        }\n        m_edgeDirection = a1->m_edgeDirection;\n        m_nTag = v5[33].m_nTag;\n        if ( m_edgeDirection == -1 )\n        {\n          a1->m_edgeDirection = m_nTag;\n        }\n        else if ( m_edgeDirection != m_nTag )\n        {\n          a1->m_edgeDirection = 0;\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; SetupCameraEdgePopup::determineStartValues from 0x1404139d0 to 0x140413ac5 (245 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x1405ded90\n; > <???> @ 0x14069f898\n; > <???> @ 0x14069f8a8\n; > <???> @ 0x1406d8d5c\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1404139d0\npush    rsi                                                            ; +0x5, 0x1404139d5\nsub     rsp, 20h                                                       ; +0x6, 0x1404139d6\nmov     rbx, rcx                                                       ; +0xa, 0x1404139da\ncall    SetupTriggerPopup__determineStartValues                        ; +0xd, 0x1404139dd\ncmp     qword ptr [rbx+290h], 0                                        ; +0x12, 0x1404139e2\njz      short loc_140413A07                                            ; +0x1a, 0x1404139ea\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x1c, 0x1404139ec\nmov     rdx, [rbx+290h]                                                ; +0x22, 0x1404139f2\nmov     rcx, rax                                                       ; +0x29, 0x1404139f9\nmov     rsi, rax                                                       ; +0x2c, 0x1404139fc\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x2f, 0x1404139ff\njmp     short loc_140413A0E                                            ; +0x35, 0x140413a05\nmov     rsi, [rbx+298h]                                                ; +0x37, 0x140413a07\ntest    rsi, rsi                                                       ; +0x3e, 0x140413a0e\njz      loc_140413ABA                                                  ; +0x41, 0x140413a11\nmov     rcx, rsi                                                       ; +0x47, 0x140413a17\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x4a, 0x140413a1a\ntest    eax, eax                                                       ; +0x50, 0x140413a20\njz      loc_140413ABA                                                  ; +0x52, 0x140413a22\nmov     [rsp+28h+arg_0], rbp                                           ; +0x58, 0x140413a28\nmov     rcx, rsi                                                       ; +0x5d, 0x140413a2d\nxor     ebp, ebp                                                       ; +0x60, 0x140413a30\nmov     [rsp+28h+arg_8], rdi                                           ; +0x62, 0x140413a32\nmov     edi, ebp                                                       ; +0x67, 0x140413a37\nmov     qword ptr [rbx+3B0h], 0FFFFFFFFFFFFFFFFh                       ; +0x69, 0x140413a39\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x74, 0x140413a44\ntest    eax, eax                                                       ; +0x7a, 0x140413a4a\njz      short loc_140413AB0                                            ; +0x7c, 0x140413a4c\nxchg    ax, ax                                                         ; +0x7e, 0x140413a4e\nmov     edx, edi                                                       ; +0x80, 0x140413a50\nmov     rcx, rsi                                                       ; +0x82, 0x140413a52\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x85, 0x140413a55\nmov     edx, [rbx+3B0h]                                                ; +0x8b, 0x140413a5b\nmov     ecx, [rax+5C8h]                                                ; +0x91, 0x140413a61\ncmp     edx, 0FFFFFFFFh                                                ; +0x97, 0x140413a67\njnz     short loc_140413A74                                            ; +0x9a, 0x140413a6a\nmov     [rbx+3B0h], ecx                                                ; +0x9c, 0x140413a6c\njmp     short loc_140413A7E                                            ; +0xa2, 0x140413a72\ncmp     edx, ecx                                                       ; +0xa4, 0x140413a74\njz      short loc_140413A7E                                            ; +0xa6, 0x140413a76\nmov     [rbx+3B0h], ebp                                                ; +0xa8, 0x140413a78\nmov     ecx, [rbx+3B4h]                                                ; +0xae, 0x140413a7e\nmov     eax, [rax+748h]                                                ; +0xb4, 0x140413a84\ncmp     ecx, 0FFFFFFFFh                                                ; +0xba, 0x140413a8a\njnz     short loc_140413A97                                            ; +0xbd, 0x140413a8d\nmov     [rbx+3B4h], eax                                                ; +0xbf, 0x140413a8f\njmp     short loc_140413AA1                                            ; +0xc5, 0x140413a95\ncmp     ecx, eax                                                       ; +0xc7, 0x140413a97\njz      short loc_140413AA1                                            ; +0xc9, 0x140413a99\nmov     [rbx+3B4h], ebp                                                ; +0xcb, 0x140413a9b\nmov     rcx, rsi                                                       ; +0xd1, 0x140413aa1\ninc     edi                                                            ; +0xd4, 0x140413aa4\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xd6, 0x140413aa6\ncmp     edi, eax                                                       ; +0xdc, 0x140413aac\njb      short loc_140413A50                                            ; +0xde, 0x140413aae\nmov     rbp, [rsp+28h+arg_0]                                           ; +0xe0, 0x140413ab0\nmov     rdi, [rsp+28h+arg_8]                                           ; +0xe5, 0x140413ab5\nmov     rbx, [rsp+28h+arg_10]                                          ; +0xea, 0x140413aba\nadd     rsp, 20h                                                       ; +0xef, 0x140413abf\npop     rsi                                                            ; +0xf3, 0x140413ac3\nretn                                                                   ; +0xf4, 0x140413ac4", "xrefs": ["<???> @ 0x1405ded90", "<???> @ 0x14069f898", "<???> @ 0x14069f8a8", "<???> @ 0x1406d8d5c"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}