{"type": "func", "start": 358572, "end": 358704, "name": "sub_578AC", "pseudocode": "// \n// sub_578AC from 0x578ac to 0x57930 (132 bytes)\n// \n// 2 xrefs:\n// > sub_57338 @ 0x574b6\n// > sub_B33B8 @ 0xb3752\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_578AC(int a1, int a2)\n{\n  int v4; // r4\n  int v5; // r5\n  _DWORD v7[2]; // [sp+4h] [bp-24h] BYREF\n  char v8; // [sp+Ch] [bp-1Ch]\n\n  v7[1] = 18;\n  v8 = 0;\n  v7[0] = a1;\n  sub_44998((int)v7);\n  v4 = *(_DWORD *)(a2 + 16);\n  *(_DWORD *)(*(_DWORD *)(a1 + 71996) + 4 * v4) = *(_DWORD *)(*(_DWORD *)(a1 + 71996) + 4\n                                                                                      * (*(_DWORD *)(a1 + 72000) - 1));\n  *(_DWORD *)(*(_DWORD *)(*(_DWORD *)(a1 + 71996) + 4 * v4) + 16) = v4;\n  sub_57A9A();\n  sub_448CC((int)v7);\n  v5 = sub_5C7EA(a1 + 1264, *(_DWORD *)(a2 + 8), 1);\n  if ( !v5 )\n    sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), a2, \"../../src/fmod_systemi.cpp\", 1038, 1);\n  return v5;\n}", "assembly": "; \n; sub_578AC from 0x578ac to 0x57930 (132 bytes)\n; \n; 2 xrefs:\n; > sub_57338 @ 0x574b6\n; > sub_B33B8 @ 0xb3752\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, 0x578ac\nADD             R7, SP, #0xC                                           ; +0x2, 0x578ae\nPUSH.W          {R4-R9,R11}                                            ; +0x4, 0x578b0\nMOV             R5, R0                                                 ; +0x8, 0x578b4\nMOVS            R0, #0x12                                              ; +0xa, 0x578b6\nADD.W           R8, SP, #0x10+var_C                                    ; +0xc, 0x578b8\nSTR             R0, [SP,#0x10+var_8]                                   ; +0x10, 0x578bc\nMOVS            R0, #0                                                 ; +0x12, 0x578be\nMOV             R9, R1                                                 ; +0x14, 0x578c0\nSTRB.W          R0, [SP,#0x10+var_4]                                   ; +0x16, 0x578c2\nMOV             R0, R8                                                 ; +0x1a, 0x578c6\nSTR             R5, [SP,#0x10+var_C]                                   ; +0x1c, 0x578c8\nBL              sub_44998                                              ; +0x1e, 0x578ca\nLDR             R2, =0x1193C                                           ; +0x22, 0x578ce\nLDR.W           R4, [R9,#0x10]                                         ; +0x24, 0x578d0\nADDS            R0, R5, R2                                             ; +0x28, 0x578d4\nLDR             R3, [R5,R2]                                            ; +0x2a, 0x578d6\nLDR             R1, [R0,#4]                                            ; +0x2c, 0x578d8\nSUBS            R1, #1                                                 ; +0x2e, 0x578da\nLDR.W           R6, [R3,R1,LSL#2]                                      ; +0x30, 0x578dc\nSTR.W           R6, [R3,R4,LSL#2]                                      ; +0x34, 0x578e0\nLDR             R2, [R5,R2]                                            ; +0x38, 0x578e4\nLDR.W           R2, [R2,R4,LSL#2]                                      ; +0x3a, 0x578e6\nSTR             R4, [R2,#0x10]                                         ; +0x3e, 0x578ea\nBL              sub_57A9A                                              ; +0x40, 0x578ec\nMOV             R0, R8                                                 ; +0x44, 0x578f0\nBL              sub_448CC                                              ; +0x46, 0x578f2\nLDR.W           R1, [R9,#8]                                            ; +0x4a, 0x578f6\nADD.W           R0, R5, #0x4F0                                         ; +0x4e, 0x578fa\nMOVS            R2, #1                                                 ; +0x52, 0x578fe\nMOVS            R6, #1                                                 ; +0x54, 0x57900\nBL              sub_5C7EA                                              ; +0x56, 0x57902\nMOV             R5, R0                                                 ; +0x5a, 0x57906\nCBNZ            R0, loc_57926                                          ; +0x5c, 0x57908\nLDR             R0, =(off_E6144 - 0x57916)                             ; +0x5e, 0x5790a\nMOV             R1, R9                                                 ; +0x60, 0x5790c\nMOVW            R3, #0x40E                                             ; +0x62, 0x5790e\nADD             R0, PC; off_E6144                                      ; +0x66, 0x57912\nLDR             R0, [R0]; off_E8000                                    ; +0x68, 0x57914\nLDR             R0, [R0]; dword_F2488                                  ; +0x6a, 0x57916\nLDR.W           R0, [R0,#(dword_F25D4 - 0xF2488)]                      ; +0x6c, 0x57918\nSTR             R6, [SP,#0x10+var_10]                                  ; +0x70, 0x5791c\nLDR             R2, =(aSrcFmodSystemi - 0x57924); \"../../src/fmod_systemi.cpp\" ... ; +0x72, 0x5791e\nADD             R2, PC; \"../../src/fmod_systemi.cpp\"                   ; +0x74, 0x57920\nBL              sub_BD7AC                                              ; +0x76, 0x57922\nMOV             R0, R5                                                 ; +0x7a, 0x57926\nADD             SP, SP, #0x10                                          ; +0x7c, 0x57928\nPOP.W           {R8,R9,R11}                                            ; +0x7e, 0x5792a\nPOP             {R4-R7,PC}                                             ; +0x82, 0x5792e", "xrefs": ["sub_57338 @ 0x574b6", "sub_B33B8 @ 0xb3752"], "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"}