{"type": "func", "start": 5373315424, "end": 5373315772, "name": "SetupTouchTogglePopup::determineStartValues", "pseudocode": "// \n// SetupTouchTogglePopup::determineStartValues from 0x140464960 to 0x140464abc (348 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x1405faae8\n// > <???> @ 0x1406a47a0\n// > <???> @ 0x1406a47b0\n// > <???> @ 0x1406dafa0\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 SetupTouchTogglePopup::determineStartValues(SetupTouchTogglePopup *a1)\n{\n  __int64 v2; // rcx\n  cocos2d::CCArray *m_gameObjects; // rdi\n  unsigned int v4; // esi\n  struct cocos2d::CCObject *v5; // rax\n  int m_groupID; // edx\n  int m_uAutoReleaseCount; // ecx\n  int m_toggleMode; // edx\n  int m_uIndexInArray; // ecx\n  int m_playerMode; // edx\n  int m_uUnknown; // ecx\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      a1->m_holdMode = 1;\n      a1->m_groupID = -1;\n      a1->m_dualMode = 1;\n      for ( *(_QWORD *)&a1->m_toggleMode = -1; v4 < cocos2d::CCArray::count(m_gameObjects); ++v4 )\n      {\n        v5 = cocos2d::CCArray::objectAtIndex(m_gameObjects, v4);\n        if ( !BYTE2(v5[29].m_eObjType) )\n          a1->m_holdMode = 0;\n        if ( !LOBYTE(v5[29].m_unknown2) )\n          a1->m_dualMode = 0;\n        m_groupID = a1->m_groupID;\n        m_uAutoReleaseCount = v5[26].m_uAutoReleaseCount;\n        if ( m_groupID == -1 )\n        {\n          a1->m_groupID = m_uAutoReleaseCount;\n        }\n        else if ( m_groupID != m_uAutoReleaseCount )\n        {\n          a1->m_groupID = 0;\n        }\n        m_toggleMode = a1->m_toggleMode;\n        m_uIndexInArray = v5[29].m_uIndexInArray;\n        if ( m_toggleMode == -1 )\n        {\n          a1->m_toggleMode = m_uIndexInArray;\n        }\n        else if ( m_toggleMode != m_uIndexInArray )\n        {\n          a1->m_toggleMode = 0;\n        }\n        m_playerMode = a1->m_playerMode;\n        m_uUnknown = v5[29].m_uUnknown;\n        if ( m_playerMode == -1 )\n        {\n          a1->m_playerMode = m_uUnknown;\n        }\n        else if ( m_playerMode != m_uUnknown )\n        {\n          a1->m_playerMode = 0;\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; SetupTouchTogglePopup::determineStartValues from 0x140464960 to 0x140464abc (348 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x1405faae8\n; > <???> @ 0x1406a47a0\n; > <???> @ 0x1406a47b0\n; > <???> @ 0x1406dafa0\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, 0x140464960\npush    rdi                                                            ; +0x5, 0x140464965\nsub     rsp, 20h                                                       ; +0x6, 0x140464966\nmov     rbx, rcx                                                       ; +0xa, 0x14046496a\ncall    SetupTriggerPopup__determineStartValues                        ; +0xd, 0x14046496d\ncmp     qword ptr [rbx+290h], 0                                        ; +0x12, 0x140464972\njz      short loc_140464997                                            ; +0x1a, 0x14046497a\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x1c, 0x14046497c\nmov     rdx, [rbx+290h]                                                ; +0x22, 0x140464982\nmov     rcx, rax                                                       ; +0x29, 0x140464989\nmov     rdi, rax                                                       ; +0x2c, 0x14046498c\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x2f, 0x14046498f\njmp     short loc_14046499E                                            ; +0x35, 0x140464995\nmov     rdi, [rbx+298h]                                                ; +0x37, 0x140464997\ntest    rdi, rdi                                                       ; +0x3e, 0x14046499e\njz      loc_140464AB1                                                  ; +0x41, 0x1404649a1\nmov     rcx, rdi                                                       ; +0x47, 0x1404649a7\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x4a, 0x1404649aa\ntest    eax, eax                                                       ; +0x50, 0x1404649b0\njz      loc_140464AB1                                                  ; +0x52, 0x1404649b2\nmov     [rsp+28h+arg_0], rbp                                           ; +0x58, 0x1404649b8\nmov     rcx, rdi                                                       ; +0x5d, 0x1404649bd\nxor     ebp, ebp                                                       ; +0x60, 0x1404649c0\nmov     [rsp+28h+arg_8], rsi                                           ; +0x62, 0x1404649c2\nmov     esi, ebp                                                       ; +0x67, 0x1404649c7\nmov     byte ptr [rbx+3B4h], 1                                         ; +0x69, 0x1404649c9\nmov     dword ptr [rbx+3B0h], 0FFFFFFFFh                               ; +0x70, 0x1404649d0\nmov     byte ptr [rbx+3D0h], 1                                         ; +0x7a, 0x1404649da\nmov     qword ptr [rbx+3B8h], 0FFFFFFFFFFFFFFFFh                       ; +0x81, 0x1404649e1\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x8c, 0x1404649ec\ntest    eax, eax                                                       ; +0x92, 0x1404649f2\njz      loc_140464AA7                                                  ; +0x94, 0x1404649f4\nnop     word ptr [rax+rax+00h]                                         ; +0x9a, 0x1404649fa\nmov     edx, esi                                                       ; +0xa0, 0x140464a00\nmov     rcx, rdi                                                       ; +0xa2, 0x140464a02\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xa5, 0x140464a05\ncmp     [rax+676h], bpl                                                ; +0xab, 0x140464a0b\njnz     short loc_140464A1B                                            ; +0xb2, 0x140464a12\nmov     [rbx+3B4h], bpl                                                ; +0xb4, 0x140464a14\ncmp     [rax+680h], bpl                                                ; +0xbb, 0x140464a1b\njnz     short loc_140464A2B                                            ; +0xc2, 0x140464a22\nmov     [rbx+3D0h], bpl                                                ; +0xc4, 0x140464a24\nmov     edx, [rbx+3B0h]                                                ; +0xcb, 0x140464a2b\nmov     ecx, [rax+5C8h]                                                ; +0xd1, 0x140464a31\ncmp     edx, 0FFFFFFFFh                                                ; +0xd7, 0x140464a37\njnz     short loc_140464A44                                            ; +0xda, 0x140464a3a\nmov     [rbx+3B0h], ecx                                                ; +0xdc, 0x140464a3c\njmp     short loc_140464A4E                                            ; +0xe2, 0x140464a42\ncmp     edx, ecx                                                       ; +0xe4, 0x140464a44\njz      short loc_140464A4E                                            ; +0xe6, 0x140464a46\nmov     [rbx+3B0h], ebp                                                ; +0xe8, 0x140464a48\nmov     edx, [rbx+3B8h]                                                ; +0xee, 0x140464a4e\nmov     ecx, [rax+678h]                                                ; +0xf4, 0x140464a54\ncmp     edx, 0FFFFFFFFh                                                ; +0xfa, 0x140464a5a\njnz     short loc_140464A67                                            ; +0xfd, 0x140464a5d\nmov     [rbx+3B8h], ecx                                                ; +0xff, 0x140464a5f\njmp     short loc_140464A71                                            ; +0x105, 0x140464a65\ncmp     edx, ecx                                                       ; +0x107, 0x140464a67\njz      short loc_140464A71                                            ; +0x109, 0x140464a69\nmov     [rbx+3B8h], ebp                                                ; +0x10b, 0x140464a6b\nmov     edx, [rbx+3BCh]                                                ; +0x111, 0x140464a71\nmov     ecx, [rax+67Ch]                                                ; +0x117, 0x140464a77\ncmp     edx, 0FFFFFFFFh                                                ; +0x11d, 0x140464a7d\njnz     short loc_140464A8A                                            ; +0x120, 0x140464a80\nmov     [rbx+3BCh], ecx                                                ; +0x122, 0x140464a82\njmp     short loc_140464A94                                            ; +0x128, 0x140464a88\ncmp     edx, ecx                                                       ; +0x12a, 0x140464a8a\njz      short loc_140464A94                                            ; +0x12c, 0x140464a8c\nmov     [rbx+3BCh], ebp                                                ; +0x12e, 0x140464a8e\nmov     rcx, rdi                                                       ; +0x134, 0x140464a94\ninc     esi                                                            ; +0x137, 0x140464a97\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x139, 0x140464a99\ncmp     esi, eax                                                       ; +0x13f, 0x140464a9f\njb      loc_140464A00                                                  ; +0x141, 0x140464aa1\nmov     rbp, [rsp+28h+arg_0]                                           ; +0x147, 0x140464aa7\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x14c, 0x140464aac\nmov     rbx, [rsp+28h+arg_10]                                          ; +0x151, 0x140464ab1\nadd     rsp, 20h                                                       ; +0x156, 0x140464ab6\npop     rdi                                                            ; +0x15a, 0x140464aba\nretn                                                                   ; +0x15b, 0x140464abb", "xrefs": ["<???> @ 0x1405faae8", "<???> @ 0x1406a47a0", "<???> @ 0x1406a47b0", "<???> @ 0x1406dafa0"], "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"}