{"type": "func", "start": 346840, "end": 346992, "name": "sub_54AD8", "pseudocode": "// \n// sub_54AD8 from 0x54ad8 to 0x54b70 (152 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x10c390\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__int64 __fastcall sub_54AD8(__int64 a1, unsigned int a2, unsigned int a3)\n{\n  char v6; // w8\n  __int64 result; // x0\n\n  if ( !*(_QWORD *)(a1 + 192) )\n    return 30;\n  if ( (unsigned int)((__int64 (*)(void))loc_525F4)() )\n    return 0;\n  if ( (*(unsigned int (__fastcall **)(_QWORD, _QWORD, __int64, _QWORD, __int64))(**(_QWORD **)(a1 + 40) + 312LL))(\n         *(_QWORD *)(a1 + 40),\n         a2,\n         2,\n         a2 + a3 - 1,\n         2) )\n  {\n    return 0;\n  }\n  v6 = atomic_load((unsigned int *)(*(_QWORD *)(a1 + 40) + 88LL));\n  if ( (v6 & 0x80) == 0 )\n    return 0;\n  result = (*(__int64 (__fastcall **)(_QWORD, _QWORD, _QWORD))(**(_QWORD **)(a1 + 192) + 144LL))(\n             *(_QWORD *)(a1 + 192),\n             a2,\n             a3);\n  if ( !(_DWORD)result )\n    return 0;\n  return result;\n}", "assembly": "; \n; sub_54AD8 from 0x54ad8 to 0x54b70 (152 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x10c390\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\nSTR             X21, [SP,#-0x10+var_20]!                               ; +0x0, 0x54ad8\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x54adc\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x54ae0\nLDR             X8, [X0,#0xC0]                                         ; +0xc, 0x54ae4\nADD             X29, SP, #0x20                                         ; +0x10, 0x54ae8\nCBZ             X8, loc_54B60                                          ; +0x14, 0x54aec\nMOV             W19, W2                                                ; +0x18, 0x54af0\nMOV             X21, X0                                                ; +0x1c, 0x54af4\nMOV             W20, W1                                                ; +0x20, 0x54af8\nBL              loc_525F4                                              ; +0x24, 0x54afc\nCBNZ            W0, loc_54B58                                          ; +0x28, 0x54b00\nLDR             X0, [X21,#0x28]                                        ; +0x2c, 0x54b04\nADD             W9, W20, W19                                           ; +0x30, 0x54b08\nSUB             W3, W9, #1                                             ; +0x34, 0x54b0c\nMOV             W2, #2                                                 ; +0x38, 0x54b10\nLDR             X8, [X0]                                               ; +0x3c, 0x54b14\nMOV             W4, #2                                                 ; +0x40, 0x54b18\nMOV             W1, W20                                                ; +0x44, 0x54b1c\nLDR             X8, [X8,#0x138]                                        ; +0x48, 0x54b20\nBLR             X8                                                     ; +0x4c, 0x54b24\nCBNZ            W0, loc_54B58                                          ; +0x50, 0x54b28\nLDR             X8, [X21,#0x28]                                        ; +0x54, 0x54b2c\nADD             X8, X8, #0x58 ; 'X'                                    ; +0x58, 0x54b30\nLDAR            W8, [X8]                                               ; +0x5c, 0x54b34\nTBZ             W8, #7, loc_54B58                                      ; +0x60, 0x54b38\nLDR             X0, [X21,#0xC0]                                        ; +0x64, 0x54b3c\nMOV             W1, W20                                                ; +0x68, 0x54b40\nMOV             W2, W19                                                ; +0x6c, 0x54b44\nLDR             X8, [X0]                                               ; +0x70, 0x54b48\nLDR             X8, [X8,#0x90]                                         ; +0x74, 0x54b4c\nBLR             X8                                                     ; +0x78, 0x54b50\nCBNZ            W0, loc_54B64                                          ; +0x7c, 0x54b54\nMOV             W0, WZR                                                ; +0x80, 0x54b58\nB               loc_54B64                                              ; +0x84, 0x54b5c\nMOV             W0, #0x1E                                              ; +0x88, 0x54b60\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8c, 0x54b64\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x90, 0x54b68\nB               loc_54D08                                              ; +0x94, 0x54b6c", "xrefs": ["<???> @ 0x10c390"], "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"}