{"type": "func", "start": 4220312, "end": 4220412, "name": "GJGarageLayer::onArrow", "pseudocode": "// \n// GJGarageLayer::onArrow from 0x406598 to 0x4065fc (100 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 GJGarageLayer::onArrow(GJGarageLayer *a1, cocos2d::CCObject *a2)\n{\n  int v3; // r6\n  GameManager *v4; // r0\n  GameManager *v5; // r0\n  int v6; // r7\n  int v7; // r2\n  int v8; // r4\n  int v9; // r3\n  int v10; // r1\n\n  v3 = a2->getTag(a2);\n  v4 = GameManager::sharedState();\n  GameManager::activeIconForType(v4, a1->m_iconType);\n  v5 = GameManager::sharedState();\n  v6 = GameManager::countForType(v5, a1->m_iconType);\n  v8 = *(_DWORD *)std::map<IconType,int>::operator[](&a1->m_iconPages.compare.pad, &a1->m_iconType, v7);\n  if ( v3 == 1 )\n    v9 = v8 + 1;\n  else\n    v9 = v8 - 1;\n  v10 = v6 / 36;\n  if ( v9 >= 0 )\n  {\n    if ( v9 > v6 / 36 )\n      v10 = 0;\n    else\n      v10 = v9;\n  }\n  GJGarageLayer::setupPage(a1, v10, a1->m_iconType);\n}", "assembly": "; \n; GJGarageLayer::onArrow from 0x406598 to 0x4065fc (100 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            {R3-R7,LR}                                             ; +0x0, 0x406598\nMOV             R5, R0                                                 ; +0x2, 0x40659a\nLDR             R3, [R1]                                               ; +0x4, 0x40659c\nMOV             R0, R1                                                 ; +0x6, 0x40659e\nLDR             R3, [R3,#0x20]                                         ; +0x8, 0x4065a0\nBLX             R3                                                     ; +0xa, 0x4065a2\nMOV             R6, R0                                                 ; +0xc, 0x4065a4\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0xe, 0x4065a6\nLDR.W           R1, [R5,#0x174]                                        ; +0x12, 0x4065aa\nBL              _ZN11GameManager17activeIconForTypeE8IconType; GameManager::activeIconForType(IconType) ; +0x16, 0x4065ae\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x1a, 0x4065b2\nLDR.W           R1, [R5,#0x174]                                        ; +0x1e, 0x4065b6\nBL              _ZN11GameManager12countForTypeE8IconType; GameManager::countForType(IconType) ; +0x22, 0x4065ba\nADD.W           R1, R5, #0x174                                         ; +0x26, 0x4065be\nMOV             R7, R0                                                 ; +0x2a, 0x4065c2\nADD.W           R0, R5, #0x178                                         ; +0x2c, 0x4065c4\nBL              _ZNSt3mapI8IconTypeiSt4lessIS0_ESaISt4pairIKS0_iEEEixERS4_; std::map<IconType,int>::operator[](IconType const&) ; +0x30, 0x4065c8\nMOVS            R1, #0x24 ; '$'                                        ; +0x34, 0x4065cc\nLDR             R4, [R0]                                               ; +0x36, 0x4065ce\nMOV             R0, R7                                                 ; +0x38, 0x4065d0\nBLX             __aeabi_idiv                                           ; +0x3a, 0x4065d2\nCMP             R6, #1                                                 ; +0x3e, 0x4065d6\nITE EQ                                                                 ; +0x40, 0x4065d8\nADDEQ           R3, R4, #1                                             ; +0x42, 0x4065da\nADDNE.W         R3, R4, #0xFFFFFFFF                                    ; +0x44, 0x4065dc\nCMP             R3, #0                                                 ; +0x48, 0x4065e0\nMOV             R1, R0                                                 ; +0x4a, 0x4065e2\nBLT             loc_4065EE                                             ; +0x4c, 0x4065e4\nCMP             R3, R0                                                 ; +0x4e, 0x4065e6\nITE LE                                                                 ; +0x50, 0x4065e8\nMOVLE           R1, R3                                                 ; +0x52, 0x4065ea\nMOVGT           R1, #0                                                 ; +0x54, 0x4065ec\nMOV             R0, R5                                                 ; +0x56, 0x4065ee\nLDR.W           R2, [R5,#0x174]                                        ; +0x58, 0x4065f0\nPOP.W           {R3-R7,LR}                                             ; +0x5c, 0x4065f4\nB.W             _ZN13GJGarageLayer9setupPageEi8IconType; GJGarageLayer::setupPage(int,IconType) ; +0x60, 0x4065f8", "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"}