{"type": "func", "start": 5303652, "end": 5303856, "name": "GJBigSprite::finishedLoadingSpriteAsync", "pseudocode": "// \n// GJBigSprite::finishedLoadingSpriteAsync from 0x50ed64 to 0x50ee30 (204 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\nvoid GJBigSprite::finishedLoadingSpriteAsync(GJBigSprite *a1, cocos2d::CCObject *a2)\n{\n  unsigned int v3; // r8\n  int v4; // r0\n  const char *v5; // r1\n  int v6; // r4\n  int v7; // r0\n  cocos2d::CCNode *v8; // r5\n  void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8\n  int v10; // r0\n  cocos2d::CCNode_vtbl *v11; // r3\n  const char *v12[2]; // [sp+0h] [bp-8h] BYREF\n\n  v12[0] = (const char *)a1;\n  v12[1] = (const char *)a2;\n  v3 = a2->getTag(a2);\n  v4 = cocos2d::CCArray::objectAtIndex(a1->m_spriteNodes, v3);\n  v6 = v4;\n  if ( *(_BYTE *)(v4 + 288) )\n  {\n    v7 = *(_DWORD *)(v4 + 268);\n    if ( v7 && (*(int (__fastcall **)(int))(*(_DWORD *)v7 + 32))(v7) == -1 )\n    {\n      (*(void (__fastcall **)(_DWORD))(**(_DWORD **)(v6 + 268) + 260))(*(_DWORD *)(v6 + 268));\n      *(_DWORD *)(v6 + 268) = 0;\n    }\n    if ( !*(_DWORD *)(v6 + 268) )\n    {\n      v8 = (cocos2d::CCNode *)cocos2d::CCSprite::create(*(cocos2d::CCSprite **)(v6 + 264), v5);\n      setPosition = v8->setPosition;\n      v10 = (*(int (__fastcall **)(int))(*(_DWORD *)v6 + 96))(v6);\n      setPosition(v8, (const cocos2d::CCPoint *)v10);\n      a1->addChild(a1, v8);\n      v11 = v8->__vftable;\n      *(_DWORD *)(v6 + 268) = v8;\n      ((void (__fastcall *)(cocos2d::CCNode *, int))v11->setScale)(v8, 1065369993);\n    }\n  }\n  else\n  {\n    sub_775C20(v12);\n    GJBigSprite::unloadSprite((int)a1, v12, v3);\n    sub_774008(v12);\n  }\n}", "assembly": "; \n; GJBigSprite::finishedLoadingSpriteAsync from 0x50ed64 to 0x50ee30 (204 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          {R0,R1,R4-R8,LR}                                       ; +0x0, 0x50ed64\nMOV             R7, R0                                                 ; +0x4, 0x50ed68\nLDR             R6, =(__stack_chk_guard_ptr - 0x50ED72)                ; +0x6, 0x50ed6a\nMOV             R0, R1                                                 ; +0x8, 0x50ed6c\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xa, 0x50ed6e\nLDR             R6, [R6]; __stack_chk_guard                            ; +0xc, 0x50ed70\nLDR             R3, [R6]                                               ; +0xe, 0x50ed72\nSTR             R3, [SP,#8+var_4]                                      ; +0x10, 0x50ed74\nLDR             R3, [R1]                                               ; +0x12, 0x50ed76\nLDR             R3, [R3,#0x20]                                         ; +0x14, 0x50ed78\nBLX             R3                                                     ; +0x16, 0x50ed7a\nMOV             R8, R0                                                 ; +0x18, 0x50ed7c\nLDR.W           R0, [R7,#0x11C]; this                                  ; +0x1a, 0x50ed7e\nMOV             R1, R8; unsigned int                                   ; +0x1e, 0x50ed82\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x20, 0x50ed84\nLDRB.W          R3, [R0,#0x120]                                        ; +0x24, 0x50ed88\nMOV             R4, R0                                                 ; +0x28, 0x50ed8c\nCBZ             R3, loc_50EDE2                                         ; +0x2a, 0x50ed8e\nLDR.W           R0, [R0,#0x10C]                                        ; +0x2c, 0x50ed90\nCBZ             R0, loc_50EDA0                                         ; +0x30, 0x50ed94\nLDR             R3, [R0]                                               ; +0x32, 0x50ed96\nLDR             R3, [R3,#0x20]                                         ; +0x34, 0x50ed98\nBLX             R3                                                     ; +0x36, 0x50ed9a\nADDS            R0, #1                                                 ; +0x38, 0x50ed9c\nBEQ             loc_50EE0A                                             ; +0x3a, 0x50ed9e\nLDR.W           R3, [R4,#0x10C]                                        ; +0x3c, 0x50eda0\nCMP             R3, #0                                                 ; +0x40, 0x50eda4\nBNE             loc_50EE1E                                             ; +0x42, 0x50eda6\nLDR.W           R0, [R4,#0x108]; this                                  ; +0x44, 0x50eda8\nBL              _ZN7cocos2d8CCSprite6createEPKc; cocos2d::CCSprite::create(char const*) ; +0x48, 0x50edac\nLDR             R3, [R0]                                               ; +0x4c, 0x50edb0\nMOV             R5, R0                                                 ; +0x4e, 0x50edb2\nMOV             R0, R4                                                 ; +0x50, 0x50edb4\nLDR.W           R8, [R3,#0x5C]                                         ; +0x52, 0x50edb6\nLDR             R3, [R4]                                               ; +0x56, 0x50edba\nLDR             R3, [R3,#0x60]                                         ; +0x58, 0x50edbc\nBLX             R3                                                     ; +0x5a, 0x50edbe\nMOV             R1, R0                                                 ; +0x5c, 0x50edc0\nMOV             R0, R5                                                 ; +0x5e, 0x50edc2\nBLX             R8                                                     ; +0x60, 0x50edc4\nLDR             R3, [R7]                                               ; +0x62, 0x50edc6\nMOV             R0, R7                                                 ; +0x64, 0x50edc8\nMOV             R1, R5                                                 ; +0x66, 0x50edca\nLDR.W           R3, [R3,#0xDC]                                         ; +0x68, 0x50edcc\nBLX             R3                                                     ; +0x6c, 0x50edd0\nLDR             R3, [R5]                                               ; +0x6e, 0x50edd2\nSTR.W           R5, [R4,#0x10C]                                        ; +0x70, 0x50edd4\nMOV             R0, R5                                                 ; +0x74, 0x50edd8\nLDR             R1, =0x3F804189                                        ; +0x76, 0x50edda\nLDR             R3, [R3,#0x50]                                         ; +0x78, 0x50eddc\nBLX             R3                                                     ; +0x7a, 0x50edde\nB               loc_50EE1E                                             ; +0x7c, 0x50ede0\nADD.W           R1, R4, #0x108                                         ; +0x7e, 0x50ede2\nMOV             R0, SP                                                 ; +0x82, 0x50ede6\nBL              sub_775C20                                             ; +0x84, 0x50ede8\nMOV             R0, R7                                                 ; +0x88, 0x50edec\nMOV             R1, SP                                                 ; +0x8a, 0x50edee\nMOV             R2, R8                                                 ; +0x8c, 0x50edf0\nMOV             R5, SP                                                 ; +0x8e, 0x50edf2\nBL              _ZN11GJBigSprite12unloadSpriteESsi; GJBigSprite::unloadSprite(std::string,int) ; +0x90, 0x50edf4\nMOV             R0, SP                                                 ; +0x94, 0x50edf8\nBL              sub_774008                                             ; +0x96, 0x50edfa\nB               loc_50EE1E                                             ; +0x9a, 0x50edfe\nMOV             R0, R5                                                 ; +0x9c, 0x50ee00\nBL              sub_774008                                             ; +0x9e, 0x50ee02\nBL              __cxa_end_cleanup                                      ; +0xa2, 0x50ee06\nLDR.W           R0, [R4,#0x10C]                                        ; +0xa6, 0x50ee0a\nLDR             R3, [R0]                                               ; +0xaa, 0x50ee0e\nLDR.W           R3, [R3,#0x104]                                        ; +0xac, 0x50ee10\nBLX             R3                                                     ; +0xb0, 0x50ee14\nMOVS            R3, #0                                                 ; +0xb2, 0x50ee16\nSTR.W           R3, [R4,#0x10C]                                        ; +0xb4, 0x50ee18\nB               loc_50EDA0                                             ; +0xb8, 0x50ee1c\nLDR             R2, [SP,#8+var_4]                                      ; +0xba, 0x50ee1e\nLDR             R3, [R6]                                               ; +0xbc, 0x50ee20\nCMP             R2, R3                                                 ; +0xbe, 0x50ee22\nBEQ             loc_50EE2A                                             ; +0xc0, 0x50ee24\nBLX             __stack_chk_fail                                       ; +0xc2, 0x50ee26\nADD             SP, SP, #8                                             ; +0xc6, 0x50ee2a\nPOP.W           {R4-R8,PC}                                             ; +0xc8, 0x50ee2c", "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"}