{"type": "func", "start": 5466520, "end": 5466772, "name": "EditorUI::createEdgeForObject", "pseudocode": "// \n// EditorUI::createEdgeForObject from 0x536998 to 0x536a94 (252 bytes)\n// \n// 3 xrefs:\n// > EditorUI::createRockEdges @ 0x536ba4\n// > EditorUI::createRockEdges @ 0x536c3c\n// > EditorUI::createRockEdges @ 0x536c56\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\nGameObject *EditorUI::createEdgeForObject(EditorUI *a1, GameObject *a2, int a3)\n{\n  int v6; // r0\n  int v7; // r9\n  float v8; // r1\n  float v9; // r2\n  int v10; // r2\n  bool v11; // r3\n  int v12; // r2\n  bool v13; // r3\n  int v14; // r2\n  bool v15; // r3\n  cocos2d::CCPoint v16; // r2\n  GameObject *result; // r0\n  cocos2d::CCPoint v18; // [sp+4h] [bp-28h] BYREF\n  cocos2d::CCPoint v19; // [sp+Ch] [bp-20h] BYREF\n  cocos2d::CCPoint v20; // [sp+14h] [bp-18h] BYREF\n  cocos2d::CCPoint v21; // [sp+1Ch] [bp-10h] BYREF\n\n  v6 = EditorUI::edgeForObject(a1, a2->m_objectID, a3);\n  v7 = v6;\n  if ( v6 <= 0 )\n    return nullptr;\n  EditorUI::offsetForKey(&v18, a1, v6);\n  cocos2d::CCPoint::CCPoint(&v19, &stru_AC77D0);\n  switch ( a3 )\n  {\n    case 0:\n      v8 = 0.0;\n      goto LABEL_14;\n    case 1:\n      v8 = 30.0;\n      goto LABEL_7;\n    case 2:\n      v8 = 0.0;\n      goto LABEL_10;\n    case 3:\n      v8 = -30.0;\nLABEL_7:\n      v9 = 0.0;\n      goto LABEL_15;\n    case 4:\n      v8 = 30.0;\n      goto LABEL_12;\n    case 5:\n      v8 = 30.0;\nLABEL_10:\n      v9 = -30.0;\n      goto LABEL_15;\n    case 6:\n      v8 = -30.0;\nLABEL_12:\n      v9 = v8;\n      goto LABEL_15;\n    case 7:\n      v8 = -30.0;\nLABEL_14:\n      v9 = 30.0;\nLABEL_15:\n      cocos2d::CCPoint::CCPoint(&v21, v8, v9);\n      cocos2d::CCPoint::operator=((PlayerObject *)&v19, COERCE_FLOAT(&v21), v10, v11);\n      break;\n    default:\n      break;\n  }\n  a2->getRealPosition(&v20, a2);\n  cocos2d::CCPoint::operator+(&v21, &v20, &v18);\n  cocos2d::CCPoint::operator=((PlayerObject *)&v20, COERCE_FLOAT(&v21), v12, v13);\n  cocos2d::CCPoint::operator+(&v21, &v20, &v19);\n  cocos2d::CCPoint::operator=((PlayerObject *)&v20, COERCE_FLOAT(&v21), v14, v15);\n  cocos2d::CCPoint::CCPoint(&v21, &v20);\n  LODWORD(v16.x) = &v21;\n  result = EditorUI::createObject(a1, v7, v16);\n  if ( result )\n    result->m_editorLayer2 = a2->m_editorLayer + 1;\n  return result;\n}", "assembly": "; \n; EditorUI::createEdgeForObject from 0x536998 to 0x536a94 (252 bytes)\n; \n; 3 xrefs:\n; > EditorUI::createRockEdges @ 0x536ba4\n; > EditorUI::createRockEdges @ 0x536c3c\n; > EditorUI::createRockEdges @ 0x536c56\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.W          {R4-R11,LR}                                            ; +0x0, 0x536998\nSUB             SP, SP, #0x2C                                          ; +0x4, 0x53699c\nLDR             R7, =(__stack_chk_guard_ptr - 0x5369AC)                ; +0x6, 0x53699e\nMOV             R8, R1                                                 ; +0x8, 0x5369a0\nLDR.W           R1, [R1,#0x374]; int                                   ; +0xa, 0x5369a2\nMOV             R10, R0                                                ; +0xe, 0x5369a6\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0x10, 0x5369a8\nLDR             R7, [R7]; __stack_chk_guard                            ; +0x12, 0x5369aa\nMOV             R6, R2                                                 ; +0x14, 0x5369ac\nLDR             R3, [R7]                                               ; +0x16, 0x5369ae\nSTR             R3, [SP,#0x2C+var_8]                                   ; +0x18, 0x5369b0\nBL              _ZN8EditorUI13edgeForObjectEii; EditorUI::edgeForObject(int,int) ; +0x1a, 0x5369b2\nSUBS.W          R9, R0, #0                                             ; +0x1e, 0x5369b6\nBLE             loc_536A80                                             ; +0x22, 0x5369ba\nADD.W           R11, SP, #0x2C+var_28                                  ; +0x24, 0x5369bc\nMOV             R1, R10; int                                           ; +0x28, 0x5369c0\nMOV             R2, R9                                                 ; +0x2a, 0x5369c2\nADD             R5, SP, #0x2C+var_20                                   ; +0x2c, 0x5369c4\nMOV             R0, R11; this                                          ; +0x2e, 0x5369c6\nADD             R4, SP, #0x2C+var_10                                   ; +0x30, 0x5369c8\nBL              _ZN8EditorUI12offsetForKeyEi; EditorUI::offsetForKey(int) ; +0x32, 0x5369ca\nLDR             R1, =(qword_AC77C8 - 0x5369D6)                         ; +0x36, 0x5369ce\nMOV             R0, R5; this                                           ; +0x38, 0x5369d0\nADD             R1, PC; qword_AC77C8                                   ; +0x3a, 0x5369d2\nADDS            R1, #(stru_AC77D0 - 0xAC77C8); cocos2d::CCPoint *      ; +0x3c, 0x5369d4\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x3e, 0x5369d6\nCMP             R6, #7; switch 8 cases                                 ; +0x42, 0x5369da\nBHI             def_5369DE; jumptable 005369DE default case            ; +0x44, 0x5369dc\nTBB.W           [PC,R6]; switch jump                                   ; +0x46, 0x5369de\nDCB 4; jump table for switch statement                                 ; +0x4a, 0x5369e2\nDCB 7                                                                  ; +0x4b, 0x5369e3\nDCB 0xA                                                                ; +0x4c, 0x5369e4\nDCB 0xD                                                                ; +0x4d, 0x5369e5\nDCB 0x11                                                               ; +0x4e, 0x5369e6\nDCB 0x14                                                               ; +0x4f, 0x5369e7\nDCB 0x18                                                               ; +0x50, 0x5369e8\nDCB 0x1C                                                               ; +0x51, 0x5369e9\nMOV             R0, R4; jumptable 005369DE case 0                      ; +0x52, 0x5369ea\nMOVS            R1, #0                                                 ; +0x54, 0x5369ec\nB               loc_536A1E                                             ; +0x56, 0x5369ee\nMOV             R0, R4; jumptable 005369DE case 1                      ; +0x58, 0x5369f0\nLDR             R1, flt_536A94                                         ; +0x5a, 0x5369f2\nB               loc_536A00                                             ; +0x5c, 0x5369f4\nMOV             R0, R4; jumptable 005369DE case 2                      ; +0x5e, 0x5369f6\nMOVS            R1, #0                                                 ; +0x60, 0x5369f8\nB               loc_536A0E                                             ; +0x62, 0x5369fa\nLDR             R1, flt_536A98; jumptable 005369DE case 3              ; +0x64, 0x5369fc\nMOV             R0, R4                                                 ; +0x66, 0x5369fe\nMOVS            R2, #0                                                 ; +0x68, 0x536a00\nB               loc_536A20                                             ; +0x6a, 0x536a02\nMOV             R0, R4; jumptable 005369DE case 4                      ; +0x6c, 0x536a04\nLDR             R1, flt_536A94                                         ; +0x6e, 0x536a06\nB               loc_536A16                                             ; +0x70, 0x536a08\nLDR             R1, flt_536A94; jumptable 005369DE case 5              ; +0x72, 0x536a0a\nMOV             R0, R4                                                 ; +0x74, 0x536a0c\nLDR             R2, flt_536A98                                         ; +0x76, 0x536a0e\nB               loc_536A20                                             ; +0x78, 0x536a10\nLDR             R1, flt_536A98; jumptable 005369DE case 6              ; +0x7a, 0x536a12\nMOV             R0, R4                                                 ; +0x7c, 0x536a14\nMOV             R2, R1                                                 ; +0x7e, 0x536a16\nB               loc_536A20                                             ; +0x80, 0x536a18\nLDR             R1, flt_536A98; jumptable 005369DE case 7              ; +0x82, 0x536a1a\nMOV             R0, R4; this                                           ; +0x84, 0x536a1c\nLDR             R2, flt_536A94; float                                  ; +0x86, 0x536a1e\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x88, 0x536a20\nMOV             R0, R5                                                 ; +0x8c, 0x536a24\nMOV             R1, R4                                                 ; +0x8e, 0x536a26\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x90, 0x536a28\nLDR.W           R3, [R8]; jumptable 005369DE default case              ; +0x94, 0x536a2c\nADD             R6, SP, #0x2C+var_18                                   ; +0x98, 0x536a30\nMOV             R1, R8                                                 ; +0x9a, 0x536a32\nMOV             R0, R6                                                 ; +0x9c, 0x536a34\nLDR.W           R3, [R3,#0x2A0]                                        ; +0x9e, 0x536a36\nBLX             R3                                                     ; +0xa2, 0x536a3a\nMOV             R2, R11                                                ; +0xa4, 0x536a3c\nMOV             R0, R4                                                 ; +0xa6, 0x536a3e\nMOV             R1, R6                                                 ; +0xa8, 0x536a40\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0xaa, 0x536a42\nMOV             R1, R4                                                 ; +0xae, 0x536a46\nMOV             R0, R6                                                 ; +0xb0, 0x536a48\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0xb2, 0x536a4a\nMOV             R2, R5                                                 ; +0xb6, 0x536a4e\nMOV             R0, R4                                                 ; +0xb8, 0x536a50\nMOV             R1, R6                                                 ; +0xba, 0x536a52\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0xbc, 0x536a54\nMOV             R1, R4                                                 ; +0xc0, 0x536a58\nMOV             R0, R6                                                 ; +0xc2, 0x536a5a\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0xc4, 0x536a5c\nMOV             R1, R6; cocos2d::CCPoint *                             ; +0xc8, 0x536a60\nMOV             R0, R4; this                                           ; +0xca, 0x536a62\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0xcc, 0x536a64\nMOV             R0, R10                                                ; +0xd0, 0x536a68\nMOV             R1, R9                                                 ; +0xd2, 0x536a6a\nMOV             R2, R4                                                 ; +0xd4, 0x536a6c\nBL              _ZN8EditorUI12createObjectEiN7cocos2d7CCPointE; EditorUI::createObject(int,cocos2d::CCPoint) ; +0xd6, 0x536a6e\nCBZ             R0, loc_536A82                                         ; +0xda, 0x536a72\nLDRH.W          R3, [R8,#0x406]                                        ; +0xdc, 0x536a74\nADDS            R3, #1                                                 ; +0xe0, 0x536a78\nSTRH.W          R3, [R0,#0x408]                                        ; +0xe2, 0x536a7a\nB               loc_536A82                                             ; +0xe6, 0x536a7e\nMOVS            R0, #0                                                 ; +0xe8, 0x536a80\nLDR             R2, [SP,#0x2C+var_8]                                   ; +0xea, 0x536a82\nLDR             R3, [R7]                                               ; +0xec, 0x536a84\nCMP             R2, R3                                                 ; +0xee, 0x536a86\nBEQ             loc_536A8E                                             ; +0xf0, 0x536a88\nBLX             __stack_chk_fail                                       ; +0xf2, 0x536a8a\nADD             SP, SP, #0x2C ; ','                                    ; +0xf6, 0x536a8e\nPOP.W           {R4-R11,PC}                                            ; +0xf8, 0x536a90", "xrefs": ["EditorUI::createRockEdges @ 0x536ba4", "EditorUI::createRockEdges @ 0x536c3c", "EditorUI::createRockEdges @ 0x536c56"], "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"}