// // sub_10046DC1C from 0x10046dc1c to 0x10046de78 (604 bytes) // // 1 xrefs: // > sub_10046DAFC @ 0x10046dba0 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 11:05:36 +0000 // __int64 __fastcall sub_10046DC1C(__int64 a1, char *a2) { __int64 v4; // x20 _QWORD *v5; // x21 std::string *p_str; // x8 std::string::size_type size; // x23 std::string *v8; // x9 std::string::size_type v9; // x11 std::string *v10; // x10 __int64 v11; // x8 __int64 v12; // x24 std::string::size_type v13; // x22 std::string *v14; // x1 __int64 v15; // x26 bool v16; // zf std::string::size_type v17; // x11 std::string *v18; // x8 _BYTE *v19; // x9 _BYTE *v20; // x10 std::string::size_type v21; // x11 __int64 v22; // x8 void *v23; // x0 _DWORD *v24; // x0 _QWORD *v25; // x0 std::string __str; // [xsp+8h] [xbp-88h] BYREF std::allocator __a[24]; // [xsp+20h] [xbp-70h] BYREF std::string v29; // [xsp+38h] [xbp-58h] BYREF LODWORD(v29.__r_.__value_.__l.__data_) = 0; v4 = cocos2d::CCLayerColor::initWithColor(a1, (__int64)&v29); if ( !(_DWORD)v4 ) return v4; if ( a2[23] < 0 ) a2 = *(char **)a2; sub_100009900(&__str, a2); v5 = sub_1002E736C(); if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) p_str = &__str; else p_str = (std::string *)__str.__r_.__value_.__r.__words[0]; if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) size = HIBYTE(__str.__r_.__value_.__r.__words[2]); else size = __str.__r_.__value_.__l.__size_; if ( size ) { v8 = (std::string *)((char *)p_str + size); v9 = size; v10 = p_str; while ( v10->__r_.__value_.__s.__data_[0] != 126 ) { v10 = (std::string *)((char *)v10 + 1); if ( !--v9 ) { v10 = (std::string *)((char *)p_str + size); break; } } v11 = (char *)v10 - (char *)p_str; if ( v10 == v8 ) v12 = -1; else v12 = v11; } else { v12 = -1; } v13 = 0; do { std::string::basic_string(&v29, &__str, v13, v12 - v13, __a); if ( SHIBYTE(v29.__r_.__value_.__r.__words[2]) < 0 ) { if ( v13 == size && !v29.__r_.__value_.__l.__size_ ) goto LABEL_29; v14 = (std::string *)v29.__r_.__value_.__r.__words[0]; } else { if ( v13 == size && !*((_BYTE *)&v29.__r_.__value_.__s + 23) ) goto LABEL_29; v14 = &v29; } sub_100009900(__a, (char *)v14); sub_1003064AC((__int128 *)__a); sub_1002E74E0((__int64)v5); if ( (*(_BYTE *)&__a[23].std::__non_trivial_if & 0x80000000) != 0 ) operator delete(*(void **)&__a[0].std::__non_trivial_if); LABEL_29: if ( v12 == -1 ) goto LABEL_30; v13 = v12 + 1; v17 = __str.__r_.__value_.__l.__size_; if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v18 = &__str; else v18 = (std::string *)__str.__r_.__value_.__r.__words[0]; if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v17 = HIBYTE(__str.__r_.__value_.__r.__words[2]); if ( v17 <= v13 ) { LABEL_30: v15 = -1; } else { v19 = (char *)v18 + v17; v20 = (char *)v18 + v13; v21 = ~v12 + v17; while ( *v20 != 126 ) { ++v20; if ( !--v21 ) { v20 = v19; break; } } v22 = v20 - (_BYTE *)v18; if ( v20 == v19 ) v15 = -1; else v15 = v22; } if ( SHIBYTE(v29.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v29.__r_.__value_.__l.__data_); v16 = v12 == -1; v12 = v15; } while ( !v16 ); *(_QWORD *)(a1 + 552) = v5; if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 ) { operator delete(__str.__r_.__value_.__l.__data_); v5 = *(_QWORD **)(a1 + 552); } cocos2d::CCObject::retain((__int64)v5); sub_10046DEC8(a1); v23 = cocos2d::CCTextureCache::sharedTextureCache(); v24 = cocos2d::CCTextureCache::addImage((__int64)v23, "GJ_GameSheet.png"); v25 = cocos2d::CCSpriteBatchNode::createWithTexture((__int64)v24, 29); *(_QWORD *)(a1 + 544) = v25; (*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)a1 + 456LL))(a1, v25); (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 544) + 912LL))(*(_QWORD *)(a1 + 544), 0x100000302LL); *(_DWORD *)(a1 + 580) = 1036831949; return v4; }
GD Web Decomp Icon

GD Web Decomp

Raw Source