{"type": "func", "start": 5764284, "end": 5764634, "name": "CustomizeObjectLayer::updateKerningLabel", "pseudocode": "// \n// CustomizeObjectLayer::updateKerningLabel from 0x57f4bc to 0x57f61a (350 bytes)\n// \n// 2 xrefs:\n// > CustomizeObjectLayer::init @ 0x580804\n// > CustomizeObjectLayer::sliderChanged @ 0x5810ac\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:52:51 +0000\n// \n\nint __fastcall CustomizeObjectLayer::updateKerningLabel(int this)\n{\n  int v1; // r5\n  int v2; // r0\n  char *v3; // r1\n  size_t v4; // r9\n  int v5; // r4\n  unsigned int v6; // r3\n  char *v7; // r10\n  size_t v8; // r4\n  char *v9; // r1\n  int v10; // r3\n  int v11; // r5\n  int v12; // [sp+10h] [bp-28h] BYREF\n  int v13; // [sp+14h] [bp-24h]\n  char *v14; // [sp+18h] [bp-20h]\n  unsigned __int8 v15; // [sp+1Ch] [bp-1Ch] BYREF\n  char v16; // [sp+1Dh] [bp-1Bh] BYREF\n  size_t v17; // [sp+20h] [bp-18h]\n  char *v18; // [sp+24h] [bp-14h]\n  _BYTE v19[12]; // [sp+28h] [bp-10h] BYREF\n\n  v1 = this;\n  if ( *(_DWORD *)(this + 612) )\n  {\n    v12 = 0;\n    v13 = 0;\n    v14 = nullptr;\n    std::string::__init(&v12, \"Kerning: \", 9u);\n    v2 = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v1 + 532) + 880))(*(_DWORD *)(v1 + 532));\n    GameToolbox::intToString((GameToolbox *)&v15, v2);\n    if ( (v15 & 1) != 0 )\n    {\n      v3 = v18;\n      v4 = v17;\n    }\n    else\n    {\n      v4 = (int)v15 >> 1;\n      v3 = &v16;\n    }\n    if ( (v12 & 1) != 0 )\n    {\n      v5 = v13;\n      v6 = (v12 & 0xFFFFFFFE) - 1;\n    }\n    else\n    {\n      v5 = (int)(unsigned __int8)v12 >> 1;\n      v6 = 10;\n    }\n    if ( v6 - v5 < v4 )\n    {\n      std::string::__grow_by_and_replace((int)&v12, v6, v5 + v4 - v6, v5, v5, 0, v4, v3);\n    }\n    else if ( v4 )\n    {\n      if ( (v12 & 1) != 0 )\n        v7 = v14;\n      else\n        v7 = (char *)&v12 + 1;\n      std::char_traits<char>::copy(&v7[v5], v3, v4);\n      v8 = v5 + v4;\n      if ( (v12 & 1) != 0 )\n        v13 = v8;\n      else\n        LOBYTE(v12) = 2 * v8;\n      v7[v8] = 0;\n    }\n    std::string::~string((int)&v15);\n    *(_DWORD *)(*(_DWORD *)(v1 + 612) + 376) = *(_DWORD *)(v1 + 608);\n    if ( (v12 & 1) != 0 )\n      v9 = v14;\n    else\n      v9 = (char *)&v12 + 1;\n    (*(void (__fastcall **)(_DWORD, char *, int))(**(_DWORD **)(v1 + 612) + 464))(\n      *(_DWORD *)(v1 + 612),\n      v9,\n      (unsigned __int8)v12 << 31);\n    v10 = *(_DWORD *)(v1 + 604);\n    if ( v10 )\n    {\n      *(_DWORD *)(v10 + 512) = *(_DWORD *)(v1 + 608);\n      v11 = *(_DWORD *)(v1 + 604);\n      CCTextInputNode::getString((CCTextInputNode *)v19, v11);\n      CCTextInputNode::setString(v11, (int)v19);\n      std::string::~string((int)v19);\n    }\n    return std::string::~string((int)&v12);\n  }\n  return this;\n}", "assembly": "; \n; CustomizeObjectLayer::updateKerningLabel from 0x57f4bc to 0x57f61a (350 bytes)\n; \n; 2 xrefs:\n; > CustomizeObjectLayer::init @ 0x580804\n; > CustomizeObjectLayer::sliderChanged @ 0x5810ac\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:52:51 +0000\n; \nLDR             R2, =(__stack_chk_guard_ptr - 0x57F4C6)                ; +0x0, 0x57f4bc\nPUSH.W          {R4-R10,LR}                                            ; +0x2, 0x57f4be\nADD             R2, PC; __stack_chk_guard_ptr                          ; +0x6, 0x57f4c2\nLDR             R2, [R2]; __stack_chk_guard                            ; +0x8, 0x57f4c4\nSUB             SP, SP, #0x38                                          ; +0xa, 0x57f4c6\nMOV             R5, R0                                                 ; +0xc, 0x57f4c8\nLDR             R3, [R2]                                               ; +0xe, 0x57f4ca\nMOV             R6, R2                                                 ; +0x10, 0x57f4cc\nSTR             R3, [SP,#0x38+var_4]                                   ; +0x12, 0x57f4ce\nLDR.W           R3, [R0,#0x264]                                        ; +0x14, 0x57f4d0\nCMP             R3, #0                                                 ; +0x18, 0x57f4d4\nBEQ.W           loc_57F608                                             ; +0x1a, 0x57f4d6\nADD             R7, SP, #0x38+var_28                                   ; +0x1e, 0x57f4da\nLDR             R1, =(aKerning - 0x57F4E8); \"Kerning: \"                ; +0x20, 0x57f4dc\nMOVS            R2, #9                                                 ; +0x22, 0x57f4de\nMOVS            R3, #0                                                 ; +0x24, 0x57f4e0\nMOV             R0, R7                                                 ; +0x26, 0x57f4e2\nADD             R1, PC; \"Kerning: \"                                    ; +0x28, 0x57f4e4\nSTR             R3, [SP,#0x38+var_28]                                  ; +0x2a, 0x57f4e6\nSTR             R3, [SP,#0x38+var_24]                                  ; +0x2c, 0x57f4e8\nSTR             R3, [SP,#0x38+var_20]                                  ; +0x2e, 0x57f4ea\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x30, 0x57f4ec\nLDR.W           R0, [R5,#0x214]                                        ; +0x34, 0x57f4f0\nLDR             R3, [R0]                                               ; +0x38, 0x57f4f4\nLDR.W           R3, [R3,#0x370]                                        ; +0x3a, 0x57f4f6\nBLX             R3                                                     ; +0x3e, 0x57f4fa\nADD.W           R8, SP, #0x38+var_1C                                   ; +0x40, 0x57f4fc\nMOV             R1, R0; int                                            ; +0x44, 0x57f500\nMOV             R0, R8; this                                           ; +0x46, 0x57f502\nBL              _ZN11GameToolbox11intToStringEi; GameToolbox::intToString(int) ; +0x48, 0x57f504\nLDRB.W          R9, [SP,#0x38+var_1C]                                  ; +0x4c, 0x57f508\nTST.W           R9, #1                                                 ; +0x50, 0x57f50c\nBEQ             loc_57F5F8                                             ; +0x54, 0x57f510\nLDR             R1, [SP,#0x38+var_14]                                  ; +0x56, 0x57f512\nLDR.W           R9, [SP,#0x38+var_18]                                  ; +0x58, 0x57f514\nLDRB.W          R4, [SP,#0x38+var_28]                                  ; +0x5c, 0x57f518\nANDS.W          R2, R4, #1                                             ; +0x60, 0x57f51c\nBEQ             loc_57F602                                             ; +0x64, 0x57f520\nLDR             R3, [SP,#0x38+var_28]                                  ; +0x66, 0x57f522\nLDR             R4, [SP,#0x38+var_24]                                  ; +0x68, 0x57f524\nBIC.W           R3, R3, #1                                             ; +0x6a, 0x57f526\nSUBS            R3, #1                                                 ; +0x6e, 0x57f52a\nSUBS            R0, R3, R4                                             ; +0x70, 0x57f52c\nCMP             R0, R9                                                 ; +0x72, 0x57f52e\nBCC             loc_57F568                                             ; +0x74, 0x57f530\nCMP.W           R9, #0                                                 ; +0x76, 0x57f532\nBEQ             loc_57F584                                             ; +0x7a, 0x57f536\nCBZ             R2, loc_57F540                                         ; +0x7c, 0x57f538\nLDR.W           R10, [SP,#0x38+var_20]                                 ; +0x7e, 0x57f53a\nB               loc_57F544                                             ; +0x82, 0x57f53e\nADD.W           R10, SP, #0x38+var_28+1                                ; +0x84, 0x57f540\nADD.W           R0, R10, R4                                            ; +0x88, 0x57f544\nMOV             R2, R9                                                 ; +0x8c, 0x57f548\nBL              _ZNSt6__ndk111char_traitsIcE4copyEPcPKcj; std::char_traits<char>::copy(char *,char const*,uint) ; +0x8e, 0x57f54a\nLDRB.W          R3, [SP,#0x38+var_28]                                  ; +0x92, 0x57f54e\nADD             R4, R9                                                 ; +0x96, 0x57f552\nLSLS            R1, R3, #0x1F                                          ; +0x98, 0x57f554\nITEE MI                                                                ; +0x9a, 0x57f556\nSTRMI           R4, [SP,#0x38+var_24]                                  ; +0x9c, 0x57f558\nLSLPL           R3, R4, #1                                             ; +0x9e, 0x57f55a\nSTRBPL.W        R3, [SP,#0x38+var_28]                                  ; +0xa0, 0x57f55c\nMOVS            R3, #0                                                 ; +0xa4, 0x57f560\nSTRB.W          R3, [R10,R4]                                           ; +0xa6, 0x57f562\nB               loc_57F584                                             ; +0xaa, 0x57f566\nADD.W           R2, R4, R9                                             ; +0xac, 0x57f568\nMOVS            R0, #0                                                 ; +0xb0, 0x57f56c\nSTR             R1, [SP,#0x38+var_2C]                                  ; +0xb2, 0x57f56e\nSUBS            R2, R2, R3                                             ; +0xb4, 0x57f570\nSTR             R0, [SP,#0x38+var_34]                                  ; +0xb6, 0x57f572\nMOV             R1, R3                                                 ; +0xb8, 0x57f574\nSTR             R4, [SP,#0x38+var_38]                                  ; +0xba, 0x57f576\nMOV             R0, R7                                                 ; +0xbc, 0x57f578\nSTR.W           R9, [SP,#0x38+var_30]                                  ; +0xbe, 0x57f57a\nMOV             R3, R4                                                 ; +0xc2, 0x57f57e\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE21__grow_by_and_replaceEjjjjjjPKc; std::string::__grow_by_and_replace(uint,uint,uint,uint,uint,uint,char const*) ; +0xc4, 0x57f580\nMOV             R0, R8                                                 ; +0xc8, 0x57f584\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xca, 0x57f586\nLDR.W           R3, [R5,#0x264]                                        ; +0xce, 0x57f58a\nLDR.W           R2, [R5,#0x260]                                        ; +0xd2, 0x57f58e\nSTR.W           R2, [R3,#0x178]                                        ; +0xd6, 0x57f592\nLDR.W           R0, [R5,#0x264]                                        ; +0xda, 0x57f596\nLDRB.W          R2, [SP,#0x38+var_28]                                  ; +0xde, 0x57f59a\nLDR             R3, [R0]                                               ; +0xe2, 0x57f59e\nLSLS            R2, R2, #0x1F                                          ; +0xe4, 0x57f5a0\nITE PL                                                                 ; +0xe6, 0x57f5a2\nADDPL.W         R1, SP, #0x38+var_28+1                                 ; +0xe8, 0x57f5a4\nLDRMI           R1, [SP,#0x38+var_20]                                  ; +0xec, 0x57f5a8\nLDR.W           R3, [R3,#0x1D0]                                        ; +0xee, 0x57f5aa\nBLX             R3                                                     ; +0xf2, 0x57f5ae\nLDR.W           R3, [R5,#0x25C]                                        ; +0xf4, 0x57f5b0\nCBZ             R3, loc_57F5DA                                         ; +0xf8, 0x57f5b4\nLDR.W           R2, [R5,#0x260]                                        ; +0xfa, 0x57f5b6\nADD             R4, SP, #0x38+var_10                                   ; +0xfe, 0x57f5ba\nMOV             R0, R4; this                                           ; +0x100, 0x57f5bc\nSTR.W           R2, [R3,#0x200]                                        ; +0x102, 0x57f5be\nLDR.W           R5, [R5,#0x25C]                                        ; +0x106, 0x57f5c2\nMOV             R1, R5                                                 ; +0x10a, 0x57f5c6\nBL              _ZN15CCTextInputNode9getStringEv; CCTextInputNode::getString(void) ; +0x10c, 0x57f5c8\nMOV             R0, R5                                                 ; +0x110, 0x57f5cc\nMOV             R1, R4                                                 ; +0x112, 0x57f5ce\nBL              _ZN15CCTextInputNode9setStringENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE; CCTextInputNode::setString(std::string) ; +0x114, 0x57f5d0\nMOV             R0, R4                                                 ; +0x118, 0x57f5d4\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x11a, 0x57f5d6\nMOV             R0, R7                                                 ; +0x11e, 0x57f5da\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x120, 0x57f5dc\nB               loc_57F608                                             ; +0x124, 0x57f5e0\nMOV             R0, R8                                                 ; +0x126, 0x57f5e2\nB               loc_57F5E8                                             ; +0x128, 0x57f5e4\nMOV             R0, R4                                                 ; +0x12a, 0x57f5e6\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x12c, 0x57f5e8\nB               loc_57F5EE                                             ; +0x130, 0x57f5ec\nMOV             R0, R7                                                 ; +0x132, 0x57f5ee\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x134, 0x57f5f0\nBL              __cxa_end_cleanup                                      ; +0x138, 0x57f5f4\nMOV.W           R9, R9,ASR#1                                           ; +0x13c, 0x57f5f8\nADD.W           R1, SP, #0x38+var_1B                                   ; +0x140, 0x57f5fc\nB               loc_57F518                                             ; +0x144, 0x57f600\nASRS            R4, R4, #1                                             ; +0x146, 0x57f602\nMOVS            R3, #0xA                                               ; +0x148, 0x57f604\nB               loc_57F52C                                             ; +0x14a, 0x57f606\nLDR             R2, [SP,#0x38+var_4]                                   ; +0x14c, 0x57f608\nLDR             R3, [R6]                                               ; +0x14e, 0x57f60a\nCMP             R2, R3                                                 ; +0x150, 0x57f60c\nBEQ             loc_57F614                                             ; +0x152, 0x57f60e\nBLX             __stack_chk_fail                                       ; +0x154, 0x57f610\nADD             SP, SP, #0x38 ; '8'                                    ; +0x158, 0x57f614\nPOP.W           {R4-R10,PC}                                            ; +0x15a, 0x57f616", "xrefs": ["CustomizeObjectLayer::init @ 0x580804", "CustomizeObjectLayer::sliderChanged @ 0x5810ac"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "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"}