{"type": "func", "start": 6443690544, "end": 6443690678, "name": "unknown_libname_51", "pseudocode": "// \n// unknown_libname_51 from 0x18012ea30 to 0x18012eab6 (134 bytes)\n// \n// 2 xrefs:\n// > sub_18012D5FC @ 0x18012d716\n// > <???> @ 0x180202d14\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_51(__int64 a1)\n{\n  _QWORD *v2; // rdi\n  __int64 v4; // rax\n  __int64 v5; // rax\n  __int64 v6; // rax\n\n  *(_QWORD *)(a1 + 32) += 8LL;\n  v2 = *(_QWORD **)(*(_QWORD *)(a1 + 32) - 8LL);\n  if ( !get_printf_count_output() )\n    goto LABEL_2;\n  v4 = __crt_stdio_output::to_integer_size(*(_DWORD *)(a1 + 60)) - 1;\n  if ( v4 )\n  {\n    v5 = v4 - 1;\n    if ( v5 )\n    {\n      v6 = v5 - 2;\n      if ( v6 )\n      {\n        if ( v6 != 4 )\n        {\nLABEL_2:\n          *errno() = 22;\n          invalid_parameter_noinfo();\n          return 0;\n        }\n        *v2 = *(int *)(a1 + 40);\n      }\n      else\n      {\n        *(_DWORD *)v2 = *(_DWORD *)(a1 + 40);\n      }\n    }\n    else\n    {\n      *(_WORD *)v2 = *(_WORD *)(a1 + 40);\n    }\n  }\n  else\n  {\n    *(_BYTE *)v2 = *(_BYTE *)(a1 + 40);\n  }\n  *(_BYTE *)(a1 + 64) = 1;\n  return 1;\n}", "assembly": "; \n; unknown_libname_51 from 0x18012ea30 to 0x18012eab6 (134 bytes)\n; \n; 2 xrefs:\n; > sub_18012D5FC @ 0x18012d716\n; > <???> @ 0x180202d14\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_0], rbx                                               ; +0x0, 0x18012ea30\npush    rdi                                                            ; +0x5, 0x18012ea35\nsub     rsp, 20h                                                       ; +0x6, 0x18012ea36\nadd     qword ptr [rcx+20h], 8                                         ; +0xa, 0x18012ea3a\nmov     rbx, rcx                                                       ; +0xf, 0x18012ea3f\nmov     rax, [rcx+20h]                                                 ; +0x12, 0x18012ea42\nmov     rdi, [rax-8]                                                   ; +0x16, 0x18012ea46\ncall    _get_printf_count_output                                       ; +0x1a, 0x18012ea4a\ntest    eax, eax                                                       ; +0x1f, 0x18012ea4f\njnz     short loc_18012EA67                                            ; +0x21, 0x18012ea51\ncall    _errno                                                         ; +0x23, 0x18012ea53\nmov     dword ptr [rax], 16h                                           ; +0x28, 0x18012ea58\ncall    _invalid_parameter_noinfo                                      ; +0x2e, 0x18012ea5e\nxor     al, al                                                         ; +0x33, 0x18012ea63\njmp     short loc_18012EAAB                                            ; +0x35, 0x18012ea65\nmov     ecx, [rbx+3Ch]                                                 ; +0x37, 0x18012ea67\ncall    ?to_integer_size@__crt_stdio_output@@YA_KW4length_modifier@1@@Z ; +0x3a, 0x18012ea6a\nsub     rax, 1                                                         ; +0x3f, 0x18012ea6f\njz      short loc_18012EAA0                                            ; +0x43, 0x18012ea73\nsub     rax, 1                                                         ; +0x45, 0x18012ea75\njz      short loc_18012EA97                                            ; +0x49, 0x18012ea79\nsub     rax, 2                                                         ; +0x4b, 0x18012ea7b\njz      short loc_18012EA90                                            ; +0x4f, 0x18012ea7f\ncmp     rax, 4                                                         ; +0x51, 0x18012ea81\njnz     short loc_18012EA53                                            ; +0x55, 0x18012ea85\nmovsxd  rax, dword ptr [rbx+28h]                                       ; +0x57, 0x18012ea87\nmov     [rdi], rax                                                     ; +0x5b, 0x18012ea8b\njmp     short loc_18012EAA5                                            ; +0x5e, 0x18012ea8e\nmov     eax, [rbx+28h]                                                 ; +0x60, 0x18012ea90\nmov     [rdi], eax                                                     ; +0x63, 0x18012ea93\njmp     short loc_18012EAA5                                            ; +0x65, 0x18012ea95\nmovzx   eax, word ptr [rbx+28h]                                        ; +0x67, 0x18012ea97\nmov     [rdi], ax                                                      ; +0x6b, 0x18012ea9b\njmp     short loc_18012EAA5                                            ; +0x6e, 0x18012ea9e\nmov     al, [rbx+28h]                                                  ; +0x70, 0x18012eaa0\nmov     [rdi], al                                                      ; +0x73, 0x18012eaa3\nmov     byte ptr [rbx+40h], 1                                          ; +0x75, 0x18012eaa5\nmov     al, 1                                                          ; +0x79, 0x18012eaa9\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x7b, 0x18012eaab\nadd     rsp, 20h                                                       ; +0x80, 0x18012eab0\npop     rdi                                                            ; +0x84, 0x18012eab4\nretn                                                                   ; +0x85, 0x18012eab5", "xrefs": ["sub_18012D5FC @ 0x18012d716", "<???> @ 0x180202d14"], "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"}