{"type": "func", "start": 612836, "end": 612918, "name": "sub_959E4", "pseudocode": "// \n// sub_959E4 from 0x959e4 to 0x95a36 (82 bytes)\n// \n// 1 xrefs:\n// > sub_95948 @ 0x959be\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_959E4(_DWORD *a1, int a2, _DWORD *a3)\n{\n  int v4; // r0\n  int result; // r0\n  int v8; // r0\n\n  if ( a2 < 0 )\n    return 28;\n  v4 = a1[1];\n  if ( v4 < a2 )\n    return 28;\n  result = sub_967E2(a1, v4 + 1);\n  if ( !result )\n  {\n    v8 = a1[1];\n    if ( v8 - a2 >= 1 )\n      memmove((void *)(*a1 + 4 * a2 + 4), (const void *)(*a1 + 4 * a2), 4 * (v8 - a2));\n    *(_DWORD *)(*a1 + 4 * a2) = *a3;\n    ++a1[1];\n    return 0;\n  }\n  return result;\n}", "assembly": "; \n; sub_959E4 from 0x959e4 to 0x95a36 (82 bytes)\n; \n; 1 xrefs:\n; > sub_95948 @ 0x959be\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-R7,LR}                                             ; +0x0, 0x959e4\nADD             R7, SP, #0xC                                           ; +0x2, 0x959e6\nPUSH.W          {R11}                                                  ; +0x4, 0x959e8\nCMP             R1, #0                                                 ; +0x8, 0x959ec\nBMI             loc_959FA                                              ; +0xa, 0x959ee\nMOV             R4, R0                                                 ; +0xc, 0x959f0\nLDR             R0, [R0,#4]                                            ; +0xe, 0x959f2\nMOV             R5, R1                                                 ; +0x10, 0x959f4\nCMP             R0, R1                                                 ; +0x12, 0x959f6\nBGE             loc_959FE                                              ; +0x14, 0x959f8\nMOVS            R0, #0x1C                                              ; +0x16, 0x959fa\nB               loc_95A30                                              ; +0x18, 0x959fc\nADDS            R1, R0, #1                                             ; +0x1a, 0x959fe\nMOV             R0, R4                                                 ; +0x1c, 0x95a00\nMOV             R6, R2                                                 ; +0x1e, 0x95a02\nBL              sub_967E2                                              ; +0x20, 0x95a04\nCBNZ            R0, loc_95A30                                          ; +0x24, 0x95a08\nLDR             R0, [R4,#4]                                            ; +0x26, 0x95a0a\nSUBS            R2, R0, R5                                             ; +0x28, 0x95a0c\nCMP             R2, #1                                                 ; +0x2a, 0x95a0e\nBLT             loc_95A20                                              ; +0x2c, 0x95a10\nLDR             R0, [R4]                                               ; +0x2e, 0x95a12\nLSLS            R2, R2, #2                                             ; +0x30, 0x95a14\nADD.W           R1, R0, R5,LSL#2                                       ; +0x32, 0x95a16\nADDS            R0, R1, #4                                             ; +0x36, 0x95a1a\nBLX             __aeabi_memmove4                                       ; +0x38, 0x95a1c\nLDR             R1, [R4]                                               ; +0x3c, 0x95a20\nLDR             R0, [R6]                                               ; +0x3e, 0x95a22\nSTR.W           R0, [R1,R5,LSL#2]                                      ; +0x40, 0x95a24\nLDR             R0, [R4,#4]                                            ; +0x44, 0x95a28\nADDS            R0, #1                                                 ; +0x46, 0x95a2a\nSTR             R0, [R4,#4]                                            ; +0x48, 0x95a2c\nMOVS            R0, #0                                                 ; +0x4a, 0x95a2e\nPOP.W           {R11}                                                  ; +0x4c, 0x95a30\nPOP             {R4-R7,PC}                                             ; +0x50, 0x95a34", "xrefs": ["sub_95948 @ 0x959be"], "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"}