{"type": "func", "start": 4295198496, "end": 4295198738, "name": "GJRewardItem::getRewardObjectForType", "pseudocode": "// \n// GJRewardItem::getRewardObjectForType from 0x100038720 to 0x100038812 (242 bytes)\n// \n// 1 xrefs:\n// > GameStatsManager::preProcessReward @ 0x100038553\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:19:32 +0000\n// \n\n__int64 __fastcall GJRewardItem::getRewardObjectForType(__int64 a1, int a2)\n{\n  __int64 v3; // rdi\n  __int64 v4; // rax\n  unsigned int v5; // r15d\n  __int64 result; // rax\n  _DWORD *v7; // r15\n\n  v3 = *(_QWORD *)(a1 + 72);\n  if ( v3 )\n    goto LABEL_8;\n  v3 = sub_1007FE900(0);\n  v4 = *(_QWORD *)(a1 + 72);\n  if ( v4 != v3 )\n  {\n    if ( v3 )\n    {\n      cocos2d::CCObject::retain(v3);\n      v4 = *(_QWORD *)(a1 + 72);\n    }\n    if ( v4 )\n      cocos2d::CCObject::release(v4);\n    *(_QWORD *)(a1 + 72) = v3;\nLABEL_8:\n    if ( (unsigned int)sub_1007FEF90(v3) )\n      goto LABEL_9;\nLABEL_12:\n    v7 = operator new(0x48u);\n    cocos2d::CCObject::CCObject(v7);\n    *(_QWORD *)v7 = off_100AB6EA8;\n    v7[14] = a2;\n    *((_QWORD *)v7 + 8) = 0;\n    cocos2d::CCObject::autorelease(v7);\n    sub_1007FEBF0(*(_QWORD *)(a1 + 72), v7);\n    return (__int64)v7;\n  }\n  if ( !(unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 72)) )\n    goto LABEL_12;\nLABEL_9:\n  v5 = 0;\n  while ( 1 )\n  {\n    result = sub_1007FEFE0(*(_QWORD *)(a1 + 72), v5);\n    if ( *(_DWORD *)(result + 56) == a2 )\n      return result;\n    if ( ++v5 >= (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 72)) )\n      goto LABEL_12;\n  }\n}", "assembly": "; \n; GJRewardItem::getRewardObjectForType from 0x100038720 to 0x100038812 (242 bytes)\n; \n; 1 xrefs:\n; > GameStatsManager::preProcessReward @ 0x100038553\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:19:32 +0000\n; \npush    rbp                                                            ; +0x0, 0x100038720\nmov     rbp, rsp                                                       ; +0x1, 0x100038721\npush    r15                                                            ; +0x4, 0x100038724\npush    r14                                                            ; +0x6, 0x100038726\npush    rbx                                                            ; +0x8, 0x100038728\npush    rax                                                            ; +0x9, 0x100038729\nmov     r14d, esi                                                      ; +0xa, 0x10003872a\nmov     rbx, rdi                                                       ; +0xd, 0x10003872d\nmov     rdi, [rdi+48h]                                                 ; +0x10, 0x100038730\ntest    rdi, rdi                                                       ; +0x14, 0x100038734\njnz     short loc_100038779                                            ; +0x17, 0x100038737\ncall    sub_1007FE900                                                  ; +0x19, 0x100038739\nmov     rdi, rax                                                       ; +0x1e, 0x10003873e\nmov     rax, [rbx+48h]                                                 ; +0x21, 0x100038741\ncmp     rax, rdi                                                       ; +0x25, 0x100038745\njz      loc_100038800                                                  ; +0x28, 0x100038748\ntest    rdi, rdi                                                       ; +0x2e, 0x10003874e\njz      short loc_100038762                                            ; +0x31, 0x100038751\nmov     r15, rdi                                                       ; +0x33, 0x100038753\ncall    cocos2d__CCObject__retain                                      ; +0x36, 0x100038756\nmov     rdi, r15                                                       ; +0x3b, 0x10003875b\nmov     rax, [rbx+48h]                                                 ; +0x3e, 0x10003875e\ntest    rax, rax                                                       ; +0x42, 0x100038762\njz      short loc_100038775                                            ; +0x45, 0x100038765\nmov     r15, rdi                                                       ; +0x47, 0x100038767\nmov     rdi, rax                                                       ; +0x4a, 0x10003876a\ncall    cocos2d__CCObject__release                                     ; +0x4d, 0x10003876d\nmov     rdi, r15                                                       ; +0x52, 0x100038772\nmov     [rbx+48h], rdi                                                 ; +0x55, 0x100038775\ncall    sub_1007FEF90                                                  ; +0x59, 0x100038779\ntest    eax, eax                                                       ; +0x5e, 0x10003877e\njz      short loc_1000387B3                                            ; +0x60, 0x100038780\nxor     r15d, r15d                                                     ; +0x62, 0x100038782\nnop     word ptr [rax+rax+00000000h]                                   ; +0x65, 0x100038785\nmov     rdi, [rbx+48h]                                                 ; +0x70, 0x100038790\nmov     esi, r15d                                                      ; +0x74, 0x100038794\ncall    sub_1007FEFE0                                                  ; +0x77, 0x100038797\ncmp     [rax+38h], r14d                                                ; +0x7c, 0x10003879c\njz      short loc_1000387F5                                            ; +0x80, 0x1000387a0\ninc     r15d                                                           ; +0x82, 0x1000387a2\nmov     rdi, [rbx+48h]                                                 ; +0x85, 0x1000387a5\ncall    sub_1007FEF90                                                  ; +0x89, 0x1000387a9\ncmp     r15d, eax                                                      ; +0x8e, 0x1000387ae\njb      short loc_100038790                                            ; +0x91, 0x1000387b1\nmov     edi, 48h ; 'H'; __sz                                           ; +0x93, 0x1000387b3\ncall    __Znwm; operator new(ulong)                                    ; +0x98, 0x1000387b8\nmov     r15, rax                                                       ; +0x9d, 0x1000387bd\nmov     rdi, rax                                                       ; +0xa0, 0x1000387c0\ncall    cocos2d__CCObject__CCObject                                    ; +0xa3, 0x1000387c3\nlea     rax, off_100AB6EA8                                             ; +0xa8, 0x1000387c8\nmov     [r15], rax                                                     ; +0xaf, 0x1000387cf\nmov     [r15+38h], r14d                                                ; +0xb2, 0x1000387d2\nmov     qword ptr [r15+40h], 0                                         ; +0xb6, 0x1000387d6\nmov     rdi, r15                                                       ; +0xbe, 0x1000387de\ncall    cocos2d__CCObject__autorelease                                 ; +0xc1, 0x1000387e1\nmov     rdi, [rbx+48h]                                                 ; +0xc6, 0x1000387e6\nmov     rsi, r15                                                       ; +0xca, 0x1000387ea\ncall    sub_1007FEBF0                                                  ; +0xcd, 0x1000387ed\nmov     rax, r15                                                       ; +0xd2, 0x1000387f2\nadd     rsp, 8                                                         ; +0xd5, 0x1000387f5\npop     rbx                                                            ; +0xd9, 0x1000387f9\npop     r14                                                            ; +0xda, 0x1000387fa\npop     r15                                                            ; +0xdc, 0x1000387fc\npop     rbp                                                            ; +0xde, 0x1000387fe\nretn                                                                   ; +0xdf, 0x1000387ff\nmov     rdi, rax                                                       ; +0xe0, 0x100038800\ncall    sub_1007FEF90                                                  ; +0xe3, 0x100038803\ntest    eax, eax                                                       ; +0xe8, 0x100038808\njnz     loc_100038782                                                  ; +0xea, 0x10003880a\njmp     short loc_1000387B3                                            ; +0xf0, 0x100038810", "xrefs": ["GameStatsManager::preProcessReward @ 0x100038553"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}