{"type": "func", "start": 6285316, "end": 6285570, "name": "DS_Dictionary::getRectArrayForKey", "pseudocode": "// \n// DS_Dictionary::getRectArrayForKey from 0x5fe804 to 0x5fe902 (254 bytes)\n// \n// 0 xrefs:\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\nstd::vector<cocos2d::CCRect> *DS_Dictionary::getRectArrayForKey(\n        std::vector<cocos2d::CCRect> *__return_ptr retstr,\n        DS_Dictionary *a2,\n        const char *a3)\n{\n  unsigned int v4; // r6\n  cocos2d::CCRect *m_finish; // r0\n  signed int v7; // r0\n  int v8; // r5\n  bool v9; // cf\n  unsigned int v10; // r5\n  cocos2d::CCRect *v11; // r7\n  cocos2d::CCRect *v12; // r0\n  cocos2d::CCRect *m_start; // r3\n  cocos2d::CCRect *v14; // r0\n  cocos2d::CCRect *v15; // r2\n  cocos2d::CCRect *v16; // r11\n  cocos2d::CCRect *v18; // [sp+8h] [bp-2Ch]\n  cocos2d::CCRect *v19; // [sp+Ch] [bp-28h]\n  std::vector<std::string> v20; // [sp+10h] [bp-24h] BYREF\n  cocos2d::CCRect v21; // [sp+1Ch] [bp-18h] BYREF\n\n  v4 = 0;\n  DS_Dictionary::getStringArrayForKey(&v20, a2, a3);\n  retstr->m_start = nullptr;\n  retstr->m_finish = nullptr;\n  retstr->m_reserveEnd = nullptr;\n  while ( v4 < v20.m_finish - v20.m_start )\n  {\n    cocos2d::CCRect::CCRect(&v21);\n    m_finish = retstr->m_finish;\n    if ( m_finish != retstr->m_reserveEnd )\n    {\n      if ( m_finish )\n        cocos2d::CCRect::CCRect(m_finish, &v21);\n      ++retstr->m_finish;\n      goto LABEL_24;\n    }\n    v7 = m_finish - retstr->m_start;\n    if ( v7 )\n      v8 = v7;\n    else\n      v8 = 1;\n    v9 = __CFADD__(v8, v7);\n    v10 = v8 + v7;\n    if ( v9 || v10 >= 0x10000000 )\n    {\n      v10 = 0xFFFFFFF;\n    }\n    else if ( !v10 )\n    {\n      v11 = nullptr;\n      goto LABEL_14;\n    }\n    v11 = (cocos2d::CCRect *)operator new(16 * v10);\nLABEL_14:\n    v12 = (cocos2d::CCRect *)((char *)v11 + (char *)retstr->m_finish - (char *)retstr->m_start);\n    if ( v12 )\n      cocos2d::CCRect::CCRect(v12, &v21);\n    m_start = retstr->m_start;\n    v14 = v11;\n    v15 = retstr->m_finish;\n    while ( 1 )\n    {\n      v16 = v14 + 1;\n      if ( m_start == v15 )\n        break;\n      if ( v14 )\n      {\n        v19 = v15;\n        v18 = m_start;\n        cocos2d::CCRect::CCRect(v14, m_start);\n        v15 = v19;\n        m_start = v18;\n      }\n      ++m_start;\n      v14 = v16;\n    }\n    if ( retstr->m_start )\n      operator delete(retstr->m_start);\n    retstr->m_start = v11;\n    retstr->m_finish = v16;\n    retstr->m_reserveEnd = &v11[v10];\nLABEL_24:\n    if ( !DS_Dictionary::rectFromString(a2, (int)&v20.m_start[v4], retstr->m_finish - 1) )\n    {\n      retstr->m_finish = retstr->m_start;\n      break;\n    }\n    ++v4;\n  }\n  std::vector<std::string>::~vector((void **)&v20.m_start);\n  return retstr;\n}", "assembly": "; \n; DS_Dictionary::getRectArrayForKey from 0x5fe804 to 0x5fe902 (254 bytes)\n; \n; 0 xrefs:\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\nPUSH.W          {R4-R11,LR}                                            ; +0x0, 0x5fe804\nSUB             SP, SP, #0x34                                          ; +0x4, 0x5fe808\nLDR             R7, =(__stack_chk_guard_ptr - 0x5FE81A)                ; +0x6, 0x5fe80a\nADD.W           R9, SP, #0x34+var_24                                   ; +0x8, 0x5fe80c\nADD.W           R8, SP, #0x34+var_18                                   ; +0xc, 0x5fe810\nMOV             R4, R0                                                 ; +0x10, 0x5fe814\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0x12, 0x5fe816\nLDR             R7, [R7]; __stack_chk_guard                            ; +0x14, 0x5fe818\nMOV             R0, R9; this                                           ; +0x16, 0x5fe81a\nMOVS            R6, #0                                                 ; +0x18, 0x5fe81c\nMOV             R10, R1                                                ; +0x1a, 0x5fe81e\nLDR             R3, [R7]                                               ; +0x1c, 0x5fe820\nSTR             R3, [SP,#0x34+var_8]                                   ; +0x1e, 0x5fe822\nBL              _ZN13DS_Dictionary20getStringArrayForKeyEPKc; DS_Dictionary::getStringArrayForKey(char const*) ; +0x20, 0x5fe824\nSTR             R6, [R4]                                               ; +0x24, 0x5fe828\nSTR             R6, [R4,#4]                                            ; +0x26, 0x5fe82a\nSTR             R6, [R4,#8]                                            ; +0x28, 0x5fe82c\nSTR             R7, [SP,#0x34+var_30]                                  ; +0x2a, 0x5fe82e\nLDR             R2, [SP,#0x34+var_24]                                  ; +0x2c, 0x5fe830\nLDR             R3, [SP,#0x34+var_20]                                  ; +0x2e, 0x5fe832\nSUBS            R3, R3, R2                                             ; +0x30, 0x5fe834\nCMP.W           R6, R3,ASR#2                                           ; +0x32, 0x5fe836\nBCS             loc_5FE8DE                                             ; +0x36, 0x5fe83a\nMOV             R0, R8; this                                           ; +0x38, 0x5fe83c\nBL              _ZN7cocos2d6CCRectC1Ev; cocos2d::CCRect::CCRect(void)  ; +0x3a, 0x5fe83e\nLDR             R0, [R4,#4]; this                                      ; +0x3e, 0x5fe842\nLDR             R3, [R4,#8]                                            ; +0x40, 0x5fe844\nCMP             R0, R3                                                 ; +0x42, 0x5fe846\nBEQ             loc_5FE85A                                             ; +0x44, 0x5fe848\nCBZ             R0, loc_5FE852                                         ; +0x46, 0x5fe84a\nMOV             R1, R8; cocos2d::CCRect *                              ; +0x48, 0x5fe84c\nBL              _ZN7cocos2d6CCRectC1ERKS0_; cocos2d::CCRect::CCRect(cocos2d::CCRect const&) ; +0x4a, 0x5fe84e\nLDR             R3, [R4,#4]                                            ; +0x4e, 0x5fe852\nADDS            R3, #0x10                                              ; +0x50, 0x5fe854\nSTR             R3, [R4,#4]                                            ; +0x52, 0x5fe856\nB               loc_5FE8C2                                             ; +0x54, 0x5fe858\nLDR             R3, [R4]                                               ; +0x56, 0x5fe85a\nSUBS            R0, R0, R3                                             ; +0x58, 0x5fe85c\nASRS            R0, R0, #4                                             ; +0x5a, 0x5fe85e\nITE NE                                                                 ; +0x5c, 0x5fe860\nMOVNE           R5, R0                                                 ; +0x5e, 0x5fe862\nMOVEQ           R5, #1                                                 ; +0x60, 0x5fe864\nADDS            R5, R5, R0                                             ; +0x62, 0x5fe866\nBCS             loc_5FE870                                             ; +0x64, 0x5fe868\nCMP.W           R5, #0x10000000                                        ; +0x66, 0x5fe86a\nBCC             loc_5FE8F4                                             ; +0x6a, 0x5fe86e\nMOV             R5, #0xFFFFFFF                                         ; +0x6c, 0x5fe870\nLSLS            R0, R5, #4; unsigned int                               ; +0x70, 0x5fe874\nBL              _Znwj; operator new(uint)                              ; +0x72, 0x5fe876\nMOV             R7, R0                                                 ; +0x76, 0x5fe87a\nLDM.W           R4, {R0,R2}                                            ; +0x78, 0x5fe87c\nSUBS            R0, R2, R0                                             ; +0x7c, 0x5fe880\nADDS            R0, R7, R0; this                                       ; +0x7e, 0x5fe882\nBEQ             loc_5FE88C                                             ; +0x80, 0x5fe884\nMOV             R1, R8; cocos2d::CCRect *                              ; +0x82, 0x5fe886\nBL              _ZN7cocos2d6CCRectC1ERKS0_; cocos2d::CCRect::CCRect(cocos2d::CCRect const&) ; +0x84, 0x5fe888\nLDR             R3, [R4]                                               ; +0x88, 0x5fe88c\nMOV             R0, R7; this                                           ; +0x8a, 0x5fe88e\nLDR             R2, [R4,#4]                                            ; +0x8c, 0x5fe890\nCMP             R3, R2                                                 ; +0x8e, 0x5fe892\nADD.W           R11, R0, #0x10                                         ; +0x90, 0x5fe894\nBEQ             loc_5FE8B0                                             ; +0x94, 0x5fe898\nCBZ             R0, loc_5FE8AA                                         ; +0x96, 0x5fe89a\nMOV             R1, R3; cocos2d::CCRect *                              ; +0x98, 0x5fe89c\nSTR             R2, [SP,#0x34+var_28]                                  ; +0x9a, 0x5fe89e\nSTR             R3, [SP,#0x34+var_2C]                                  ; +0x9c, 0x5fe8a0\nBL              _ZN7cocos2d6CCRectC1ERKS0_; cocos2d::CCRect::CCRect(cocos2d::CCRect const&) ; +0x9e, 0x5fe8a2\nLDR             R2, [SP,#0x34+var_28]                                  ; +0xa2, 0x5fe8a6\nLDR             R3, [SP,#0x34+var_2C]                                  ; +0xa4, 0x5fe8a8\nADDS            R3, #0x10                                              ; +0xa6, 0x5fe8aa\nMOV             R0, R11                                                ; +0xa8, 0x5fe8ac\nB               loc_5FE892                                             ; +0xaa, 0x5fe8ae\nLDR             R0, [R4]; p                                            ; +0xac, 0x5fe8b0\nCBZ             R0, loc_5FE8B8                                         ; +0xae, 0x5fe8b2\nBL              _ZdlPv; operator delete(void *)                        ; +0xb0, 0x5fe8b4\nADD.W           R3, R7, R5,LSL#4                                       ; +0xb4, 0x5fe8b8\nSTM.W           R4, {R7,R11}                                           ; +0xb8, 0x5fe8bc\nSTR             R3, [R4,#8]                                            ; +0xbc, 0x5fe8c0\nLDR             R2, [R4,#4]                                            ; +0xbe, 0x5fe8c2\nMOV             R0, R10                                                ; +0xc0, 0x5fe8c4\nLDR             R1, [SP,#0x34+var_24]                                  ; +0xc2, 0x5fe8c6\nSUBS            R2, #0x10                                              ; +0xc4, 0x5fe8c8\nADD.W           R1, R1, R6,LSL#2                                       ; +0xc6, 0x5fe8ca\nBL              _ZN13DS_Dictionary14rectFromStringERKSsRN7cocos2d6CCRectE; DS_Dictionary::rectFromString(std::string const&,cocos2d::CCRect &) ; +0xca, 0x5fe8ce\nCBNZ            R0, loc_5FE8DA                                         ; +0xce, 0x5fe8d2\nLDR             R3, [R4]                                               ; +0xd0, 0x5fe8d4\nSTR             R3, [R4,#4]                                            ; +0xd2, 0x5fe8d6\nB               loc_5FE8DE                                             ; +0xd4, 0x5fe8d8\nADDS            R6, #1                                                 ; +0xd6, 0x5fe8da\nB               loc_5FE830                                             ; +0xd8, 0x5fe8dc\nMOV             R0, R9                                                 ; +0xda, 0x5fe8de\nBL              _ZNSt6vectorISsSaISsEED2Ev; std::vector<std::string>::~vector() ; +0xdc, 0x5fe8e0\nLDR             R3, [SP,#0x34+var_30]                                  ; +0xe0, 0x5fe8e4\nLDR             R2, [SP,#0x34+var_8]                                   ; +0xe2, 0x5fe8e6\nMOV             R0, R4                                                 ; +0xe4, 0x5fe8e8\nLDR             R3, [R3]                                               ; +0xe6, 0x5fe8ea\nCMP             R2, R3                                                 ; +0xe8, 0x5fe8ec\nBEQ             loc_5FE8FC                                             ; +0xea, 0x5fe8ee\nBLX             __stack_chk_fail                                       ; +0xec, 0x5fe8f0\nCMP             R5, #0                                                 ; +0xf0, 0x5fe8f4\nBNE             loc_5FE874                                             ; +0xf2, 0x5fe8f6\nMOV             R7, R5                                                 ; +0xf4, 0x5fe8f8\nB               loc_5FE87C                                             ; +0xf6, 0x5fe8fa\nADD             SP, SP, #0x34 ; '4'                                    ; +0xf8, 0x5fe8fc\nPOP.W           {R4-R11,PC}                                            ; +0xfa, 0x5fe8fe", "xrefs": [], "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"}