{"type": "func", "start": 4029620, "end": 4029778, "name": "GJLevelList::addLevelToList", "pseudocode": "// \n// GJLevelList::addLevelToList from 0x3d7cb4 to 0x3d7d52 (158 bytes)\n// \n// 2 xrefs:\n// > LevelInfoLayer::cellPerformedAction @ 0x3b085c\n// > GJLevelList::duplicateListLevels @ 0x3d7d80\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 GJLevelList::addLevelToList(GJLevelList *a1, GJGameLevel *a2)\n{\n  int *m_finish; // r1\n  int *i; // r3\n  int *v6; // r0\n  int random; // r4\n  int seed; // r2\n  cocos2d::CCDictionary *m_levelsDict; // r9\n  GJGameLevel *ListSnapshot; // r8\n  _DWORD v11[2]; // [sp+0h] [bp-Ch] BYREF\n\n  v11[0] = a1;\n  v11[1] = a2;\n  m_finish = a1->m_levels.m_finish;\n  for ( i = a1->m_levels.m_start; ; ++i )\n  {\n    v6 = i;\n    random = a2->m_levelID.random;\n    seed = a2->m_levelID.seed;\n    if ( i == m_finish )\n      break;\n    if ( *v6 == random - seed )\n      return;\n  }\n  v11[0] = random - seed;\n  std::vector<int>::emplace_back<int>((void **)&a1->m_levels.m_start, v11);\n  GJLevelList::updateLevelsString(a1);\n  m_levelsDict = a1->m_levelsDict;\n  ListSnapshot = GJGameLevel::getListSnapshot(a2);\n  GameToolbox::intToString((GameToolbox *)v11, a2->m_levelID.random - a2->m_levelID.seed);\n  cocos2d::CCDictionary::setObject((int)m_levelsDict, ListSnapshot);\n  sub_774008(v11);\n  a1->m_modified = 1;\n}", "assembly": "; \n; GJLevelList::addLevelToList from 0x3d7cb4 to 0x3d7d52 (158 bytes)\n; \n; 2 xrefs:\n; > LevelInfoLayer::cellPerformedAction @ 0x3b085c\n; > GJLevelList::duplicateListLevels @ 0x3d7d80\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          {R0-R2,R4-R9,LR}                                       ; +0x0, 0x3d7cb4\nMOV             R5, R1                                                 ; +0x4, 0x3d7cb8\nLDR             R2, =(__stack_chk_guard_ptr - 0x3D7CC6)                ; +0x6, 0x3d7cba\nMOV             R6, R0                                                 ; +0x8, 0x3d7cbc\nLDR.W           R1, [R0,#0x10C]                                        ; +0xa, 0x3d7cbe\nADD             R2, PC; __stack_chk_guard_ptr                          ; +0xe, 0x3d7cc2\nLDR             R2, [R2]; __stack_chk_guard                            ; +0x10, 0x3d7cc4\nLDR             R3, [R2]                                               ; +0x12, 0x3d7cc6\nMOV             R7, R2                                                 ; +0x14, 0x3d7cc8\nSTR             R3, [SP,#0xC+var_8]                                    ; +0x16, 0x3d7cca\nLDR.W           R3, [R0,#0x108]                                        ; +0x18, 0x3d7ccc\nCMP             R3, R1                                                 ; +0x1c, 0x3d7cd0\nMOV             R0, R3                                                 ; +0x1e, 0x3d7cd2\nLDR.W           R4, [R5,#0x10C]                                        ; +0x20, 0x3d7cd4\nLDR.W           R2, [R5,#0x110]                                        ; +0x24, 0x3d7cd8\nBEQ             loc_3D7CEA                                             ; +0x28, 0x3d7cdc\nSUBS            R4, R4, R2                                             ; +0x2a, 0x3d7cde\nLDR             R2, [R0]                                               ; +0x2c, 0x3d7ce0\nADDS            R3, #4                                                 ; +0x2e, 0x3d7ce2\nCMP             R2, R4                                                 ; +0x30, 0x3d7ce4\nBNE             loc_3D7CD0                                             ; +0x32, 0x3d7ce6\nB               loc_3D7D40                                             ; +0x34, 0x3d7ce8\nSUBS            R3, R4, R2                                             ; +0x36, 0x3d7cea\nADD             R4, SP, #0xC+var_4                                     ; +0x38, 0x3d7cec\nADD.W           R0, R6, #0x108                                         ; +0x3a, 0x3d7cee\nSTR.W           R3, [R4,#-8]!                                          ; +0x3e, 0x3d7cf2\nMOV             R1, R4                                                 ; +0x42, 0x3d7cf6\nBL              _ZNSt6vectorIiSaIiEE12emplace_backIJiEEEvDpOT_; std::vector<int>::emplace_back<int>(int &&) ; +0x44, 0x3d7cf8\nMOV             R0, R6; this                                           ; +0x48, 0x3d7cfc\nBL              _ZN11GJLevelList18updateLevelsStringEv; GJLevelList::updateLevelsString(void) ; +0x4a, 0x3d7cfe\nMOV             R0, R5; this                                           ; +0x4e, 0x3d7d02\nLDR.W           R9, [R6,#0x168]                                        ; +0x50, 0x3d7d04\nBL              _ZN11GJGameLevel15getListSnapshotEv; GJGameLevel::getListSnapshot(void) ; +0x54, 0x3d7d08\nLDR.W           R1, [R5,#0x10C]                                        ; +0x58, 0x3d7d0c\nLDR.W           R3, [R5,#0x110]                                        ; +0x5c, 0x3d7d10\nSUBS            R1, R1, R3; int                                        ; +0x60, 0x3d7d14\nMOV             R8, R0                                                 ; +0x62, 0x3d7d16\nMOV             R0, R4; this                                           ; +0x64, 0x3d7d18\nBL              _ZN11GameToolbox11intToStringEi; GameToolbox::intToString(int) ; +0x66, 0x3d7d1a\nMOV             R0, R9; int                                            ; +0x6a, 0x3d7d1e\nMOV             R1, R8; this                                           ; +0x6c, 0x3d7d20\nMOV             R2, R4                                                 ; +0x6e, 0x3d7d22\nBL              _ZN7cocos2d12CCDictionary9setObjectEPNS_8CCObjectERKSs; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const&) ; +0x70, 0x3d7d24\nMOV             R0, R4                                                 ; +0x74, 0x3d7d28\nBL              sub_774008                                             ; +0x76, 0x3d7d2a\nMOVS            R3, #1                                                 ; +0x7a, 0x3d7d2e\nSTRB.W          R3, [R6,#0x14B]                                        ; +0x7c, 0x3d7d30\nB               loc_3D7D40                                             ; +0x80, 0x3d7d34\nMOV             R0, R4                                                 ; +0x82, 0x3d7d36\nBL              sub_774008                                             ; +0x84, 0x3d7d38\nBL              __cxa_end_cleanup                                      ; +0x88, 0x3d7d3c\nLDR             R2, [SP,#0xC+var_8]                                    ; +0x8c, 0x3d7d40\nLDR             R3, [R7]                                               ; +0x8e, 0x3d7d42\nCMP             R2, R3                                                 ; +0x90, 0x3d7d44\nBEQ             loc_3D7D4C                                             ; +0x92, 0x3d7d46\nBLX             __stack_chk_fail                                       ; +0x94, 0x3d7d48\nADD             SP, SP, #0xC                                           ; +0x98, 0x3d7d4c\nPOP.W           {R4-R9,PC}                                             ; +0x9a, 0x3d7d4e", "xrefs": ["LevelInfoLayer::cellPerformedAction @ 0x3b085c", "GJLevelList::duplicateListLevels @ 0x3d7d80"], "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"}