{"type": "func", "start": 335540, "end": 335680, "name": "sub_51EB4", "pseudocode": "// \n// sub_51EB4 from 0x51eb4 to 0x51f40 (140 bytes)\n// \n// 1 xrefs:\n// > sub_610FC @ 0x61174\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_51EB4(int a1, _DWORD *a2, _DWORD *a3)\n{\n  int v5; // r1\n  _DWORD *v6; // r5\n  int v8; // r0\n  _DWORD *v9; // r6\n  int result; // r0\n\n  v5 = a2[21];\n  v6 = nullptr;\n  if ( v5 <= 816 )\n    v5 = 816;\n  v8 = sub_BD580(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), v5, \"../../src/fmod_pluginfactory.cpp\", 1710, 0);\n  if ( v8 )\n  {\n    v9 = (_DWORD *)v8;\n    qmemcpy((void *)(sub_B28B0() + 680), a2, 0x88u);\n    v9[9] = *(_DWORD *)(a1 + 624);\n    v9[2] = sub_B3FF8;\n    v9[3] = sub_51F60;\n    v6 = v9;\n    v9[4] = sub_51F98;\n    v9[5] = nullsub_1;\n    result = 0;\n    v9[6] = sub_B4002;\n    v9[7] = sub_B400C;\n  }\n  else\n  {\n    result = 38;\n  }\n  *a3 = v6;\n  return result;\n}", "assembly": "; \n; sub_51EB4 from 0x51eb4 to 0x51f40 (140 bytes)\n; \n; 1 xrefs:\n; > sub_610FC @ 0x61174\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, 0x51eb4\nADD             R7, SP, #0xC                                           ; +0x2, 0x51eb6\nPUSH.W          {R6-R9,R11}                                            ; +0x4, 0x51eb8\nMOV             R9, R0                                                 ; +0x8, 0x51ebc\nLDR             R0, =(off_E6144 - 0x51EC8)                             ; +0xa, 0x51ebe\nMOV             R4, R1                                                 ; +0xc, 0x51ec0\nLDR             R1, [R1,#0x54]                                         ; +0xe, 0x51ec2\nADD             R0, PC; off_E6144                                      ; +0x10, 0x51ec4\nMOVS            R5, #0                                                 ; +0x12, 0x51ec6\nMOV             R8, R2                                                 ; +0x14, 0x51ec8\nCMP.W           R1, #0x330                                             ; +0x16, 0x51eca\nLDR             R0, [R0]; off_E8000                                    ; +0x1a, 0x51ece\nMOVW            R3, #0x6AE                                             ; +0x1c, 0x51ed0\nLDR             R0, [R0]; dword_F2488                                  ; +0x20, 0x51ed4\nLDR.W           R0, [R0,#(dword_F25D4 - 0xF2488)]                      ; +0x22, 0x51ed6\nSTR             R5, [SP,#8+var_8]                                      ; +0x26, 0x51eda\nIT LE                                                                  ; +0x28, 0x51edc\nMOVLE.W         R1, #0x330                                             ; +0x2a, 0x51ede\nLDR             R2, =(aSrcFmodPluginf - 0x51EE8); \"../../src/fmod_pluginfactory.cpp\" ... ; +0x2e, 0x51ee2\nADD             R2, PC; \"../../src/fmod_pluginfactory.cpp\"             ; +0x30, 0x51ee4\nBL              sub_BD580                                              ; +0x32, 0x51ee6\nCBZ             R0, loc_51F34                                          ; +0x36, 0x51eea\nMOV             R6, R0                                                 ; +0x38, 0x51eec\nBL              sub_B28B0                                              ; +0x3a, 0x51eee\nADD.W           R0, R0, #0x2A8                                         ; +0x3e, 0x51ef2\nMOV             R1, R4                                                 ; +0x42, 0x51ef6\nMOVS            R2, #0x88                                              ; +0x44, 0x51ef8\nBLX             __aeabi_memcpy4                                        ; +0x46, 0x51efa\nLDR.W           R0, [R9,#0x270]                                        ; +0x4a, 0x51efe\nLDR             R1, =(off_E6174 - 0x51F0C)                             ; +0x4e, 0x51f02\nLDR             R2, =(off_E6178 - 0x51F10)                             ; +0x50, 0x51f04\nLDR             R3, =(off_E617C - 0x51F14)                             ; +0x52, 0x51f06\nADD             R1, PC; off_E6174                                      ; +0x54, 0x51f08\nSTR             R0, [R6,#0x24]                                         ; +0x56, 0x51f0a\nADD             R2, PC; off_E6178                                      ; +0x58, 0x51f0c\nLDR             R0, =(nullsub_1+1 - 0x51F1A)                           ; +0x5a, 0x51f0e\nADD             R3, PC; off_E617C                                      ; +0x5c, 0x51f10\nLDR             R4, =(sub_51F98+1 - 0x51F1E)                           ; +0x5e, 0x51f12\nLDR             R5, =(sub_51F60+1 - 0x51F20)                           ; +0x60, 0x51f14\nADD             R0, PC; nullsub_1                                      ; +0x62, 0x51f16\nLDR             R1, [R1]; sub_B400C                                    ; +0x64, 0x51f18\nADD             R4, PC; sub_51F98                                      ; +0x66, 0x51f1a\nADD             R5, PC; sub_51F60                                      ; +0x68, 0x51f1c\nLDR             R3, [R3]; sub_B3FF8                                    ; +0x6a, 0x51f1e\nLDR             R2, [R2]; sub_B4002                                    ; +0x6c, 0x51f20\nSTRD.W          R3, R5, [R6,#8]                                        ; +0x6e, 0x51f22\nMOV             R5, R6                                                 ; +0x72, 0x51f26\nSTRD.W          R4, R0, [R6,#0x10]                                     ; +0x74, 0x51f28\nMOVS            R0, #0                                                 ; +0x78, 0x51f2c\nSTRD.W          R2, R1, [R6,#0x18]                                     ; +0x7a, 0x51f2e\nB               loc_51F36                                              ; +0x7e, 0x51f32\nMOVS            R0, #0x26 ; '&'                                        ; +0x80, 0x51f34\nSTR.W           R5, [R8]                                               ; +0x82, 0x51f36\nPOP.W           {R2,R3,R8,R9,R11}                                      ; +0x86, 0x51f3a\nPOP             {R4-R7,PC}                                             ; +0x8a, 0x51f3e", "xrefs": ["sub_610FC @ 0x61174"], "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"}