{"type": "func", "start": 5303512, "end": 5303646, "name": "GJBigSprite::unloadAll", "pseudocode": "// \n// GJBigSprite::unloadAll from 0x50ecd8 to 0x50ed5e (134 bytes)\n// \n// 1 xrefs:\n// > MapSelectLayer::onExit @ 0x50fb3c\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 GJBigSprite::unloadAll(GJBigSprite *a1)\n{\n  unsigned int v1; // r7\n  int v3; // r5\n  int v4; // r0\n  GJBigSprite *v5; // [sp+0h] [bp-Ch] BYREF\n\n  v5 = a1;\n  v1 = 0;\n  a1->m_unloadingAll = 1;\n  while ( v1 < cocos2d::CCArray::count(a1->m_spriteNodes) )\n  {\n    v3 = cocos2d::CCArray::objectAtIndex(a1->m_spriteNodes, v1);\n    *(_BYTE *)(v3 + 288) = 0;\n    v4 = *(_DWORD *)(v3 + 268);\n    if ( v4 )\n    {\n      (*(void (__fastcall **)(int))(*(_DWORD *)v4 + 260))(v4);\n      *(_DWORD *)(v3 + 268) = 0;\n      sub_775C20(&v5);\n      GJBigSprite::unloadSprite((int)a1, (const char **)&v5, v1);\n      sub_774008(&v5);\n    }\n    ++v1;\n  }\n}", "assembly": "; \n; GJBigSprite::unloadAll from 0x50ecd8 to 0x50ed5e (134 bytes)\n; \n; 1 xrefs:\n; > MapSelectLayer::onExit @ 0x50fb3c\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\nLDR             R3, =(__stack_chk_guard_ptr - 0x50ECE2)                ; +0x0, 0x50ecd8\nPUSH.W          {R0-R2,R4-R9,LR}                                       ; +0x2, 0x50ecda\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x50ecde\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x50ece0\nMOVS            R7, #0                                                 ; +0xa, 0x50ece2\nMOV             R8, R0                                                 ; +0xc, 0x50ece4\nLDR             R2, [R3]                                               ; +0xe, 0x50ece6\nMOV             R6, R3                                                 ; +0x10, 0x50ece8\nMOV             R9, R7                                                 ; +0x12, 0x50ecea\nMOV             R4, SP                                                 ; +0x14, 0x50ecec\nSTR             R2, [SP,#0xC+var_8]                                    ; +0x16, 0x50ecee\nMOVS            R2, #1                                                 ; +0x18, 0x50ecf0\nSTRB.W          R2, [R0,#0x129]                                        ; +0x1a, 0x50ecf2\nLDR.W           R0, [R8,#0x11C]; this                                  ; +0x1e, 0x50ecf6\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x22, 0x50ecfa\nCMP             R7, R0                                                 ; +0x26, 0x50ecfe\nBCS             loc_50ED4C                                             ; +0x28, 0x50ed00\nLDR.W           R0, [R8,#0x11C]; this                                  ; +0x2a, 0x50ed02\nMOV             R1, R7; unsigned int                                   ; +0x2e, 0x50ed06\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x30, 0x50ed08\nMOV             R5, R0                                                 ; +0x34, 0x50ed0c\nSTRB.W          R9, [R0,#0x120]                                        ; +0x36, 0x50ed0e\nLDR.W           R0, [R0,#0x10C]                                        ; +0x3a, 0x50ed12\nCBZ             R0, loc_50ED3E                                         ; +0x3e, 0x50ed16\nLDR             R3, [R0]                                               ; +0x40, 0x50ed18\nLDR.W           R3, [R3,#0x104]                                        ; +0x42, 0x50ed1a\nBLX             R3                                                     ; +0x46, 0x50ed1e\nADD.W           R1, R5, #0x108                                         ; +0x48, 0x50ed20\nSTR.W           R9, [R5,#0x10C]                                        ; +0x4c, 0x50ed24\nMOV             R0, R4                                                 ; +0x50, 0x50ed28\nBL              sub_775C20                                             ; +0x52, 0x50ed2a\nMOV             R0, R8                                                 ; +0x56, 0x50ed2e\nMOV             R1, R4                                                 ; +0x58, 0x50ed30\nMOV             R2, R7                                                 ; +0x5a, 0x50ed32\nBL              _ZN11GJBigSprite12unloadSpriteESsi; GJBigSprite::unloadSprite(std::string,int) ; +0x5c, 0x50ed34\nMOV             R0, R4                                                 ; +0x60, 0x50ed38\nBL              sub_774008                                             ; +0x62, 0x50ed3a\nADDS            R7, #1                                                 ; +0x66, 0x50ed3e\nB               loc_50ECF6                                             ; +0x68, 0x50ed40\nMOV             R0, R4                                                 ; +0x6a, 0x50ed42\nBL              sub_774008                                             ; +0x6c, 0x50ed44\nBL              __cxa_end_cleanup                                      ; +0x70, 0x50ed48\nLDR             R2, [SP,#0xC+var_8]                                    ; +0x74, 0x50ed4c\nLDR             R3, [R6]                                               ; +0x76, 0x50ed4e\nCMP             R2, R3                                                 ; +0x78, 0x50ed50\nBEQ             loc_50ED58                                             ; +0x7a, 0x50ed52\nBLX             __stack_chk_fail                                       ; +0x7c, 0x50ed54\nADD             SP, SP, #0xC                                           ; +0x80, 0x50ed58\nPOP.W           {R4-R9,PC}                                             ; +0x82, 0x50ed5a", "xrefs": ["MapSelectLayer::onExit @ 0x50fb3c"], "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"}