{"type": "func", "start": 413736, "end": 413876, "name": "sub_65028", "pseudocode": "// \n// sub_65028 from 0x65028 to 0x650b4 (140 bytes)\n// \n// 4 xrefs:\n// > sub_64F90 @ 0x64fc0\n// > sub_64FF8 @ 0x65014\n// > sub_657BC @ 0x657d8\n// > sub_65838 @ 0x65868\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:13:55 +0000\n// \n\n__int64 __fastcall sub_65028(__int64 a1, unsigned int a2)\n{\n  __int64 result; // x0\n  __int64 v5; // x8\n  __int64 v6; // [xsp+8h] [xbp-18h] BYREF\n\n  if ( *(_DWORD *)(a1 + 8) > (signed int)a2 )\n    return 28;\n  v6 = 0;\n  if ( a2 )\n  {\n    result = sub_650E8(a2, &v6);\n    if ( (_DWORD)result )\n      return result;\n    if ( *(_DWORD *)(a1 + 8) )\n      sub_65134(v6, *(_QWORD *)a1);\n  }\n  if ( *(int *)(a1 + 12) >= 1 )\n    sub_65158(*(_QWORD *)a1);\n  v5 = v6;\n  *(_DWORD *)(a1 + 12) = a2;\n  *(_QWORD *)a1 = v5;\n  return 0;\n}", "assembly": "; \n; sub_65028 from 0x65028 to 0x650b4 (140 bytes)\n; \n; 4 xrefs:\n; > sub_64F90 @ 0x64fc0\n; > sub_64FF8 @ 0x65014\n; > sub_657BC @ 0x657d8\n; > sub_65838 @ 0x65868\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:13:55 +0000\n; \nSUB             SP, SP, #0x30                                          ; +0x0, 0x65028\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x6502c\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x65030\nLDR             W8, [X0,#8]                                            ; +0xc, 0x65034\nADD             X29, SP, #0x20                                         ; +0x10, 0x65038\nCMP             W8, W1                                                 ; +0x14, 0x6503c\nB.LE            loc_6504C                                              ; +0x18, 0x65040\nMOV             W0, #0x1C                                              ; +0x1c, 0x65044\nB               loc_650A4                                              ; +0x20, 0x65048\nMOV             X19, X0                                                ; +0x24, 0x6504c\nMOV             W20, W1                                                ; +0x28, 0x65050\nSTR             XZR, [SP,#0x20+var_18]                                 ; +0x2c, 0x65054\nCBZ             W1, loc_65080                                          ; +0x30, 0x65058\nADD             X1, SP, #0x20+var_18                                   ; +0x34, 0x6505c\nMOV             W0, W20                                                ; +0x38, 0x65060\nBL              sub_650E8                                              ; +0x3c, 0x65064\nCBNZ            W0, loc_650A4                                          ; +0x40, 0x65068\nLDR             W2, [X19,#8]                                           ; +0x44, 0x6506c\nCBZ             W2, loc_65080                                          ; +0x48, 0x65070\nLDR             X0, [SP,#0x20+var_18]                                  ; +0x4c, 0x65074\nLDR             X1, [X19]                                              ; +0x50, 0x65078\nBL              sub_65134                                              ; +0x54, 0x6507c\nLDR             W8, [X19,#0xC]                                         ; +0x58, 0x65080\nCMP             W8, #1                                                 ; +0x5c, 0x65084\nB.LT            loc_65094                                              ; +0x60, 0x65088\nLDR             X0, [X19]                                              ; +0x64, 0x6508c\nBL              sub_65158                                              ; +0x68, 0x65090\nLDR             X8, [SP,#0x20+var_18]                                  ; +0x6c, 0x65094\nMOV             W0, WZR                                                ; +0x70, 0x65098\nSTR             W20, [X19,#0xC]                                        ; +0x74, 0x6509c\nSTR             X8, [X19]                                              ; +0x78, 0x650a0\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x7c, 0x650a4\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x80, 0x650a8\nADD             SP, SP, #0x30 ; '0'                                    ; +0x84, 0x650ac\nRET                                                                    ; +0x88, 0x650b0", "xrefs": ["sub_64F90 @ 0x64fc0", "sub_64FF8 @ 0x65014", "sub_657BC @ 0x657d8", "sub_65838 @ 0x65868"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}