{"type": "func", "start": 4726700, "end": 4726988, "name": "EditorUI::playSoundForCreatedObject", "pseudocode": "// \n// EditorUI::playSoundForCreatedObject from 0x481fac to 0x4820cc (288 bytes)\n// \n// 1 xrefs:\n// > EditorUI::onCreate @ 0x487892\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:49:23 +0000\n// \n\nint __fastcall EditorUI::playSoundForCreatedObject(EditorUI *this, GameObject *a2)\n{\n  int v3; // r4\n  int v4; // r0\n  int v5; // r6\n  unsigned int v6; // r7\n  bool v7; // zf\n  int v8; // r4\n  EditorSFXManager *v9; // r0\n  EditorSFXManager *hasSoundsForAction; // r0\n  EditorSFXManager *v11; // r0\n  int v12; // r1\n\n  if ( !a2 )\n  {\n    v8 = 263;\n    goto LABEL_43;\n  }\n  v3 = *((_DWORD *)a2 + 223);\n  v4 = (*(int (__fastcall **)(GameObject *))(*(_DWORD *)a2 + 900))(a2);\n  v5 = *((_DWORD *)a2 + 271);\n  v6 = v4;\n  this = (EditorUI *)(*(int (__fastcall **)(GameObject *))(*(_DWORD *)a2 + 868))(a2);\n  if ( v3 == 1334 )\n    goto LABEL_26;\n  if ( v3 > 1334 )\n  {\n    if ( v3 != 1700 )\n    {\n      if ( v3 > 1700 )\n      {\n        if ( v3 == 2063 )\n        {\n          v8 = 260;\n          goto LABEL_43;\n        }\n        if ( v3 != 2065 )\n        {\n          v7 = v3 == 2012;\n          goto LABEL_20;\n        }\n      }\n      else if ( v3 != 1586 )\n      {\n        if ( v3 == 1615 )\n          goto LABEL_24;\n        v7 = v3 == 1584;\nLABEL_20:\n        if ( !v7 )\n          goto LABEL_27;\nLABEL_40:\n        v8 = 264;\n        goto LABEL_43;\n      }\n    }\n    v8 = 251;\n    goto LABEL_43;\n  }\n  if ( v3 == 914 )\n  {\nLABEL_24:\n    v8 = 252;\n    goto LABEL_43;\n  }\n  if ( v3 <= 914 )\n  {\n    if ( (unsigned int)(v3 - 200) > 3 )\n      goto LABEL_27;\nLABEL_26:\n    v8 = 265;\n    goto LABEL_43;\n  }\n  if ( v3 == 918 || v3 >= 918 && (unsigned int)(v3 - 1327) <= 1 )\n    goto LABEL_40;\nLABEL_27:\n  if ( v6 > 0x2F )\n  {\n    if ( this )\n      goto LABEL_42;\n  }\n  else\n  {\n    v8 = word_BEBDD8[v6 + 2];\n    if ( this )\n    {\n      if ( v8 != 263 )\n      {\n        if ( v8 == 256 )\n          v8 = 255;\n        goto LABEL_43;\n      }\nLABEL_42:\n      v8 = 254;\n      goto LABEL_43;\n    }\n    if ( v8 != 263 )\n      goto LABEL_43;\n  }\n  if ( v5 == 2 || (this = (EditorUI *)(*(int (__fastcall **)(GameObject *))(*(_DWORD *)a2 + 864))(a2)) != nullptr )\n  {\n    v8 = 253;\n  }\n  else\n  {\n    v8 = 263;\n    if ( v5 == 1 )\n      v8 = 250;\n  }\nLABEL_43:\n  v9 = (EditorSFXManager *)EditorSFXManager::sharedState(this);\n  hasSoundsForAction = (EditorSFXManager *)EditorSFXManager::hasSoundsForAction(v9, v8);\n  if ( hasSoundsForAction )\n  {\n    v11 = (EditorSFXManager *)EditorSFXManager::sharedState(hasSoundsForAction);\n    v12 = v8;\n  }\n  else\n  {\n    v11 = (EditorSFXManager *)EditorSFXManager::sharedState(nullptr);\n    v12 = 100;\n  }\n  return EditorSFXManager::playAction(v11, v12);\n}", "assembly": "; \n; EditorUI::playSoundForCreatedObject from 0x481fac to 0x4820cc (288 bytes)\n; \n; 1 xrefs:\n; > EditorUI::onCreate @ 0x487892\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:49:23 +0000\n; \nPUSH            {R3-R7,LR}                                             ; +0x0, 0x481fac\nMOV             R5, R1                                                 ; +0x2, 0x481fae\nCMP             R1, #0                                                 ; +0x4, 0x481fb0\nBEQ             loc_482094                                             ; +0x6, 0x481fb2\nLDR             R3, [R1]                                               ; +0x8, 0x481fb4\nMOV             R0, R1                                                 ; +0xa, 0x481fb6\nLDR.W           R4, [R1,#0x37C]                                        ; +0xc, 0x481fb8\nLDR.W           R3, [R3,#0x384]                                        ; +0x10, 0x481fbc\nBLX             R3                                                     ; +0x14, 0x481fc0\nLDR             R3, [R5]                                               ; +0x16, 0x481fc2\nLDR.W           R6, [R5,#0x43C]                                        ; +0x18, 0x481fc4\nLDR.W           R3, [R3,#0x364]                                        ; +0x1c, 0x481fc8\nMOV             R7, R0                                                 ; +0x20, 0x481fcc\nMOV             R0, R5                                                 ; +0x22, 0x481fce\nBLX             R3                                                     ; +0x24, 0x481fd0\nMOVW            R3, #0x536                                             ; +0x26, 0x481fd2\nCMP             R4, R3                                                 ; +0x2a, 0x481fd6\nBEQ             loc_48204A                                             ; +0x2c, 0x481fd8\nBGT             loc_482002                                             ; +0x2e, 0x481fda\nMOVW            R3, #0x392                                             ; +0x30, 0x481fdc\nCMP             R4, R3                                                 ; +0x34, 0x481fe0\nBEQ             loc_482040                                             ; +0x36, 0x481fe2\nBGT             loc_481FEE                                             ; +0x38, 0x481fe4\nSUBS            R4, #0xC8                                              ; +0x3a, 0x481fe6\nCMP             R4, #3                                                 ; +0x3c, 0x481fe8\nBLS             loc_48204A                                             ; +0x3e, 0x481fea\nB               loc_482050                                             ; +0x40, 0x481fec\nMOVW            R3, #0x396                                             ; +0x42, 0x481fee\nCMP             R4, R3                                                 ; +0x46, 0x481ff2\nBEQ             loc_48209A                                             ; +0x48, 0x481ff4\nBLT             loc_482050                                             ; +0x4a, 0x481ff6\nSUBW            R4, R4, #0x52F                                         ; +0x4c, 0x481ff8\nCMP             R4, #1                                                 ; +0x50, 0x481ffc\nBLS             loc_48209A                                             ; +0x52, 0x481ffe\nB               loc_482050                                             ; +0x54, 0x482000\nMOVW            R3, #0x6A4                                             ; +0x56, 0x482002\nCMP             R4, R3                                                 ; +0x5a, 0x482006\nBEQ             loc_48203C                                             ; +0x5c, 0x482008\nBGT             loc_482022                                             ; +0x5e, 0x48200a\nMOVW            R3, #0x632                                             ; +0x60, 0x48200c\nCMP             R4, R3                                                 ; +0x64, 0x482010\nBEQ             loc_48203C                                             ; +0x66, 0x482012\nMOVW            R3, #0x64F                                             ; +0x68, 0x482014\nCMP             R4, R3                                                 ; +0x6c, 0x482018\nBEQ             loc_482040                                             ; +0x6e, 0x48201a\nCMP.W           R4, #0x630                                             ; +0x70, 0x48201c\nB               loc_482038                                             ; +0x74, 0x482020\nMOVW            R3, #0x80F                                             ; +0x76, 0x482022\nCMP             R4, R3                                                 ; +0x7a, 0x482026\nBEQ             loc_482044                                             ; +0x7c, 0x482028\nMOVW            R3, #0x811                                             ; +0x7e, 0x48202a\nCMP             R4, R3                                                 ; +0x82, 0x48202e\nBEQ             loc_48203C                                             ; +0x84, 0x482030\nMOVW            R3, #0x7DC                                             ; +0x86, 0x482032\nCMP             R4, R3                                                 ; +0x8a, 0x482036\nBNE             loc_482050                                             ; +0x8c, 0x482038\nB               loc_48209A                                             ; +0x8e, 0x48203a\nMOVS            R4, #0xFB                                              ; +0x90, 0x48203c\nB               loc_4820A6                                             ; +0x92, 0x48203e\nMOVS            R4, #0xFC                                              ; +0x94, 0x482040\nB               loc_4820A6                                             ; +0x96, 0x482042\nMOV.W           R4, #0x104                                             ; +0x98, 0x482044\nB               loc_4820A6                                             ; +0x9c, 0x482048\nMOVW            R4, #0x109                                             ; +0x9e, 0x48204a\nB               loc_4820A6                                             ; +0xa2, 0x48204e\nCMP             R7, #0x2F ; '/'                                        ; +0xa4, 0x482050\nBHI             loc_4820A0                                             ; +0xa6, 0x482052\nLDR             R3, =(word_BEBDD8 - 0x48205A)                          ; +0xa8, 0x482054\nADD             R3, PC; word_BEBDD8                                    ; +0xaa, 0x482056\nADD.W           R3, R3, R7,LSL#1                                       ; +0xac, 0x482058\nLDRSH.W         R4, [R3,#4]                                            ; +0xb0, 0x48205c\nMOVW            R3, #0x107                                             ; +0xb4, 0x482060\nCBZ             R0, loc_482074                                         ; +0xb8, 0x482064\nCMP             R4, R3                                                 ; +0xba, 0x482066\nBEQ             loc_4820A4                                             ; +0xbc, 0x482068\nCMP.W           R4, #0x100                                             ; +0xbe, 0x48206a\nIT EQ                                                                  ; +0xc2, 0x48206e\nMOVEQ           R4, #0xFF                                              ; +0xc4, 0x482070\nB               loc_4820A6                                             ; +0xc6, 0x482072\nCMP             R4, R3                                                 ; +0xc8, 0x482074\nBNE             loc_4820A6                                             ; +0xca, 0x482076\nCMP             R6, #2                                                 ; +0xcc, 0x482078\nBEQ             loc_4820C8                                             ; +0xce, 0x48207a\nLDR             R3, [R5]                                               ; +0xd0, 0x48207c\nMOV             R0, R5                                                 ; +0xd2, 0x48207e\nLDR.W           R3, [R3,#0x360]                                        ; +0xd4, 0x482080\nBLX             R3                                                     ; +0xd8, 0x482084\nCBNZ            R0, loc_4820C8                                         ; +0xda, 0x482086\nCMP             R6, #1                                                 ; +0xdc, 0x482088\nMOVW            R4, #0x107                                             ; +0xde, 0x48208a\nIT EQ                                                                  ; +0xe2, 0x48208e\nMOVEQ           R4, #0xFA                                              ; +0xe4, 0x482090\nB               loc_4820A6                                             ; +0xe6, 0x482092\nMOVW            R4, #0x107                                             ; +0xe8, 0x482094\nB               loc_4820A6                                             ; +0xec, 0x482098\nMOV.W           R4, #0x108                                             ; +0xee, 0x48209a\nB               loc_4820A6                                             ; +0xf2, 0x48209e\nCMP             R0, #0                                                 ; +0xf4, 0x4820a0\nBEQ             loc_482078                                             ; +0xf6, 0x4820a2\nMOVS            R4, #0xFE                                              ; +0xf8, 0x4820a4\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0xfa, 0x4820a6\nMOV             R1, R4; int                                            ; +0xfe, 0x4820aa\nBL              _ZNK16EditorSFXManager18hasSoundsForActionEi; EditorSFXManager::hasSoundsForAction(int) ; +0x100, 0x4820ac\nCBZ             R0, loc_4820BA                                         ; +0x104, 0x4820b0\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0x106, 0x4820b2\nMOV             R1, R4                                                 ; +0x10a, 0x4820b6\nB               loc_4820C0                                             ; +0x10c, 0x4820b8\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0x10e, 0x4820ba\nMOVS            R1, #0x64 ; 'd'; int                                   ; +0x112, 0x4820be\nPOP.W           {R3-R7,LR}                                             ; +0x114, 0x4820c0\nB.W             _ZN16EditorSFXManager10playActionEi; EditorSFXManager::playAction(int) ; +0x118, 0x4820c4\nMOVS            R4, #0xFD                                              ; +0x11c, 0x4820c8\nB               loc_4820A6                                             ; +0x11e, 0x4820ca", "xrefs": ["EditorUI::onCreate @ 0x487892"], "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"}