{"type": "func", "start": 584988, "end": 585086, "name": "sub_8ED1C", "pseudocode": "// \n// sub_8ED1C from 0x8ed1c to 0x8ed7e (98 bytes)\n// \n// 1 xrefs:\n// > sub_B3130 @ 0xb3328\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:41:25 +0000\n// \n\nint __fastcall sub_8ED1C(int a1, int a2, int a3, int a4)\n{\n  bool v4; // zf\n  bool v5; // zf\n  _DWORD *v6; // r0\n  int v7; // r2\n  int v8; // r3\n  int v9; // r4\n  int v10; // r6\n  int v11; // r5\n  int *v12; // r0\n  int v13; // r2\n  int v14; // r3\n  int v15; // r4\n  int v16; // r6\n\n  v4 = a3 == 8;\n  if ( a3 == 8 )\n    v4 = a4 == 1;\n  if ( v4 )\n  {\n    v12 = (int *)(a1 + 16);\n    v13 = 0;\n    while ( v13 < a2 )\n    {\n      v14 = *v12;\n      v15 = v12[1];\n      v16 = v12[3];\n      ++v13;\n      *v12 = v12[2];\n      v12[1] = v16;\n      v12[2] = v14;\n      v12[3] = v15;\n      v12 += 8;\n    }\n  }\n  else if ( a4 == 5 )\n  {\n    v5 = a3 == 8;\n    if ( a3 != 8 )\n      v5 = a3 == 6;\n    if ( v5 )\n    {\n      v6 = (_DWORD *)(a1 + 12);\n      v7 = 4 * a3;\n      v8 = 0;\n      while ( v8 < a2 )\n      {\n        ++v8;\n        v9 = v6[2];\n        v6[2] = *v6;\n        v10 = *(v6 - 1);\n        v11 = v6[1];\n        *v6 = v9;\n        v6[1] = v10;\n        *(v6 - 1) = v11;\n        v6 = (_DWORD *)((char *)v6 + v7);\n      }\n    }\n  }\n  return 0;\n}", "assembly": "; \n; sub_8ED1C from 0x8ed1c to 0x8ed7e (98 bytes)\n; \n; 1 xrefs:\n; > sub_B3130 @ 0xb3328\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:41:25 +0000\n; \nPUSH            {R4-R7,LR}                                             ; +0x0, 0x8ed1c\nADD             R7, SP, #0xC                                           ; +0x2, 0x8ed1e\nPUSH.W          {R11}                                                  ; +0x4, 0x8ed20\nCMP             R2, #8                                                 ; +0x8, 0x8ed24\nIT EQ                                                                  ; +0xa, 0x8ed26\nCMPEQ           R3, #1                                                 ; +0xc, 0x8ed28\nBEQ             loc_8ED5C                                              ; +0xe, 0x8ed2a\nCMP             R3, #5                                                 ; +0x10, 0x8ed2c\nBNE             loc_8ED76                                              ; +0x12, 0x8ed2e\nCMP             R2, #8                                                 ; +0x14, 0x8ed30\nIT NE                                                                  ; +0x16, 0x8ed32\nCMPNE           R2, #6                                                 ; +0x18, 0x8ed34\nBNE             loc_8ED76                                              ; +0x1a, 0x8ed36\nADDS            R0, #0xC                                               ; +0x1c, 0x8ed38\nLSLS            R2, R2, #2                                             ; +0x1e, 0x8ed3a\nMOVS            R3, #0                                                 ; +0x20, 0x8ed3c\nCMP             R3, R1                                                 ; +0x22, 0x8ed3e\nBGE             loc_8ED76                                              ; +0x24, 0x8ed40\nLDR             R5, [R0]                                               ; +0x26, 0x8ed42\nADDS            R3, #1                                                 ; +0x28, 0x8ed44\nLDR             R4, [R0,#8]                                            ; +0x2a, 0x8ed46\nSTR             R5, [R0,#8]                                            ; +0x2c, 0x8ed48\nLDR.W           R6, [R0,#-4]                                           ; +0x2e, 0x8ed4a\nLDR             R5, [R0,#4]                                            ; +0x32, 0x8ed4e\nSTRD.W          R4, R6, [R0]                                           ; +0x34, 0x8ed50\nSTR.W           R5, [R0,#-4]                                           ; +0x38, 0x8ed54\nADD             R0, R2                                                 ; +0x3c, 0x8ed58\nB               loc_8ED3E                                              ; +0x3e, 0x8ed5a\nADDS            R0, #0x10                                              ; +0x40, 0x8ed5c\nMOVS            R2, #0                                                 ; +0x42, 0x8ed5e\nCMP             R2, R1                                                 ; +0x44, 0x8ed60\nBGE             loc_8ED76                                              ; +0x46, 0x8ed62\nLDM.W           R0, {R3-R6}                                            ; +0x48, 0x8ed64\nADDS            R2, #1                                                 ; +0x4c, 0x8ed68\nSTRD.W          R5, R6, [R0]                                           ; +0x4e, 0x8ed6a\nSTRD.W          R3, R4, [R0,#8]                                        ; +0x52, 0x8ed6e\nADDS            R0, #0x20 ; ' '                                        ; +0x56, 0x8ed72\nB               loc_8ED60                                              ; +0x58, 0x8ed74\nMOVS            R0, #0                                                 ; +0x5a, 0x8ed76\nPOP.W           {R11}                                                  ; +0x5c, 0x8ed78\nPOP             {R4-R7,PC}                                             ; +0x60, 0x8ed7c", "xrefs": ["sub_B3130 @ 0xb3328"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}