{"type": "func", "start": 414588, "end": 414732, "name": "sub_6537C", "pseudocode": "// \n// sub_6537C from 0x6537c to 0x6540c (144 bytes)\n// \n// 3 xrefs:\n// > sub_64B98 @ 0x64bc8\n// > sub_6534C @ 0x65368\n// > sub_65508 @ 0x65538\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_6537C(__int64 a1, unsigned int a2)\n{\n  __int64 result; // x0\n  __int64 v5; // x8\n  void *v6; // x8\n  void *dest; // [xsp+8h] [xbp-18h] BYREF\n\n  if ( *(_DWORD *)(a1 + 8) > (signed int)a2 )\n    return 28;\n  dest = nullptr;\n  if ( a2 )\n  {\n    result = sub_6540C(a2, &dest);\n    if ( (_DWORD)result )\n      return result;\n    v5 = *(int *)(a1 + 8);\n    if ( (_DWORD)v5 )\n      memcpy(dest, *(const void **)a1, 16 * v5);\n  }\n  if ( *(int *)(a1 + 12) >= 1 )\n    sub_65158(*(_QWORD *)a1);\n  v6 = dest;\n  *(_DWORD *)(a1 + 12) = a2;\n  *(_QWORD *)a1 = v6;\n  return 0;\n}", "assembly": "; \n; sub_6537C from 0x6537c to 0x6540c (144 bytes)\n; \n; 3 xrefs:\n; > sub_64B98 @ 0x64bc8\n; > sub_6534C @ 0x65368\n; > sub_65508 @ 0x65538\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             SP, SP, #0x30                                          ; +0x0, 0x6537c\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x65380\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x65384\nLDR             W8, [X0,#8]                                            ; +0xc, 0x65388\nADD             X29, SP, #0x20                                         ; +0x10, 0x6538c\nCMP             W8, W1                                                 ; +0x14, 0x65390\nB.LE            loc_653A0                                              ; +0x18, 0x65394\nMOV             W0, #0x1C                                              ; +0x1c, 0x65398\nB               loc_653FC                                              ; +0x20, 0x6539c\nMOV             X19, X0                                                ; +0x24, 0x653a0\nMOV             W20, W1                                                ; +0x28, 0x653a4\nSTR             XZR, [SP,#0x20+dest]                                   ; +0x2c, 0x653a8\nCBZ             W1, loc_653D8                                          ; +0x30, 0x653ac\nADD             X1, SP, #0x20+dest                                     ; +0x34, 0x653b0\nMOV             W0, W20                                                ; +0x38, 0x653b4\nBL              sub_6540C                                              ; +0x3c, 0x653b8\nCBNZ            W0, loc_653FC                                          ; +0x40, 0x653bc\nLDRSW           X8, [X19,#8]                                           ; +0x44, 0x653c0\nCBZ             W8, loc_653D8                                          ; +0x48, 0x653c4\nLDR             X0, [SP,#0x20+dest]; dest                              ; +0x4c, 0x653c8\nLDR             X1, [X19]; src                                         ; +0x50, 0x653cc\nLSL             X2, X8, #4; n                                          ; +0x54, 0x653d0\nBL              .memcpy                                                ; +0x58, 0x653d4\nLDR             W8, [X19,#0xC]                                         ; +0x5c, 0x653d8\nCMP             W8, #1                                                 ; +0x60, 0x653dc\nB.LT            loc_653EC                                              ; +0x64, 0x653e0\nLDR             X0, [X19]                                              ; +0x68, 0x653e4\nBL              sub_65158                                              ; +0x6c, 0x653e8\nLDR             X8, [SP,#0x20+dest]                                    ; +0x70, 0x653ec\nMOV             W0, WZR                                                ; +0x74, 0x653f0\nSTR             W20, [X19,#0xC]                                        ; +0x78, 0x653f4\nSTR             X8, [X19]                                              ; +0x7c, 0x653f8\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x80, 0x653fc\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x84, 0x65400\nADD             SP, SP, #0x30 ; '0'                                    ; +0x88, 0x65404\nRET                                                                    ; +0x8c, 0x65408", "xrefs": ["sub_64B98 @ 0x64bc8", "sub_6534C @ 0x65368", "sub_65508 @ 0x65538"], "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"}