{"type": "func", "start": 6443691848, "end": 6443692078, "name": "unknown_libname_58", "pseudocode": "// \n// unknown_libname_58 from 0x18012ef48 to 0x18012f02e (230 bytes)\n// \n// 2 xrefs:\n// > __multtenpow12 @ 0x18012db4e\n// > <???> @ 0x180202d68\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_58(__int64 a1)\n{\n  const char *v2; // rsi\n  int v3; // edi\n  __crt_locale_pointers *v4; // r9\n  int v5; // eax\n  __int64 v6; // rcx\n  wchar_t v7; // dx\n  wchar_t DstCh; // [rsp+40h] [rbp+8h] BYREF\n\n  if ( *(_BYTE *)(a1 + 84) || *(int *)(a1 + 80) <= 0 )\n  {\n    unknown_libname_60(a1 + 1128, *(_QWORD *)(a1 + 72), *(unsigned int *)(a1 + 80), a1 + 40, a1 + 16);\n  }\n  else\n  {\n    v2 = *(const char **)(a1 + 72);\n    v3 = 0;\n    while ( 1 )\n    {\n      v4 = *(__crt_locale_pointers **)(a1 + 8);\n      DstCh = 0;\n      v5 = mbtowc_l(&DstCh, v2, *((int *)v4->locinfo + 2), v4);\n      if ( v5 <= 0 )\n        break;\n      v6 = *(_QWORD *)(a1 + 1128);\n      v7 = DstCh;\n      if ( *(_QWORD *)(v6 + 16) == *(_QWORD *)(v6 + 8) )\n      {\n        if ( *(_BYTE *)(v6 + 24) )\n          ++*(_DWORD *)(a1 + 40);\n        else\n          *(_DWORD *)(a1 + 40) = -1;\n      }\n      else\n      {\n        ++*(_DWORD *)(a1 + 40);\n        ++*(_QWORD *)(v6 + 16);\n        ***(_WORD ***)(a1 + 1128) = v7;\n        **(_QWORD **)(a1 + 1128) += 2LL;\n      }\n      v2 += v5;\n      if ( ++v3 == *(_DWORD *)(a1 + 80) )\n        return 1;\n    }\n    *(_DWORD *)(a1 + 40) = -1;\n  }\n  return 1;\n}", "assembly": "; \n; unknown_libname_58 from 0x18012ef48 to 0x18012f02e (230 bytes)\n; \n; 2 xrefs:\n; > __multtenpow12 @ 0x18012db4e\n; > <???> @ 0x180202d68\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x18012ef48\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x18012ef4d\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x18012ef52\npush    rdi                                                            ; +0xf, 0x18012ef57\nsub     rsp, 30h                                                       ; +0x10, 0x18012ef58\nxor     ebp, ebp                                                       ; +0x14, 0x18012ef5c\nmov     rbx, rcx                                                       ; +0x16, 0x18012ef5e\ncmp     [rcx+54h], bpl                                                 ; +0x19, 0x18012ef61\njnz     loc_18012EFF6                                                  ; +0x1d, 0x18012ef65\ncmp     [rcx+50h], ebp                                                 ; +0x23, 0x18012ef6b\njle     loc_18012EFF6                                                  ; +0x26, 0x18012ef6e\nmov     rsi, [rcx+48h]                                                 ; +0x2c, 0x18012ef74\nmov     edi, ebp                                                       ; +0x30, 0x18012ef78\nmov     r9, [rbx+8]; Locale                                            ; +0x32, 0x18012ef7a\nlea     rcx, [rsp+38h+DstCh]; DstCh                                    ; +0x36, 0x18012ef7e\nmov     [rsp+38h+DstCh], bp                                            ; +0x3b, 0x18012ef83\nmov     rdx, rsi; SrcCh                                                ; +0x40, 0x18012ef88\nmov     rax, [r9]                                                      ; +0x43, 0x18012ef8b\nmovsxd  r8, dword ptr [rax+8]; SrcSizeInBytes                          ; +0x46, 0x18012ef8e\ncall    _mbtowc_l                                                      ; +0x4a, 0x18012ef92\nmovsxd  r8, eax                                                        ; +0x4f, 0x18012ef97\ntest    eax, eax                                                       ; +0x52, 0x18012ef9a\njle     short loc_18012EFF0                                            ; +0x54, 0x18012ef9c\nmov     rcx, [rbx+468h]                                                ; +0x56, 0x18012ef9e\nmovzx   edx, [rsp+38h+DstCh]                                           ; +0x5d, 0x18012efa5\nmov     rax, [rcx+8]                                                   ; +0x62, 0x18012efaa\ncmp     [rcx+10h], rax                                                 ; +0x66, 0x18012efae\njnz     short loc_18012EFC5                                            ; +0x6a, 0x18012efb2\ncmp     [rcx+18h], bpl                                                 ; +0x6c, 0x18012efb4\njz      short loc_18012EFBF                                            ; +0x70, 0x18012efb8\ninc     dword ptr [rbx+28h]                                            ; +0x72, 0x18012efba\njmp     short loc_18012EFE4                                            ; +0x75, 0x18012efbd\nor      dword ptr [rbx+28h], 0FFFFFFFFh                                ; +0x77, 0x18012efbf\njmp     short loc_18012EFE4                                            ; +0x7b, 0x18012efc3\ninc     dword ptr [rbx+28h]                                            ; +0x7d, 0x18012efc5\ninc     qword ptr [rcx+10h]                                            ; +0x80, 0x18012efc8\nmov     rax, [rbx+468h]                                                ; +0x84, 0x18012efcc\nmov     rcx, [rax]                                                     ; +0x8b, 0x18012efd3\nmov     [rcx], dx                                                      ; +0x8e, 0x18012efd6\nmov     rax, [rbx+468h]                                                ; +0x91, 0x18012efd9\nadd     qword ptr [rax], 2                                             ; +0x98, 0x18012efe0\nadd     rsi, r8                                                        ; +0x9c, 0x18012efe4\ninc     edi                                                            ; +0x9f, 0x18012efe7\ncmp     edi, [rbx+50h]                                                 ; +0xa1, 0x18012efe9\njnz     short loc_18012EF7A                                            ; +0xa4, 0x18012efec\njmp     short loc_18012F017                                            ; +0xa6, 0x18012efee\nor      dword ptr [rbx+28h], 0FFFFFFFFh                                ; +0xa8, 0x18012eff0\njmp     short loc_18012F017                                            ; +0xac, 0x18012eff4\nmov     r8d, [rbx+50h]                                                 ; +0xae, 0x18012eff6\nlea     rax, [rcx+10h]                                                 ; +0xb2, 0x18012effa\nmov     rdx, [rbx+48h]                                                 ; +0xb6, 0x18012effe\nlea     r9, [rcx+28h]                                                  ; +0xba, 0x18012f002\nadd     rcx, 468h                                                      ; +0xbe, 0x18012f006\nmov     [rsp+38h+var_18], rax                                          ; +0xc5, 0x18012f00d\ncall    unknown_libname_60; Microsoft VisualC 64bit universal runtime  ; +0xca, 0x18012f012\nmov     rbx, [rsp+38h+arg_8]                                           ; +0xcf, 0x18012f017\nmov     al, 1                                                          ; +0xd4, 0x18012f01c\nmov     rbp, [rsp+38h+arg_10]                                          ; +0xd6, 0x18012f01e\nmov     rsi, [rsp+38h+arg_18]                                          ; +0xdb, 0x18012f023\nadd     rsp, 30h                                                       ; +0xe0, 0x18012f028\npop     rdi                                                            ; +0xe4, 0x18012f02c\nretn                                                                   ; +0xe5, 0x18012f02d", "xrefs": ["__multtenpow12 @ 0x18012db4e", "<???> @ 0x180202d68"], "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"}