; ; BrowseSmartTemplateLayer::addPrefabMenuItem from 0x673b2c to 0x673d56 (554 bytes) ; ; 2 xrefs: ; > BrowseSmartTemplateLayer::init @ 0x6755d4 ; > BrowseSmartTemplateLayer::init @ 0x67563e ; ; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! ; ; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA ; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings ; Generated at Fri, 27 Nov 2026 11:55:54 +0000 ; PUSH.W {R4-R11,LR} ; +0x0, 0x673b2c MOV R7, R1 ; +0x4, 0x673b30 VPUSH {D8} ; +0x6, 0x673b32 MOV R10, R2 ; +0xa, 0x673b36 LDR R5, =(__stack_chk_guard_ptr - 0x673B44) ; +0xc, 0x673b38 MOV R6, R0 ; +0xe, 0x673b3a ADD.W R9, R7, #4 ; +0x10, 0x673b3c ADD R5, PC; __stack_chk_guard_ptr ; +0x14, 0x673b40 LDR R5, [R5]; __stack_chk_guard ; +0x16, 0x673b42 SUB SP, SP, #0x7C ; +0x18, 0x673b44 LDR R3, [R5] ; +0x1a, 0x673b46 ADD R4, SP, #0x7C+var_48 ; +0x1c, 0x673b48 ADD.W R11, SP, #0x1C ; +0x1e, 0x673b4a STR R3, [SP,#0x7C+var_8] ; +0x22, 0x673b4e BL _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x24, 0x673b50 MOV R1, R0 ; +0x28, 0x673b54 ADD R0, SP, #0x7C+var_68; this ; +0x2a, 0x673b56 BL _ZN7cocos2d10CCDirector10getWinSizeEv; cocos2d::CCDirector::getWinSize(void) ; +0x2c, 0x673b58 VMOV.F32 S14, #0.5 ; +0x30, 0x673b5c VLDR S13, [SP,#0x7C+var_64] ; +0x34, 0x673b60 MOV R0, R4; this ; +0x38, 0x673b64 LDR.W R8, [R6,#0x1BC] ; +0x3a, 0x673b66 VLDR S15, =140.0 ; +0x3e, 0x673b6a VMLA.F32 S15, S13, S14 ; +0x42, 0x673b6e VLDR S13, [SP,#0x7C+var_68] ; +0x46, 0x673b72 VMUL.F32 S14, S13, S14 ; +0x4a, 0x673b76 VMOV R1, S14; float ; +0x4e, 0x673b7a VLDR S14, =50.0 ; +0x52, 0x673b7e VSUB.F32 S15, S15, S14 ; +0x56, 0x673b82 VMOV R2, S15; float ; +0x5a, 0x673b86 BL _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x5e, 0x673b8a MOV R2, R4 ; +0x62, 0x673b8e ADD R4, SP, #0x7C+var_34 ; +0x64, 0x673b90 MOV R0, R11; this ; +0x66, 0x673b92 MOV R1, R8; cocos2d::CCPoint * ; +0x68, 0x673b94 BL _ZN7cocos2d6CCNode18convertToNodeSpaceERKNS_7CCPointE; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const&) ; +0x6a, 0x673b96 MOV R0, R4 ; +0x6e, 0x673b9a MOV R1, R9 ; +0x70, 0x673b9c BL _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x72, 0x673b9e MOV R0, R4 ; +0x76, 0x673ba2 STR R5, [SP,#0x7C+var_70] ; +0x78, 0x673ba4 BL _ZN19GJSmartBlockPreview6createENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE; GJSmartBlockPreview::create(std::string) ; +0x7a, 0x673ba6 MOV R5, R0 ; +0x7e, 0x673baa MOV R0, R4 ; +0x80, 0x673bac BL _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x82, 0x673bae MOV R1, R7; SmartPrefabResult * ; +0x86, 0x673bb2 MOV R0, R4; this ; +0x88, 0x673bb4 BL _ZN17SmartPrefabResultC2ERKS_; SmartPrefabResult::SmartPrefabResult(SmartPrefabResult const&) ; +0x8a, 0x673bb6 VMOV.F32 S15, #1.0 ; +0x8e, 0x673bba LDR R3, [R7,#0x1C] ; +0x92, 0x673bbe MOV R0, R5 ; +0x94, 0x673bc0 MOV R1, R4 ; +0x96, 0x673bc2 CMP R3, #0 ; +0x98, 0x673bc4 VMOV.F32 S14, #0.5 ; +0x9a, 0x673bc6 ITE LE ; +0x9e, 0x673bca VMOVLE R2, S15 ; +0xa0, 0x673bcc VMOVGT R2, S14 ; +0xa4, 0x673bd0 BL _ZN19GJSmartBlockPreview16addTemplateGuideE17SmartPrefabResultf; GJSmartBlockPreview::addTemplateGuide(SmartPrefabResult,float) ; +0xa8, 0x673bd4 MOV R0, R4; this ; +0xac, 0x673bd8 BL _ZN17SmartPrefabResultD2Ev; SmartPrefabResult::~SmartPrefabResult() ; +0xae, 0x673bda LDR R3, [R7,#0x1C] ; +0xb2, 0x673bde CMP R3, #0 ; +0xb4, 0x673be0 BLE loc_673C46 ; +0xb6, 0x673be2 LDR.W R8, [R6,#0x208] ; +0xb8, 0x673be4 MOV R1, R9 ; +0xbc, 0x673be8 MOV R0, R4 ; +0xbe, 0x673bea BL _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0xc0, 0x673bec MOV R1, R4 ; +0xc4, 0x673bf0 MOV R0, R8 ; +0xc6, 0x673bf2 BL _ZN15GJSmartTemplate15getRandomPrefabENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE; GJSmartTemplate::getRandomPrefab(std::string) ; +0xc8, 0x673bf4 STR R0, [SP,#0x7C+var_74] ; +0xcc, 0x673bf8 MOV R0, R4 ; +0xce, 0x673bfa BL _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xd0, 0x673bfc LDR R3, [SP,#0x7C+var_74] ; +0xd4, 0x673c00 CBZ R3, loc_673C46 ; +0xd6, 0x673c02 ADD.W R8, SP, #0x7C+var_40 ; +0xd8, 0x673c04 MOV R1, R9 ; +0xdc, 0x673c08 MOV R0, R8 ; +0xde, 0x673c0a BL _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0xe0, 0x673c0c LDR R1, [SP,#0x7C+var_74] ; +0xe4, 0x673c10 MOV R0, R4 ; +0xe6, 0x673c12 ADDS R1, #0x40 ; '@' ; +0xe8, 0x673c14 BL _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0xea, 0x673c16 BL _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0xee, 0x673c1a MOV R3, R0 ; +0xf2, 0x673c1e MOV R1, R8 ; +0xf4, 0x673c20 MOV R0, R5 ; +0xf6, 0x673c22 MOV R2, R4 ; +0xf8, 0x673c24 LDR.W R3, [R3,#0x198] ; +0xfa, 0x673c26 BL _ZN19GJSmartBlockPreview10addPreviewENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES6_P16LevelEditorLayer; GJSmartBlockPreview::addPreview(std::string,std::string,LevelEditorLayer *) ; +0xfe, 0x673c2a MOV R0, R4 ; +0x102, 0x673c2e BL _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x104, 0x673c30 MOV R0, R8 ; +0x108, 0x673c34 BL _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x10a, 0x673c36 LDR R1, [R7,#0x1C]; int ; +0x10e, 0x673c3a CMP R1, #1 ; +0x110, 0x673c3c BLE loc_673C46 ; +0x112, 0x673c3e MOV R0, R5; this ; +0x114, 0x673c40 BL _ZN19GJSmartBlockPreview8addCountEi; GJSmartBlockPreview::addCount(int) ; +0x116, 0x673c42 LDR R3, [R5] ; +0x11a, 0x673c46 MOV R0, R5 ; +0x11c, 0x673c48 MOV.W R1, #0x3F000000 ; +0x11e, 0x673c4a ADD.W R8, SP, #0x7C+var_50 ; +0x122, 0x673c4e LDR R3, [R3,#0x50] ; +0x126, 0x673c52 BLX R3 ; +0x128, 0x673c54 LDR R3, =(_ZN24BrowseSmartTemplateLayer16onTemplateObjectEPN7cocos2d8CCObjectE_ptr - 0x673C60) ; +0x12a, 0x673c56 MOV R2, R6 ; +0x12c, 0x673c58 MOVS R1, #0 ; +0x12e, 0x673c5a ADD R3, PC; _ZN24BrowseSmartTemplateLayer16onTemplateObjectEPN7cocos2d8CCObjectE_ptr ; +0x130, 0x673c5c LDR R3, [R3]; BrowseSmartTemplateLayer::onTemplateObject(cocos2d::CCObject *) ; +0x132, 0x673c5e STR R1, [SP,#0x7C+var_7C] ; +0x134, 0x673c60 MOV R0, R5 ; +0x136, 0x673c62 STR R3, [SP,#0x7C+var_48] ; +0x138, 0x673c64 STR R1, [SP,#0x7C+var_44] ; +0x13a, 0x673c66 BL _ZN21CCMenuItemSpriteExtra6createEPN7cocos2d6CCNodeES2_PNS0_8CCObjectEMS3_FvS4_E; CCMenuItemSpriteExtra::create(cocos2d::CCNode *,cocos2d::CCNode *,cocos2d::CCObject *,void (cocos2d::CCObject::*)(cocos2d::CCObject *)) ; +0x13c, 0x673c68 ADD R5, SP, #0x7C+var_58 ; +0x140, 0x673c6c MOV R4, R0 ; +0x142, 0x673c6e LDR.W R0, [R6,#0x1BC] ; +0x144, 0x673c70 MOV R1, R4 ; +0x148, 0x673c74 LDR R3, [R0] ; +0x14a, 0x673c76 LDR.W R3, [R3,#0xE4] ; +0x14c, 0x673c78 BLX R3 ; +0x150, 0x673c7c MOVS R1, #0x1C ; +0x152, 0x673c7e MOV R0, R10 ; +0x154, 0x673c80 BLX __aeabi_idiv ; +0x156, 0x673c82 VMOV S15, R0 ; +0x15a, 0x673c86 VCVT.F32.S32 S15, S15 ; +0x15e, 0x673c8a VMOV R0, S15; x ; +0x162, 0x673c8e BLX floorf ; +0x166, 0x673c92 MOVS R3, #0x1C ; +0x16a, 0x673c96 MOVS R1, #7 ; +0x16c, 0x673c98 VMOV S15, R0 ; +0x16e, 0x673c9a VCVT.S32.F32 S15, S15 ; +0x172, 0x673c9e VMOV R7, S15 ; +0x176, 0x673ca2 MLS R10, R3, R7, R10 ; +0x17a, 0x673ca6 LDR R3, [R4] ; +0x17e, 0x673caa LDR.W R9, [R3,#0x5C] ; +0x180, 0x673cac MOV R0, R10 ; +0x184, 0x673cb0 BLX __aeabi_idiv ; +0x186, 0x673cb2 VMOV S15, R0 ; +0x18a, 0x673cb6 VCVT.F32.S32 S15, S15 ; +0x18e, 0x673cba VMOV R0, S15; x ; +0x192, 0x673cbe BLX floorf ; +0x196, 0x673cc2 MOVS R1, #7 ; +0x19a, 0x673cc6 VMOV S16, R0 ; +0x19c, 0x673cc8 MOV R0, R10 ; +0x1a0, 0x673ccc BLX __aeabi_idivmod ; +0x1a2, 0x673cce VLDR S14, =60.0 ; +0x1a6, 0x673cd2 MOV R0, R5; this ; +0x1aa, 0x673cd6 VMOV S15, R1 ; +0x1ac, 0x673cd8 VCVT.F32.S32 S13, S15 ; +0x1b0, 0x673cdc VLDR S15, =210.0 ; +0x1b4, 0x673ce0 VNMLS.F32 S15, S13, S14 ; +0x1b8, 0x673ce4 VMOV.F32 S14, #30.0 ; +0x1bc, 0x673ce8 VADD.F32 S15, S15, S14 ; +0x1c0, 0x673cec VMOV R1, S15; float ; +0x1c4, 0x673cf0 VLDR S15, =-60.0 ; +0x1c8, 0x673cf4 VMUL.F32 S15, S16, S15 ; +0x1cc, 0x673cf8 VMOV R2, S15; float ; +0x1d0, 0x673cfc BL _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x1d4, 0x673d00 MOV R2, R5 ; +0x1d8, 0x673d04 MOV R0, R8 ; +0x1da, 0x673d06 MOV R1, R11 ; +0x1dc, 0x673d08 BL _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x1de, 0x673d0a MOV R0, R4 ; +0x1e2, 0x673d0e MOV R1, R8 ; +0x1e4, 0x673d10 BLX R9 ; +0x1e6, 0x673d12 MOV R2, R7; int ; +0x1e8, 0x673d14 MOV R0, R6; this ; +0x1ea, 0x673d16 MOV R1, R4; cocos2d::CCObject * ; +0x1ec, 0x673d18 BL _ZN24BrowseSmartTemplateLayer15addObjectToPageEPN7cocos2d8CCObjectEi; BrowseSmartTemplateLayer::addObjectToPage(cocos2d::CCObject *,int) ; +0x1ee, 0x673d1a LDR R3, [SP,#0x7C+var_70] ; +0x1f2, 0x673d1e LDR R2, [SP,#0x7C+var_8] ; +0x1f4, 0x673d20 LDR R3, [R3] ; +0x1f6, 0x673d22 CMP R2, R3 ; +0x1f8, 0x673d24 BEQ loc_673D4C ; +0x1fa, 0x673d26 BLX __stack_chk_fail ; +0x1fc, 0x673d28 B loc_673D38 ; +0x200, 0x673d2c MOV R0, R4; this ; +0x202, 0x673d2e BL _ZN17SmartPrefabResultD2Ev; SmartPrefabResult::~SmartPrefabResult() ; +0x204, 0x673d30 BL __cxa_end_cleanup ; +0x208, 0x673d34 MOV R0, R4 ; +0x20c, 0x673d38 BL _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x20e, 0x673d3a B loc_673D34 ; +0x212, 0x673d3e MOV R0, R4 ; +0x214, 0x673d40 BL _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x216, 0x673d42 B loc_673D48 ; +0x21a, 0x673d46 MOV R0, R8 ; +0x21c, 0x673d48 B loc_673D3A ; +0x21e, 0x673d4a ADD SP, SP, #0x7C ; '|' ; +0x220, 0x673d4c VPOP {D8} ; +0x222, 0x673d4e POP.W {R4-R11,PC} ; +0x226, 0x673d52