{"type": "func", "start": 6443234384, "end": 6443234741, "name": "cocos2d::CCDirector::setDefaultValues", "pseudocode": "// \n// cocos2d::CCDirector::setDefaultValues from 0x1800bf450 to 0x1800bf5b5 (357 bytes)\n// \n// 4 xrefs:\n// > cocos2d::CCConfiguration::loadConfigFile @ 0x1800bdaad\n// > cocos2d::CCDirector::init @ 0x1800be7b2\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b92f4\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\nvoid __fastcall cocos2d::CCDirector::setDefaultValues(cocos2d::CCDirector *this)\n{\n  cocos2d::CCConfiguration *v2; // rdi\n  __m128d v3; // xmm1\n  std::string *CString; // rax\n  std::string *v5; // rdx\n  __int64 v6; // rcx\n  char v7; // al\n  std::string *v8; // rbx\n  int v9; // ecx\n  char Bool; // al\n\n  v2 = cocos2d::CCConfiguration::sharedConfiguration();\n  v3 = (__m128d)0x3FF0000000000000uLL;\n  v3.m128d_f64[0] = 1.0 / cocos2d::CCConfiguration::getNumber(v2, \"cocos2d.x.fps\", 60.0);\n  *(__m128d *)&this->m_dAnimationInterval = _mm_unpacklo_pd(v3, v3);\n  this->m_bDisplayStats = cocos2d::CCConfiguration::getBool(v2, \"cocos2d.x.display_fps\", 0);\n  CString = cocos2d::CCConfiguration::getCString(v2, \"cocos2d.x.gl.projection\", \"3d\");\n  v5 = CString;\n  if ( *(_WORD *)CString->m_data.m_smallStorage._Elems != 25651 || CString->m_data.m_smallStorage._Elems[2] )\n  {\n    if ( CString->m_data.m_smallStorage._Elems[0] == 50\n      && CString->m_data.m_smallStorage._Elems[1] == 100\n      && !CString->m_data.m_smallStorage._Elems[2] )\n    {\n      this->m_eProjection = kCCDirectorProjection2D;\n    }\n    else\n    {\n      v6 = 0;\n      while ( 1 )\n      {\n        v7 = v5->m_data.m_smallStorage._Elems[v6++];\n        if ( v7 != aCustom[v6 - 1] )\n          break;\n        if ( v6 == 7 )\n        {\n          this->m_eProjection = kCCDirectorProjectionCustom;\n          break;\n        }\n      }\n    }\n  }\n  else\n  {\n    this->m_eProjection = kCCDirectorProjection3D;\n  }\n  v8 = cocos2d::CCConfiguration::getCString(v2, \"cocos2d.x.texture.pixel_format_for_png\", \"rgba8888\");\n  if ( !strcmp(v8->m_data.m_smallStorage._Elems, \"rgba8888\") )\n  {\n    v9 = 0;\nLABEL_18:\n    cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(v9);\n    goto LABEL_19;\n  }\n  if ( !strcmp(v8->m_data.m_smallStorage._Elems, \"rgba4444\") )\n  {\n    v9 = 6;\n    goto LABEL_18;\n  }\n  if ( !strcmp(v8->m_data.m_smallStorage._Elems, \"rgba5551\") )\n  {\n    v9 = 7;\n    goto LABEL_18;\n  }\nLABEL_19:\n  Bool = cocos2d::CCConfiguration::getBool(v2, \"cocos2d.x.texture.pvrv2_has_alpha_premultiplied\", 0);\n  cocos2d::CCTexture2D::PVRImagesHavePremultipliedAlpha(Bool);\n}", "assembly": "; \n; cocos2d::CCDirector::setDefaultValues from 0x1800bf450 to 0x1800bf5b5 (357 bytes)\n; \n; 4 xrefs:\n; > cocos2d::CCConfiguration::loadConfigFile @ 0x1800bdaad\n; > cocos2d::CCDirector::init @ 0x1800be7b2\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b92f4\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_0], rbx                                               ; +0x0, 0x1800bf450\npush    rdi                                                            ; +0x5, 0x1800bf455\nsub     rsp, 20h                                                       ; +0x6, 0x1800bf456\nmov     rbx, rcx                                                       ; +0xa, 0x1800bf45a\ncall    ?sharedConfiguration@CCConfiguration@cocos2d@@SAPEAV12@XZ; cocos2d::CCConfiguration::sharedConfiguration(void) ; +0xd, 0x1800bf45d\nmovsd   xmm2, cs:dbl_180107590; double                                 ; +0x12, 0x1800bf462\nlea     rdx, aCocos2dXFps; \"cocos2d.x.fps\"                             ; +0x1a, 0x1800bf46a\nmov     rcx, rax; this                                                 ; +0x21, 0x1800bf471\nmov     rdi, rax                                                       ; +0x24, 0x1800bf474\ncall    ?getNumber@CCConfiguration@cocos2d@@QEBANPEBDN@Z; cocos2d::CCConfiguration::getNumber(char const *,double) ; +0x27, 0x1800bf477\nmovsd   xmm1, cs:depth                                                 ; +0x2c, 0x1800bf47c\nlea     rdx, aCocos2dXDispla; \"cocos2d.x.display_fps\"                  ; +0x34, 0x1800bf484\ndivsd   xmm1, xmm0                                                     ; +0x3b, 0x1800bf48b\nxor     r8d, r8d; bool                                                 ; +0x3f, 0x1800bf48f\nmov     rcx, rdi; this                                                 ; +0x42, 0x1800bf492\nunpcklpd xmm1, xmm1                                                    ; +0x45, 0x1800bf495\nmovups  xmmword ptr [rbx+0C0h], xmm1                                   ; +0x49, 0x1800bf499\ncall    ?getBool@CCConfiguration@cocos2d@@QEBA_NPEBD_N@Z; cocos2d::CCConfiguration::getBool(char const *,bool) ; +0x50, 0x1800bf4a0\nlea     r8, a3d; \"3d\"                                                  ; +0x55, 0x1800bf4a5\nmov     [rbx+0D1h], al                                                 ; +0x5c, 0x1800bf4ac\nlea     rdx, aCocos2dXGlProj; \"cocos2d.x.gl.projection\"                ; +0x62, 0x1800bf4b2\nmov     rcx, rdi; this                                                 ; +0x69, 0x1800bf4b9\ncall    ?getCString@CCConfiguration@cocos2d@@QEBAPEBDPEBD0@Z; cocos2d::CCConfiguration::getCString(char const *,char const *) ; +0x6c, 0x1800bf4bc\nmov     rdx, rax                                                       ; +0x71, 0x1800bf4c1\ncmp     byte ptr [rax], 33h ; '3'                                      ; +0x74, 0x1800bf4c4\njnz     short loc_1800BF4E1                                            ; +0x77, 0x1800bf4c7\ncmp     byte ptr [rax+1], 64h ; 'd'                                    ; +0x79, 0x1800bf4c9\njnz     short loc_1800BF4E1                                            ; +0x7d, 0x1800bf4cd\ncmp     byte ptr [rax+2], 0                                            ; +0x7f, 0x1800bf4cf\njnz     short loc_1800BF4E1                                            ; +0x83, 0x1800bf4d3\nmov     dword ptr [rbx+134h], 1                                        ; +0x85, 0x1800bf4d5\njmp     short loc_1800BF52E                                            ; +0x8f, 0x1800bf4df\ncmp     byte ptr [rax], 32h ; '2'                                      ; +0x91, 0x1800bf4e1\njnz     short loc_1800BF4FC                                            ; +0x94, 0x1800bf4e4\ncmp     byte ptr [rax+1], 64h ; 'd'                                    ; +0x96, 0x1800bf4e6\njnz     short loc_1800BF4FC                                            ; +0x9a, 0x1800bf4ea\ncmp     byte ptr [rax+2], 0                                            ; +0x9c, 0x1800bf4ec\njnz     short loc_1800BF4FC                                            ; +0xa0, 0x1800bf4f0\nxor     ecx, ecx                                                       ; +0xa2, 0x1800bf4f2\nmov     [rbx+134h], ecx                                                ; +0xa4, 0x1800bf4f4\njmp     short loc_1800BF52E                                            ; +0xaa, 0x1800bf4fa\nxor     ecx, ecx                                                       ; +0xac, 0x1800bf4fc\nlea     r8, aCustom; \"custom\"                                          ; +0xae, 0x1800bf4fe\nnop     word ptr [rax+rax+00000000h]                                   ; +0xb5, 0x1800bf505\nmovzx   eax, byte ptr [rdx+rcx]                                        ; +0xc0, 0x1800bf510\ninc     rcx                                                            ; +0xc4, 0x1800bf514\ncmp     al, [r8+rcx-1]                                                 ; +0xc7, 0x1800bf517\njnz     short loc_1800BF52E                                            ; +0xcc, 0x1800bf51c\ncmp     rcx, 7                                                         ; +0xce, 0x1800bf51e\njnz     short loc_1800BF510                                            ; +0xd2, 0x1800bf522\nmov     dword ptr [rbx+134h], 2                                        ; +0xd4, 0x1800bf524\nlea     r8, aRgba8888_0; \"rgba8888\"                                    ; +0xde, 0x1800bf52e\nmov     rcx, rdi; this                                                 ; +0xe5, 0x1800bf535\nlea     rdx, aCocos2dXTextur; \"cocos2d.x.texture.pixel_format_for_png\" ; +0xe8, 0x1800bf538\ncall    ?getCString@CCConfiguration@cocos2d@@QEBAPEBDPEBD0@Z; cocos2d::CCConfiguration::getCString(char const *,char const *) ; +0xef, 0x1800bf53f\nlea     rdx, aRgba8888_0; \"rgba8888\"                                   ; +0xf4, 0x1800bf544\nmov     rcx, rax; Str1                                                 ; +0xfb, 0x1800bf54b\nmov     rbx, rax                                                       ; +0xfe, 0x1800bf54e\ncall    strcmp                                                         ; +0x101, 0x1800bf551\ntest    eax, eax                                                       ; +0x106, 0x1800bf556\njnz     short loc_1800BF55E                                            ; +0x108, 0x1800bf558\nxor     ecx, ecx                                                       ; +0x10a, 0x1800bf55a\njmp     short loc_1800BF58C                                            ; +0x10c, 0x1800bf55c\nlea     rdx, aRgba4444_0; \"rgba4444\"                                   ; +0x10e, 0x1800bf55e\nmov     rcx, rbx; Str1                                                 ; +0x115, 0x1800bf565\ncall    strcmp                                                         ; +0x118, 0x1800bf568\ntest    eax, eax                                                       ; +0x11d, 0x1800bf56d\njnz     short loc_1800BF576                                            ; +0x11f, 0x1800bf56f\nlea     ecx, [rax+6]                                                   ; +0x121, 0x1800bf571\njmp     short loc_1800BF58C                                            ; +0x124, 0x1800bf574\nlea     rdx, aRgba5551; \"rgba5551\"                                     ; +0x126, 0x1800bf576\nmov     rcx, rbx; Str1                                                 ; +0x12d, 0x1800bf57d\ncall    strcmp                                                         ; +0x130, 0x1800bf580\ntest    eax, eax                                                       ; +0x135, 0x1800bf585\njnz     short loc_1800BF591                                            ; +0x137, 0x1800bf587\nlea     ecx, [rax+7]                                                   ; +0x139, 0x1800bf589\ncall    ?setDefaultAlphaPixelFormat@CCTexture2D@cocos2d@@SAXW4CCTexture2DPixelFormat@2@@Z; cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(cocos2d::CCTexture2DPixelFormat) ; +0x13c, 0x1800bf58c\nxor     r8d, r8d; bool                                                 ; +0x141, 0x1800bf591\nlea     rdx, aCocos2dXTextur_0; \"cocos2d.x.texture.pvrv2_has_alpha_premu\"... ; +0x144, 0x1800bf594\nmov     rcx, rdi; this                                                 ; +0x14b, 0x1800bf59b\ncall    ?getBool@CCConfiguration@cocos2d@@QEBA_NPEBD_N@Z; cocos2d::CCConfiguration::getBool(char const *,bool) ; +0x14e, 0x1800bf59e\nmovzx   ecx, al; bool                                                  ; +0x153, 0x1800bf5a3\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x156, 0x1800bf5a6\nadd     rsp, 20h                                                       ; +0x15b, 0x1800bf5ab\npop     rdi                                                            ; +0x15f, 0x1800bf5af\njmp     ?PVRImagesHavePremultipliedAlpha@CCTexture2D@cocos2d@@SAX_N@Z; cocos2d::CCTexture2D::PVRImagesHavePremultipliedAlpha(bool) ; +0x160, 0x1800bf5b0", "xrefs": ["cocos2d::CCConfiguration::loadConfigFile @ 0x1800bdaad", "cocos2d::CCDirector::init @ 0x1800be7b2", "<???> @ 0x1801438a8", "<???> @ 0x1801b92f4"], "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"}