{"type": "func", "start": 5372585824, "end": 5372586238, "name": "PlayLayer::toggleProgressbar", "pseudocode": "// \n// PlayLayer::toggleProgressbar from 0x1403b2760 to 0x1403b28fe (414 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1405c9ce8\n// > <???> @ 0x1406d6e54\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=3\nvoid PlayLayer::toggleProgressbar(PlayLayer *a1)\n{\n  float v1; // xmm0_4\n  GameManager *v3; // rcx\n  bool m_showProgressBar; // si\n  float v5; // xmm6_4\n  bool GameVariable; // bp\n  float v7; // xmm8_4\n  __int64 v8; // rcx\n  cocos2d::CCDirector *v9; // rax\n  cocos2d::CCLabelBMFont *m_percentageLabel; // rcx\n  cocos2d::CCLabelBMFont_vtbl *v11; // rbx\n  double v12; // xmm0_8\n  const cocos2d::CCPoint *v13; // rax\n  cocos2d::CCLabelBMFont_vtbl *v14; // rbx\n  const cocos2d::CCPoint *v15; // rax\n  float v16; // [rsp+60h] [rbp+8h]\n  void *v17; // [rsp+68h] [rbp+10h]\n\n  v3 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v17 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v17);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v3 = (GameManager *)qword_1406C2ED8;\n  }\n  m_showProgressBar = v3->m_showProgressBar;\n  v5 = 0.0;\n  if ( a1->m_isPlatformer )\n  {\n    m_showProgressBar = 0;\n    GameVariable = GameManager::getGameVariable(v3, \"0145\");\n    v7 = 0.0;\n  }\n  else\n  {\n    GameVariable = GameManager::getGameVariable(v3, \"0040\");\n    v7 = (float)(m_showProgressBar ? 0x6E : 0);\n  }\n  a1->m_progressBar->setVisible(a1->m_progressBar, m_showProgressBar);\n  v9 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v8);\n  cocos2d::CCDirector::getWinSize(v9);\n  a1->m_percentageLabel->setVisible(a1->m_percentageLabel, GameVariable);\n  m_percentageLabel = a1->m_percentageLabel;\n  v11 = m_percentageLabel->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  m_percentageLabel->getPosition_0(m_percentageLabel);\n  v12 = cocos2d::CCPoint::CCPoint(v1, (float)(v16 * 0.5) + v7);\n  v11->setPosition_0(a1->m_percentageLabel, v13);\n  if ( !m_showProgressBar && !a1->m_isPlatformer )\n    v5 = 0.5;\n  v14 = a1->m_percentageLabel->__vftable;\n  cocos2d::CCPoint::CCPoint(*(float *)&v12, v5);\n  v14->setAnchorPoint(a1->m_percentageLabel, v15);\n  PlayLayer::updateProgressbar(a1);\n  if ( a1->m_isPlatformer && GameVariable )\n    GJBaseGameLayer::updatePlatformerTime(a1);\n}", "assembly": "; \n; PlayLayer::toggleProgressbar from 0x1403b2760 to 0x1403b28fe (414 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1405c9ce8\n; > <???> @ 0x1406d6e54\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\nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1403b2760\npush    rbp                                                            ; +0x5, 0x1403b2765\npush    rsi                                                            ; +0x6, 0x1403b2766\npush    rdi                                                            ; +0x7, 0x1403b2767\nsub     rsp, 40h                                                       ; +0x8, 0x1403b2768\nmovaps  [rsp+58h+var_28], xmm6                                         ; +0xc, 0x1403b276c\nmovaps  [rsp+58h+var_38], xmm8                                         ; +0x11, 0x1403b2771\nmov     rdi, rcx                                                       ; +0x17, 0x1403b2777\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x1a, 0x1403b277a\ntest    rcx, rcx                                                       ; +0x21, 0x1403b2781\njnz     short loc_1403B27B5                                            ; +0x24, 0x1403b2784\nmov     ecx, 668h; Size                                                ; +0x26, 0x1403b2786\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2b, 0x1403b278b\nmov     [rsp+58h+arg_8], rax                                           ; +0x30, 0x1403b2790\nmov     rcx, rax                                                       ; +0x35, 0x1403b2795\ncall    sub_14017AB00                                                  ; +0x38, 0x1403b2798\nnop                                                                    ; +0x3d, 0x1403b279d\nmov     cs:qword_1406C2ED8, rax                                        ; +0x3e, 0x1403b279e\nmov     rdx, [rax]                                                     ; +0x45, 0x1403b27a5\nmov     rcx, rax                                                       ; +0x48, 0x1403b27a8\ncall    qword ptr [rdx+48h]                                            ; +0x4b, 0x1403b27ab\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x4e, 0x1403b27ae\nmovzx   esi, byte ptr [rcx+394h]                                       ; +0x55, 0x1403b27b5\nxorps   xmm6, xmm6                                                     ; +0x5c, 0x1403b27bc\ncmp     byte ptr [rdi+309Eh], 0                                        ; +0x5f, 0x1403b27bf\njz      short loc_1403B27E0                                            ; +0x66, 0x1403b27c6\nxor     sil, sil                                                       ; +0x68, 0x1403b27c8\nlea     rdx, a0145; \"0145\"                                             ; +0x6b, 0x1403b27cb\ncall    GameManager__getGameVariable                                   ; +0x72, 0x1403b27d2\nmovzx   ebp, al                                                        ; +0x77, 0x1403b27d7\nxorps   xmm8, xmm8                                                     ; +0x7a, 0x1403b27da\njmp     short loc_1403B2803                                            ; +0x7e, 0x1403b27de\nlea     rdx, a0040; \"0040\"                                             ; +0x80, 0x1403b27e0\ncall    GameManager__getGameVariable                                   ; +0x87, 0x1403b27e7\nmovzx   ebp, al                                                        ; +0x8c, 0x1403b27ec\nmovzx   eax, sil                                                       ; +0x8f, 0x1403b27ef\nneg     al                                                             ; +0x93, 0x1403b27f3\nsbb     ecx, ecx                                                       ; +0x95, 0x1403b27f5\nand     ecx, 6Eh                                                       ; +0x97, 0x1403b27f7\nmovd    xmm8, ecx                                                      ; +0x9a, 0x1403b27fa\ncvtdq2ps xmm8, xmm8                                                    ; +0x9f, 0x1403b27ff\nmov     rcx, [rdi+38F0h]                                               ; +0xa3, 0x1403b2803\nmov     rax, [rcx]                                                     ; +0xaa, 0x1403b280a\nmovzx   edx, sil                                                       ; +0xad, 0x1403b280d\ncall    qword ptr [rax+140h]                                           ; +0xb1, 0x1403b2811\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xb7, 0x1403b2817\nmov     rcx, rax                                                       ; +0xbd, 0x1403b281d\nlea     rdx, [rsp+58h+arg_0]                                           ; +0xc0, 0x1403b2820\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0xc5, 0x1403b2825\nmov     rcx, [rdi+38E0h]                                               ; +0xcb, 0x1403b282b\nmov     rax, [rcx]                                                     ; +0xd2, 0x1403b2832\nmovzx   edx, bpl                                                       ; +0xd5, 0x1403b2835\ncall    qword ptr [rax+140h]                                           ; +0xd9, 0x1403b2839\nmov     rcx, [rdi+38E0h]                                               ; +0xdf, 0x1403b283f\nmov     rbx, [rcx]                                                     ; +0xe6, 0x1403b2846\ncall    qword ptr [rbx+0C8h]                                           ; +0xe9, 0x1403b2849\nmovss   xmm1, [rsp+58h+arg_0]                                          ; +0xef, 0x1403b284f\nmulss   xmm1, cs:dword_140622B08                                       ; +0xf5, 0x1403b2855\naddss   xmm1, xmm8                                                     ; +0xfd, 0x1403b285d\nmovss   xmm2, dword ptr [rax+4]                                        ; +0x102, 0x1403b2862\nlea     rcx, [rsp+58h+arg_8]                                           ; +0x107, 0x1403b2867\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x10c, 0x1403b286c\nmov     rdx, rax                                                       ; +0x112, 0x1403b2872\nmov     rcx, [rdi+38E0h]                                               ; +0x115, 0x1403b2875\ncall    qword ptr [rbx+0B8h]                                           ; +0x11c, 0x1403b287c\ntest    sil, sil                                                       ; +0x122, 0x1403b2882\njnz     short loc_1403B2898                                            ; +0x125, 0x1403b2885\ncmp     [rdi+309Eh], sil                                               ; +0x127, 0x1403b2887\njnz     short loc_1403B2898                                            ; +0x12e, 0x1403b288e\nmovss   xmm6, cs:dword_140622B08                                       ; +0x130, 0x1403b2890\nmov     rax, [rdi+38E0h]                                               ; +0x138, 0x1403b2898\nmov     rbx, [rax]                                                     ; +0x13f, 0x1403b289f\nmovss   xmm2, cs:dword_140622B08                                       ; +0x142, 0x1403b28a2\nmovaps  xmm1, xmm6                                                     ; +0x14a, 0x1403b28aa\nlea     rcx, [rsp+58h+arg_8]                                           ; +0x14d, 0x1403b28ad\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x152, 0x1403b28b2\nmov     rdx, rax                                                       ; +0x158, 0x1403b28b8\nmov     rcx, [rdi+38E0h]                                               ; +0x15b, 0x1403b28bb\ncall    qword ptr [rbx+110h]                                           ; +0x162, 0x1403b28c2\nmov     rcx, rdi                                                       ; +0x168, 0x1403b28c8\ncall    PlayLayer__updateProgressbar                                   ; +0x16b, 0x1403b28cb\ncmp     byte ptr [rdi+309Eh], 0                                        ; +0x170, 0x1403b28d0\njz      short loc_1403B28E6                                            ; +0x177, 0x1403b28d7\ntest    bpl, bpl                                                       ; +0x179, 0x1403b28d9\njz      short loc_1403B28E6                                            ; +0x17c, 0x1403b28dc\nmov     rcx, rdi                                                       ; +0x17e, 0x1403b28de\ncall    GJBaseGameLayer__updatePlatformerTime                          ; +0x181, 0x1403b28e1\nmov     rbx, [rsp+58h+arg_10]                                          ; +0x186, 0x1403b28e6\nmovaps  xmm6, [rsp+58h+var_28]                                         ; +0x18b, 0x1403b28eb\nmovaps  xmm8, [rsp+58h+var_38]                                         ; +0x190, 0x1403b28f0\nadd     rsp, 40h                                                       ; +0x196, 0x1403b28f6\npop     rdi                                                            ; +0x19a, 0x1403b28fa\npop     rsi                                                            ; +0x19b, 0x1403b28fb\npop     rbp                                                            ; +0x19c, 0x1403b28fc\nretn                                                                   ; +0x19d, 0x1403b28fd", "xrefs": ["<???> @ 0x1405c9ce8", "<???> @ 0x1406d6e54"], "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"}