{"type": "func", "start": 680732, "end": 680904, "name": "sub_A631C", "pseudocode": "// \n// sub_A631C from 0xa631c to 0xa63c8 (172 bytes)\n// \n// 1 xrefs:\n// > sub_A35FC @ 0xa35fc\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_A631C(__int64 a1, __int64 a2, unsigned int a3, int a4)\n{\n  __int64 v5; // x19\n  unsigned int v7; // w8\n  int v8; // w21\n  __int16 v9; // w20\n\n  v5 = a1;\n  if ( a4 == 2 )\n  {\n    v7 = *(_DWORD *)(a1 + 2136);\n    if ( v7 == a3 )\n      return 0;\n    if ( v7 > a3 )\n    {\n      a1 = sub_A64D4();\n      v8 = 1;\n    }\n    else\n    {\n      v8 = 0;\n    }\n    while ( *(_DWORD *)(v5 + 2136) < a3 )\n      a1 = sub_A3674(v5, 1);\n    if ( !v8 )\n    {\n      return 0;\n    }\n    else\n    {\n      v9 = *(_WORD *)(v5 + 3048);\n      sub_A6458(a1);\n      *(_WORD *)(v5 + 3048) = v9;\n      return 0;\n    }\n  }\n  else if ( a4 == 256 )\n  {\n    sub_A64D4();\n    *(_DWORD *)(v5 + 3068) = a3;\n    *(_DWORD *)(v5 + 3084) = a3;\n    return 0;\n  }\n  else\n  {\n    return 19;\n  }\n}", "assembly": "; \n; sub_A631C from 0xa631c to 0xa63c8 (172 bytes)\n; \n; 1 xrefs:\n; > sub_A35FC @ 0xa35fc\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, 0xa631c\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0xa6320\nMOV             W20, W2                                                ; +0x8, 0xa6324\nCMP             W3, #2                                                 ; +0xc, 0xa6328\nMOV             X19, X0                                                ; +0x10, 0xa632c\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x14, 0xa6330\nADD             X29, SP, #0x20                                         ; +0x18, 0xa6334\nB.EQ            loc_A6358                                              ; +0x1c, 0xa6338\nCMP             W3, #0x100                                             ; +0x20, 0xa633c\nB.NE            loc_A6374                                              ; +0x24, 0xa6340\nBL              sub_A64D4                                              ; +0x28, 0xa6344\nMOV             W0, WZR                                                ; +0x2c, 0xa6348\nSTR             W20, [X19,#0xBFC]                                      ; +0x30, 0xa634c\nSTR             W20, [X19,#0xC0C]                                      ; +0x34, 0xa6350\nB               loc_A63B8                                              ; +0x38, 0xa6354\nLDR             W8, [X19,#0x858]                                       ; +0x3c, 0xa6358\nCMP             W8, W20                                                ; +0x40, 0xa635c\nB.EQ            loc_A63B4                                              ; +0x44, 0xa6360\nB.LS            loc_A637C                                              ; +0x48, 0xa6364\nBL              sub_A64D4                                              ; +0x4c, 0xa6368\nMOV             W21, #1                                                ; +0x50, 0xa636c\nB               loc_A6390                                              ; +0x54, 0xa6370\nMOV             W0, #0x13                                              ; +0x58, 0xa6374\nB               loc_A63B8                                              ; +0x5c, 0xa6378\nMOV             W21, WZR                                               ; +0x60, 0xa637c\nB               loc_A6390                                              ; +0x64, 0xa6380\nMOV             W1, #1                                                 ; +0x68, 0xa6384\nMOV             X0, X19                                                ; +0x6c, 0xa6388\nBL              sub_A3674                                              ; +0x70, 0xa638c\nLDR             W8, [X19,#0x858]                                       ; +0x74, 0xa6390\nCMP             W8, W20                                                ; +0x78, 0xa6394\nB.CC            loc_A6384                                              ; +0x7c, 0xa6398\nCBZ             W21, loc_A63B4                                         ; +0x80, 0xa639c\nLDRH            W20, [X19,#0xBE8]                                      ; +0x84, 0xa63a0\nBL              sub_A6458                                              ; +0x88, 0xa63a4\nMOV             W0, WZR                                                ; +0x8c, 0xa63a8\nSTRH            W20, [X19,#0xBE8]                                      ; +0x90, 0xa63ac\nB               loc_A63B8                                              ; +0x94, 0xa63b0\nMOV             W0, WZR                                                ; +0x98, 0xa63b4\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x9c, 0xa63b8\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0xa0, 0xa63bc\nLDR             X21, [SP+0x20+var_20],#0x30                            ; +0xa4, 0xa63c0\nRET                                                                    ; +0xa8, 0xa63c4", "xrefs": ["sub_A35FC @ 0xa35fc"], "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"}