{"type": "func", "start": 4140308, "end": 4140436, "name": "CCSpriteGrayscale::create", "pseudocode": "// \n// CCSpriteGrayscale::create from 0x3f2d14 to 0x3f2d94 (128 bytes)\n// \n// 0 xrefs:\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:47:15 +0000\n// \n\nCCSpriteWithHue *__fastcall CCSpriteGrayscale::create(char *a1, const cocos2d::CCRect *a2)\n{\n  CCSpriteWithHue *v4; // r0\n  CCSpriteWithHue *v5; // r4\n  char v6; // r3\n  const char *v7; // r1\n\n  v4 = (CCSpriteWithHue *)operator new(0x23Cu, (const std::nothrow_t *)&std::nothrow);\n  v5 = v4;\n  if ( !v4 )\n    return v5;\n  memset(v4, 0, 0x23Cu);\n  CCSpriteWithHue::CCSpriteWithHue(v5);\n  *(_DWORD *)v5 = &off_C8B898;\n  *((_DWORD *)v5 + 70) = &off_C8BB58;\n  v6 = *a1;\n  *((_DWORD *)v5 + 66) = &off_C8BB18;\n  if ( (v6 & 1) != 0 )\n    v7 = *((const char **)a1 + 2);\n  else\n    v7 = a1 + 1;\n  if ( cocos2d::CCSprite::initWithFile(v5, v7, a2) )\n  {\n    cocos2d::CCObject::autorelease(v5);\n    return v5;\n  }\n  (*(void (__fastcall **)(CCSpriteWithHue *))(*(_DWORD *)v5 + 8))(v5);\n  return nullptr;\n}", "assembly": "; \n; CCSpriteGrayscale::create from 0x3f2d14 to 0x3f2d94 (128 bytes)\n; \n; 0 xrefs:\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:47:15 +0000\n; \nPUSH            {R3-R7,LR}                                             ; +0x0, 0x3f2d14\nMOV             R6, R0                                                 ; +0x2, 0x3f2d16\nLDR             R5, =(_ZSt7nothrow_ptr - 0x3F2D24)                     ; +0x4, 0x3f2d18\nMOV             R7, R1                                                 ; +0x6, 0x3f2d1a\nMOV.W           R0, #0x23C; unsigned int                               ; +0x8, 0x3f2d1c\nADD             R5, PC; _ZSt7nothrow_ptr                               ; +0xc, 0x3f2d20\nLDR             R5, [R5]; std::nothrow ...                             ; +0xe, 0x3f2d22\nMOV             R1, R5; std::nothrow_t *                               ; +0x10, 0x3f2d24\nBL              _ZnwjRKSt9nothrow_t; operator new(uint,std::nothrow_t const&) ; +0x12, 0x3f2d26\nMOV             R4, R0                                                 ; +0x16, 0x3f2d2a\nCBZ             R0, loc_3F2D84                                         ; +0x18, 0x3f2d2c\nMOVS            R1, #0; int                                            ; +0x1a, 0x3f2d2e\nMOV.W           R2, #0x23C; size_t                                     ; +0x1c, 0x3f2d30\nBLX             memset                                                 ; +0x20, 0x3f2d34\nMOV             R0, R4; this                                           ; +0x24, 0x3f2d38\nBL              _ZN15CCSpriteWithHueC2Ev; CCSpriteWithHue::CCSpriteWithHue(void) ; +0x26, 0x3f2d3a\nLDR             R3, =(_ZTV17CCSpriteGrayscale_ptr - 0x3F2D46)          ; +0x2a, 0x3f2d3e\nMOV             R0, R4; this                                           ; +0x2c, 0x3f2d40\nADD             R3, PC; _ZTV17CCSpriteGrayscale_ptr                    ; +0x2e, 0x3f2d42\nLDR             R3, [R3]; `vtable for'CCSpriteGrayscale ...            ; +0x30, 0x3f2d44\nADD.W           R2, R3, #8                                             ; +0x32, 0x3f2d46\nSTR             R2, [R4]                                               ; +0x36, 0x3f2d4a\nADD.W           R2, R3, #0x288                                         ; +0x38, 0x3f2d4c\nADD.W           R3, R3, #0x2C8                                         ; +0x3c, 0x3f2d50\nSTR.W           R3, [R4,#0x118]                                        ; +0x40, 0x3f2d54\nLDRB            R3, [R6]                                               ; +0x44, 0x3f2d58\nSTR.W           R2, [R4,#0x108]                                        ; +0x46, 0x3f2d5a\nMOV             R2, R7; cocos2d::CCRect *                              ; +0x4a, 0x3f2d5e\nLSLS            R3, R3, #0x1F                                          ; +0x4c, 0x3f2d60\nITE PL                                                                 ; +0x4e, 0x3f2d62\nADDPL           R1, R6, #1                                             ; +0x50, 0x3f2d64\nLDRMI           R1, [R6,#8]; char *                                    ; +0x52, 0x3f2d66\nBL              _ZN7cocos2d8CCSprite12initWithFileEPKcRKNS_6CCRectE; cocos2d::CCSprite::initWithFile(char const*,cocos2d::CCRect const&) ; +0x54, 0x3f2d68\nMOV             R5, R0                                                 ; +0x58, 0x3f2d6c\nCBZ             R0, loc_3F2D88                                         ; +0x5a, 0x3f2d6e\nMOV             R0, R4; this                                           ; +0x5c, 0x3f2d70\nBL              _ZN7cocos2d8CCObject11autoreleaseEv; cocos2d::CCObject::autorelease(void) ; +0x5e, 0x3f2d72\nB               loc_3F2D84                                             ; +0x62, 0x3f2d76\nMOV             R0, R4; void *                                         ; +0x64, 0x3f2d78\nMOV             R1, R5; std::nothrow_t *                               ; +0x66, 0x3f2d7a\nBL              _ZdlPvRKSt9nothrow_t; operator delete(void *,std::nothrow_t const&) ; +0x68, 0x3f2d7c\nBL              __cxa_end_cleanup                                      ; +0x6c, 0x3f2d80\nMOV             R0, R4                                                 ; +0x70, 0x3f2d84\nPOP             {R3-R7,PC}                                             ; +0x72, 0x3f2d86\nLDR             R3, [R4]                                               ; +0x74, 0x3f2d88\nMOV             R0, R4                                                 ; +0x76, 0x3f2d8a\nLDR             R3, [R3,#8]                                            ; +0x78, 0x3f2d8c\nBLX             R3                                                     ; +0x7a, 0x3f2d8e\nMOV             R0, R5                                                 ; +0x7c, 0x3f2d90\nPOP             {R3-R7,PC}                                             ; +0x7e, 0x3f2d92", "xrefs": [], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}