//
// PlayerObject::playDynamicSpiderRun from 0x1403a14d0 to 0x1403a170d (573 bytes)
//
// 6 xrefs:
// > PlayerObject::updateMove @ 0x14038a8c1
// > PlayerObject::stopDashing @ 0x140396cdd
// > PlayerObject::toggleSpiderMode @ 0x14039bc84
// > PlayerObject::hitGround @ 0x14039c3fa
// > PlayerObject::updateRobotAnimationSpeed @ 0x1403a13bd
// > ??> @ 0x1406d6968
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=1
void PlayerObject::playDynamicSpiderRun(PlayerObject *a1)
{
int v2; // edi
float m_playerSpeed; // xmm0_4
size_t v4; // rax
void **v5; // rdx
size_t v6; // r14
int v7; // esi
size_t v8; // rcx
const char *v9; // rdx
void **v10; // rdx
size_t v11; // r14
struct cocos2d::CCAction *ActionByTag; // rax
struct cocos2d::CCAction *v13; // rbx
__int128 Buf1; // [rsp+28h] [rbp-48h] BYREF
__int64 v15; // [rsp+38h] [rbp-38h]
__int64 v16; // [rsp+40h] [rbp-30h]
void *Buf2[2]; // [rsp+48h] [rbp-28h] BYREF
size_t Size; // [rsp+58h] [rbp-18h]
unsigned __int64 v19; // [rsp+60h] [rbp-10h]
v2 = 0;
if ( !a1->m_isDashing )
{
sub_14003BDB0((__int64)Buf2, (__int64)&a1->m_spiderSprite->m_animationManager->m_currentAnimation);
m_playerSpeed = a1->m_playerSpeed;
v4 = 4;
v16 = 15;
v15 = 4;
if ( m_playerSpeed <= 1.1 )
{
Buf1 = 0;
strcpy((char *)&Buf1, "walk");
if ( m_playerSpeed <= 0.89999998 )
{
CCAnimatedSprite::runAnimation((__int64)a1->m_spiderSprite, (__int64)&Buf1);
LABEL_32:
sub_14003A830((__int64)Buf2);
return;
}
v10 = Buf2;
if ( v19 > 0xF )
v10 = (void **)Buf2[0];
v11 = Size;
if ( Size < 4 )
v4 = Size;
v7 = memcmp(&Buf1, v10, v4);
if ( !v7 )
{
if ( v11 <= 4 )
{
LOBYTE(v2) = v11 < 4;
v7 = v2;
}
else
{
v7 = -1;
}
}
Buf1 = 0;
v15 = 3;
v16 = 15;
LOWORD(Buf1) = *(_WORD *)"run";
WORD1(Buf1) = (unsigned __int8)aRun[2];
}
else
{
Buf1 = 0;
strcpy((char *)&Buf1, "walk");
v5 = Buf2;
if ( v19 > 0xF )
v5 = (void **)Buf2[0];
v6 = Size;
if ( Size < 4 )
v4 = Size;
v7 = memcmp(&Buf1, v5, v4);
v8 = -1;
if ( !v7 )
{
if ( v6 <= 4 )
v7 = v6 < 4;
else
v7 = -1;
}
v9 = "run2";
if ( !a1->m_spiderAnimationEnabled )
v9 = "run";
Buf1 = 0;
v15 = 0;
v16 = 0;
do
++v8;
while ( v9[v8] );
sub_14003A930(&Buf1, v9, v8);
}
CCAnimatedSprite::runAnimation((__int64)a1->m_spiderSprite, (__int64)&Buf1);
if ( !v7 )
{
ActionByTag = cocos2d::CCNode::getActionByTag(a1->m_spiderSprite->m_animationManager->m_sprite->m_sprite, 1);
v13 = ActionByTag;
if ( ActionByTag )
{
if ( LOBYTE(ActionByTag[1].m_nLuaID) )
((void (__fastcall *)(struct cocos2d::CCAction *))ActionByTag->step)(ActionByTag);
((void (__fastcall *)(struct cocos2d::CCAction *))v13->step)(v13);
}
}
goto LABEL_32;
}
}