{"type": "func", "start": 4299319296, "end": 4299319408, "name": "GJSmartTemplate::offsetForType", "pseudocode": "// \n// GJSmartTemplate::offsetForType from 0x100426800 to 0x100426870 (112 bytes)\n// \n// 7 xrefs:\n// > EditorUI::addObjectsToSmartTemplate @ 0x100041470\n// > EditorUI::createPrefab @ 0x1000439b9\n// > EditorUI::createPrefab @ 0x100043af3\n// > GJSmartTemplate::offsetForObject @ 0x100426518\n// > GJSmartBlockPreview::addTemplateGuide_1 @ 0x100428e10\n// > GJSmartBlockPreview::addTemplateGuide_1 @ 0x100428fb4\n// > GJSmartBlockPreview::addPreview @ 0x10042939d\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\n// local variable allocation has failed, the output may be wrong!\ncocos2d::CCPoint __fastcall GJSmartTemplate::offsetForType(SmartBlockType a1)\n{\n  int v1; // esi\n  float v3; // xmm1_4\n  cocos2d::CCPoint result; // 0:xmm0_8.8\n\n  switch ( v1 )\n  {\n    case '6':\n    case '9':\n    case 'A':\n    case 'D':\n      result = (cocos2d::CCPoint)1097859072LL;\n      goto LABEL_4;\n    case '7':\n    case '8':\n    case 'B':\n    case 'C':\n      result = (cocos2d::CCPoint)3245342720LL;\nLABEL_4:\n      v3 = 0.0;\n      goto LABEL_8;\n    case 'E':\n    case 'G':\n    case 'J':\n    case 'L':\n      v3 = -15.0;\n      goto LABEL_7;\n    case 'F':\n    case 'H':\n    case 'I':\n    case 'K':\n      v3 = 15.0;\nLABEL_7:\n      *(double *)&result = 0.0;\nLABEL_8:\n      sub_10028CBE0(*(float **)&a1, result.x, v3);\n      break;\n    default:\n      *(double *)&result = sub_10028CC60(*(_QWORD **)&a1, &dbl_1009A15B8);\n      break;\n  }\n  return result;\n}", "assembly": "; \n; GJSmartTemplate::offsetForType from 0x100426800 to 0x100426870 (112 bytes)\n; \n; 7 xrefs:\n; > EditorUI::addObjectsToSmartTemplate @ 0x100041470\n; > EditorUI::createPrefab @ 0x1000439b9\n; > EditorUI::createPrefab @ 0x100043af3\n; > GJSmartTemplate::offsetForObject @ 0x100426518\n; > GJSmartBlockPreview::addTemplateGuide_1 @ 0x100428e10\n; > GJSmartBlockPreview::addTemplateGuide_1 @ 0x100428fb4\n; > GJSmartBlockPreview::addPreview @ 0x10042939d\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, 0x100426800\nmov     rbp, rsp                                                       ; +0x1, 0x100426801\npush    rbx                                                            ; +0x4, 0x100426804\npush    rax                                                            ; +0x5, 0x100426805\nmov     rbx, rdi                                                       ; +0x6, 0x100426806\nadd     esi, 0FFFFFFCAh; switch 23 cases                               ; +0x9, 0x100426809\ncmp     esi, 16h                                                       ; +0xc, 0x10042680c\nja      short def_10042681F; jumptable 000000010042681F default case, cases 58-64 ; +0xf, 0x10042680f\nlea     rax, jpt_10042681F                                             ; +0x11, 0x100426811\nmovsxd  rcx, (jpt_10042681F - 100426870h)[rax+rsi*4]                   ; +0x18, 0x100426818\nadd     rcx, rax                                                       ; +0x1c, 0x10042681c\njmp     rcx; switch jump                                               ; +0x1f, 0x10042681f\nmovss   xmm0, cs:dword_100815090; jumptable 000000010042681F cases 54,57,65,68 ; +0x21, 0x100426821\njmp     short loc_100426833                                            ; +0x29, 0x100426829\nmovss   xmm0, cs:dword_100814FAC; jumptable 000000010042681F cases 55,56,66,67 ; +0x2b, 0x10042682b\nxorps   xmm1, xmm1                                                     ; +0x33, 0x100426833\njmp     short loc_10042684D                                            ; +0x36, 0x100426836\nmovss   xmm1, cs:dword_100814FAC; jumptable 000000010042681F cases 69,71,74,76 ; +0x38, 0x100426838\njmp     short loc_10042684A                                            ; +0x40, 0x100426840\nmovss   xmm1, cs:dword_100815090; jumptable 000000010042681F cases 70,72,73,75 ; +0x42, 0x100426842\nxorps   xmm0, xmm0                                                     ; +0x4a, 0x10042684a\nmov     rdi, rbx                                                       ; +0x4d, 0x10042684d\ncall    sub_10028CBE0                                                  ; +0x50, 0x100426850\nmov     rax, rbx                                                       ; +0x55, 0x100426855\nadd     rsp, 8                                                         ; +0x58, 0x100426858\npop     rbx                                                            ; +0x5c, 0x10042685c\npop     rbp                                                            ; +0x5d, 0x10042685d\nretn                                                                   ; +0x5e, 0x10042685e\nlea     rsi, dbl_1009A15B8; jumptable 000000010042681F default case, cases 58-64 ; +0x5f, 0x10042685f\nmov     rdi, rbx                                                       ; +0x66, 0x100426866\ncall    sub_10028CC60                                                  ; +0x69, 0x100426869\njmp     short loc_100426855                                            ; +0x6e, 0x10042686e", "xrefs": ["EditorUI::addObjectsToSmartTemplate @ 0x100041470", "EditorUI::createPrefab @ 0x1000439b9", "EditorUI::createPrefab @ 0x100043af3", "GJSmartTemplate::offsetForObject @ 0x100426518", "GJSmartBlockPreview::addTemplateGuide_1 @ 0x100428e10", "GJSmartBlockPreview::addTemplateGuide_1 @ 0x100428fb4", "GJSmartBlockPreview::addPreview @ 0x10042939d"], "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"}