{"type": "func", "start": 4680744, "end": 4680800, "name": "GJBaseGameLayer::getPlayerButtonID", "pseudocode": "// \n// GJBaseGameLayer::getPlayerButtonID from 0x476c28 to 0x476c60 (56 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::getRecordString @ 0x48eba2\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\nint GJBaseGameLayer::getPlayerButtonID(GJBaseGameLayer *a1, int a2, bool a3)\n{\n  unsigned int v3; // r0\n\n  if ( (unsigned int)(a2 - 98) <= 1 )\n    return a2;\n  v3 = a2 - 2;\n  if ( a3 )\n  {\n    if ( v3 > 3 )\n      return 6;\n    else\n      return *((char *)&unk_9ABF60 + v3 + 100);\n  }\n  else if ( v3 > 3 )\n  {\n    return 1;\n  }\n  else\n  {\n    return *((char *)&unk_9ABF60 + v3 + 96);\n  }\n}", "assembly": "; \n; GJBaseGameLayer::getPlayerButtonID from 0x476c28 to 0x476c60 (56 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::getRecordString @ 0x48eba2\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\nSUB.W           R3, R1, #0x62 ; 'b'                                    ; +0x0, 0x476c28\nCMP             R3, #1                                                 ; +0x4, 0x476c2c\nBLS             loc_476C54                                             ; +0x6, 0x476c2e\nSUBS            R0, R1, #2                                             ; +0x8, 0x476c30\nCBNZ            R2, loc_476C44                                         ; +0xa, 0x476c32\nCMP             R0, #3                                                 ; +0xc, 0x476c34\nBHI             loc_476C58                                             ; +0xe, 0x476c36\nLDR             R3, =(unk_9ABF60 - 0x476C3E)                           ; +0x10, 0x476c38\nADD             R3, PC; unk_9ABF60                                     ; +0x12, 0x476c3a\nADD             R0, R3                                                 ; +0x14, 0x476c3c\nLDRSB.W         R0, [R0,#0x60]                                         ; +0x16, 0x476c3e\nBX              LR                                                     ; +0x1a, 0x476c42\nCMP             R0, #3                                                 ; +0x1c, 0x476c44\nBHI             loc_476C5C                                             ; +0x1e, 0x476c46\nLDR             R3, =(unk_9ABF60 - 0x476C4E)                           ; +0x20, 0x476c48\nADD             R3, PC; unk_9ABF60                                     ; +0x22, 0x476c4a\nADD             R0, R3                                                 ; +0x24, 0x476c4c\nLDRSB.W         R0, [R0,#0x64]                                         ; +0x26, 0x476c4e\nBX              LR                                                     ; +0x2a, 0x476c52\nMOV             R0, R1                                                 ; +0x2c, 0x476c54\nBX              LR                                                     ; +0x2e, 0x476c56\nMOVS            R0, #1                                                 ; +0x30, 0x476c58\nBX              LR                                                     ; +0x32, 0x476c5a\nMOVS            R0, #6                                                 ; +0x34, 0x476c5c\nBX              LR                                                     ; +0x36, 0x476c5e", "xrefs": ["GJBaseGameLayer::getRecordString @ 0x48eba2"], "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"}