{"type": "func", "start": 5372590416, "end": 5372590536, "name": "PlayLayer::getCurrentPercent", "pseudocode": "// \n// PlayLayer::getCurrentPercent from 0x1403b3950 to 0x1403b39c8 (120 bytes)\n// \n// 4 xrefs:\n// > PlayLayer::updateProgressbar @ 0x1403b23fb\n// > PlayLayer::destroyPlayer @ 0x1403b3cfc\n// > PlayLayer::destroyPlayer @ 0x1403b3f54\n// > <???> @ 0x1406d6ec0\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\nfloat PlayLayer::getCurrentPercent(PlayLayer *a1)\n{\n  const cocos2d::CCPoint *v2; // rax\n  float m_levelLength; // xmm1_4\n  float x; // xmm0_4\n  int m_timestamp; // eax\n  float v6; // xmm1_4\n\n  v2 = a1->m_player1->getPosition_0(a1->m_player1);\n  m_levelLength = a1->m_levelLength;\n  x = v2->x;\n  m_timestamp = a1->m_level->GJBaseGameLayer::m_timestamp;\n  if ( m_timestamp > 0 )\n  {\n    x = (float)(int)a1->m_gameState.m_currentProgress;\n    m_levelLength = (float)(2 * m_timestamp);\n  }\n  v6 = fmaxf(0.0, (float)(x / m_levelLength) * 100.0);\n  if ( v6 <= 100.0 )\n    return v6;\n  else\n    return 100.0;\n}", "assembly": "; \n; PlayLayer::getCurrentPercent from 0x1403b3950 to 0x1403b39c8 (120 bytes)\n; \n; 4 xrefs:\n; > PlayLayer::updateProgressbar @ 0x1403b23fb\n; > PlayLayer::destroyPlayer @ 0x1403b3cfc\n; > PlayLayer::destroyPlayer @ 0x1403b3f54\n; > <???> @ 0x1406d6ec0\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, 0x1403b3950\nsub     rsp, 20h                                                       ; +0x2, 0x1403b3952\nmov     rbx, rcx                                                       ; +0x6, 0x1403b3956\nmov     rcx, [rcx+0DA0h]                                               ; +0x9, 0x1403b3959\nmov     rax, [rcx]                                                     ; +0x10, 0x1403b3960\ncall    qword ptr [rax+0C8h]                                           ; +0x13, 0x1403b3963\nmovss   xmm1, dword ptr [rbx+3220h]                                    ; +0x19, 0x1403b3969\nmovss   xmm0, dword ptr [rax]                                          ; +0x21, 0x1403b3971\nmov     rax, [rbx+878h]                                                ; +0x25, 0x1403b3975\nmov     eax, [rax+4C8h]                                                ; +0x2c, 0x1403b397c\ntest    eax, eax                                                       ; +0x32, 0x1403b3982\njle     short loc_1403B399A                                            ; +0x34, 0x1403b3984\nmovd    xmm0, dword ptr [rbx+3E8h]                                     ; +0x36, 0x1403b3986\nadd     eax, eax                                                       ; +0x3e, 0x1403b398e\ncvtdq2ps xmm0, xmm0                                                    ; +0x40, 0x1403b3990\nmovd    xmm1, eax                                                      ; +0x43, 0x1403b3993\ncvtdq2ps xmm1, xmm1                                                    ; +0x47, 0x1403b3997\nmovss   xmm2, cs:dword_1406232BC                                       ; +0x4a, 0x1403b399a\ndivss   xmm0, xmm1                                                     ; +0x52, 0x1403b39a2\nxorps   xmm1, xmm1                                                     ; +0x56, 0x1403b39a6\nmulss   xmm0, xmm2                                                     ; +0x59, 0x1403b39a9\nmaxss   xmm1, xmm0                                                     ; +0x5d, 0x1403b39ad\ncomiss  xmm1, xmm2                                                     ; +0x61, 0x1403b39b1\njbe     short loc_1403B39BF                                            ; +0x64, 0x1403b39b4\nmovaps  xmm0, xmm2                                                     ; +0x66, 0x1403b39b6\nadd     rsp, 20h                                                       ; +0x69, 0x1403b39b9\npop     rbx                                                            ; +0x6d, 0x1403b39bd\nretn                                                                   ; +0x6e, 0x1403b39be\nmovaps  xmm0, xmm1                                                     ; +0x6f, 0x1403b39bf\nadd     rsp, 20h                                                       ; +0x72, 0x1403b39c2\npop     rbx                                                            ; +0x76, 0x1403b39c6\nretn                                                                   ; +0x77, 0x1403b39c7", "xrefs": ["PlayLayer::updateProgressbar @ 0x1403b23fb", "PlayLayer::destroyPlayer @ 0x1403b3cfc", "PlayLayer::destroyPlayer @ 0x1403b3f54", "<???> @ 0x1406d6ec0"], "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"}