{"type": "func", "start": 5369517264, "end": 5369517632, "name": "SongOptionsLayer::onClose", "pseudocode": "// \n// SongOptionsLayer::onClose from 0x1400c54d0 to 0x1400c5640 (368 bytes)\n// \n// 3 xrefs:\n// > SongOptionsLayer::keyBackClicked @ 0x1400c5649\n// > SongOptionsLayer::init @ 0x1400c4a89\n// > <???> @ 0x1406c813c\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\n// Hidden C++ exception states: #wind=1\nvoid SongOptionsLayer::onClose(SongOptionsLayer *a1, cocos2d::CCObject *a2)\n{\n  float m_songOffset; // xmm7_4\n  cocos2d::CCLabelProtocol *v4; // rcx\n  const char *v5; // rax\n  size_t v6; // r8\n  const char *v7; // rcx\n  float v8; // xmm6_4\n  char *v9; // rcx\n  _BOOL8 v10; // rdx\n  char *String[2]; // [rsp+28h] [rbp-50h] BYREF\n  __int128 v12; // [rsp+38h] [rbp-40h]\n\n  a1->m_offsetInput->onClickTrackNode(a1->m_offsetInput, 0);\n  m_songOffset = a1->m_delegate->getLevelSettings(a1->m_delegate)->m_songOffset;\n  v4 = &a1->m_offsetInput->m_textField->cocos2d::CCLabelProtocol;\n  v5 = v4->getString(v4);\n  *(_OWORD *)String = 0;\n  v12 = 0;\n  v6 = -1;\n  do\n    ++v6;\n  while ( v5[v6] );\n  sub_14003A930(String, v5, v6);\n  v7 = (const char *)String;\n  if ( *((_QWORD *)&v12 + 1) > 0xFu )\n    v7 = String[0];\n  v8 = atof(v7);\n  a1->m_delegate->getLevelSettings(a1->m_delegate)->m_songOffset = v8;\n  if ( *((_QWORD *)&v12 + 1) > 0xFu )\n  {\n    v9 = String[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v12 + 1) + 1LL) >= 0x1000 )\n    {\n      v9 = *((char **)String[0] - 1);\n      if ( (unsigned __int64)(String[0] - v9 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v9);\n  }\n  if ( m_songOffset != a1->m_delegate->getLevelSettings(a1->m_delegate)->m_songOffset )\n    a1->m_delegate->getLevelSettings(a1->m_delegate)->m_guidelinesUpdated = 1;\n  a1->setKeypadEnabled(a1, 0);\n  LOBYTE(v10) = 1;\n  a1->removeFromParentAndCleanup(a1, v10);\n}", "assembly": "; \n; SongOptionsLayer::onClose from 0x1400c54d0 to 0x1400c5640 (368 bytes)\n; \n; 3 xrefs:\n; > SongOptionsLayer::keyBackClicked @ 0x1400c5649\n; > SongOptionsLayer::init @ 0x1400c4a89\n; > <???> @ 0x1406c813c\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    rbx                                                            ; +0x0, 0x1400c54d0\nsub     rsp, 70h                                                       ; +0x2, 0x1400c54d2\nmovaps  [rsp+78h+var_18], xmm6                                         ; +0x6, 0x1400c54d6\nmovaps  [rsp+78h+var_28], xmm7                                         ; +0xb, 0x1400c54db\nmov     rax, cs:__security_cookie                                      ; +0x10, 0x1400c54e0\nxor     rax, rsp                                                       ; +0x17, 0x1400c54e7\nmov     [rsp+78h+var_30], rax                                          ; +0x1a, 0x1400c54ea\nmov     rbx, rcx                                                       ; +0x1f, 0x1400c54ef\nmov     rcx, [rcx+280h]                                                ; +0x22, 0x1400c54f2\nmov     rax, [rcx]                                                     ; +0x29, 0x1400c54f9\nxor     edx, edx                                                       ; +0x2c, 0x1400c54fc\ncall    qword ptr [rax+3F8h]                                           ; +0x2e, 0x1400c54fe\nmov     rcx, [rbx+278h]                                                ; +0x34, 0x1400c5504\nmov     rax, [rcx]                                                     ; +0x3b, 0x1400c550b\ncall    qword ptr [rax+18h]                                            ; +0x3e, 0x1400c550e\nmovss   xmm7, dword ptr [rax+158h]                                     ; +0x41, 0x1400c5511\nmov     rax, [rbx+280h]                                                ; +0x49, 0x1400c5519\nmov     rcx, [rax+228h]                                                ; +0x50, 0x1400c5520\nadd     rcx, 258h                                                      ; +0x57, 0x1400c5527\nmov     rax, [rcx]                                                     ; +0x5e, 0x1400c552e\ncall    qword ptr [rax+8]                                              ; +0x61, 0x1400c5531\nxorps   xmm0, xmm0                                                     ; +0x64, 0x1400c5534\nmovups  xmmword ptr [rsp+78h+String], xmm0                             ; +0x67, 0x1400c5537\nxorps   xmm1, xmm1                                                     ; +0x6c, 0x1400c553c\nmovdqu  [rsp+78h+var_40], xmm1                                         ; +0x6f, 0x1400c553f\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x75, 0x1400c5545\nnop     dword ptr [rax+00h]                                            ; +0x7c, 0x1400c554c\ninc     r8                                                             ; +0x80, 0x1400c5550\ncmp     byte ptr [rax+r8], 0                                           ; +0x83, 0x1400c5553\njnz     short loc_1400C5550                                            ; +0x88, 0x1400c5558\nmov     rdx, rax                                                       ; +0x8a, 0x1400c555a\nlea     rcx, [rsp+78h+String]                                          ; +0x8d, 0x1400c555d\ncall    sub_14003A930                                                  ; +0x92, 0x1400c5562\nnop                                                                    ; +0x97, 0x1400c5567\nlea     rcx, [rsp+78h+String]                                          ; +0x98, 0x1400c5568\ncmp     qword ptr [rsp+78h+var_40+8], 0Fh                              ; +0x9d, 0x1400c556d\ncmova   rcx, [rsp+78h+String]; String                                  ; +0xa3, 0x1400c5573\ncall    cs:atof                                                        ; +0xa9, 0x1400c5579\nxorps   xmm6, xmm6                                                     ; +0xaf, 0x1400c557f\ncvtsd2ss xmm6, xmm0                                                    ; +0xb2, 0x1400c5582\nmov     rcx, [rbx+278h]                                                ; +0xb6, 0x1400c5586\nmov     rax, [rcx]                                                     ; +0xbd, 0x1400c558d\ncall    qword ptr [rax+18h]                                            ; +0xc0, 0x1400c5590\nmovss   dword ptr [rax+158h], xmm6                                     ; +0xc3, 0x1400c5593\nmov     rdx, qword ptr [rsp+78h+var_40+8]                              ; +0xcb, 0x1400c559b\ncmp     rdx, 0Fh                                                       ; +0xd0, 0x1400c55a0\njbe     short loc_1400C55DB                                            ; +0xd4, 0x1400c55a4\ninc     rdx                                                            ; +0xd6, 0x1400c55a6\nmov     rcx, [rsp+78h+String]; Block                                   ; +0xd9, 0x1400c55a9\nmov     rax, rcx                                                       ; +0xde, 0x1400c55ae\ncmp     rdx, 1000h                                                     ; +0xe1, 0x1400c55b1\njb      short loc_1400C55D6                                            ; +0xe8, 0x1400c55b8\nadd     rdx, 27h ; '''                                                 ; +0xea, 0x1400c55ba\nmov     rcx, [rcx-8]                                                   ; +0xee, 0x1400c55be\nsub     rax, rcx                                                       ; +0xf2, 0x1400c55c2\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xf5, 0x1400c55c5\ncmp     rax, 1Fh                                                       ; +0xf9, 0x1400c55c9\njbe     short loc_1400C55D6                                            ; +0xfd, 0x1400c55cd\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xff, 0x1400c55cf\nalign 2                                                                ; +0x105, 0x1400c55d5\ncall    j_j_free                                                       ; +0x106, 0x1400c55d6\nmov     rcx, [rbx+278h]                                                ; +0x10b, 0x1400c55db\nmov     rax, [rcx]                                                     ; +0x112, 0x1400c55e2\ncall    qword ptr [rax+18h]                                            ; +0x115, 0x1400c55e5\nucomiss xmm7, dword ptr [rax+158h]                                     ; +0x118, 0x1400c55e8\njp      short loc_1400C55F3                                            ; +0x11f, 0x1400c55ef\njz      short loc_1400C5607                                            ; +0x121, 0x1400c55f1\nmov     rcx, [rbx+278h]                                                ; +0x123, 0x1400c55f3\nmov     rax, [rcx]                                                     ; +0x12a, 0x1400c55fa\ncall    qword ptr [rax+18h]                                            ; +0x12d, 0x1400c55fd\nmov     byte ptr [rax+1A8h], 1                                         ; +0x130, 0x1400c5600\nmov     rax, [rbx]                                                     ; +0x137, 0x1400c5607\nxor     edx, edx                                                       ; +0x13a, 0x1400c560a\nmov     rcx, rbx                                                       ; +0x13c, 0x1400c560c\ncall    qword ptr [rax+3D0h]                                           ; +0x13f, 0x1400c560f\nmov     rax, [rbx]                                                     ; +0x145, 0x1400c5615\nmov     dl, 1                                                          ; +0x148, 0x1400c5618\nmov     rcx, rbx                                                       ; +0x14a, 0x1400c561a\ncall    qword ptr [rax+1F8h]                                           ; +0x14d, 0x1400c561d\nmov     rcx, [rsp+78h+var_30]                                          ; +0x153, 0x1400c5623\nxor     rcx, rsp; StackCookie                                          ; +0x158, 0x1400c5628\ncall    __security_check_cookie                                        ; +0x15b, 0x1400c562b\nmovaps  xmm6, [rsp+78h+var_18]                                         ; +0x160, 0x1400c5630\nmovaps  xmm7, [rsp+78h+var_28]                                         ; +0x165, 0x1400c5635\nadd     rsp, 70h                                                       ; +0x16a, 0x1400c563a\npop     rbx                                                            ; +0x16e, 0x1400c563e\nretn                                                                   ; +0x16f, 0x1400c563f", "xrefs": ["SongOptionsLayer::keyBackClicked @ 0x1400c5649", "SongOptionsLayer::init @ 0x1400c4a89", "<???> @ 0x1406c813c"], "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"}