{"type": "func", "start": 743268, "end": 743380, "name": "sub_B5764", "pseudocode": "// \n// sub_B5764 from 0xb5764 to 0xb57d4 (112 bytes)\n// \n// 1 xrefs:\n// > sub_B4934 @ 0xb4948\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_B5764(__int64 a1, int a2)\n{\n  int v2; // w8\n  __int64 result; // x0\n  __int64 v6; // x8\n\n  v2 = *(_DWORD *)(a1 + 12);\n  if ( v2 < 0 )\n    v2 = -v2;\n  if ( v2 >= a2 || (result = sub_B5804(a1, (unsigned int)a2), !(_DWORD)result) )\n  {\n    v6 = *(int *)(a1 + 8);\n    if ( (int)v6 < a2 )\n      memset((void *)(*(_QWORD *)a1 + 4 * v6), 0, 4LL * (a2 - (int)v6));\n    *(_DWORD *)(a1 + 8) = a2;\n    return 0;\n  }\n  return result;\n}", "assembly": "; \n; sub_B5764 from 0xb5764 to 0xb57d4 (112 bytes)\n; \n; 1 xrefs:\n; > sub_B4934 @ 0xb4948\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\nSTP             X20, X19, [SP,#-0x10+var_10]!                          ; +0x0, 0xb5764\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0xb5768\nLDR             W8, [X0,#0xC]                                          ; +0x8, 0xb576c\nMOV             W19, W1                                                ; +0xc, 0xb5770\nMOV             X20, X0                                                ; +0x10, 0xb5774\nADD             X29, SP, #0x10                                         ; +0x14, 0xb5778\nCMP             W8, #0                                                 ; +0x18, 0xb577c\nCNEG            W8, W8, MI                                             ; +0x1c, 0xb5780\nCMP             W8, W1                                                 ; +0x20, 0xb5784\nB.GE            loc_B579C                                              ; +0x24, 0xb5788\nMOV             X0, X20                                                ; +0x28, 0xb578c\nMOV             W1, W19                                                ; +0x2c, 0xb5790\nBL              sub_B5804                                              ; +0x30, 0xb5794\nCBNZ            W0, loc_B57C8                                          ; +0x34, 0xb5798\nLDRSW           X8, [X20,#8]                                           ; +0x38, 0xb579c\nCMP             W8, W19                                                ; +0x3c, 0xb57a0\nB.GE            loc_B57C0                                              ; +0x40, 0xb57a4\nLDR             X9, [X20]                                              ; +0x44, 0xb57a8\nSUB             W10, W19, W8                                           ; +0x48, 0xb57ac\nSBFIZ           X2, X10, #2, #0x20 ; ' '; n                            ; +0x4c, 0xb57b0\nMOV             W1, WZR; c                                             ; +0x50, 0xb57b4\nADD             X0, X9, X8,LSL#2; s                                    ; +0x54, 0xb57b8\nBL              .memset                                                ; +0x58, 0xb57bc\nMOV             W0, WZR                                                ; +0x5c, 0xb57c0\nSTR             W19, [X20,#8]                                          ; +0x60, 0xb57c4\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x64, 0xb57c8\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x68, 0xb57cc\nRET                                                                    ; +0x6c, 0xb57d0", "xrefs": ["sub_B4934 @ 0xb4948"], "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"}