// // sub_10073EB90 from 0x10073eb90 to 0x10073ed7c (492 bytes) // // 2 xrefs: // > sub_10073EF70 @ 0x10073f025 // > cocos2d::cc_utf8_to_utf16 @ 0x10073fdcd // // 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:36:28 +0000 // __int64 __fastcall sub_10073EB90(char **a1, unsigned __int64 a2, _WORD **a3, unsigned __int64 a4, int a5) { char *v5; // r15 _WORD *v6; // r12 __int64 v7; // rbx signed __int64 v8; // r13 unsigned int v9; // r14d bool v10; // cl __int64 result; // rax int v12; // ecx int v13; // edx int v14; // edx int v15; // edx int v16; // edx unsigned int v17; // ecx unsigned __int64 v18; // [rsp+0h] [rbp-50h] v5 = *a1; v6 = *a3; if ( (unsigned __int64)*a1 < a2 ) { v18 = a2; while ( 1 ) { v7 = (unsigned __int8)*v5; v8 = (unsigned __int16)byte_100A12710[v7]; if ( (__int64)(a2 - (_QWORD)v5) <= v8 ) { result = 1; goto LABEL_25; } v9 = v8 + 1; v10 = sub_10073E970(v5, (int)v8 + 1); result = 3; if ( !v10 ) goto LABEL_25; v12 = 0; switch ( (char)v8 ) { case 0: v13 = (unsigned __int8)v8; goto LABEL_14; case 1: goto LABEL_13; case 2: goto LABEL_12; case 3: goto LABEL_11; case 4: goto LABEL_10; case 5: v12 = (_DWORD)v7 << 6; LOBYTE(v7) = *++v5; LABEL_10: v14 = v12 + (unsigned __int8)v7; LOBYTE(v7) = *++v5; v12 = v14 << 6; LABEL_11: v15 = v12 + (unsigned __int8)v7; LOBYTE(v7) = *++v5; v12 = v15 << 6; LABEL_12: v16 = v12 + (unsigned __int8)v7; LOBYTE(v7) = *++v5; v12 = v16 << 6; LABEL_13: v13 = (v12 + (unsigned __int8)v7) << 6; LOBYTE(v7) = *++v5; LABEL_14: ++v5; v12 = v13 + (unsigned __int8)v7; break; default: break; } if ( (unsigned __int64)v6 >= a4 ) { LABEL_26: v5 -= v9; result = 2; goto LABEL_25; } v17 = v12 - dword_100A12810[v8]; if ( v17 > 0xFFFF ) { if ( v17 >= 0x110000 ) goto LABEL_20; if ( (unsigned __int64)(v6 + 1) >= a4 ) goto LABEL_26; *v6 = ((v17 + 67043328) >> 10) - 10240; v6[1] = v17 & 0x3FF | 0xDC00; v6 += 2; a2 = v18; if ( (unsigned __int64)v5 >= v18 ) break; } else { if ( (v17 & 0xF800) != 0xD800 ) { *v6 = v17; goto LABEL_4; } LABEL_20: if ( !a5 ) { v5 -= v9; goto LABEL_25; } *v6 = -3; LABEL_4: ++v6; a2 = v18; if ( (unsigned __int64)v5 >= v18 ) break; } } } result = 0; LABEL_25: *a1 = v5; *a3 = v6; return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source