{"type": "func", "start": 5370757520, "end": 5370757724, "name": "GJRewardItem::create", "pseudocode": "// \n// GJRewardItem::create from 0x1401f4190 to 0x1401f425c (204 bytes)\n// \n// 20 xrefs:\n// > GameStatsManager::createReward @ 0x1401e17a7\n// > GameStatsManager::storeRewardState @ 0x1401e193c\n// > GameStatsManager::completedDailyLevel @ 0x1401e34d8\n// > GameStatsManager::createSpecialChestItems @ 0x1401e88b3\n// > GameStatsManager::createSpecialChestItems @ 0x1401e8a68\n// > GameStatsManager::createSpecialChestItems @ 0x1401e8c13\n// > GameStatsManager::createSpecialChestItems @ 0x1401e8d83\n// > GameStatsManager::createSpecialChestItems @ 0x1401e8f04\n// > GameStatsManager::createSpecialChestItems @ 0x1401e90b9\n// > GameStatsManager::createSpecialChestItems @ 0x1401e9264\n// > GameStatsManager::createSpecialChestItems @ 0x1401e9419\n// > GameStatsManager::createSpecialChestItems @ 0x1401e95c4\n// > GameStatsManager::createSpecialChestItems @ 0x1401e9779\n// > GameStatsManager::addSimpleSpecialChestReward @ 0x1401ea14f\n// > GJRewardItem::create_1 @ 0x1401f3e7c\n// > GJRewardItem::createWithObject @ 0x1401f3ed5\n// > GJRewardItem::createWithObjects @ 0x1401f3f58\n// > GJRewardItem::createSpecial @ 0x1401f4138\n// > GJObjectDecoder::getDecodedObject @ 0x1402842c9\n// > <???> @ 0x1406cc774\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// Hidden C++ exception states: #wind=2\ncocos2d::CCObject *__fastcall GJRewardItem::create(unsigned int a1, unsigned int a2, __int64 a3)\n{\n  cocos2d::CCObject *v6; // rsi\n  __int64 v7; // rax\n  _BYTE v9[32]; // [rsp+28h] [rbp-50h] BYREF\n  __int64 v10; // [rsp+48h] [rbp-30h]\n\n  v10 = a3;\n  v6 = (cocos2d::CCObject *)operator new(0x58u);\n  cocos2d::CCObject::CCObject(v6);\n  v6->__vftable = (cocos2d::CCObject_vtbl *)&GJRewardItem::`vftable';\n  v6[1].__vftable = nullptr;\n  v6[1].m_uID = 0;\n  *(_QWORD *)&v6[1].m_nTag = 0;\n  LOBYTE(v6[1].m_uAutoReleaseCount) = 0;\n  v7 = sub_14003BDB0((__int64)v9, a3);\n  if ( (unsigned __int8)GJRewardItem::init(v6, a1, a2, v7, v6) )\n  {\n    cocos2d::CCObject::autorelease(v6);\n  }\n  else\n  {\n    ((void (__fastcall *)(cocos2d::CCObject *, __int64))v6->~CCObject)(v6, 1);\n    v6 = nullptr;\n  }\n  sub_14003A830(a3);\n  return v6;\n}", "assembly": "; \n; GJRewardItem::create from 0x1401f4190 to 0x1401f425c (204 bytes)\n; \n; 20 xrefs:\n; > GameStatsManager::createReward @ 0x1401e17a7\n; > GameStatsManager::storeRewardState @ 0x1401e193c\n; > GameStatsManager::completedDailyLevel @ 0x1401e34d8\n; > GameStatsManager::createSpecialChestItems @ 0x1401e88b3\n; > GameStatsManager::createSpecialChestItems @ 0x1401e8a68\n; > GameStatsManager::createSpecialChestItems @ 0x1401e8c13\n; > GameStatsManager::createSpecialChestItems @ 0x1401e8d83\n; > GameStatsManager::createSpecialChestItems @ 0x1401e8f04\n; > GameStatsManager::createSpecialChestItems @ 0x1401e90b9\n; > GameStatsManager::createSpecialChestItems @ 0x1401e9264\n; > GameStatsManager::createSpecialChestItems @ 0x1401e9419\n; > GameStatsManager::createSpecialChestItems @ 0x1401e95c4\n; > GameStatsManager::createSpecialChestItems @ 0x1401e9779\n; > GameStatsManager::addSimpleSpecialChestReward @ 0x1401ea14f\n; > GJRewardItem::create_1 @ 0x1401f3e7c\n; > GJRewardItem::createWithObject @ 0x1401f3ed5\n; > GJRewardItem::createWithObjects @ 0x1401f3f58\n; > GJRewardItem::createSpecial @ 0x1401f4138\n; > GJObjectDecoder::getDecodedObject @ 0x1402842c9\n; > <???> @ 0x1406cc774\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, 0x1401f4190\nmov     [rsp+arg_18], rbp                                              ; +0x5, 0x1401f4195\npush    rsi                                                            ; +0xa, 0x1401f419a\npush    rdi                                                            ; +0xb, 0x1401f419b\npush    r14                                                            ; +0xc, 0x1401f419c\nsub     rsp, 60h                                                       ; +0xe, 0x1401f419e\nmov     rax, cs:__security_cookie                                      ; +0x12, 0x1401f41a2\nxor     rax, rsp                                                       ; +0x19, 0x1401f41a9\nmov     [rsp+78h+var_28], rax                                          ; +0x1c, 0x1401f41ac\nmov     rbp, r8                                                        ; +0x21, 0x1401f41b1\nmov     edi, edx                                                       ; +0x24, 0x1401f41b4\nmov     ebx, ecx                                                       ; +0x26, 0x1401f41b6\nmov     [rsp+78h+var_30], r8                                           ; +0x28, 0x1401f41b8\nmov     ecx, 58h ; 'X'; Size                                           ; +0x2d, 0x1401f41bd\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x32, 0x1401f41c2\nmov     rsi, rax                                                       ; +0x37, 0x1401f41c7\nmov     [rsp+78h+var_58], rax                                          ; +0x3a, 0x1401f41ca\nmov     rcx, rax                                                       ; +0x3f, 0x1401f41cf\ncall    cs:??0CCObject@cocos2d@@QEAA@XZ; cocos2d::CCObject::CCObject(void) ; +0x42, 0x1401f41d2\nlea     rax, ??_7GJRewardItem@@6B@; const GJRewardItem::`vftable'      ; +0x48, 0x1401f41d8\nmov     [rsi], rax                                                     ; +0x4f, 0x1401f41df\nxor     r14d, r14d                                                     ; +0x52, 0x1401f41e2\nmov     [rsi+38h], r14                                                 ; +0x55, 0x1401f41e5\nmov     [rsi+40h], r14d                                                ; +0x59, 0x1401f41e9\nmov     [rsi+48h], r14                                                 ; +0x5d, 0x1401f41ed\nmov     [rsi+50h], r14b                                                ; +0x61, 0x1401f41f1\nmov     rdx, rbp                                                       ; +0x65, 0x1401f41f5\nlea     rcx, [rsp+78h+var_50]                                          ; +0x68, 0x1401f41f8\ncall    sub_14003BDB0                                                  ; +0x6d, 0x1401f41fd\nmov     r9, rax                                                        ; +0x72, 0x1401f4202\nmov     r8d, edi                                                       ; +0x75, 0x1401f4205\nmov     edx, ebx                                                       ; +0x78, 0x1401f4208\nmov     rcx, rsi                                                       ; +0x7a, 0x1401f420a\ncall    GJRewardItem__init                                             ; +0x7d, 0x1401f420d\nmov     rcx, rsi                                                       ; +0x82, 0x1401f4212\ntest    al, al                                                         ; +0x85, 0x1401f4215\njz      short loc_1401F4221                                            ; +0x87, 0x1401f4217\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x89, 0x1401f4219\njmp     short loc_1401F422F                                            ; +0x8f, 0x1401f421f\nmov     rax, [rsi]                                                     ; +0x91, 0x1401f4221\nmov     edx, 1                                                         ; +0x94, 0x1401f4224\ncall    qword ptr [rax+8]                                              ; +0x99, 0x1401f4229\nmov     rsi, r14                                                       ; +0x9c, 0x1401f422c\nmov     rcx, rbp                                                       ; +0x9f, 0x1401f422f\ncall    sub_14003A830                                                  ; +0xa2, 0x1401f4232\nmov     rax, rsi                                                       ; +0xa7, 0x1401f4237\nmov     rcx, [rsp+78h+var_28]                                          ; +0xaa, 0x1401f423a\nxor     rcx, rsp; StackCookie                                          ; +0xaf, 0x1401f423f\ncall    __security_check_cookie                                        ; +0xb2, 0x1401f4242\nlea     r11, [rsp+78h+var_18]                                          ; +0xb7, 0x1401f4247\nmov     rbx, [r11+20h]                                                 ; +0xbc, 0x1401f424c\nmov     rbp, [r11+38h]                                                 ; +0xc0, 0x1401f4250\nmov     rsp, r11                                                       ; +0xc4, 0x1401f4254\npop     r14                                                            ; +0xc7, 0x1401f4257\npop     rdi                                                            ; +0xc9, 0x1401f4259\npop     rsi                                                            ; +0xca, 0x1401f425a\nretn                                                                   ; +0xcb, 0x1401f425b", "xrefs": ["GameStatsManager::createReward @ 0x1401e17a7", "GameStatsManager::storeRewardState @ 0x1401e193c", "GameStatsManager::completedDailyLevel @ 0x1401e34d8", "GameStatsManager::createSpecialChestItems @ 0x1401e88b3", "GameStatsManager::createSpecialChestItems @ 0x1401e8a68", "GameStatsManager::createSpecialChestItems @ 0x1401e8c13", "GameStatsManager::createSpecialChestItems @ 0x1401e8d83", "GameStatsManager::createSpecialChestItems @ 0x1401e8f04", "GameStatsManager::createSpecialChestItems @ 0x1401e90b9", "GameStatsManager::createSpecialChestItems @ 0x1401e9264", "GameStatsManager::createSpecialChestItems @ 0x1401e9419", "GameStatsManager::createSpecialChestItems @ 0x1401e95c4", "GameStatsManager::createSpecialChestItems @ 0x1401e9779", "GameStatsManager::addSimpleSpecialChestReward @ 0x1401ea14f", "GJRewardItem::create_1 @ 0x1401f3e7c", "GJRewardItem::createWithObject @ 0x1401f3ed5", "GJRewardItem::createWithObjects @ 0x1401f3f58", "GJRewardItem::createSpecial @ 0x1401f4138", "GJObjectDecoder::getDecodedObject @ 0x1402842c9", "<???> @ 0x1406cc774"], "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"}