// // _configure_narrow_argv from 0x180131cac to 0x180131e32 (390 bytes) // // 2 xrefs: // > __scrt_dllmain_after_initialize_c @ 0x1801204fb // > @ 0x180202f54 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // errno_t __cdecl configure_narrow_argv(_crt_argv_mode mode) { errno_t v1; // edi errno_t v3; // ebx char *v4; // rsi unsigned __int64 v5; // r15 _QWORD *buffer_for_argv; // rax void *v7; // rbx void *v8; // rcx errno_t v9; // esi void *v10; // rdx int v11; // ecx _QWORD *i; // rax void *Block; // [rsp+68h] [rbp+38h] BYREF unsigned __int64 v15; // [rsp+70h] [rbp+40h] BYREF unsigned __int64 v16; // [rsp+78h] [rbp+48h] BYREF v1 = 0; if ( mode ) { if ( (unsigned int)(mode - 1) <= 1 ) { _acrt_initialize_multibyte(); _acrt_GetModuleFileNameA(0, &unk_1801F4BF0, 260); v4 = (char *)qword_1801F5600; qword_1801F55E0 = (__int64)&unk_1801F4BF0; if ( !qword_1801F5600 || !*(_BYTE *)qword_1801F5600 ) v4 = (char *)&unk_1801F4BF0; v15 = 0; v16 = 0; parse_command_line(v4, nullptr, nullptr, &v15, &v16); v5 = v15; buffer_for_argv = _acrt_allocate_buffer_for_argv(v15, v16, 1u); v7 = buffer_for_argv; if ( buffer_for_argv ) { parse_command_line(v4, buffer_for_argv, &buffer_for_argv[v5], &v15, &v16); if ( mode == _crt_argv_unexpanded_arguments ) { qword_1801F55F0 = v7; dword_1801F55E8 = v15 - 1; v8 = nullptr; } else { Block = nullptr; v9 = common_expand_argv_wildcards(v7, &Block); if ( v9 ) { free_base(Block); Block = nullptr; free_base(v7); return v9; } v10 = Block; v11 = 0; for ( i = Block; *i; ++v11 ) ++i; dword_1801F55E8 = v11; Block = nullptr; qword_1801F55F0 = v10; free_base(nullptr); v8 = v7; Block = nullptr; } free_base(v8); return v1; } v3 = 12; *errno() = 12; free_base(nullptr); } else { v3 = 22; *errno() = 22; invalid_parameter_noinfo(); } return v3; } return v1; }