// // sub_100904730 from 0x100904730 to 0x100904a40 (784 bytes) // // 2 xrefs: // > CCTextInputNode::insertAtCursor @ 0x100067137 // > CCTextInputNode::onTextFieldInsertText @ 0x10006a086 // // This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 12:38:04 +0000 // std::string *__fastcall sub_100904730(std::string *a1, std::string *a2) { unsigned int v3; // esi std::string::size_type size; // rsi unsigned int v5; // r14d unsigned __int8 *data; // r15 unsigned __int64 v7; // r14 std::string::size_type v8; // r12 int v9; // ecx char v10; // dl int v11; // edi unsigned int v12; // eax char v13; // si std::string::size_type v14; // r13 unsigned __int64 v15; // rbx unsigned int v16; // eax bool v17; // cl __int64 v18; // rdx char *v19; // rcx std::string *__str; // [rsp+0h] [rbp-40h] std::string::value_type *__s; // [rsp+8h] [rbp-38h] *(_OWORD *)&a1->__r_.__value_.__l.0 = 0; a1->__r_.__value_.__r.__words[2] = 0; v3 = (unsigned int)a2->__r_.__value_.__l.0; if ( (v3 & 1) != 0 ) size = a2->__r_.__value_.__l.__size_; else size = v3 >> 1; std::string::reserve(a1, size); v5 = (unsigned int)a2->__r_.__value_.__l.0; __str = a2; if ( (v5 & 1) != 0 ) { data = (unsigned __int8 *)a2->__r_.__value_.__l.__data_; v7 = a2->__r_.__value_.__l.__size_; if ( !v7 ) return a1; goto LABEL_8; } data = (unsigned __int8 *)a2->__r_.__value_.__s.__data_; v7 = v5 >> 1; if ( v7 ) { LABEL_8: v8 = 0; while ( 1 ) { v9 = data[v8]; v10 = 1; v11 = 7; if ( (v9 & 0x80u) == 0 ) break; if ( (v9 & 0xFFFFFFE0) == 0xC0 ) { v12 = 2; LABEL_15: v13 = 0; v14 = v12; v15 = v8 + v12; if ( v15 > v7 ) goto LABEL_16; goto LABEL_19; } if ( (v9 & 0xFFFFFFF0) != 0xE0 ) { if ( (v9 & 0xFFFFFFF8) != 0xF0 ) { LABEL_16: std::string::push_back(a1, v9); v15 = v8 + 1; goto LABEL_10; } v12 = 4; v10 = 0; goto LABEL_15; } v13 = 1; v11 = 15; v10 = 0; v14 = 3; v15 = v8 + 3; if ( v8 + 3 > v7 ) goto LABEL_16; LABEL_19: v16 = data[v8]; if ( v14 != 1 ) { if ( (_DWORD)v14 != 2 ) { v16 = v9 & v11; if ( (v9 & 0x80u) == 0 ) goto LABEL_39; goto LABEL_25; } v16 = v9 & 0x1F; } if ( (v9 & 0x80u) == 0 ) goto LABEL_39; LABEL_25: v16 = (v16 << 6) | data[v8 + 1] & 0x3F; if ( !v10 ) { v16 = (v16 << 6) | data[v8 + 2] & 0x3F; if ( !v13 ) v16 = (v16 << 6) | data[v8 + 3] & 0x3F; } if ( v15 + 7 > v7 || v16 != 128565 ) goto LABEL_39; v17 = data[v15] == 0xE2; if ( data[v15] == 0xE2 ) { v17 = data[v15 + 1] == 0x80; if ( data[v15 + 1] == 0x80 ) { v17 = data[v15 + 2] == 0x8D; if ( data[v15 + 2] == 0x8D ) { v17 = data[v15 + 3] == 0xF0; if ( data[v15 + 3] == 0xF0 ) { v17 = data[v15 + 4] == 0x9F; if ( data[v15 + 4] == 0x9F ) { v17 = data[v15 + 5] == 0x92; if ( data[v15 + 5] == 0x92 ) v17 = data[v15 + 6] == 0xAB; } } } } } if ( !v17 ) { LABEL_39: if ( v16 - 65038 >= 2 && v16 != 8205 && v16 != 8419 && v16 - 127995 >= 5 ) { if ( v16 < 0x2000 ) goto LABEL_9; __s = "clock"; if ( v16 - 128336 < 0x18 ) goto LABEL_58; v18 = 188; v19 = (char *)&unk_100BBCD80; while ( 1 ) { if ( *((_DWORD *)v19 - 8) == v16 ) { v19 -= 32; goto LABEL_57; } if ( *((_DWORD *)v19 - 4) == v16 ) { v19 -= 16; goto LABEL_57; } if ( *(_DWORD *)v19 == v16 ) goto LABEL_57; if ( *((_DWORD *)v19 + 4) == v16 ) break; v19 += 64; v18 -= 4; if ( !v18 ) goto LABEL_9; } v19 += 16; LABEL_57: __s = *((std::string::value_type **)v19 + 1); if ( __s ) { LABEL_58: std::string::push_back(a1, 58); std::string::append(a1, __s); std::string::push_back(a1, 58); } else { LABEL_9: std::string::append(a1, __str, v8, v14); } } goto LABEL_10; } std::string::append(a1, ":dizzy:"); v15 = v8 + v14 + 7; LABEL_10: v8 = v15; if ( v15 >= v7 ) return a1; } v12 = 1; goto LABEL_15; } return a1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source