{"type": "func", "start": 4296182544, "end": 4296182776, "name": "GJBaseGameLayer::pickupItem", "pseudocode": "// \n// GJBaseGameLayer::pickupItem from 0x100128b10 to 0x100128bf8 (232 bytes)\n// \n// 3 xrefs:\n// > PlayLayer::loadFromCheckpoint @ 0x1000bd79a\n// > GJBaseGameLayer::collisionCheckObjects @ 0x1001270a3\n// > GJBaseGameLayer::collisionCheckObjects @ 0x100127286\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 GJBaseGameLayer::pickupItem(GJBaseGameLayer *a1, EffectGameObject *a2)\n{\n  double v2; // xmm0_8\n  cocos2d::CCDictionary *m_collectedItems; // r14\n  cocos2d::CCString *v4; // rax\n  const char *CString; // r12\n  size_t v6; // rax\n  size_t v7; // r15\n  char *v8; // r13\n  size_t v9; // r14\n  char v10; // [rsp+0h] [rbp-50h]\n  cocos2d::CCDictionary *v11; // [rsp+8h] [rbp-48h]\n  _QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF\n  void *__p; // [rsp+20h] [rbp-30h]\n\n  m_collectedItems = a1->m_collectedItems;\n  v4 = (cocos2d::CCString *)sub_1007AB580(\"%i\", v10);\n  CString = cocos2d::CCString::getCString(v4);\n  v6 = strlen(CString);\n  if ( v6 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100006BF0(v2);\n  v7 = v6;\n  if ( v6 >= 0x17 )\n  {\n    v11 = m_collectedItems;\n    v9 = 26;\n    if ( (v6 | 7) != 0x17 )\n      v9 = (v6 | 7) + 1;\n    v8 = (char *)operator new(v9);\n    __p = v8;\n    __dst[0] = v9 + 1;\n    m_collectedItems = v11;\n    __dst[1] = v7;\n    goto LABEL_8;\n  }\n  LOBYTE(__dst[0]) = 2 * v6;\n  v8 = (char *)__dst + 1;\n  if ( v6 )\nLABEL_8:\n    memmove(v8, CString, v7);\n  v8[v7] = 0;\n  cocos2d::CCDictionary::setObject_1(m_collectedItems, a2, __dst);\n  if ( (__dst[0] & 1) != 0 )\n    operator delete(__p);\n}", "assembly": "; \n; GJBaseGameLayer::pickupItem from 0x100128b10 to 0x100128bf8 (232 bytes)\n; \n; 3 xrefs:\n; > PlayLayer::loadFromCheckpoint @ 0x1000bd79a\n; > GJBaseGameLayer::collisionCheckObjects @ 0x1001270a3\n; > GJBaseGameLayer::collisionCheckObjects @ 0x100127286\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\npush    rbp                                                            ; +0x0, 0x100128b10\nmov     rbp, rsp                                                       ; +0x1, 0x100128b11\npush    r15                                                            ; +0x4, 0x100128b14\npush    r14                                                            ; +0x6, 0x100128b16\npush    r13                                                            ; +0x8, 0x100128b18\npush    r12                                                            ; +0xa, 0x100128b1a\npush    rbx                                                            ; +0xc, 0x100128b1c\nsub     rsp, 28h                                                       ; +0xd, 0x100128b1d\nmov     rbx, rsi                                                       ; +0x11, 0x100128b21\nmov     r14, [rdi+3080h]                                               ; +0x14, 0x100128b24\nmov     esi, [rsi+700h]                                                ; +0x1b, 0x100128b2b\nlea     rdi, aI; \"%i\"                                                  ; +0x21, 0x100128b31\nxor     eax, eax                                                       ; +0x28, 0x100128b38\ncall    sub_1007AB580                                                  ; +0x2a, 0x100128b3a\nmov     rdi, rax                                                       ; +0x2f, 0x100128b3f\ncall    cocos2d__CCString__getCString                                  ; +0x32, 0x100128b42\nmov     r12, rax                                                       ; +0x37, 0x100128b47\nmov     rdi, rax; __s                                                  ; +0x3a, 0x100128b4a\ncall    _strlen                                                        ; +0x3d, 0x100128b4d\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x42, 0x100128b52\njnb     loc_100128BF3                                                  ; +0x46, 0x100128b56\nmov     r15, rax                                                       ; +0x4c, 0x100128b5c\ncmp     rax, 17h                                                       ; +0x4f, 0x100128b5f\njnb     short loc_100128B77                                            ; +0x53, 0x100128b63\nlea     eax, [r15+r15]                                                 ; +0x55, 0x100128b65\nmov     byte ptr [rbp+__dst], al                                       ; +0x59, 0x100128b69\nlea     r13, [rbp+__dst+1]                                             ; +0x5c, 0x100128b6c\ntest    r15, r15                                                       ; +0x60, 0x100128b70\njnz     short loc_100128BB2                                            ; +0x63, 0x100128b73\njmp     short loc_100128BC0                                            ; +0x65, 0x100128b75\nmov     rax, r15                                                       ; +0x67, 0x100128b77\nor      rax, 7                                                         ; +0x6a, 0x100128b7a\nlea     rcx, [rax+1]                                                   ; +0x6e, 0x100128b7e\ncmp     rax, 17h                                                       ; +0x72, 0x100128b82\nmov     [rbp+var_48], r14                                              ; +0x76, 0x100128b86\nmov     r14d, 1Ah                                                      ; +0x7a, 0x100128b8a\ncmovnz  r14, rcx                                                       ; +0x80, 0x100128b90\nmov     rdi, r14; __sz                                                 ; +0x84, 0x100128b94\ncall    __Znwm; operator new(ulong)                                    ; +0x87, 0x100128b97\nmov     r13, rax                                                       ; +0x8c, 0x100128b9c\nmov     [rbp+__p], rax                                                 ; +0x8f, 0x100128b9f\ninc     r14                                                            ; +0x93, 0x100128ba3\nmov     [rbp+__dst], r14                                               ; +0x96, 0x100128ba6\nmov     r14, [rbp+var_48]                                              ; +0x9a, 0x100128baa\nmov     [rbp+var_38], r15                                              ; +0x9e, 0x100128bae\nmov     rdi, r13; __dst                                                ; +0xa2, 0x100128bb2\nmov     rsi, r12; __src                                                ; +0xa5, 0x100128bb5\nmov     rdx, r15; __len                                                ; +0xa8, 0x100128bb8\ncall    _memmove                                                       ; +0xab, 0x100128bbb\nmov     byte ptr [r13+r15+0], 0                                        ; +0xb0, 0x100128bc0\nlea     rdx, [rbp+__dst]                                               ; +0xb6, 0x100128bc6\nmov     rdi, r14                                                       ; +0xba, 0x100128bca\nmov     rsi, rbx                                                       ; +0xbd, 0x100128bcd\ncall    cocos2d__CCDictionary__setObject_1                             ; +0xc0, 0x100128bd0\ntest    byte ptr [rbp+__dst], 1                                        ; +0xc5, 0x100128bd5\njz      short loc_100128BE4                                            ; +0xc9, 0x100128bd9\nmov     rdi, [rbp+__p]; __p                                            ; +0xcb, 0x100128bdb\ncall    __ZdlPv; operator delete(void *)                               ; +0xcf, 0x100128bdf\nadd     rsp, 28h                                                       ; +0xd4, 0x100128be4\npop     rbx                                                            ; +0xd8, 0x100128be8\npop     r12                                                            ; +0xd9, 0x100128be9\npop     r13                                                            ; +0xdb, 0x100128beb\npop     r14                                                            ; +0xdd, 0x100128bed\npop     r15                                                            ; +0xdf, 0x100128bef\npop     rbp                                                            ; +0xe1, 0x100128bf1\nretn                                                                   ; +0xe2, 0x100128bf2\ncall    sub_100006BF0                                                  ; +0xe3, 0x100128bf3", "xrefs": ["PlayLayer::loadFromCheckpoint @ 0x1000bd79a", "GJBaseGameLayer::collisionCheckObjects @ 0x1001270a3", "GJBaseGameLayer::collisionCheckObjects @ 0x100127286"], "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"}