{"type": "func", "start": 5372771776, "end": 5372772269, "name": "SecretLayer::getMessage", "pseudocode": "// \n// SecretLayer::getMessage from 0x1403dfdc0 to 0x1403dffad (493 bytes)\n// \n// 5 xrefs:\n// > SecretLayer::init @ 0x1403dd9f0\n// > SecretLayer::onSubmit @ 0x1403df6fe\n// > <???> @ 0x14069cd3c\n// > <???> @ 0x14069cd94\n// > <???> @ 0x1406d7e74\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__int64 __fastcall SecretLayer::getMessage(__int64 a1, __int64 a2)\n{\n  float v4; // xmm6_4\n  cocos2d::CCArray *v5; // rsi\n  int v6; // eax\n  float v7; // xmm6_4\n  float v8; // xmm6_4\n  int v9; // eax\n  int v10; // eax\n  float v11; // xmm6_4\n  int v12; // eax\n  struct cocos2d::CCObject *v13; // rax\n  struct cocos2d::CCObject *v14; // rax\n\n  if ( !*(_DWORD *)(a1 + 428) && *(int *)(a1 + 440) <= 0 )\n  {\n    v4 = 1.0 - (float)((float)*(int *)(a1 + 436) * 0.079999998);\n    if ( (float)((float)rand() / 32767.0) > v4 )\n    {\n      v5 = cocos2d::CCDictionary::allKeys(*(cocos2d::CCDictionary **)(a1 + 472));\n      v6 = *(_DWORD *)(a1 + 480);\n      if ( v6 >= 0 )\n      {\n        v10 = v6 + 1;\n      }\n      else\n      {\n        v7 = (float)(int)(cocos2d::CCArray::count(v5) - 1);\n        if ( (float)((float)((float)rand() / 32767.0) * v7) < 0.0 )\n        {\n          v11 = (float)(int)(cocos2d::CCArray::count(v5) - 1);\n          v12 = rand();\n          v10 = (int)ceilf((float)((float)((float)v12 / 32767.0) * v11) - 0.5);\n        }\n        else\n        {\n          v8 = (float)(int)(cocos2d::CCArray::count(v5) - 1);\n          v9 = rand();\n          v10 = (int)floorf((float)((float)((float)v9 / 32767.0) * v8) + 0.5);\n        }\n      }\n      *(_DWORD *)(a1 + 480) = v10;\n      if ( *(_DWORD *)(a1 + 480) >= cocos2d::CCArray::count(v5) )\n        *(_DWORD *)(a1 + 480) = 0;\n      if ( cocos2d::CCDictionary::count(*(cocos2d::CCDictionary **)(a1 + 472)) )\n      {\n        v13 = cocos2d::CCArray::objectAtIndex(v5, *(_DWORD *)(a1 + 480));\n        v14 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(a1 + 472), SLODWORD(v13[1].__vftable));\n        *(_DWORD *)(a1 + 428) = v14->getTag(v14);\n      }\n      *(_DWORD *)(a1 + 432) = 0;\n    }\n  }\n  if ( *(_DWORD *)(a1 + 428) )\n    SecretLayer::getThreadMessage(a1, a2);\n  else\n    SecretLayer::getBasicMessage(a1, a2);\n  return a2;\n}", "assembly": "; \n; SecretLayer::getMessage from 0x1403dfdc0 to 0x1403dffad (493 bytes)\n; \n; 5 xrefs:\n; > SecretLayer::init @ 0x1403dd9f0\n; > SecretLayer::onSubmit @ 0x1403df6fe\n; > <???> @ 0x14069cd3c\n; > <???> @ 0x14069cd94\n; > <???> @ 0x1406d7e74\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_8], rbx                                               ; +0x0, 0x1403dfdc0\npush    rdi                                                            ; +0x5, 0x1403dfdc5\nsub     rsp, 50h                                                       ; +0x6, 0x1403dfdc6\ncmp     dword ptr [rcx+1ACh], 0                                        ; +0xa, 0x1403dfdca\nmov     rdi, rdx                                                       ; +0x11, 0x1403dfdd1\nmovd    xmm0, dword ptr [rcx+1B4h]                                     ; +0x14, 0x1403dfdd4\nmov     rbx, rcx                                                       ; +0x1c, 0x1403dfddc\nmovaps  [rsp+58h+var_18], xmm6                                         ; +0x1f, 0x1403dfddf\nmovss   xmm6, cs:flt_140622C24                                         ; +0x24, 0x1403dfde4\ncvtdq2ps xmm0, xmm0                                                    ; +0x2c, 0x1403dfdec\nmulss   xmm0, cs:dword_140622A04                                       ; +0x2f, 0x1403dfdef\nsubss   xmm6, xmm0                                                     ; +0x37, 0x1403dfdf7\njnz     loc_1403DFF73                                                  ; +0x3b, 0x1403dfdfb\ncmp     dword ptr [rcx+1B8h], 0                                        ; +0x41, 0x1403dfe01\njg      loc_1403DFF73                                                  ; +0x48, 0x1403dfe08\nmovaps  [rsp+58h+var_28], xmm7                                         ; +0x4e, 0x1403dfe0e\ncall    cs:rand                                                        ; +0x53, 0x1403dfe13\nmovss   xmm7, cs:dword_140623644                                       ; +0x59, 0x1403dfe19\nmovd    xmm0, eax                                                      ; +0x61, 0x1403dfe21\ncvtdq2ps xmm0, xmm0                                                    ; +0x65, 0x1403dfe25\ndivss   xmm0, xmm7                                                     ; +0x68, 0x1403dfe28\ncomiss  xmm0, xmm6                                                     ; +0x6c, 0x1403dfe2c\njbe     loc_1403DFF6E                                                  ; +0x6f, 0x1403dfe2f\nmov     rcx, [rbx+1D8h]                                                ; +0x75, 0x1403dfe35\nmov     [rsp+58h+arg_0], rsi                                           ; +0x7c, 0x1403dfe3c\ncall    cs:?allKeys@CCDictionary@cocos2d@@QEAAPEAVCCArray@2@XZ; cocos2d::CCDictionary::allKeys(void) ; +0x81, 0x1403dfe41\nmov     rsi, rax                                                       ; +0x87, 0x1403dfe47\nmov     eax, [rbx+1E0h]                                                ; +0x8a, 0x1403dfe4a\ntest    eax, eax                                                       ; +0x90, 0x1403dfe50\njns     loc_1403DFEFC                                                  ; +0x92, 0x1403dfe52\nmov     rcx, rsi                                                       ; +0x98, 0x1403dfe58\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x9b, 0x1403dfe5b\nxorps   xmm6, xmm6                                                     ; +0xa1, 0x1403dfe61\nlea     ecx, [rax-1]                                                   ; +0xa4, 0x1403dfe64\ncvtsi2ss xmm6, rcx                                                     ; +0xa7, 0x1403dfe67\ncall    cs:rand                                                        ; +0xac, 0x1403dfe6c\nxorps   xmm0, xmm0                                                     ; +0xb2, 0x1403dfe72\nmov     rcx, rsi                                                       ; +0xb5, 0x1403dfe75\nmovd    xmm1, eax                                                      ; +0xb8, 0x1403dfe78\ncvtdq2ps xmm1, xmm1                                                    ; +0xbc, 0x1403dfe7c\ndivss   xmm1, xmm7                                                     ; +0xbf, 0x1403dfe7f\nmulss   xmm1, xmm6                                                     ; +0xc3, 0x1403dfe83\ncomiss  xmm1, xmm0                                                     ; +0xc7, 0x1403dfe87\njb      short loc_1403DFEC4                                            ; +0xca, 0x1403dfe8a\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xcc, 0x1403dfe8c\ndec     eax                                                            ; +0xd2, 0x1403dfe92\nxorps   xmm6, xmm6                                                     ; +0xd4, 0x1403dfe94\ncvtsi2ss xmm6, rax                                                     ; +0xd7, 0x1403dfe97\ncall    cs:rand                                                        ; +0xdc, 0x1403dfe9c\nmovd    xmm0, eax                                                      ; +0xe2, 0x1403dfea2\ncvtdq2ps xmm0, xmm0                                                    ; +0xe6, 0x1403dfea6\ndivss   xmm0, xmm7                                                     ; +0xe9, 0x1403dfea9\nmulss   xmm0, xmm6                                                     ; +0xed, 0x1403dfead\naddss   xmm0, cs:dword_140622B08; X                                    ; +0xf1, 0x1403dfeb1\ncall    floorf                                                         ; +0xf9, 0x1403dfeb9\ncvttss2si eax, xmm0                                                    ; +0xfe, 0x1403dfebe\njmp     short loc_1403DFEFE                                            ; +0x102, 0x1403dfec2\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x104, 0x1403dfec4\ndec     eax                                                            ; +0x10a, 0x1403dfeca\nxorps   xmm6, xmm6                                                     ; +0x10c, 0x1403dfecc\ncvtsi2ss xmm6, rax                                                     ; +0x10f, 0x1403dfecf\ncall    cs:rand                                                        ; +0x114, 0x1403dfed4\nmovd    xmm0, eax                                                      ; +0x11a, 0x1403dfeda\ncvtdq2ps xmm0, xmm0                                                    ; +0x11e, 0x1403dfede\ndivss   xmm0, xmm7                                                     ; +0x121, 0x1403dfee1\nmulss   xmm0, xmm6                                                     ; +0x125, 0x1403dfee5\nsubss   xmm0, cs:dword_140622B08; X                                    ; +0x129, 0x1403dfee9\ncall    ceilf                                                          ; +0x131, 0x1403dfef1\ncvttss2si eax, xmm0                                                    ; +0x136, 0x1403dfef6\njmp     short loc_1403DFEFE                                            ; +0x13a, 0x1403dfefa\ninc     eax                                                            ; +0x13c, 0x1403dfefc\nmov     rcx, rsi                                                       ; +0x13e, 0x1403dfefe\nmov     [rbx+1E0h], eax                                                ; +0x141, 0x1403dff01\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x147, 0x1403dff07\ncmp     [rbx+1E0h], eax                                                ; +0x14d, 0x1403dff0d\njb      short loc_1403DFF1F                                            ; +0x153, 0x1403dff13\nmov     dword ptr [rbx+1E0h], 0                                        ; +0x155, 0x1403dff15\nmov     rcx, [rbx+1D8h]                                                ; +0x15f, 0x1403dff1f\ncall    cs:?count@CCDictionary@cocos2d@@QEAAIXZ; cocos2d::CCDictionary::count(void) ; +0x166, 0x1403dff26\ntest    eax, eax                                                       ; +0x16c, 0x1403dff2c\njz      short loc_1403DFF5F                                            ; +0x16e, 0x1403dff2e\nmov     edx, [rbx+1E0h]                                                ; +0x170, 0x1403dff30\nmov     rcx, rsi                                                       ; +0x176, 0x1403dff36\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x179, 0x1403dff39\nmov     rcx, [rbx+1D8h]                                                ; +0x17f, 0x1403dff3f\nmovsxd  rdx, dword ptr [rax+38h]                                       ; +0x186, 0x1403dff46\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x18a, 0x1403dff4a\nmov     rcx, rax                                                       ; +0x190, 0x1403dff50\nmov     rdx, [rax]                                                     ; +0x193, 0x1403dff53\ncall    qword ptr [rdx+38h]                                            ; +0x196, 0x1403dff56\nmov     [rbx+1ACh], eax                                                ; +0x199, 0x1403dff59\nmov     rsi, [rsp+58h+arg_0]                                           ; +0x19f, 0x1403dff5f\nmov     dword ptr [rbx+1B0h], 0                                        ; +0x1a4, 0x1403dff64\nmovaps  xmm7, [rsp+58h+var_28]                                         ; +0x1ae, 0x1403dff6e\ncmp     dword ptr [rbx+1ACh], 0                                        ; +0x1b3, 0x1403dff73\nmov     rdx, rdi                                                       ; +0x1ba, 0x1403dff7a\nmovaps  xmm6, [rsp+58h+var_18]                                         ; +0x1bd, 0x1403dff7d\nmov     rcx, rbx                                                       ; +0x1c2, 0x1403dff82\njnz     short loc_1403DFF9A                                            ; +0x1c5, 0x1403dff85\ncall    SecretLayer__getBasicMessage                                   ; +0x1c7, 0x1403dff87\nmov     rax, rdi                                                       ; +0x1cc, 0x1403dff8c\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x1cf, 0x1403dff8f\nadd     rsp, 50h                                                       ; +0x1d4, 0x1403dff94\npop     rdi                                                            ; +0x1d8, 0x1403dff98\nretn                                                                   ; +0x1d9, 0x1403dff99\ncall    SecretLayer__getThreadMessage                                  ; +0x1da, 0x1403dff9a\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x1df, 0x1403dff9f\nmov     rax, rdi                                                       ; +0x1e4, 0x1403dffa4\nadd     rsp, 50h                                                       ; +0x1e7, 0x1403dffa7\npop     rdi                                                            ; +0x1eb, 0x1403dffab\nretn                                                                   ; +0x1ec, 0x1403dffac", "xrefs": ["SecretLayer::init @ 0x1403dd9f0", "SecretLayer::onSubmit @ 0x1403df6fe", "<???> @ 0x14069cd3c", "<???> @ 0x14069cd94", "<???> @ 0x1406d7e74"], "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"}