{"type": "func", "start": 5372046480, "end": 5372046756, "name": "GJBaseGameLayer::addUIObject", "pseudocode": "// \n// GJBaseGameLayer::addUIObject from 0x14032ec90 to 0x14032eda4 (276 bytes)\n// \n// 5 xrefs:\n// > GJBaseGameLayer::positionUIObjects @ 0x14032efff\n// > GJBaseGameLayer::positionUIObjects @ 0x14032f1ab\n// > <???> @ 0x1408b6468\n// > <???> @ 0x1408b6478\n// > <???> @ 0x14091f478\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 11:30:31 +0000\n// \n\nvoid __fastcall GJBaseGameLayer::addUIObject(__int64 a1, _DWORD *a2)\n{\n  __int64 v4; // rbx\n  __int64 v5; // rax\n  __int64 v6; // rdx\n  unsigned __int64 v7; // r9\n  _BYTE *v8; // rdx\n  __int64 v9; // r8\n  _BYTE v10[24]; // [rsp+20h] [rbp-18h] BYREF\n  _DWORD *v11; // [rsp+48h] [rbp+10h] BYREF\n  char v12; // [rsp+50h] [rbp+18h] BYREF\n\n  if ( !*((_BYTE *)a2 + 1353) )\n  {\n    LODWORD(v11) = a2[231];\n    v4 = *(_QWORD *)sub_140357DC0(a1 + 2344, v10, &v11);\n    v5 = (*(__int64 (__fastcall **)(_DWORD *, char *))(*(_QWORD *)a2 + 1664LL))(a2, &v12);\n    cocos2d::CCPoint::operator=(v4 + 20, v5);\n    GJBaseGameLayer::removeObjectFromSection(a1, a2);\n    LOBYTE(v6) = 1;\n    (*(void (__fastcall **)(_DWORD *, __int64))(*(_QWORD *)a2 + 1160LL))(a2, v6);\n    a2[158] = -1;\n    *((_BYTE *)a2 + 1353) = 1;\n    cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 13896), (struct cocos2d::CCObject *)a2);\n    if ( a2[259] == 1816 )\n    {\n      v7 = *(int *)(a1 + 14136);\n      v8 = *(_BYTE **)(a1 + 14120);\n      v9 = *(_QWORD *)(a1 + 14112);\n      v11 = a2;\n      if ( v7 < (__int64)&v8[-v9] >> 3 )\n      {\n        *(_QWORD *)(v9 + 8 * v7) = a2;\n      }\n      else if ( v8 == *(_BYTE **)(a1 + 14128) )\n      {\n        sub_1400699B0((_QWORD *)(a1 + 14112), v8, &v11);\n      }\n      else\n      {\n        *(_QWORD *)v8 = a2;\n        *(_QWORD *)(a1 + 14120) += 8LL;\n      }\n      a2[157] = (*(_DWORD *)(a1 + 14136))++;\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::addUIObject from 0x14032ec90 to 0x14032eda4 (276 bytes)\n; \n; 5 xrefs:\n; > GJBaseGameLayer::positionUIObjects @ 0x14032efff\n; > GJBaseGameLayer::positionUIObjects @ 0x14032f1ab\n; > <???> @ 0x1408b6468\n; > <???> @ 0x1408b6478\n; > <???> @ 0x14091f478\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 11:30:31 +0000\n; \nmov     [rsp+arg_18], rsi                                              ; +0x0, 0x14032ec90\npush    rdi                                                            ; +0x5, 0x14032ec95\nsub     rsp, 30h                                                       ; +0x6, 0x14032ec96\ncmp     byte ptr [rdx+549h], 0                                         ; +0xa, 0x14032ec9a\nmov     rdi, rdx                                                       ; +0x11, 0x14032eca1\nmov     rsi, rcx                                                       ; +0x14, 0x14032eca4\njnz     loc_14032ED99                                                  ; +0x17, 0x14032eca7\nmov     eax, [rdx+39Ch]                                                ; +0x1d, 0x14032ecad\nlea     r8, [rsp+38h+arg_8]                                            ; +0x23, 0x14032ecb3\nlea     rdx, [rsp+38h+var_18]                                          ; +0x28, 0x14032ecb8\nmov     [rsp+38h+arg_0], rbx                                           ; +0x2d, 0x14032ecbd\nadd     rcx, 928h                                                      ; +0x32, 0x14032ecc2\nmov     dword ptr [rsp+38h+arg_8], eax                                 ; +0x39, 0x14032ecc9\ncall    sub_140357DC0                                                  ; +0x3d, 0x14032eccd\nlea     rdx, [rsp+38h+arg_10]                                          ; +0x42, 0x14032ecd2\nmov     rcx, rdi                                                       ; +0x47, 0x14032ecd7\nmov     rbx, [rax]                                                     ; +0x4a, 0x14032ecda\nmov     rax, [rdi]                                                     ; +0x4d, 0x14032ecdd\ncall    qword ptr [rax+680h]                                           ; +0x50, 0x14032ece0\nmov     rdx, rax                                                       ; +0x56, 0x14032ece6\nlea     rcx, [rbx+14h]                                                 ; +0x59, 0x14032ece9\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x5d, 0x14032eced\nmov     rdx, rdi                                                       ; +0x63, 0x14032ecf3\nmov     rcx, rsi                                                       ; +0x66, 0x14032ecf6\ncall    GJBaseGameLayer__removeObjectFromSection                       ; +0x69, 0x14032ecf9\nmov     rax, [rdi]                                                     ; +0x6e, 0x14032ecfe\nmov     dl, 1                                                          ; +0x71, 0x14032ed01\nmov     rcx, rdi                                                       ; +0x73, 0x14032ed03\ncall    qword ptr [rax+488h]                                           ; +0x76, 0x14032ed06\nmov     dword ptr [rdi+278h], 0FFFFFFFFh                               ; +0x7c, 0x14032ed0c\nmov     rdx, rdi                                                       ; +0x86, 0x14032ed16\nmov     byte ptr [rdi+549h], 1                                         ; +0x89, 0x14032ed19\nmov     rcx, [rsi+3648h]                                               ; +0x90, 0x14032ed20\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x97, 0x14032ed27\ncmp     dword ptr [rdi+40Ch], 718h                                     ; +0x9d, 0x14032ed2d\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xa7, 0x14032ed37\njnz     short loc_14032ED99                                            ; +0xac, 0x14032ed3c\nmovsxd  r9, dword ptr [rsi+3738h]                                      ; +0xae, 0x14032ed3e\nlea     rcx, [rsi+3720h]                                               ; +0xb5, 0x14032ed45\nmov     rdx, [rcx+8]                                                   ; +0xbc, 0x14032ed4c\nmov     r8, [rcx]                                                      ; +0xc0, 0x14032ed50\nmov     rax, rdx                                                       ; +0xc3, 0x14032ed53\nsub     rax, r8                                                        ; +0xc6, 0x14032ed56\nmov     [rsp+38h+arg_8], rdi                                           ; +0xc9, 0x14032ed59\nsar     rax, 3                                                         ; +0xce, 0x14032ed5e\ncmp     r9, rax                                                        ; +0xd2, 0x14032ed62\njb      short loc_14032ED83                                            ; +0xd5, 0x14032ed65\ncmp     rdx, [rcx+10h]                                                 ; +0xd7, 0x14032ed67\njz      short loc_14032ED77                                            ; +0xdb, 0x14032ed6b\nmov     [rdx], rdi                                                     ; +0xdd, 0x14032ed6d\nadd     qword ptr [rcx+8], 8                                           ; +0xe0, 0x14032ed70\njmp     short loc_14032ED87                                            ; +0xe5, 0x14032ed75\nlea     r8, [rsp+38h+arg_8]                                            ; +0xe7, 0x14032ed77\ncall    sub_1400699B0                                                  ; +0xec, 0x14032ed7c\njmp     short loc_14032ED87                                            ; +0xf1, 0x14032ed81\nmov     [r8+r9*8], rdi                                                 ; +0xf3, 0x14032ed83\nmov     eax, [rsi+3738h]                                               ; +0xf7, 0x14032ed87\nmov     [rdi+274h], eax                                                ; +0xfd, 0x14032ed8d\ninc     dword ptr [rsi+3738h]                                          ; +0x103, 0x14032ed93\nmov     rsi, [rsp+38h+arg_18]                                          ; +0x109, 0x14032ed99\nadd     rsp, 30h                                                       ; +0x10e, 0x14032ed9e\npop     rdi                                                            ; +0x112, 0x14032eda2\nretn                                                                   ; +0x113, 0x14032eda3", "xrefs": ["GJBaseGameLayer::positionUIObjects @ 0x14032efff", "GJBaseGameLayer::positionUIObjects @ 0x14032f1ab", "<???> @ 0x1408b6468", "<???> @ 0x1408b6478", "<???> @ 0x14091f478"], "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"}