{"type": "func", "start": 5371289200, "end": 5371289450, "name": "GJGarageLayer::onArrow", "pseudocode": "// \n// GJGarageLayer::onArrow from 0x140275e70 to 0x140275f6a (250 bytes)\n// \n// 2 xrefs:\n// > GJGarageLayer::setupIconSelect @ 0x140275c07\n// > <???> @ 0x1406d0f2c\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\n// Hidden C++ exception states: #wind=2\nvoid GJGarageLayer::onArrow(GJGarageLayer *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // rcx\n  int v4; // ebp\n  int v5; // ebx\n  int v6; // ecx\n  int v7; // edx\n  int v8; // eax\n  int v9; // eax\n  void *v10; // [rsp+30h] [rbp+8h]\n  void *v11; // [rsp+30h] [rbp+8h]\n\n  v4 = a2->getTag(a2);\n  if ( !qword_1406C2ED8 )\n  {\n    v10 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v10);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    if ( !qword_1406C2ED8 )\n    {\n      v11 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00((__int64)v11);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    }\n  }\n  v5 = GameManager::countForType(v3, a1->m_iconType);\n  v6 = *(_DWORD *)sub_14012CE70((__int64 *)&a1->m_iconPages, (int *)&a1->m_iconType);\n  v7 = v5 / 36;\n  v8 = 1;\n  if ( v4 != 1 )\n    v8 = -1;\n  v9 = v6 + v8;\n  if ( v9 >= 0 )\n  {\n    if ( v9 > v7 )\n      v9 = 0;\n    v7 = v9;\n  }\n  GJGarageLayer::setupPage(a1, v7, a1->m_iconType);\n}", "assembly": "; \n; GJGarageLayer::onArrow from 0x140275e70 to 0x140275f6a (250 bytes)\n; \n; 2 xrefs:\n; > GJGarageLayer::setupIconSelect @ 0x140275c07\n; > <???> @ 0x1406d0f2c\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140275e70\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140275e75\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x140275e7a\npush    rdi                                                            ; +0xf, 0x140275e7f\nsub     rsp, 20h                                                       ; +0x10, 0x140275e80\nmov     rdi, rcx                                                       ; +0x14, 0x140275e84\nmov     rax, [rdx]                                                     ; +0x17, 0x140275e87\nmov     rcx, rdx                                                       ; +0x1a, 0x140275e8a\ncall    qword ptr [rax+38h]                                            ; +0x1d, 0x140275e8d\nmov     ebp, eax                                                       ; +0x20, 0x140275e90\ncmp     cs:qword_1406C2ED8, 0                                          ; +0x22, 0x140275e92\njnz     short loc_140275EF6                                            ; +0x2a, 0x140275e9a\nmov     ecx, 668h; Size                                                ; +0x2c, 0x140275e9c\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x31, 0x140275ea1\nmov     [rsp+28h+arg_0], rax                                           ; +0x36, 0x140275ea6\nmov     rcx, rax                                                       ; +0x3b, 0x140275eab\ncall    sub_14017AB00                                                  ; +0x3e, 0x140275eae\nnop                                                                    ; +0x43, 0x140275eb3\nmov     cs:qword_1406C2ED8, rax                                        ; +0x44, 0x140275eb4\nmov     rdx, [rax]                                                     ; +0x4b, 0x140275ebb\nmov     rcx, rax                                                       ; +0x4e, 0x140275ebe\ncall    qword ptr [rdx+48h]                                            ; +0x51, 0x140275ec1\ncmp     cs:qword_1406C2ED8, 0                                          ; +0x54, 0x140275ec4\njnz     short loc_140275EF6                                            ; +0x5c, 0x140275ecc\nmov     ecx, 668h; Size                                                ; +0x5e, 0x140275ece\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x63, 0x140275ed3\nmov     [rsp+28h+arg_0], rax                                           ; +0x68, 0x140275ed8\nmov     rcx, rax                                                       ; +0x6d, 0x140275edd\ncall    sub_14017AB00                                                  ; +0x70, 0x140275ee0\nnop                                                                    ; +0x75, 0x140275ee5\nmov     cs:qword_1406C2ED8, rax                                        ; +0x76, 0x140275ee6\nmov     rdx, [rax]                                                     ; +0x7d, 0x140275eed\nmov     rcx, rax                                                       ; +0x80, 0x140275ef0\ncall    qword ptr [rdx+48h]                                            ; +0x83, 0x140275ef3\nmov     edx, [rdi+204h]                                                ; +0x86, 0x140275ef6\ncall    GameManager__countForType                                      ; +0x8c, 0x140275efc\nmov     ebx, eax                                                       ; +0x91, 0x140275f01\nlea     rcx, [rdi+208h]                                                ; +0x93, 0x140275f03\nlea     rdx, [rdi+204h]                                                ; +0x9a, 0x140275f0a\ncall    sub_14012CE70                                                  ; +0xa1, 0x140275f11\nmov     ecx, [rax]                                                     ; +0xa6, 0x140275f16\nmov     eax, 38E38E39h                                                 ; +0xa8, 0x140275f18\nimul    ebx                                                            ; +0xad, 0x140275f1d\nsar     edx, 3                                                         ; +0xaf, 0x140275f1f\nmov     eax, edx                                                       ; +0xb2, 0x140275f22\nshr     eax, 1Fh                                                       ; +0xb4, 0x140275f24\nadd     edx, eax                                                       ; +0xb7, 0x140275f27\nmov     eax, 1                                                         ; +0xb9, 0x140275f29\nmov     r8d, 0FFFFFFFFh                                                ; +0xbe, 0x140275f2e\ncmp     ebp, eax                                                       ; +0xc4, 0x140275f34\ncmovnz  eax, r8d                                                       ; +0xc6, 0x140275f36\nadd     eax, ecx                                                       ; +0xca, 0x140275f3a\njs      short loc_140275F47                                            ; +0xcc, 0x140275f3c\nxor     ecx, ecx                                                       ; +0xce, 0x140275f3e\ncmp     eax, edx                                                       ; +0xd0, 0x140275f40\ncmovg   eax, ecx                                                       ; +0xd2, 0x140275f42\nmov     edx, eax                                                       ; +0xd5, 0x140275f45\nmov     r8d, [rdi+204h]                                                ; +0xd7, 0x140275f47\nmov     rcx, rdi                                                       ; +0xde, 0x140275f4e\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xe1, 0x140275f51\nmov     rbp, [rsp+28h+arg_10]                                          ; +0xe6, 0x140275f56\nmov     rsi, [rsp+28h+arg_18]                                          ; +0xeb, 0x140275f5b\nadd     rsp, 20h                                                       ; +0xf0, 0x140275f60\npop     rdi                                                            ; +0xf4, 0x140275f64\njmp     GJGarageLayer__setupPage                                       ; +0xf5, 0x140275f65", "xrefs": ["GJGarageLayer::setupIconSelect @ 0x140275c07", "<???> @ 0x1406d0f2c"], "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"}