{"type": "func", "start": 5372095248, "end": 5372095616, "name": "GJBaseGameLayer::buttonIsRelevant", "pseudocode": "// \n// GJBaseGameLayer::buttonIsRelevant from 0x14033ab10 to 0x14033ac80 (368 bytes)\n// \n// 3 xrefs:\n// > GJBaseGameLayer::update @ 0x140340aa8\n// > <???> @ 0x14091fb38\n// > <???> @ 0x14091fb44\n// \n// This function is hookable on this platform (idp: pc, 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:30:37 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nbool __fastcall GJBaseGameLayer::buttonIsRelevant(__int64 a1, __int64 a2)\n{\n  char v4; // di\n  bool v5; // bp\n  char v6; // r14\n  __int64 v7; // rcx\n  __int64 v8; // rax\n  _BYTE *v9; // rcx\n  _BYTE *v10; // rdx\n  char v11; // al\n  char v12; // di\n  void *v14; // [rsp+48h] [rbp+10h]\n\n  if ( *(_DWORD *)a2 != 1 )\n    return 0;\n  v4 = *(_BYTE *)(a2 + 5);\n  v5 = v4 == 0;\n  v6 = *(_BYTE *)(*(_QWORD *)(a1 + 3528) + 340LL);\n  if ( !*(_BYTE *)(a1 + 12670) && !*(_BYTE *)(a1 + 12928) )\n  {\n    v7 = qword_14090BFD0;\n    if ( !qword_14090BFD0 )\n    {\n      v14 = operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager((__int64)v14);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n      v7 = qword_14090BFD0;\n    }\n    if ( GameManager::getGameVariable(v7, \"0010\") )\n      v5 = v4 != 0;\n  }\n  v8 = *(_QWORD *)(a1 + 2408);\n  v9 = *(_BYTE **)(v8 + 496);\n  v10 = *(_BYTE **)(v8 + 504);\n  if ( v9 == v10 )\n  {\nLABEL_12:\n    v11 = 0;\n  }\n  else\n  {\n    while ( !v9[28] || *v9 )\n    {\n      v9 += 56;\n      if ( v9 == v10 )\n        goto LABEL_12;\n    }\n    v11 = 1;\n  }\n  if ( !*(_BYTE *)(a2 + 4) && !*(_BYTE *)(a1 + 12636) )\n    v11 = 0;\n  if ( v5 )\n  {\n    v12 = 0;\nLABEL_22:\n    v11 = 1;\n    goto LABEL_23;\n  }\n  if ( v11 )\n    return 0;\n  v12 = 0;\n  if ( !v6 )\n    goto LABEL_22;\nLABEL_23:\n  if ( !*(_BYTE *)(a1 + 12636) && *(_BYTE *)(a1 + 1058) && (!v5 || !v6) )\n    v12 = 1;\n  if ( v11 && sub_14033AA90(*(_QWORD *)(a1 + 3512), a2) )\n    return 1;\n  if ( v12 )\n    return sub_14033AA90(*(_QWORD *)(a1 + 3520), a2);\n  return 0;\n}", "assembly": "; \n; GJBaseGameLayer::buttonIsRelevant from 0x14033ab10 to 0x14033ac80 (368 bytes)\n; \n; 3 xrefs:\n; > GJBaseGameLayer::update @ 0x140340aa8\n; > <???> @ 0x14091fb38\n; > <???> @ 0x14091fb44\n; \n; This function is hookable on this platform (idp: pc, 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:30:37 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x14033ab10\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x14033ab15\npush    rsi                                                            ; +0xa, 0x14033ab1a\npush    rdi                                                            ; +0xb, 0x14033ab1b\npush    r14                                                            ; +0xc, 0x14033ab1c\nsub     rsp, 20h                                                       ; +0xe, 0x14033ab1e\nmov     rsi, rdx                                                       ; +0x12, 0x14033ab22\nmov     rbx, rcx                                                       ; +0x15, 0x14033ab25\ncmp     dword ptr [rdx], 1                                             ; +0x18, 0x14033ab28\njnz     loc_14033AC6B                                                  ; +0x1b, 0x14033ab2b\nmovzx   edi, byte ptr [rdx+5]                                          ; +0x21, 0x14033ab31\ntest    dil, dil                                                       ; +0x25, 0x14033ab35\nsetz    bpl                                                            ; +0x28, 0x14033ab38\nmov     rax, [rcx+0DC8h]                                               ; +0x2c, 0x14033ab3c\nmovzx   r14d, byte ptr [rax+154h]                                      ; +0x33, 0x14033ab43\ncmp     byte ptr [rcx+317Eh], 0                                        ; +0x3b, 0x14033ab4b\njnz     short loc_14033ABB2                                            ; +0x42, 0x14033ab52\ncmp     byte ptr [rcx+3280h], 0                                        ; +0x44, 0x14033ab54\njnz     short loc_14033ABB2                                            ; +0x4b, 0x14033ab5b\nmov     rcx, cs:qword_14090BFD0                                        ; +0x4d, 0x14033ab5d\ntest    rcx, rcx                                                       ; +0x54, 0x14033ab64\njnz     short loc_14033AB9B                                            ; +0x57, 0x14033ab67\nmov     ecx, 6E8h; Size                                                ; +0x59, 0x14033ab69\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x5e, 0x14033ab6e\nmov     [rsp+38h+arg_8], rax                                           ; +0x63, 0x14033ab73\nmov     rcx, rax                                                       ; +0x68, 0x14033ab78\ncall    GameManager__GameManager                                       ; +0x6b, 0x14033ab7b\nnop                                                                    ; +0x70, 0x14033ab80\nmov     cs:qword_14090BFD0, rax                                        ; +0x71, 0x14033ab81\nmov     rcx, [rax]                                                     ; +0x78, 0x14033ab88\nmov     rdx, [rcx+48h]                                                 ; +0x7b, 0x14033ab8b\nmov     rcx, rax                                                       ; +0x7f, 0x14033ab8f\ncall    rdx                                                            ; +0x82, 0x14033ab92\nmov     rcx, cs:qword_14090BFD0                                        ; +0x84, 0x14033ab94\nlea     rdx, a0010; \"0010\"                                             ; +0x8b, 0x14033ab9b\ncall    GameManager__getGameVariable                                   ; +0x92, 0x14033aba2\ntest    al, al                                                         ; +0x97, 0x14033aba7\njz      short loc_14033ABB2                                            ; +0x99, 0x14033aba9\ntest    dil, dil                                                       ; +0x9b, 0x14033abab\nsetnz   bpl                                                            ; +0x9e, 0x14033abae\nmov     rax, [rbx+968h]                                                ; +0xa2, 0x14033abb2\nmov     rcx, [rax+1F0h]                                                ; +0xa9, 0x14033abb9\nmov     rdx, [rax+1F8h]                                                ; +0xb0, 0x14033abc0\ncmp     rcx, rdx                                                       ; +0xb7, 0x14033abc7\njz      short loc_14033ABE4                                            ; +0xba, 0x14033abca\nnop     dword ptr [rax+00h]                                            ; +0xbc, 0x14033abcc\ncmp     byte ptr [rcx+1Ch], 0                                          ; +0xc0, 0x14033abd0\njz      short loc_14033ABDB                                            ; +0xc4, 0x14033abd4\ncmp     byte ptr [rcx], 0                                              ; +0xc6, 0x14033abd6\njz      short loc_14033AC0D                                            ; +0xc9, 0x14033abd9\nadd     rcx, 38h ; '8'                                                 ; +0xcb, 0x14033abdb\ncmp     rcx, rdx                                                       ; +0xcf, 0x14033abdf\njnz     short loc_14033ABD0                                            ; +0xd2, 0x14033abe2\nxor     al, al                                                         ; +0xd4, 0x14033abe4\ncmp     byte ptr [rsi+4], 0                                            ; +0xd6, 0x14033abe6\njnz     short loc_14033ABFA                                            ; +0xda, 0x14033abea\nmovzx   eax, al                                                        ; +0xdc, 0x14033abec\nxor     ecx, ecx                                                       ; +0xdf, 0x14033abef\ncmp     [rbx+315Ch], cl                                                ; +0xe1, 0x14033abf1\ncmovz   eax, ecx                                                       ; +0xe7, 0x14033abf7\ntest    bpl, bpl                                                       ; +0xea, 0x14033abfa\njnz     short loc_14033AC11                                            ; +0xed, 0x14033abfd\ntest    al, al                                                         ; +0xef, 0x14033abff\njnz     short loc_14033AC6B                                            ; +0xf1, 0x14033ac01\nxor     dil, dil                                                       ; +0xf3, 0x14033ac03\ntest    r14b, r14b                                                     ; +0xf6, 0x14033ac06\njnz     short loc_14033AC16                                            ; +0xf9, 0x14033ac09\njmp     short loc_14033AC14                                            ; +0xfb, 0x14033ac0b\nmov     al, 1                                                          ; +0xfd, 0x14033ac0d\njmp     short loc_14033ABE6                                            ; +0xff, 0x14033ac0f\nxor     dil, dil                                                       ; +0x101, 0x14033ac11\nmov     al, 1                                                          ; +0x104, 0x14033ac14\ncmp     byte ptr [rbx+315Ch], 0                                        ; +0x106, 0x14033ac16\njnz     short loc_14033AC35                                            ; +0x10d, 0x14033ac1d\ncmp     byte ptr [rbx+422h], 0                                         ; +0x10f, 0x14033ac1f\njz      short loc_14033AC35                                            ; +0x116, 0x14033ac26\ntest    bpl, bpl                                                       ; +0x118, 0x14033ac28\njz      short loc_14033AC32                                            ; +0x11b, 0x14033ac2b\ntest    r14b, r14b                                                     ; +0x11d, 0x14033ac2d\njnz     short loc_14033AC35                                            ; +0x120, 0x14033ac30\nmov     dil, 1                                                         ; +0x122, 0x14033ac32\ntest    al, al                                                         ; +0x125, 0x14033ac35\njz      short loc_14033AC50                                            ; +0x127, 0x14033ac37\nmov     rdx, rsi                                                       ; +0x129, 0x14033ac39\nmov     rcx, [rbx+0DB8h]                                               ; +0x12c, 0x14033ac3c\ncall    sub_14033AA90                                                  ; +0x133, 0x14033ac43\ntest    al, al                                                         ; +0x138, 0x14033ac48\njz      short loc_14033AC50                                            ; +0x13a, 0x14033ac4a\nmov     al, 1                                                          ; +0x13c, 0x14033ac4c\njmp     short loc_14033AC6D                                            ; +0x13e, 0x14033ac4e\ntest    dil, dil                                                       ; +0x140, 0x14033ac50\njz      short loc_14033AC6B                                            ; +0x143, 0x14033ac53\nmov     rdx, rsi                                                       ; +0x145, 0x14033ac55\nmov     rcx, [rbx+0DC0h]                                               ; +0x148, 0x14033ac58\ncall    sub_14033AA90                                                  ; +0x14f, 0x14033ac5f\ntest    al, al                                                         ; +0x154, 0x14033ac64\nsetnz   al                                                             ; +0x156, 0x14033ac66\njmp     short loc_14033AC6D                                            ; +0x159, 0x14033ac69\nxor     al, al                                                         ; +0x15b, 0x14033ac6b\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x15d, 0x14033ac6d\nmov     rbp, [rsp+38h+arg_10]                                          ; +0x162, 0x14033ac72\nadd     rsp, 20h                                                       ; +0x167, 0x14033ac77\npop     r14                                                            ; +0x16b, 0x14033ac7b\npop     rdi                                                            ; +0x16d, 0x14033ac7d\npop     rsi                                                            ; +0x16e, 0x14033ac7e\nretn                                                                   ; +0x16f, 0x14033ac7f", "xrefs": ["GJBaseGameLayer::update @ 0x140340aa8", "<???> @ 0x14091fb38", "<???> @ 0x14091fb44"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}