{"type": "func", "start": 359066, "end": 359118, "name": "sub_57A9A", "pseudocode": "// \n// sub_57A9A from 0x57a9a to 0x57ace (52 bytes)\n// \n// 1 xrefs:\n// > sub_578AC @ 0x578ec\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\nint __fastcall sub_57A9A(_DWORD *a1, int a2)\n{\n  int v3; // r0\n  int v4; // r2\n\n  if ( a2 < 0 )\n    return 28;\n  v3 = a1[1];\n  if ( v3 <= a2 )\n    return 28;\n  v4 = ~a2 + v3;\n  if ( v4 >= 1 )\n  {\n    memmove((void *)(*a1 + 4 * a2), (const void *)(*a1 + 4 * a2 + 4), 4 * v4);\n    v3 = a1[1];\n  }\n  a1[1] = v3 - 1;\n  return 0;\n}", "assembly": "; \n; sub_57A9A from 0x57a9a to 0x57ace (52 bytes)\n; \n; 1 xrefs:\n; > sub_578AC @ 0x578ec\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\nPUSH            {R4,R6,R7,LR}                                          ; +0x0, 0x57a9a\nADD             R7, SP, #8                                             ; +0x2, 0x57a9c\nCMP             R1, #0                                                 ; +0x4, 0x57a9e\nBMI             loc_57ACA                                              ; +0x6, 0x57aa0\nMOV             R4, R0                                                 ; +0x8, 0x57aa2\nLDR             R0, [R0,#4]                                            ; +0xa, 0x57aa4\nCMP             R0, R1                                                 ; +0xc, 0x57aa6\nBLE             loc_57ACA                                              ; +0xe, 0x57aa8\nMVNS            R2, R1                                                 ; +0x10, 0x57aaa\nADD             R2, R0                                                 ; +0x12, 0x57aac\nCMP             R2, #1                                                 ; +0x14, 0x57aae\nBLT             loc_57AC2                                              ; +0x16, 0x57ab0\nLDR             R0, [R4]                                               ; +0x18, 0x57ab2\nLSLS            R2, R2, #2                                             ; +0x1a, 0x57ab4\nADD.W           R0, R0, R1,LSL#2                                       ; +0x1c, 0x57ab6\nADDS            R1, R0, #4                                             ; +0x20, 0x57aba\nBLX             __aeabi_memmove4                                       ; +0x22, 0x57abc\nLDR             R0, [R4,#4]                                            ; +0x26, 0x57ac0\nSUBS            R0, #1                                                 ; +0x28, 0x57ac2\nSTR             R0, [R4,#4]                                            ; +0x2a, 0x57ac4\nMOVS            R0, #0                                                 ; +0x2c, 0x57ac6\nPOP             {R4,R6,R7,PC}                                          ; +0x2e, 0x57ac8\nMOVS            R0, #0x1C                                              ; +0x30, 0x57aca\nPOP             {R4,R6,R7,PC}                                          ; +0x32, 0x57acc", "xrefs": ["sub_578AC @ 0x578ec"], "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"}