{"type": "func", "start": 6443688704, "end": 6443688901, "name": "unknown_libname_47", "pseudocode": "// \n// unknown_libname_47 from 0x18012e300 to 0x18012e3c5 (197 bytes)\n// \n// 2 xrefs:\n// > sub_18012D394 @ 0x18012d407\n// > <???> @ 0x180202cc0\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\n// Microsoft VisualC 64bit universal runtime\nchar __fastcall unknown_libname_47(__int64 a1)\n{\n  int v2; // ecx\n  int v3; // ecx\n  bool v4; // al\n  char *v5; // rdx\n  size_t v6; // r8\n  _BYTE *v7; // r8\n  char result; // al\n  __int64 v9; // rdx\n\n  v2 = *(_DWORD *)(a1 + 60) - 2;\n  if ( !v2 )\n  {\n    v4 = 0;\nLABEL_7:\n    if ( v4 )\n    {\nLABEL_8:\n      *(_QWORD *)(a1 + 32) += 8LL;\n      v5 = *(char **)(a1 + 1120);\n      if ( v5 )\n      {\n        v6 = *(_QWORD *)(a1 + 1112) >> 1;\n      }\n      else\n      {\n        v6 = 512;\n        v5 = (char *)(a1 + 88);\n      }\n      if ( wctomb_s_l((int *)(a1 + 80), v5, v6, *(_WORD *)(*(_QWORD *)(a1 + 32) - 8LL), *(_locale_t *)(a1 + 8)) )\n        *(_BYTE *)(a1 + 64) = 1;\n      goto LABEL_16;\n    }\n    goto LABEL_13;\n  }\n  v3 = v2 - 1;\n  if ( !v3 || v3 == 9 )\n    goto LABEL_8;\n  if ( *(_DWORD *)(a1 + 60) != 13 )\n  {\n    v4 = ((*(_BYTE *)(a1 + 65) - 99) & 0xEF) != 0;\n    goto LABEL_7;\n  }\nLABEL_13:\n  v7 = *(_BYTE **)(a1 + 1120);\n  if ( !v7 )\n    v7 = (_BYTE *)(a1 + 88);\n  *(_QWORD *)(a1 + 32) += 8LL;\n  *v7 = *(_BYTE *)(*(_QWORD *)(a1 + 32) - 8LL);\n  *(_DWORD *)(a1 + 80) = 1;\nLABEL_16:\n  result = 1;\n  v9 = *(_QWORD *)(a1 + 1120);\n  if ( !v9 )\n    v9 = a1 + 88;\n  *(_QWORD *)(a1 + 72) = v9;\n  return result;\n}", "assembly": "; \n; unknown_libname_47 from 0x18012e300 to 0x18012e3c5 (197 bytes)\n; \n; 2 xrefs:\n; > sub_18012D394 @ 0x18012d407\n; > <???> @ 0x180202cc0\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    rbx                                                            ; +0x0, 0x18012e300\nsub     rsp, 30h                                                       ; +0x2, 0x18012e302\nmov     rbx, rcx                                                       ; +0x6, 0x18012e306\nmov     ecx, [rcx+3Ch]                                                 ; +0x9, 0x18012e309\nsub     ecx, 2                                                         ; +0xc, 0x18012e30c\njz      short loc_18012E32D                                            ; +0xf, 0x18012e30f\nsub     ecx, 1                                                         ; +0x11, 0x18012e311\njz      short loc_18012E333                                            ; +0x14, 0x18012e314\ncmp     ecx, 9                                                         ; +0x16, 0x18012e316\njz      short loc_18012E333                                            ; +0x19, 0x18012e319\ncmp     dword ptr [rbx+3Ch], 0Dh                                       ; +0x1b, 0x18012e31b\njz      short loc_18012E37F                                            ; +0x1f, 0x18012e31f\nmov     al, [rbx+41h]                                                  ; +0x21, 0x18012e321\nsub     al, 63h ; 'c'                                                  ; +0x24, 0x18012e324\ntest    al, 0EFh                                                       ; +0x26, 0x18012e326\nsetnz   al                                                             ; +0x28, 0x18012e328\njmp     short loc_18012E32F                                            ; +0x2b, 0x18012e32b\nxor     al, al                                                         ; +0x2d, 0x18012e32d\ntest    al, al                                                         ; +0x2f, 0x18012e32f\njz      short loc_18012E37F                                            ; +0x31, 0x18012e331\nadd     qword ptr [rbx+20h], 8                                         ; +0x33, 0x18012e333\nmov     rax, [rbx+20h]                                                 ; +0x38, 0x18012e338\nmov     rdx, [rbx+460h]; MbCh                                          ; +0x3c, 0x18012e33c\nmovzx   r9d, word ptr [rax-8]; WCh                                     ; +0x43, 0x18012e343\ntest    rdx, rdx                                                       ; +0x48, 0x18012e348\njnz     short loc_18012E359                                            ; +0x4b, 0x18012e34b\nmov     r8d, 200h                                                      ; +0x4d, 0x18012e34d\nlea     rdx, [rbx+58h]                                                 ; +0x53, 0x18012e353\njmp     short loc_18012E363                                            ; +0x57, 0x18012e357\nmov     r8, [rbx+458h]                                                 ; +0x59, 0x18012e359\nshr     r8, 1; SizeInBytes                                             ; +0x60, 0x18012e360\nmov     rax, [rbx+8]                                                   ; +0x63, 0x18012e363\nlea     rcx, [rbx+50h]; SizeConverted                                  ; +0x67, 0x18012e367\nmov     [rsp+38h+Locale], rax; Locale                                  ; +0x6b, 0x18012e36b\ncall    _wctomb_s_l                                                    ; +0x70, 0x18012e370\ntest    eax, eax                                                       ; +0x75, 0x18012e375\njz      short loc_18012E3A7                                            ; +0x77, 0x18012e377\nmov     byte ptr [rbx+40h], 1                                          ; +0x79, 0x18012e379\njmp     short loc_18012E3A7                                            ; +0x7d, 0x18012e37d\nlea     rax, [rbx+58h]                                                 ; +0x7f, 0x18012e37f\nmov     r8, [rax+408h]                                                 ; +0x83, 0x18012e383\ntest    r8, r8                                                         ; +0x8a, 0x18012e38a\ncmovz   r8, rax                                                        ; +0x8d, 0x18012e38d\nadd     qword ptr [rbx+20h], 8                                         ; +0x91, 0x18012e391\nmov     rcx, [rbx+20h]                                                 ; +0x96, 0x18012e396\nmov     dl, [rcx-8]                                                    ; +0x9a, 0x18012e39a\nmov     [r8], dl                                                       ; +0x9d, 0x18012e39d\nmov     dword ptr [rbx+50h], 1                                         ; +0xa0, 0x18012e3a0\nlea     rcx, [rbx+58h]                                                 ; +0xa7, 0x18012e3a7\nmov     al, 1                                                          ; +0xab, 0x18012e3ab\nmov     rdx, [rcx+408h]                                                ; +0xad, 0x18012e3ad\ntest    rdx, rdx                                                       ; +0xb4, 0x18012e3b4\ncmovz   rdx, rcx                                                       ; +0xb7, 0x18012e3b7\nmov     [rbx+48h], rdx                                                 ; +0xbb, 0x18012e3bb\nadd     rsp, 30h                                                       ; +0xbf, 0x18012e3bf\npop     rbx                                                            ; +0xc3, 0x18012e3c3\nretn                                                                   ; +0xc4, 0x18012e3c4", "xrefs": ["sub_18012D394 @ 0x18012d407", "<???> @ 0x180202cc0"], "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"}