{"type": "func", "start": 4298788164, "end": 4298788480, "name": "GJItemIcon::darkenStoreItem", "pseudocode": "// \n// GJItemIcon::darkenStoreItem from 0x1003a4d44 to 0x1003a4e80 (316 bytes)\n// \n// 6 xrefs:\n// > GJGarageLayer::setupSpecialPage @ 0x1003a2338\n// > GJItemIcon::darkenStoreItem_1 @ 0x1003a2af4\n// > GJItemIcon::darkenStoreItem_1 @ 0x1003a2b00\n// > GJItemIcon::changeToLockedState @ 0x1003a2b28\n// > ShardsPage::init @ 0x100449410\n// > sub_10045F6C4 @ 0x1004603b4\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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:03:48 +0000\n// \n\n__int64 __fastcall GJItemIcon::darkenStoreItem(__int64 a1, int a2)\n{\n  int v3; // w21\n  __int64 v4; // x19\n  __int64 v5; // x0\n  __int64 result; // x0\n  __int64 v7; // x19\n  unsigned int v8; // w20\n  __int64 v9; // x0\n\n  v3 = *(unsigned __int8 *)(a1 + 620);\n  v4 = *(_QWORD *)(a1 + 600);\n  (*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v4 + 960LL))(v4, algn_10076DC6E);\n  (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v4 + 912LL))(v4, 120);\n  if ( v3 == 1 )\n  {\n    *(_BYTE *)(v4 + 660) = 0;\n    SimplePlayer::updateColors(v4);\n    sub_1003A42BC(v4);\n    v5 = *(_QWORD *)(v4 + 640);\n    if ( v5 )\n    {\n      GJRobotSprite::updateColor01(v5, a2 & 0xFFFFFF);\n      (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v4 + 640) + 912LL))(*(_QWORD *)(v4 + 640), 190);\n      (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(v4 + 640) + 1256LL))(*(_QWORD *)(v4 + 640));\n    }\n    result = *(_QWORD *)(v4 + 648);\n    if ( result )\n    {\n      GJRobotSprite::updateColor01(result, a2 & 0xFFFFFF);\n      (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v4 + 648) + 912LL))(*(_QWORD *)(v4 + 648), 190);\n      return (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v4 + 648) + 1256LL))(*(_QWORD *)(v4 + 648));\n    }\n  }\n  else\n  {\n    result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 488LL))(v4);\n    if ( result )\n    {\n      v7 = result;\n      result = sub_1002E757C(result);\n      if ( (_DWORD)result )\n      {\n        v8 = 0;\n        do\n        {\n          v9 = sub_1002E75A0(v7, v8);\n          (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v9 + 344LL))(v9, 0);\n          ++v8;\n          result = sub_1002E757C(v7);\n        }\n        while ( v8 < (unsigned int)result );\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; GJItemIcon::darkenStoreItem from 0x1003a4d44 to 0x1003a4e80 (316 bytes)\n; \n; 6 xrefs:\n; > GJGarageLayer::setupSpecialPage @ 0x1003a2338\n; > GJItemIcon::darkenStoreItem_1 @ 0x1003a2af4\n; > GJItemIcon::darkenStoreItem_1 @ 0x1003a2b00\n; > GJItemIcon::changeToLockedState @ 0x1003a2b28\n; > ShardsPage::init @ 0x100449410\n; > sub_10045F6C4 @ 0x1004603b4\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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:03:48 +0000\n; \nSTP             X22, X21, [SP,#-0x10+var_20]!                          ; +0x0, 0x1003a4d44\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1003a4d48\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1003a4d4c\nADD             X29, SP, #0x20                                         ; +0xc, 0x1003a4d50\nMOV             X20, X1                                                ; +0x10, 0x1003a4d54\nLDRB            W21, [X0,#0x26C]                                       ; +0x14, 0x1003a4d58\nLDR             X19, [X0,#0x258]                                       ; +0x18, 0x1003a4d5c\nLDR             X8, [X19]                                              ; +0x1c, 0x1003a4d60\nLDR             X8, [X8,#0x3C0]                                        ; +0x20, 0x1003a4d64\nADRL            X1, algn_10076DC6E                                     ; +0x24, 0x1003a4d68\nMOV             X0, X19                                                ; +0x2c, 0x1003a4d70\nBLR             X8                                                     ; +0x30, 0x1003a4d74\nLDR             X8, [X19]                                              ; +0x34, 0x1003a4d78\nLDR             X8, [X8,#0x390]                                        ; +0x38, 0x1003a4d7c\nMOV             X0, X19                                                ; +0x3c, 0x1003a4d80\nMOV             W1, #0x78 ; 'x'                                        ; +0x40, 0x1003a4d84\nBLR             X8                                                     ; +0x44, 0x1003a4d88\nCMP             W21, #1                                                ; +0x48, 0x1003a4d8c\nB.NE            loc_1003A4E1C                                          ; +0x4c, 0x1003a4d90\nSTRB            WZR, [X19,#0x294]                                      ; +0x50, 0x1003a4d94\nMOV             X0, X19                                                ; +0x54, 0x1003a4d98\nBL              SimplePlayer__updateColors                             ; +0x58, 0x1003a4d9c\nMOV             X0, X19                                                ; +0x5c, 0x1003a4da0\nBL              sub_1003A42BC                                          ; +0x60, 0x1003a4da4\nLDR             X0, [X19,#0x280]                                       ; +0x64, 0x1003a4da8\nCBZ             X0, loc_1003A4DDC                                      ; +0x68, 0x1003a4dac\nAND             X1, X20, #0xFFFFFF                                     ; +0x6c, 0x1003a4db0\nBL              GJRobotSprite__updateColor01                           ; +0x70, 0x1003a4db4\nLDR             X0, [X19,#0x280]                                       ; +0x74, 0x1003a4db8\nLDR             X8, [X0]                                               ; +0x78, 0x1003a4dbc\nLDR             X8, [X8,#0x390]                                        ; +0x7c, 0x1003a4dc0\nMOV             W1, #0xBE                                              ; +0x80, 0x1003a4dc4\nBLR             X8                                                     ; +0x84, 0x1003a4dc8\nLDR             X0, [X19,#0x280]                                       ; +0x88, 0x1003a4dcc\nLDR             X8, [X0]                                               ; +0x8c, 0x1003a4dd0\nLDR             X8, [X8,#0x4E8]                                        ; +0x90, 0x1003a4dd4\nBLR             X8                                                     ; +0x94, 0x1003a4dd8\nLDR             X0, [X19,#0x288]                                       ; +0x98, 0x1003a4ddc\nCBZ             X0, loc_1003A4E70                                      ; +0x9c, 0x1003a4de0\nAND             X1, X20, #0xFFFFFF                                     ; +0xa0, 0x1003a4de4\nBL              GJRobotSprite__updateColor01                           ; +0xa4, 0x1003a4de8\nLDR             X0, [X19,#0x288]                                       ; +0xa8, 0x1003a4dec\nLDR             X8, [X0]                                               ; +0xac, 0x1003a4df0\nLDR             X8, [X8,#0x390]                                        ; +0xb0, 0x1003a4df4\nMOV             W1, #0xBE                                              ; +0xb4, 0x1003a4df8\nBLR             X8                                                     ; +0xb8, 0x1003a4dfc\nLDR             X0, [X19,#0x288]                                       ; +0xbc, 0x1003a4e00\nLDR             X8, [X0]                                               ; +0xc0, 0x1003a4e04\nLDR             X1, [X8,#0x4E8]                                        ; +0xc4, 0x1003a4e08\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0xc8, 0x1003a4e0c\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0xcc, 0x1003a4e10\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0xd0, 0x1003a4e14\nBR              X1                                                     ; +0xd4, 0x1003a4e18\nLDR             X8, [X19]                                              ; +0xd8, 0x1003a4e1c\nLDR             X8, [X8,#0x1E8]                                        ; +0xdc, 0x1003a4e20\nMOV             X0, X19                                                ; +0xe0, 0x1003a4e24\nBLR             X8                                                     ; +0xe4, 0x1003a4e28\nCBZ             X0, loc_1003A4E70                                      ; +0xe8, 0x1003a4e2c\nMOV             X19, X0                                                ; +0xec, 0x1003a4e30\nBL              sub_1002E757C                                          ; +0xf0, 0x1003a4e34\nCBZ             W0, loc_1003A4E70                                      ; +0xf4, 0x1003a4e38\nMOV             W20, #0                                                ; +0xf8, 0x1003a4e3c\nMOV             X0, X19                                                ; +0xfc, 0x1003a4e40\nMOV             X1, X20                                                ; +0x100, 0x1003a4e44\nBL              sub_1002E75A0                                          ; +0x104, 0x1003a4e48\nLDR             X8, [X0]                                               ; +0x108, 0x1003a4e4c\nLDR             X8, [X8,#0x158]                                        ; +0x10c, 0x1003a4e50\nMOV             W1, #0                                                 ; +0x110, 0x1003a4e54\nBLR             X8                                                     ; +0x114, 0x1003a4e58\nADD             W20, W20, #1                                           ; +0x118, 0x1003a4e5c\nMOV             X0, X19                                                ; +0x11c, 0x1003a4e60\nBL              sub_1002E757C                                          ; +0x120, 0x1003a4e64\nCMP             W20, W0                                                ; +0x124, 0x1003a4e68\nB.CC            loc_1003A4E40                                          ; +0x128, 0x1003a4e6c\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x12c, 0x1003a4e70\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x130, 0x1003a4e74\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x134, 0x1003a4e78\nRET                                                                    ; +0x138, 0x1003a4e7c", "xrefs": ["GJGarageLayer::setupSpecialPage @ 0x1003a2338", "GJItemIcon::darkenStoreItem_1 @ 0x1003a2af4", "GJItemIcon::darkenStoreItem_1 @ 0x1003a2b00", "GJItemIcon::changeToLockedState @ 0x1003a2b28", "ShardsPage::init @ 0x100449410", "sub_10045F6C4 @ 0x1004603b4"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "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"}