{"type": "func", "start": 315808, "end": 315872, "name": "sub_4D1A0", "pseudocode": "// \n// sub_4D1A0 from 0x4d1a0 to 0x4d1e0 (64 bytes)\n// \n// 1 xrefs:\n// > sub_4D760 @ 0x4d7f0\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:40:41 +0000\n// \n\nint __fastcall sub_4D1A0(int a1)\n{\n  int v2; // r0\n  bool v3; // cc\n  int result; // r0\n  int v5; // r1\n\n  v2 = *(_DWORD *)(a1 + 344);\n  v3 = v2 <= 1;\n  result = v2 - 1;\n  *(_DWORD *)(a1 + 344) = result;\n  if ( v3 )\n  {\n    *(_DWORD *)(a1 + 344) = 0;\n    v5 = *(_DWORD *)(a1 + 340);\n    if ( v5 )\n    {\n      result = sub_BD7AC(\n                 *(int *)((char *)&dword_14C + (_DWORD)off_E8000),\n                 v5,\n                 \"../../src/fmod_geometry_mgr.cpp\",\n                 400,\n                 1);\n      *(_DWORD *)(a1 + 340) = 0;\n    }\n  }\n  return result;\n}", "assembly": "; \n; sub_4D1A0 from 0x4d1a0 to 0x4d1e0 (64 bytes)\n; \n; 1 xrefs:\n; > sub_4D760 @ 0x4d7f0\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:40:41 +0000\n; \nPUSH            {R2-R5,R7,LR}                                          ; +0x0, 0x4d1a0\nADD             R7, SP, #0x10                                          ; +0x2, 0x4d1a2\nMOV             R4, R0                                                 ; +0x4, 0x4d1a4\nLDR.W           R0, [R0,#0x158]                                        ; +0x6, 0x4d1a6\nSUBS            R0, #1                                                 ; +0xa, 0x4d1aa\nSTR.W           R0, [R4,#0x158]                                        ; +0xc, 0x4d1ac\nBGT             locret_4D1DE                                           ; +0x10, 0x4d1b0\nMOVS            R5, #0                                                 ; +0x12, 0x4d1b2\nSTR.W           R5, [R4,#0x158]                                        ; +0x14, 0x4d1b4\nLDR.W           R1, [R4,#0x154]                                        ; +0x18, 0x4d1b8\nCBZ             R1, locret_4D1DE                                       ; +0x1c, 0x4d1bc\nLDR             R0, =(off_E6144 - 0x4D1CA)                             ; +0x1e, 0x4d1be\nMOVS            R2, #1                                                 ; +0x20, 0x4d1c0\nMOV.W           R3, #0x190                                             ; +0x22, 0x4d1c2\nADD             R0, PC; off_E6144                                      ; +0x26, 0x4d1c6\nLDR             R0, [R0]; off_E8000                                    ; +0x28, 0x4d1c8\nLDR             R0, [R0]; unk_F2488                                    ; +0x2a, 0x4d1ca\nLDR.W           R0, [R0,#(dword_F25D4 - 0xF2488)]                      ; +0x2c, 0x4d1cc\nSTR             R2, [SP,#8+var_8]                                      ; +0x30, 0x4d1d0\nLDR             R2, =(aSrcFmodGeometr - 0x4D1D8); \"../../src/fmod_geometry_mgr.cpp\" ... ; +0x32, 0x4d1d2\nADD             R2, PC; \"../../src/fmod_geometry_mgr.cpp\"              ; +0x34, 0x4d1d4\nBL              sub_BD7AC                                              ; +0x36, 0x4d1d6\nSTR.W           R5, [R4,#0x154]                                        ; +0x3a, 0x4d1da\nPOP             {R2-R5,R7,PC}                                          ; +0x3e, 0x4d1de", "xrefs": ["sub_4D760 @ 0x4d7f0"], "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"}