{"type": "func", "start": 3954440, "end": 3954608, "name": "GJGameLevel::getSongName", "pseudocode": "// \n// GJGameLevel::getSongName from 0x3c5708 to 0x3c57b0 (168 bytes)\n// \n// 3 xrefs:\n// > LevelCell::loadLocalLevelCell @ 0x33197e\n// > LevelCell::loadCustomLevelCell @ 0x33259c\n// > EditLevelLayer::setupLevelInfo @ 0x3b63ac\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\nGJGameLevel *__fastcall GJGameLevel::getSongName(GJGameLevel *this, int a2, int a3, int a4)\n{\n  int v6; // r1\n  int v7; // r0\n  GJGameLevel_vtbl *v9; // [sp+4h] [bp-Ch] BYREF\n  _DWORD v10[2]; // [sp+8h] [bp-8h] BYREF\n\n  v9 = (GJGameLevel_vtbl *)a2;\n  v10[0] = a3;\n  v10[1] = a4;\n  if ( *(_DWORD *)(a2 + 356) )\n  {\n    sub_776584((int)&v9, (char *)&unk_939830);\n    v7 = SongInfoObject::create(*(SongInfoObject **)(a2 + 356), v6);\n    if ( !v7 || *(_BYTE *)(v7 + 308) )\n    {\n      sub_7753D4((int)&v9, \"Unknown\");\n    }\n    else\n    {\n      sub_775C20(v10, v7 + 268);\n      sub_774794(&v9, v10);\n      sub_774008(v10);\n    }\n    this->__vftable = v9;\n    v9 = (GJGameLevel_vtbl *)&unk_ACDDA8;\n    sub_774008(&v9);\n  }\n  else\n  {\n    LevelTools::getAudioTitle((LevelTools *)this, *(_DWORD *)(a2 + 352));\n  }\n  return this;\n}", "assembly": "; \n; GJGameLevel::getSongName from 0x3c5708 to 0x3c57b0 (168 bytes)\n; \n; 3 xrefs:\n; > LevelCell::loadLocalLevelCell @ 0x33197e\n; > LevelCell::loadCustomLevelCell @ 0x33259c\n; > EditLevelLayer::setupLevelInfo @ 0x3b63ac\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.W          {R0-R8,LR}                                             ; +0x0, 0x3c5708\nMOV             R7, R0                                                 ; +0x4, 0x3c570c\nLDR             R3, =(__stack_chk_guard_ptr - 0x3C5716)                ; +0x6, 0x3c570e\nMOV             R8, R1                                                 ; +0x8, 0x3c5710\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0xa, 0x3c5712\nLDR             R3, [R3]; __stack_chk_guard                            ; +0xc, 0x3c5714\nLDR             R2, [R3]                                               ; +0xe, 0x3c5716\nMOV             R6, R3                                                 ; +0x10, 0x3c5718\nSTR             R2, [SP,#0x10+var_4]                                   ; +0x12, 0x3c571a\nLDR.W           R2, [R1,#0x164]                                        ; +0x14, 0x3c571c\nCBZ             R2, loc_3C5746                                         ; +0x18, 0x3c5720\nADD             R4, SP, #0x10+var_C                                    ; +0x1a, 0x3c5722\nADD             R5, SP, #0x10+var_8                                    ; +0x1c, 0x3c5724\nLDR             R1, =(unk_939830 - 0x3C5730)                           ; +0x1e, 0x3c5726\nMOV             R0, R4; int                                            ; +0x20, 0x3c5728\nMOV             R2, R5                                                 ; +0x22, 0x3c572a\nADD             R1, PC; unk_939830 ; char *                            ; +0x24, 0x3c572c\nBL              sub_776584                                             ; +0x26, 0x3c572e\nLDR.W           R0, [R8,#0x164]; this                                  ; +0x2a, 0x3c5732\nBL              _ZN14SongInfoObject6createEi; SongInfoObject::create(int) ; +0x2e, 0x3c5736\nMOV             R1, R0                                                 ; +0x32, 0x3c573a\nCBZ             R0, loc_3C5790                                         ; +0x34, 0x3c573c\nLDRB.W          R3, [R0,#0x134]                                        ; +0x36, 0x3c573e\nCBNZ            R3, loc_3C5790                                         ; +0x3a, 0x3c5742\nB               loc_3C575A                                             ; +0x3c, 0x3c5744\nLDR.W           R1, [R1,#0x160]; int                                   ; +0x3e, 0x3c5746\nBL              _ZN10LevelTools13getAudioTitleEi; LevelTools::getAudioTitle(int) ; +0x42, 0x3c574a\nB               loc_3C579C                                             ; +0x46, 0x3c574e\nMOV             R0, R4                                                 ; +0x48, 0x3c5750\nBL              sub_774008                                             ; +0x4a, 0x3c5752\nBL              __cxa_end_cleanup                                      ; +0x4e, 0x3c5756\nMOV             R0, R5                                                 ; +0x52, 0x3c575a\nADD.W           R1, R1, #0x10C                                         ; +0x54, 0x3c575c\nBL              sub_775C20                                             ; +0x58, 0x3c5760\nMOV             R0, R4                                                 ; +0x5c, 0x3c5764\nMOV             R1, R5                                                 ; +0x5e, 0x3c5766\nBL              sub_774794                                             ; +0x60, 0x3c5768\nMOV             R0, R5                                                 ; +0x64, 0x3c576c\nBL              sub_774008                                             ; +0x66, 0x3c576e\nLDR             R3, [SP,#0x10+var_C]                                   ; +0x6a, 0x3c5772\nMOV             R0, R4                                                 ; +0x6c, 0x3c5774\nLDR             R5, =(off_AB5BA0 - 0x3C577E)                           ; +0x6e, 0x3c5776\nSTR             R3, [R7]                                               ; +0x70, 0x3c5778\nADD             R5, PC; off_AB5BA0                                     ; +0x72, 0x3c577a\nLDR             R5, [R5]; dword_ACDD9C                                 ; +0x74, 0x3c577c\nADDS            R5, #0xC                                               ; +0x76, 0x3c577e\nSTR             R5, [SP,#0x10+var_C]                                   ; +0x78, 0x3c5780\nBL              sub_774008                                             ; +0x7a, 0x3c5782\nB               loc_3C579C                                             ; +0x7e, 0x3c5786\nMOV             R0, R5                                                 ; +0x80, 0x3c5788\nBL              sub_774008                                             ; +0x82, 0x3c578a\nB               loc_3C5750                                             ; +0x86, 0x3c578e\nLDR             R1, =(aUnknown - 0x3C5798); \"Unknown\"                  ; +0x88, 0x3c5790\nMOV             R0, R4; int                                            ; +0x8a, 0x3c5792\nADD             R1, PC; \"Unknown\"                                      ; +0x8c, 0x3c5794\nBL              sub_7753D4                                             ; +0x8e, 0x3c5796\nB               loc_3C5772                                             ; +0x92, 0x3c579a\nLDR             R2, [SP,#0x10+var_4]                                   ; +0x94, 0x3c579c\nMOV             R0, R7                                                 ; +0x96, 0x3c579e\nLDR             R3, [R6]                                               ; +0x98, 0x3c57a0\nCMP             R2, R3                                                 ; +0x9a, 0x3c57a2\nBEQ             loc_3C57AA                                             ; +0x9c, 0x3c57a4\nBLX             __stack_chk_fail                                       ; +0x9e, 0x3c57a6\nADD             SP, SP, #0x10                                          ; +0xa2, 0x3c57aa\nPOP.W           {R4-R8,PC}                                             ; +0xa4, 0x3c57ac", "xrefs": ["LevelCell::loadLocalLevelCell @ 0x33197e", "LevelCell::loadCustomLevelCell @ 0x33259c", "EditLevelLayer::setupLevelInfo @ 0x3b63ac"], "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"}