{"type": "func", "start": 5368965456, "end": 5368965613, "name": "FontObject::getFontAdvance", "pseudocode": "// \n// FontObject::getFontAdvance from 0x14003e950 to 0x14003e9ed (157 bytes)\n// \n// 2 xrefs:\n// > MultilineBitmapFont::stringWithMaxWidth @ 0x14007afb7\n// > MultilineBitmapFont::stringWithMaxWidth @ 0x14007afee\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:25:28 +0000\n// \n\n__int64 __fastcall FontObject::getFontAdvance(_QWORD *a1, unsigned int a2)\n{\n  __int64 v2; // r8\n  __int64 *v3; // rcx\n  __int64 v4; // rax\n  __int64 v5; // rcx\n\n  v2 = a1[16];\n  v3 = (__int64 *)(a1[18]\n                 + 16\n                 * (a1[21]\n                  & (0x100000001B3LL\n                   * (((unsigned __int64)a2 >> 24)\n                    ^ (0x100000001B3LL\n                     * ((0x100000001B3LL\n                       * (BYTE1(a2) ^ (0x100000001B3LL * ((unsigned __int8)a2 ^ 0xCBF29CE484222325uLL))))\n                      ^ BYTE2(a2)))))));\n  v4 = v3[1];\n  if ( v4 != v2 )\n  {\n    v5 = *v3;\n    if ( a2 == *(_DWORD *)(v4 + 16) )\n      goto LABEL_7;\n    while ( v4 != v5 )\n    {\n      v4 = *(_QWORD *)(v4 + 8);\n      if ( a2 == *(_DWORD *)(v4 + 16) )\n        goto LABEL_7;\n    }\n  }\n  v4 = 0;\nLABEL_7:\n  if ( !v4 )\n    v4 = v2;\n  if ( v4 == v2 )\n    return 0;\n  else\n    return *(unsigned int *)(v4 + 20);\n}", "assembly": "; \n; FontObject::getFontAdvance from 0x14003e950 to 0x14003e9ed (157 bytes)\n; \n; 2 xrefs:\n; > MultilineBitmapFont::stringWithMaxWidth @ 0x14007afb7\n; > MultilineBitmapFont::stringWithMaxWidth @ 0x14007afee\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:25:28 +0000\n; \nmov     r10, rcx                                                       ; +0x0, 0x14003e950\nmovzx   r9d, dl                                                        ; +0x3, 0x14003e953\nmov     r11, 100000001B3h                                              ; +0x7, 0x14003e957\nmov     rax, 0CBF29CE484222325h                                        ; +0x11, 0x14003e961\nxor     r9, rax                                                        ; +0x1b, 0x14003e96b\nmov     eax, edx                                                       ; +0x1e, 0x14003e96e\nshr     eax, 8                                                         ; +0x20, 0x14003e970\nmovzx   r8d, al                                                        ; +0x23, 0x14003e973\nmov     eax, edx                                                       ; +0x27, 0x14003e977\nshr     eax, 10h                                                       ; +0x29, 0x14003e979\nmovzx   ecx, al                                                        ; +0x2c, 0x14003e97c\nimul    r9, r11                                                        ; +0x2f, 0x14003e97f\nmov     eax, edx                                                       ; +0x33, 0x14003e983\nxor     r9, r8                                                         ; +0x35, 0x14003e985\nshr     rax, 18h                                                       ; +0x38, 0x14003e988\nmov     r8, [r10+80h]                                                  ; +0x3c, 0x14003e98c\nimul    r9, r11                                                        ; +0x43, 0x14003e993\nxor     rcx, r9                                                        ; +0x47, 0x14003e997\nimul    rcx, r11                                                       ; +0x4a, 0x14003e99a\nxor     rcx, rax                                                       ; +0x4e, 0x14003e99e\nimul    rcx, r11                                                       ; +0x51, 0x14003e9a1\nand     rcx, [r10+0A8h]                                                ; +0x55, 0x14003e9a5\nshl     rcx, 4                                                         ; +0x5c, 0x14003e9ac\nadd     rcx, [r10+90h]                                                 ; +0x60, 0x14003e9b0\nmov     rax, [rcx+8]                                                   ; +0x67, 0x14003e9b7\ncmp     rax, r8                                                        ; +0x6b, 0x14003e9bb\njz      short loc_14003E9D8                                            ; +0x6e, 0x14003e9be\nmov     rcx, [rcx]                                                     ; +0x70, 0x14003e9c0\ncmp     edx, [rax+10h]                                                 ; +0x73, 0x14003e9c3\njz      short loc_14003E9DA                                            ; +0x76, 0x14003e9c6\ncmp     rax, rcx                                                       ; +0x78, 0x14003e9c8\njz      short loc_14003E9D8                                            ; +0x7b, 0x14003e9cb\nmov     rax, [rax+8]                                                   ; +0x7d, 0x14003e9cd\ncmp     edx, [rax+10h]                                                 ; +0x81, 0x14003e9d1\njnz     short loc_14003E9C8                                            ; +0x84, 0x14003e9d4\njmp     short loc_14003E9DA                                            ; +0x86, 0x14003e9d6\nxor     eax, eax                                                       ; +0x88, 0x14003e9d8\ntest    rax, rax                                                       ; +0x8a, 0x14003e9da\ncmovz   rax, r8                                                        ; +0x8d, 0x14003e9dd\ncmp     rax, r8                                                        ; +0x91, 0x14003e9e1\njnz     short loc_14003E9E9                                            ; +0x94, 0x14003e9e4\nxor     eax, eax                                                       ; +0x96, 0x14003e9e6\nretn                                                                   ; +0x98, 0x14003e9e8\nmov     eax, [rax+14h]                                                 ; +0x99, 0x14003e9e9\nretn                                                                   ; +0x9c, 0x14003e9ec", "xrefs": ["MultilineBitmapFont::stringWithMaxWidth @ 0x14007afb7", "MultilineBitmapFont::stringWithMaxWidth @ 0x14007afee"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}