{"type": "func", "start": 5372855312, "end": 5372855888, "name": "LevelEditorLayer::lockedLayerForObjectString", "pseudocode": "// \n// LevelEditorLayer::lockedLayerForObjectString from 0x1403f4410 to 0x1403f4650 (576 bytes)\n// \n// 2 xrefs:\n// > EditorUI::pasteObjects @ 0x1401c62dd\n// > <???> @ 0x14092549c\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:31:49 +0000\n// \n\n// Hidden C++ exception states: #wind=2\n__int64 __fastcall LevelEditorLayer::lockedLayerForObjectString(__int64 a1, __int64 *a2)\n{\n  int v4; // r15d\n  __int64 v5; // rdx\n  __int64 v6; // rcx\n  int v7; // esi\n  int v8; // ebp\n  __int64 v9; // r8\n  int v10; // edi\n  __int64 v11; // rbx\n  const char *v12; // rcx\n  int v13; // eax\n  const char *v14; // rcx\n  const char *v15; // rcx\n  int v16; // eax\n  int v17; // r8d\n  int v18; // ebx\n  __int64 v19; // r9\n  int v20; // eax\n  int v21; // eax\n  __int128 v22; // [rsp+20h] [rbp-48h] BYREF\n  __int64 v23; // [rsp+30h] [rbp-38h]\n  __int128 v24; // [rsp+38h] [rbp-30h] BYREF\n  __int64 v25; // [rsp+48h] [rbp-20h]\n\n  if ( !*(_DWORD *)(a1 + 15240) )\n    return 0xFFFFFFFFLL;\n  v24 = 0;\n  v25 = 0;\n  sub_1401C5360(a2, byte_140752308, (__int64 *)&v24);\n  v4 = 0;\n  v5 = v24;\n  if ( !((__int64)(*((_QWORD *)&v24 + 1) - v24) >> 5) )\n  {\nLABEL_36:\n    v18 = -1;\n    goto LABEL_37;\n  }\n  v6 = 0;\n  while ( 1 )\n  {\n    v22 = 0;\n    v23 = 0;\n    sub_1401C5360((__int64 *)(v5 + 32 * v6), byte_14070ECF8, (__int64 *)&v22);\n    v7 = 0;\n    v8 = 0;\n    v9 = v22;\n    if ( (unsigned __int64)((__int64)(*((_QWORD *)&v22 + 1) - v22) >> 5) > 1 )\n    {\n      v10 = 1;\n      v11 = 0;\n      do\n      {\n        v12 = (const char *)(v11 + v9);\n        if ( *(_QWORD *)(v11 + v9 + 24) > 0xFu )\n          v12 = *(const char **)v12;\n        v13 = atoi(v12);\n        if ( v13 == 20 )\n        {\n          v14 = (const char *)(v11 + v22 + 32);\n          if ( *((_QWORD *)v14 + 3) > 0xFu )\n            v14 = *(const char **)v14;\n          v7 = atoi(v14);\n        }\n        else if ( v13 == 61 )\n        {\n          v15 = (const char *)(v11 + v22 + 32);\n          if ( *((_QWORD *)v15 + 3) > 0xFu )\n            v15 = *(const char **)v15;\n          v8 = atoi(v15);\n        }\n        v10 += 2;\n        v11 += 64;\n        v9 = v22;\n      }\n      while ( v10 < (unsigned __int64)((__int64)(*((_QWORD *)&v22 + 1) - v22) >> 5) );\n    }\n    v16 = *(__int16 *)(a1 + 14866);\n    if ( *(_WORD *)(a1 + 14866) != 0xFFFF && !*(_BYTE *)(a1 + 14808) && v7 != v16 && v8 != v16 )\n      v7 = *(__int16 *)(a1 + 14866);\n    if ( !*(_DWORD *)(a1 + 15240) )\n      goto LABEL_35;\n    v17 = 9999;\n    if ( v7 < 9999 )\n      v17 = v7;\n    if ( v17 < 0 )\n      v17 = 0;\n    v18 = 9999;\n    if ( v8 < 9999 )\n      v18 = v8;\n    if ( v18 < 0 )\n      v18 = 0;\n    v19 = *(_QWORD *)(a1 + 15208);\n    v20 = *(_DWORD *)(v19 + 4 * ((unsigned __int64)(unsigned int)v17 >> 5));\n    if ( _bittest(&v20, v17 & 0x1F) )\n      break;\n    if ( v18 )\n    {\n      v21 = *(_DWORD *)(v19 + 4 * ((unsigned __int64)(unsigned int)v18 >> 5));\n      if ( _bittest(&v21, v18 & 0x1F) )\n        goto LABEL_39;\n    }\nLABEL_35:\n    sub_1400760C0((__int64 *)&v22);\n    v6 = ++v4;\n    v5 = v24;\n    if ( v4 >= (unsigned __int64)((__int64)(*((_QWORD *)&v24 + 1) - v24) >> 5) )\n      goto LABEL_36;\n  }\n  v18 = v17;\nLABEL_39:\n  sub_1400760C0((__int64 *)&v22);\nLABEL_37:\n  sub_1400760C0((__int64 *)&v24);\n  return (unsigned int)v18;\n}", "assembly": "; \n; LevelEditorLayer::lockedLayerForObjectString from 0x1403f4410 to 0x1403f4650 (576 bytes)\n; \n; 2 xrefs:\n; > EditorUI::pasteObjects @ 0x1401c62dd\n; > <???> @ 0x14092549c\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:31:49 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1403f4410\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1403f4415\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1403f441a\nmov     [rsp+arg_18], rdi                                              ; +0xf, 0x1403f441f\npush    r12                                                            ; +0x14, 0x1403f4424\npush    r14                                                            ; +0x16, 0x1403f4426\npush    r15                                                            ; +0x18, 0x1403f4428\nsub     rsp, 50h                                                       ; +0x1a, 0x1403f442a\nmov     rax, rdx                                                       ; +0x1e, 0x1403f442e\nmov     r14, rcx                                                       ; +0x21, 0x1403f4431\ncmp     dword ptr [rcx+3B88h], 0                                       ; +0x24, 0x1403f4434\njnz     short loc_1403F4447                                            ; +0x2b, 0x1403f443b\nmov     eax, 0FFFFFFFFh                                                ; +0x2d, 0x1403f443d\njmp     loc_1403F4621                                                  ; +0x32, 0x1403f4442\nxorps   xmm0, xmm0                                                     ; +0x37, 0x1403f4447\nmovdqu  [rsp+68h+var_30], xmm0                                         ; +0x3a, 0x1403f444a\nxor     r12d, r12d                                                     ; +0x40, 0x1403f4450\nmov     [rsp+68h+var_20], r12                                          ; +0x43, 0x1403f4453\nlea     r8, [rsp+68h+var_30]                                           ; +0x48, 0x1403f4458\nlea     rdx, byte_140752308                                            ; +0x4d, 0x1403f445d\nmov     rcx, rax                                                       ; +0x54, 0x1403f4464\ncall    sub_1401C5360                                                  ; +0x57, 0x1403f4467\nmov     r15d, r12d                                                     ; +0x5c, 0x1403f446c\nmov     rax, qword ptr [rsp+68h+var_30+8]                              ; +0x5f, 0x1403f446f\nmov     rdx, qword ptr [rsp+68h+var_30]                                ; +0x64, 0x1403f4474\nsub     rax, rdx                                                       ; +0x69, 0x1403f4479\nsar     rax, 5                                                         ; +0x6c, 0x1403f447c\ntest    rax, rax                                                       ; +0x70, 0x1403f4480\njz      loc_1403F4610                                                  ; +0x73, 0x1403f4483\nmov     ecx, r12d                                                      ; +0x79, 0x1403f4489\nnop     dword ptr [rax+00h]                                            ; +0x7c, 0x1403f448c\nxorps   xmm0, xmm0                                                     ; +0x80, 0x1403f4490\nmovdqu  [rsp+68h+var_48], xmm0                                         ; +0x83, 0x1403f4493\nmov     [rsp+68h+var_38], r12                                          ; +0x89, 0x1403f4499\nshl     rcx, 5                                                         ; +0x8e, 0x1403f449e\nadd     rcx, rdx                                                       ; +0x92, 0x1403f44a2\nlea     r8, [rsp+68h+var_48]                                           ; +0x95, 0x1403f44a5\nlea     rdx, byte_14070ECF8                                            ; +0x9a, 0x1403f44aa\ncall    sub_1401C5360                                                  ; +0xa1, 0x1403f44b1\nmov     esi, r12d                                                      ; +0xa6, 0x1403f44b6\nmov     ebp, r12d                                                      ; +0xa9, 0x1403f44b9\nmov     rax, qword ptr [rsp+68h+var_48+8]                              ; +0xac, 0x1403f44bc\nmov     r8, qword ptr [rsp+68h+var_48]                                 ; +0xb1, 0x1403f44c1\nsub     rax, r8                                                        ; +0xb6, 0x1403f44c6\nsar     rax, 5                                                         ; +0xb9, 0x1403f44c9\ncmp     rax, 1                                                         ; +0xbd, 0x1403f44cd\njbe     loc_1403F455C                                                  ; +0xc1, 0x1403f44d1\nmov     edi, 1                                                         ; +0xc7, 0x1403f44d7\nmov     rbx, r12                                                       ; +0xcc, 0x1403f44dc\nnop                                                                    ; +0xcf, 0x1403f44df\nlea     rcx, [rbx+r8]                                                  ; +0xd0, 0x1403f44e0\ncmp     qword ptr [rcx+18h], 0Fh                                       ; +0xd4, 0x1403f44e4\njbe     short loc_1403F44EE                                            ; +0xd9, 0x1403f44e9\nmov     rcx, [rcx]; String                                             ; +0xdb, 0x1403f44eb\ncall    cs:atoi                                                        ; +0xde, 0x1403f44ee\ncmp     eax, 14h                                                       ; +0xe4, 0x1403f44f4\njnz     short loc_1403F4519                                            ; +0xe7, 0x1403f44f7\nmov     rcx, qword ptr [rsp+68h+var_48]                                ; +0xe9, 0x1403f44f9\nadd     rcx, 20h ; ' '                                                 ; +0xee, 0x1403f44fe\nadd     rcx, rbx                                                       ; +0xf2, 0x1403f4502\ncmp     qword ptr [rcx+18h], 0Fh                                       ; +0xf5, 0x1403f4505\njbe     short loc_1403F450F                                            ; +0xfa, 0x1403f450a\nmov     rcx, [rcx]; String                                             ; +0xfc, 0x1403f450c\ncall    cs:atoi                                                        ; +0xff, 0x1403f450f\nmov     esi, eax                                                       ; +0x105, 0x1403f4515\njmp     short loc_1403F453C                                            ; +0x107, 0x1403f4517\ncmp     eax, 3Dh ; '='                                                 ; +0x109, 0x1403f4519\njnz     short loc_1403F453C                                            ; +0x10c, 0x1403f451c\nmov     rcx, qword ptr [rsp+68h+var_48]                                ; +0x10e, 0x1403f451e\nadd     rcx, 20h ; ' '                                                 ; +0x113, 0x1403f4523\nadd     rcx, rbx                                                       ; +0x117, 0x1403f4527\ncmp     qword ptr [rcx+18h], 0Fh                                       ; +0x11a, 0x1403f452a\njbe     short loc_1403F4534                                            ; +0x11f, 0x1403f452f\nmov     rcx, [rcx]; String                                             ; +0x121, 0x1403f4531\ncall    cs:atoi                                                        ; +0x124, 0x1403f4534\nmov     ebp, eax                                                       ; +0x12a, 0x1403f453a\nadd     edi, 2                                                         ; +0x12c, 0x1403f453c\nadd     rbx, 40h ; '@'                                                 ; +0x12f, 0x1403f453f\nmov     rdx, qword ptr [rsp+68h+var_48+8]                              ; +0x133, 0x1403f4543\nmov     r8, qword ptr [rsp+68h+var_48]                                 ; +0x138, 0x1403f4548\nsub     rdx, r8                                                        ; +0x13d, 0x1403f454d\nsar     rdx, 5                                                         ; +0x140, 0x1403f4550\nmovsxd  rcx, edi                                                       ; +0x144, 0x1403f4554\ncmp     rcx, rdx                                                       ; +0x147, 0x1403f4557\njb      short loc_1403F44E0                                            ; +0x14a, 0x1403f455a\nmovsx   eax, word ptr [r14+3A12h]                                      ; +0x14c, 0x1403f455c\ncmp     ax, 0FFFFh                                                     ; +0x154, 0x1403f4564\njz      short loc_1403F457D                                            ; +0x158, 0x1403f4568\ncmp     byte ptr [r14+39D8h], 0                                        ; +0x15a, 0x1403f456a\njnz     short loc_1403F457D                                            ; +0x162, 0x1403f4572\ncmp     esi, eax                                                       ; +0x164, 0x1403f4574\njz      short loc_1403F457D                                            ; +0x166, 0x1403f4576\ncmp     ebp, eax                                                       ; +0x168, 0x1403f4578\ncmovnz  esi, eax                                                       ; +0x16a, 0x1403f457a\ncmp     dword ptr [r14+3B88h], 0                                       ; +0x16d, 0x1403f457d\njz      short loc_1403F45E6                                            ; +0x175, 0x1403f4585\nmov     r8d, 270Fh                                                     ; +0x177, 0x1403f4587\ncmp     esi, r8d                                                       ; +0x17d, 0x1403f458d\ncmovl   r8d, esi                                                       ; +0x180, 0x1403f4590\ntest    r8d, r8d                                                       ; +0x184, 0x1403f4594\ncmovs   r8d, r12d                                                      ; +0x187, 0x1403f4597\nmov     edx, r8d                                                       ; +0x18b, 0x1403f459b\nmov     ebx, 270Fh                                                     ; +0x18e, 0x1403f459e\ncmp     ebp, ebx                                                       ; +0x193, 0x1403f45a3\ncmovl   ebx, ebp                                                       ; +0x195, 0x1403f45a5\ntest    ebx, ebx                                                       ; +0x198, 0x1403f45a8\ncmovs   ebx, r12d                                                      ; +0x19a, 0x1403f45aa\nmov     r9, [r14+3B68h]                                                ; +0x19e, 0x1403f45ae\nmovzx   eax, r8b                                                       ; +0x1a5, 0x1403f45b5\nand     al, 1Fh                                                        ; +0x1a9, 0x1403f45b9\nmovzx   ecx, al                                                        ; +0x1ab, 0x1403f45bb\nshr     rdx, 5                                                         ; +0x1ae, 0x1403f45be\nmov     eax, [r9+rdx*4]                                                ; +0x1b2, 0x1403f45c2\nbt      eax, ecx                                                       ; +0x1b6, 0x1403f45c6\njb      short loc_1403F4640                                            ; +0x1b9, 0x1403f45c9\ntest    ebx, ebx                                                       ; +0x1bb, 0x1403f45cb\njz      short loc_1403F45E6                                            ; +0x1bd, 0x1403f45cd\nmov     edx, ebx                                                       ; +0x1bf, 0x1403f45cf\nmovzx   eax, bl                                                        ; +0x1c1, 0x1403f45d1\nand     al, 1Fh                                                        ; +0x1c4, 0x1403f45d4\nmovzx   ecx, al                                                        ; +0x1c6, 0x1403f45d6\nshr     rdx, 5                                                         ; +0x1c9, 0x1403f45d9\nmov     eax, [r9+rdx*4]                                                ; +0x1cd, 0x1403f45dd\nbt      eax, ecx                                                       ; +0x1d1, 0x1403f45e1\njb      short loc_1403F4643                                            ; +0x1d4, 0x1403f45e4\nlea     rcx, [rsp+68h+var_48]                                          ; +0x1d6, 0x1403f45e6\ncall    sub_1400760C0                                                  ; +0x1db, 0x1403f45eb\ninc     r15d                                                           ; +0x1e0, 0x1403f45f0\nmovsxd  rcx, r15d                                                      ; +0x1e3, 0x1403f45f3\nmov     rax, qword ptr [rsp+68h+var_30+8]                              ; +0x1e6, 0x1403f45f6\nmov     rdx, qword ptr [rsp+68h+var_30]                                ; +0x1eb, 0x1403f45fb\nsub     rax, rdx                                                       ; +0x1f0, 0x1403f4600\nsar     rax, 5                                                         ; +0x1f3, 0x1403f4603\ncmp     rcx, rax                                                       ; +0x1f7, 0x1403f4607\njb      loc_1403F4490                                                  ; +0x1fa, 0x1403f460a\nmov     ebx, 0FFFFFFFFh                                                ; +0x200, 0x1403f4610\nlea     rcx, [rsp+68h+var_30]                                          ; +0x205, 0x1403f4615\ncall    sub_1400760C0                                                  ; +0x20a, 0x1403f461a\nmov     eax, ebx                                                       ; +0x20f, 0x1403f461f\nlea     r11, [rsp+68h+var_18]                                          ; +0x211, 0x1403f4621\nmov     rbx, [r11+20h]                                                 ; +0x216, 0x1403f4626\nmov     rbp, [r11+28h]                                                 ; +0x21a, 0x1403f462a\nmov     rsi, [r11+30h]                                                 ; +0x21e, 0x1403f462e\nmov     rdi, [r11+38h]                                                 ; +0x222, 0x1403f4632\nmov     rsp, r11                                                       ; +0x226, 0x1403f4636\npop     r15                                                            ; +0x229, 0x1403f4639\npop     r14                                                            ; +0x22b, 0x1403f463b\npop     r12                                                            ; +0x22d, 0x1403f463d\nretn                                                                   ; +0x22f, 0x1403f463f\nmov     ebx, r8d                                                       ; +0x230, 0x1403f4640\nlea     rcx, [rsp+68h+var_48]                                          ; +0x233, 0x1403f4643\ncall    sub_1400760C0                                                  ; +0x238, 0x1403f4648\njmp     short loc_1403F4615                                            ; +0x23d, 0x1403f464d\nalign 10h                                                              ; +0x23f, 0x1403f464f", "xrefs": ["EditorUI::pasteObjects @ 0x1401c62dd", "<???> @ 0x14092549c"], "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"}