{"type": "func", "start": 458748, "end": 458892, "name": "sub_6FFFC", "pseudocode": "// \n// sub_6FFFC from 0x6fffc to 0x7008c (144 bytes)\n// \n// 4 xrefs:\n// > sub_6FF5C @ 0x6ff8c\n// > sub_6FFCC @ 0x6ffe8\n// > sub_C2D94 @ 0xc2db0\n// > sub_C2F4C @ 0xc2f7c\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_6FFFC(__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_7008C(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_6FFFC from 0x6fffc to 0x7008c (144 bytes)\n; \n; 4 xrefs:\n; > sub_6FF5C @ 0x6ff8c\n; > sub_6FFCC @ 0x6ffe8\n; > sub_C2D94 @ 0xc2db0\n; > sub_C2F4C @ 0xc2f7c\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, 0x6fffc\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x70000\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x70004\nLDR             W8, [X0,#8]                                            ; +0xc, 0x70008\nADD             X29, SP, #0x20                                         ; +0x10, 0x7000c\nCMP             W8, W1                                                 ; +0x14, 0x70010\nB.LE            loc_70020                                              ; +0x18, 0x70014\nMOV             W0, #0x1C                                              ; +0x1c, 0x70018\nB               loc_7007C                                              ; +0x20, 0x7001c\nMOV             X19, X0                                                ; +0x24, 0x70020\nMOV             W20, W1                                                ; +0x28, 0x70024\nSTR             XZR, [SP,#0x20+dest]                                   ; +0x2c, 0x70028\nCBZ             W1, loc_70058                                          ; +0x30, 0x7002c\nADD             X1, SP, #0x20+dest                                     ; +0x34, 0x70030\nMOV             W0, W20                                                ; +0x38, 0x70034\nBL              sub_7008C                                              ; +0x3c, 0x70038\nCBNZ            W0, loc_7007C                                          ; +0x40, 0x7003c\nLDRSW           X8, [X19,#8]                                           ; +0x44, 0x70040\nCBZ             W8, loc_70058                                          ; +0x48, 0x70044\nLDR             X0, [SP,#0x20+dest]; dest                              ; +0x4c, 0x70048\nLDR             X1, [X19]; src                                         ; +0x50, 0x7004c\nLSL             X2, X8, #4; n                                          ; +0x54, 0x70050\nBL              .memcpy                                                ; +0x58, 0x70054\nLDR             W8, [X19,#0xC]                                         ; +0x5c, 0x70058\nCMP             W8, #1                                                 ; +0x60, 0x7005c\nB.LT            loc_7006C                                              ; +0x64, 0x70060\nLDR             X0, [X19]                                              ; +0x68, 0x70064\nBL              sub_65158                                              ; +0x6c, 0x70068\nLDR             X8, [SP,#0x20+dest]                                    ; +0x70, 0x7006c\nMOV             W0, WZR                                                ; +0x74, 0x70070\nSTR             W20, [X19,#0xC]                                        ; +0x78, 0x70074\nSTR             X8, [X19]                                              ; +0x7c, 0x70078\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x80, 0x7007c\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x84, 0x70080\nADD             SP, SP, #0x30 ; '0'                                    ; +0x88, 0x70084\nRET                                                                    ; +0x8c, 0x70088", "xrefs": ["sub_6FF5C @ 0x6ff8c", "sub_6FFCC @ 0x6ffe8", "sub_C2D94 @ 0xc2db0", "sub_C2F4C @ 0xc2f7c"], "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"}