{"type": "func", "start": 5373167792, "end": 5373168127, "name": "SetupRandTriggerPopup::determineStartValues", "pseudocode": "// \n// SetupRandTriggerPopup::determineStartValues from 0x1404408b0 to 0x1404409ff (335 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x1405ec7c8\n// > <???> @ 0x1406a1fec\n// > <???> @ 0x1406a2020\n// > <???> @ 0x1406da304\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 SetupRandTriggerPopup::determineStartValues(SetupRandTriggerPopup *a1)\n{\n  __int64 v2; // rcx\n  cocos2d::CCArray *m_gameObjects; // rdi\n  unsigned int v4; // esi\n  struct cocos2d::CCObject *v5; // rdx\n  int m_groupID1; // eax\n  int m_uAutoReleaseCount; // ecx\n  int m_groupID2; // ecx\n  int m_eObjType; // eax\n  float m_chancePercent; // xmm1_4\n  float v11; // xmm0_4\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      *(_QWORD *)&a1->m_groupID1 = -1;\n      for ( a1->m_chancePercent = -1.0; v4 < cocos2d::CCArray::count(m_gameObjects); ++v4 )\n      {\n        v5 = cocos2d::CCArray::objectAtIndex(m_gameObjects, v4);\n        m_groupID1 = a1->m_groupID1;\n        m_uAutoReleaseCount = v5[26].m_uAutoReleaseCount;\n        if ( m_groupID1 == -1 )\n        {\n          a1->m_groupID1 = m_uAutoReleaseCount;\n        }\n        else if ( m_groupID1 != m_uAutoReleaseCount )\n        {\n          a1->m_groupID1 = 0;\n        }\n        m_groupID2 = a1->m_groupID2;\n        m_eObjType = v5[26].m_eObjType;\n        if ( m_groupID2 == -1 )\n        {\n          a1->m_groupID2 = m_eObjType;\n        }\n        else if ( m_groupID2 != m_eObjType )\n        {\n          a1->m_groupID2 = 0;\n        }\n        m_chancePercent = a1->m_chancePercent;\n        v11 = *(float *)&v5[26].m_nLuaID;\n        if ( m_chancePercent == -1.0 )\n        {\n          a1->m_chancePercent = v11;\n        }\n        else if ( m_chancePercent != v11 )\n        {\n          a1->m_chancePercent = 0.0;\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; SetupRandTriggerPopup::determineStartValues from 0x1404408b0 to 0x1404409ff (335 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x1405ec7c8\n; > <???> @ 0x1406a1fec\n; > <???> @ 0x1406a2020\n; > <???> @ 0x1406da304\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, 0x1404408b0\npush    rdi                                                            ; +0x5, 0x1404408b5\nsub     rsp, 30h                                                       ; +0x6, 0x1404408b6\nmov     rbx, rcx                                                       ; +0xa, 0x1404408ba\ncall    SetupTriggerPopup__determineStartValues                        ; +0xd, 0x1404408bd\ncmp     qword ptr [rbx+290h], 0                                        ; +0x12, 0x1404408c2\njz      short loc_1404408E7                                            ; +0x1a, 0x1404408ca\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x1c, 0x1404408cc\nmov     rdx, [rbx+290h]                                                ; +0x22, 0x1404408d2\nmov     rcx, rax                                                       ; +0x29, 0x1404408d9\nmov     rdi, rax                                                       ; +0x2c, 0x1404408dc\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x2f, 0x1404408df\njmp     short loc_1404408EE                                            ; +0x35, 0x1404408e5\nmov     rdi, [rbx+298h]                                                ; +0x37, 0x1404408e7\ntest    rdi, rdi                                                       ; +0x3e, 0x1404408ee\njz      loc_1404409F4                                                  ; +0x41, 0x1404408f1\nmov     rcx, rdi                                                       ; +0x47, 0x1404408f7\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x4a, 0x1404408fa\ntest    eax, eax                                                       ; +0x50, 0x140440900\njz      loc_1404409F4                                                  ; +0x52, 0x140440902\nmov     [rsp+38h+arg_0], rbp                                           ; +0x58, 0x140440908\nmov     rcx, rdi                                                       ; +0x5d, 0x14044090d\nxor     ebp, ebp                                                       ; +0x60, 0x140440910\nmov     [rsp+38h+arg_8], rsi                                           ; +0x62, 0x140440912\nmov     esi, ebp                                                       ; +0x67, 0x140440917\nmov     qword ptr [rbx+3D0h], 0FFFFFFFFFFFFFFFFh                       ; +0x69, 0x140440919\nmov     dword ptr [rbx+3B8h], 0BF800000h                               ; +0x74, 0x140440924\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x7e, 0x14044092e\ntest    eax, eax                                                       ; +0x84, 0x140440934\njz      loc_1404409EA                                                  ; +0x86, 0x140440936\nmovaps  [rsp+38h+var_18], xmm6                                         ; +0x8c, 0x14044093c\nmovss   xmm6, cs:dword_1406236F0                                       ; +0x91, 0x140440941\nnop     dword ptr [rax+00000000h]                                      ; +0x99, 0x140440949\nmov     edx, esi                                                       ; +0xa0, 0x140440950\nmov     rcx, rdi                                                       ; +0xa2, 0x140440952\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xa5, 0x140440955\nmov     rdx, rax                                                       ; +0xab, 0x14044095b\nmov     eax, [rbx+3D0h]                                                ; +0xae, 0x14044095e\nmov     ecx, [rdx+5C8h]                                                ; +0xb4, 0x140440964\ncmp     eax, 0FFFFFFFFh                                                ; +0xba, 0x14044096a\njnz     short loc_140440977                                            ; +0xbd, 0x14044096d\nmov     [rbx+3D0h], ecx                                                ; +0xbf, 0x14044096f\njmp     short loc_140440981                                            ; +0xc5, 0x140440975\ncmp     eax, ecx                                                       ; +0xc7, 0x140440977\njz      short loc_140440981                                            ; +0xc9, 0x140440979\nmov     [rbx+3D0h], ebp                                                ; +0xcb, 0x14044097b\nmov     ecx, [rbx+3D4h]                                                ; +0xd1, 0x140440981\nmov     eax, [rdx+5CCh]                                                ; +0xd7, 0x140440987\ncmp     ecx, 0FFFFFFFFh                                                ; +0xdd, 0x14044098d\njnz     short loc_14044099A                                            ; +0xe0, 0x140440990\nmov     [rbx+3D4h], eax                                                ; +0xe2, 0x140440992\njmp     short loc_1404409A4                                            ; +0xe8, 0x140440998\ncmp     ecx, eax                                                       ; +0xea, 0x14044099a\njz      short loc_1404409A4                                            ; +0xec, 0x14044099c\nmov     [rbx+3D4h], ebp                                                ; +0xee, 0x14044099e\nmovss   xmm1, dword ptr [rbx+3B8h]                                     ; +0xf4, 0x1404409a4\nucomiss xmm1, xmm6                                                     ; +0xfc, 0x1404409ac\nmovss   xmm0, dword ptr [rdx+5BCh]                                     ; +0xff, 0x1404409af\njp      short loc_1404409C5                                            ; +0x107, 0x1404409b7\njnz     short loc_1404409C5                                            ; +0x109, 0x1404409b9\nmovss   dword ptr [rbx+3B8h], xmm0                                     ; +0x10b, 0x1404409bb\njmp     short loc_1404409D2                                            ; +0x113, 0x1404409c3\nucomiss xmm1, xmm0                                                     ; +0x115, 0x1404409c5\njp      short loc_1404409CC                                            ; +0x118, 0x1404409c8\njz      short loc_1404409D2                                            ; +0x11a, 0x1404409ca\nmov     [rbx+3B8h], ebp                                                ; +0x11c, 0x1404409cc\nmov     rcx, rdi                                                       ; +0x122, 0x1404409d2\ninc     esi                                                            ; +0x125, 0x1404409d5\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x127, 0x1404409d7\ncmp     esi, eax                                                       ; +0x12d, 0x1404409dd\njb      loc_140440950                                                  ; +0x12f, 0x1404409df\nmovaps  xmm6, [rsp+38h+var_18]                                         ; +0x135, 0x1404409e5\nmov     rbp, [rsp+38h+arg_0]                                           ; +0x13a, 0x1404409ea\nmov     rsi, [rsp+38h+arg_8]                                           ; +0x13f, 0x1404409ef\nmov     rbx, [rsp+38h+arg_10]                                          ; +0x144, 0x1404409f4\nadd     rsp, 30h                                                       ; +0x149, 0x1404409f9\npop     rdi                                                            ; +0x14d, 0x1404409fd\nretn                                                                   ; +0x14e, 0x1404409fe", "xrefs": ["<???> @ 0x1405ec7c8", "<???> @ 0x1406a1fec", "<???> @ 0x1406a2020", "<???> @ 0x1406da304"], "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"}