{"type": "func", "start": 4298670656, "end": 4298670943, "name": "ChallengesPage::claimItem", "pseudocode": "// \n// ChallengesPage::claimItem from 0x100388240 to 0x10038835f (287 bytes)\n// \n// 1 xrefs:\n// > ChallengeNode::onClaimReward @ 0x1003890e0\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:29:10 +0000\n// \n\n__int64 __fastcall ChallengesPage::claimItem(_QWORD *a1, __m128 a2, __int64 a3, _DWORD *a4, _QWORD *a5)\n{\n  __int64 v7; // rax\n  __int64 v8; // r13\n  unsigned int v9; // r15d\n  __int64 v10; // rax\n  int v11; // r14d\n  __int64 v12; // rax\n  __int64 v14; // [rsp+Ch] [rbp-34h] BYREF\n  int v15; // [rsp+14h] [rbp-2Ch]\n\n  v15 = a4[26];\n  v7 = GameStatsManager::sharedState();\n  GameStatsManager::completedChallenge(v7, (__int64)a4, a2);\n  v8 = a1[90];\n  v9 = a4[18] - a4[19];\n  sub_1002782D0(&v14, a5);\n  if ( v8 )\n  {\n    CurrencyRewardLayer::createObjects(v8, 3, v9, &v14, 0.0);\n  }\n  else\n  {\n    v10 = CurrencyRewardLayer::create(0, 0, 0, v9, 0, 0, 0, 0, (__int64)&v14, 0);\n    a1[90] = v10;\n    *(_QWORD *)(v10 + 408) = a1 + 85;\n    (*(void (__fastcall **)(_QWORD *, __int64, __int64, double, float))(*a1 + 464LL))(a1, v10, 14, 0.0, 1.0);\n  }\n  v11 = v15;\n  ChallengesPage::exitNodeAtSlot((__int64)a1, v15, 0.0);\n  v12 = GameStatsManager::sharedState();\n  GameStatsManager::processChallengeQueue(v12, v11);\n  ChallengesPage::createChallengeNode((__int64)a1, v11, 0, 1u, 0.5);\n  ChallengesPage::updateTimers((__int64)a1);\n  return ChallengesPage::updateDots((__int64)a1);\n}", "assembly": "; \n; ChallengesPage::claimItem from 0x100388240 to 0x10038835f (287 bytes)\n; \n; 1 xrefs:\n; > ChallengeNode::onClaimReward @ 0x1003890e0\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:29:10 +0000\n; \npush    rbp                                                            ; +0x0, 0x100388240\nmov     rbp, rsp                                                       ; +0x1, 0x100388241\npush    r15                                                            ; +0x4, 0x100388244\npush    r14                                                            ; +0x6, 0x100388246\npush    r13                                                            ; +0x8, 0x100388248\npush    r12                                                            ; +0xa, 0x10038824a\npush    rbx                                                            ; +0xc, 0x10038824c\nsub     rsp, 18h                                                       ; +0xd, 0x10038824d\nmov     r12, rcx                                                       ; +0x11, 0x100388251\nmov     r14, rdx                                                       ; +0x14, 0x100388254\nmov     rbx, rdi                                                       ; +0x17, 0x100388257\nmov     eax, [rdx+68h]                                                 ; +0x1a, 0x10038825a\nmov     [rbp+var_2C], eax                                              ; +0x1d, 0x10038825d\ncall    GameStatsManager__sharedState                                  ; +0x20, 0x100388260\nmov     rdi, rax                                                       ; +0x25, 0x100388265\nmov     rsi, r14                                                       ; +0x28, 0x100388268\ncall    GameStatsManager__completedChallenge                           ; +0x2b, 0x10038826b\nmov     r13, [rbx+2D0h]                                                ; +0x30, 0x100388270\nmov     r15d, [r14+48h]                                                ; +0x37, 0x100388277\nsub     r15d, [r14+4Ch]                                                ; +0x3b, 0x10038827b\nlea     r14, [rbp+var_34]                                              ; +0x3f, 0x10038827f\nmov     rdi, r14                                                       ; +0x43, 0x100388283\nmov     rsi, r12                                                       ; +0x46, 0x100388286\ntest    r13, r13                                                       ; +0x49, 0x100388289\njz      short loc_1003882AB                                            ; +0x4c, 0x10038828c\ncall    sub_1002782D0                                                  ; +0x4e, 0x10038828e\nxorps   xmm0, xmm0                                                     ; +0x53, 0x100388293\nmov     rdi, r13                                                       ; +0x56, 0x100388296\nmov     esi, 3                                                         ; +0x59, 0x100388299\nmov     edx, r15d                                                      ; +0x5e, 0x10038829e\nmov     rcx, r14                                                       ; +0x61, 0x1003882a1\ncall    CurrencyRewardLayer__createObjects                             ; +0x64, 0x1003882a4\njmp     short loc_100388304                                            ; +0x69, 0x1003882a9\ncall    sub_1002782D0                                                  ; +0x6b, 0x1003882ab\nmovss   xmm1, cs:alpha                                                 ; +0x70, 0x1003882b0\nxorps   xmm0, xmm0                                                     ; +0x78, 0x1003882b8\nxor     edi, edi                                                       ; +0x7b, 0x1003882bb\nxor     esi, esi                                                       ; +0x7d, 0x1003882bd\nxor     edx, edx                                                       ; +0x7f, 0x1003882bf\nmov     ecx, r15d                                                      ; +0x81, 0x1003882c1\nxor     r8d, r8d                                                       ; +0x84, 0x1003882c4\nxor     r9d, r9d                                                       ; +0x87, 0x1003882c7\npush    0                                                              ; +0x8a, 0x1003882ca\npush    r14                                                            ; +0x8c, 0x1003882cc\npush    0                                                              ; +0x8e, 0x1003882ce\npush    0                                                              ; +0x90, 0x1003882d0\ncall    CurrencyRewardLayer__create                                    ; +0x92, 0x1003882d2\nadd     rsp, 20h                                                       ; +0x97, 0x1003882d7\nmov     [rbx+2D0h], rax                                                ; +0x9b, 0x1003882db\nlea     rcx, [rbx+2A8h]                                                ; +0xa2, 0x1003882e2\nmov     [rax+198h], rcx                                                ; +0xa9, 0x1003882e9\nmov     rcx, [rbx]                                                     ; +0xb0, 0x1003882f0\nmov     rdi, rbx                                                       ; +0xb3, 0x1003882f3\nmov     rsi, rax                                                       ; +0xb6, 0x1003882f6\nmov     edx, 0Eh                                                       ; +0xb9, 0x1003882f9\ncall    qword ptr [rcx+1D0h]                                           ; +0xbe, 0x1003882fe\nxorps   xmm0, xmm0                                                     ; +0xc4, 0x100388304\nmov     rdi, rbx                                                       ; +0xc7, 0x100388307\nmov     r14d, [rbp+var_2C]                                             ; +0xca, 0x10038830a\nmov     esi, r14d                                                      ; +0xce, 0x10038830e\ncall    ChallengesPage__exitNodeAtSlot                                 ; +0xd1, 0x100388311\ncall    GameStatsManager__sharedState                                  ; +0xd6, 0x100388316\nmov     rdi, rax                                                       ; +0xdb, 0x10038831b\nmov     esi, r14d                                                      ; +0xde, 0x10038831e\ncall    GameStatsManager__processChallengeQueue                        ; +0xe1, 0x100388321\nmovss   xmm0, cs:dword_100A03578                                       ; +0xe6, 0x100388326\nmov     rdi, rbx                                                       ; +0xee, 0x10038832e\nmov     esi, r14d                                                      ; +0xf1, 0x100388331\nxor     edx, edx                                                       ; +0xf4, 0x100388334\nmov     ecx, 1                                                         ; +0xf6, 0x100388336\ncall    ChallengesPage__createChallengeNode                            ; +0xfb, 0x10038833b\nmov     rdi, rbx                                                       ; +0x100, 0x100388340\ncall    ChallengesPage__updateTimers                                   ; +0x103, 0x100388343\nmov     rdi, rbx                                                       ; +0x108, 0x100388348\ncall    ChallengesPage__updateDots                                     ; +0x10b, 0x10038834b\nadd     rsp, 18h                                                       ; +0x110, 0x100388350\npop     rbx                                                            ; +0x114, 0x100388354\npop     r12                                                            ; +0x115, 0x100388355\npop     r13                                                            ; +0x117, 0x100388357\npop     r14                                                            ; +0x119, 0x100388359\npop     r15                                                            ; +0x11b, 0x10038835b\npop     rbp                                                            ; +0x11d, 0x10038835d\nretn                                                                   ; +0x11e, 0x10038835e", "xrefs": ["ChallengeNode::onClaimReward @ 0x1003890e0"], "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"}