Function at 0x1401840
Capabilities:
Accept command line arguments
Check mutex and terminate process on windows
Check mutex on windows
Initialize winsock library
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x304
mov eax, dword [0x1408024]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push str.ValveHalfLifeLauncherMutex
xor ebx, ebx
push ebx
push ebx
mov dword [ebp - 0x304], eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
push ebx
push eax
mov dword [ebp - 0x300], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, ebx
je 0x14018af
cmp eax, 0x80
je 0x14018af
push 0x10
push str.Error
push str.Could_not_launch_game._nOnly_one_instance_of_this_game_can_be_run_at_a_time.
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.01404641
mov esp, ebp
pop ebp
ret 0x10
lea ecx, [ebp - 0x2d8]
push ecx
push 2
call sub.WS2_32.dll_WSAStartup
mov edx, dword [vtable.CRegistry.0]
mov eax, dword [edx]
mov ecx, 0x14080d4
call eax
mov esi, dword [vtable.CCommandLine.0]
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edx, dword [esi]
push eax
mov ecx, 0x14080cc
call edx
push 0x100
lea eax, [ebp - 0x104]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x104]
push 0x5c
push ecx
call dword [sym.imp.msvcrt.dll_strrchr]
mov esi, eax
add esi, 1
push str.hl.exe
push esi
call dword [sym.imp.msvcrt.dll__stricmp]
add esp, 0x10
test eax, eax
je 0x1401967
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 8]
push ebx
push str._game
mov ecx, 0x14080cc
call eax
test eax, eax
jne 0x1401967
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x1401942
sub eax, edx
mov byte [eax + esi - 4], bl
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0x10]
push esi
push str._game
mov ecx, 0x14080cc
call eax
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 8]
lea ecx, [ebp - 0x2e4]
push ecx
push str._game
mov ecx, 0x14080cc
call eax
mov ecx, dword [ebp - 0x2e4]
mov esi, 0x34084dc
sub esi, ecx
mov dl, byte [ecx]
mov byte [ecx + esi], dl
add ecx, 1
test dl, dl
jne 0x1401990
cmp eax, ebx
je 0x14019ce
push 5
add eax, 6
push str.czero
push eax
call dword [sym.imp.msvcrt.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x14019ce
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0x10]
push ebx
push str._forcevalve
mov ecx, 0x14080cc
call eax
mov edx, dword [vtable.CRegistry.0]
mov eax, dword [edx + 8]
push ebx
push str.CrashInitializingVideoMode
mov ecx, 0x14080d4
call eax
test eax, eax
je 0x1401ae0
mov edx, dword [vtable.CRegistry.0]
mov eax, dword [edx + 0xc]
push ebx
push str.CrashInitializingVideoMode
mov ecx, 0x14080d4
call eax
mov edx, dword [vtable.CRegistry.0]
mov eax, dword [edx + 0x10]
mov edi, str.hw.dll
push edi
push str.EngineDLL
mov ecx, 0x14080d4
call eax
mov esi, eax
mov ecx, 7
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x1401ae0
mov eax, dword [vtable.CRegistry.0]
mov edx, dword [eax + 8]
push ebx
push str.EngineD3D
mov ecx, 0x14080d4
call edx
test eax, eax
mov eax, dword [vtable.CRegistry.0]
mov ecx, 0x14080d4
je 0x1401a6a
mov edx, dword [eax + 0xc]
push ebx
push str.EngineD3D
call edx
push 0x31
push str.Video_mode_change_failure
push str.The_game_has_detected_that_the_previous_attempt_to_start_in_D3D_video_mode_failed._nThe_game_will_now_run_attempt_to_run_in_openGL_mode.
jmp 0x1401a85
mov edx, dword [eax + 0x14]
push str.sw.dll
push str.EngineDLL
call edx
push 0x31
push str.Video_mode_change_failure
push str.The_game_has_detected_that_the_previous_attempt_to_start_in_openGL_video_mode_failed._nThe_game_will_now_run_in_software_mode.
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 1
jne 0x140189a
mov eax, dword [vtable.CRegistry.0]
mov edx, dword [eax + 0xc]
push 0x280
push str.ScreenWidth
mov ecx, 0x14080d4
call edx
mov eax, dword [vtable.CRegistry.0]
mov edx, dword [eax + 0xc]
push 0x1e0
push str.ScreenHeight
mov ecx, 0x14080d4
call edx
mov eax, dword [vtable.CRegistry.0]
mov edx, dword [eax + 0xc]
push 0x10
push str.ScreenBPP
mov ecx, 0x14080d4
call edx
lea ecx, [ecx]
push str.filesystem_stdio.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x2ec], esi
je 0x1401f41
call fcn.014021b0
push 0x1405214
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ebx
push str.VFileSystem009
call eax
mov edx, dword [eax]
mov dword [0x1408120], eax
mov ecx, eax
mov eax, dword [edx + 4]
add esp, 8
call eax
mov ecx, dword [0x1408120]
mov esi, dword [ecx]
push str.ROOT
add esi, 0x10
call fcn.01403240
mov ecx, dword [0x1408120]
mov edx, dword [esi]
push eax
call edx
lea esi, [ebp - 0x2f4]
mov byte [0x3408bc0], 0
call fcn.01401710
mov ecx, dword [0x1408120]
mov edi, dword [ebp - 0x2f4]
push 0
mov dword [ebp - 0x2e0], ebx
mov eax, dword [ecx]
mov edx, dword [eax + 0x28]
push 0x14055fc
mov dword [ebp - 0x2f8], ebx
push edi
xor bl, bl
call edx
mov esi, eax
test esi, esi
je 0x1401c46
mov ecx, dword [0x1408120]
mov eax, dword [ecx]
mov eax, dword [eax + 0x54]
push esi
push 0x44
lea edx, [ebp - 0x148]
push edx
call eax
mov ecx, dword [0x1408120]
mov edx, dword [ecx]
mov eax, dword [edx + 0x2c]
push esi
call eax
cmp dword [ebp - 0x108], 0x12345678
jne 0x1401c46
test byte [0x34081b0], 1
jne 0x1401beb
or dword [0x34081b0], 1
push str.NtSetInformationProcess
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x34081ac], eax
push 4
lea ecx, [ebp - 0x2f0]
push ecx
push 0x22
mov dword [ebp - 0x2f0], 2
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [0x34081ac]
mov dword [ebp - 0x2fc], 0x140484e
push dword [ebp - 0x2fc]
push dword fs:[0]
mov dword fs:[0], esp
lea edx, [ebp - 0x2e0]
push edx
mov edx, edi
call fcn.01401fb0
mov esi, dword [ebp - 0x2e8]
add esp, 4
mov bl, 1
jmp 0x1401c8c
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
mov dword [ebp - 0x2e8], esi
je 0x1401f50
push 0x1405214
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0
mov edi, eax
push str.VENGINE_LAUNCHER_API_VERSION002
call edi
add esp, 8
test edi, edi
mov dword [ebp - 0x2e0], eax
je 0x1401c85
test eax, eax
jne 0x1401c99
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x2e0], 0
je 0x1401f78
mov al, bl
neg al
sbb eax, eax
not eax
and eax, esi
call fcn.01402520
mov ecx, dword [ebp - 0x2ec]
push 0x1405214
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, dword [ebp - 0x2e0]
mov esi, dword [edx]
push eax
mov eax, dword [vtable.CCommandLine.0]
mov edx, dword [eax + 4]
push sym.MetaHook.exe_CreateInterface
push 0x3408bc0
mov ecx, 0x14080cc
add esi, 4
call edx
push eax
call fcn.01403240
mov ecx, dword [ebp - 0x2e0]
mov edx, dword [esi]
push eax
mov eax, dword [ebp - 0x304]
push eax
call edx
mov esi, dword [0x3408178]
test esi, esi
mov edi, eax
je 0x1401d1b
cmp dword [esi + 0xc], 1
jle 0x1401d14
mov ecx, dword [esi + 8]
mov eax, dword [ecx]
mov edx, dword [eax + 0x14]
push edi
call edx
mov esi, dword [esi + 0x10]
test esi, esi
jne 0x1401d03
test bl, bl
je 0x1401d27
mov eax, dword [ebp - 0x2f8]
jmp 0x1401d31
mov eax, dword [ebp - 0x2e8]
test eax, eax
je 0x1401d38
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test edi, edi
je 0x1401f78
cmp edi, 2
jg 0x1401f78
sub edi, 1
je 0x1401d63
sub edi, 1
jne 0x1401d6a
call fcn.014017c0
test eax, eax
setne byte [ebp - 0x2d9]
jmp 0x1401d6a
mov byte [ebp - 0x2d9], 1
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0xc]
push 0x1405598
mov ecx, 0x14080cc
call eax
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0xc]
push str._startwindowed
mov ecx, 0x14080cc
call eax
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0xc]
push str._windowed
mov ecx, 0x14080cc
call eax
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0xc]
push str._window
mov ecx, 0x14080cc
call eax
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0xc]
push str._full
mov ecx, 0x14080cc
call eax
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0xc]
push str._fullscreen
mov ecx, 0x14080cc
call eax
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0xc]
push str._soft
mov ecx, 0x14080cc
call eax
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0xc]
push str._software
mov ecx, 0x14080cc
call eax
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0xc]
push 0x14052c0
mov ecx, 0x14080cc
call eax
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0xc]
push str._d3d
mov ecx, 0x14080cc
call eax
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0xc]
push 0x14055d4
mov ecx, 0x14080cc
call eax
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0xc]
push str._width
mov ecx, 0x14080cc
call eax
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0xc]
push 0x14055e0
mov ecx, 0x14080cc
call eax
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0xc]
push str._height
mov ecx, 0x14080cc
call eax
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0xc]
push str._novid
mov ecx, 0x14080cc
call eax
mov esi, dword [sym.imp.msvcrt.dll_strstr]
push str._game
push 0x3408bc0
call esi
add esp, 8
test eax, eax
je 0x1401ed3
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0xc]
push str._game
mov ecx, 0x14080cc
call eax
push str.load
push 0x3408bc0
call esi
add esp, 8
test eax, eax
je 0x1401efb
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0xc]
push str.load
mov ecx, 0x14080cc
call eax
mov edx, dword [vtable.CCommandLine.0]
mov eax, dword [edx + 0x10]
push 0
push 0x3408bc0
mov ecx, 0x14080cc
call eax
mov ecx, dword [0x1408120]
mov edx, dword [ecx]
mov eax, dword [edx + 8]
call eax
mov ecx, dword [ebp - 0x2ec]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call fcn.01402640
cmp byte [ebp - 0x2d9], 0
je 0x1401f78
xor ebx, ebx
jmp 0x1401ae0
push 0x10
push str.Fatal_Error
push str.Could_not_load_filesystem_dll._nFileSystem_crashed_during_construction.
push ebx
jmp 0x1401f72
push edi
push str.Could_not_load__s._nPlease_try_again_at_a_later_time.
push 0x34089c0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x10
push str.Fatal_Error
push 0x34089c0
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov edx, dword [vtable.CRegistry.0]
mov eax, dword [edx + 4]
mov ecx, 0x14080d4
call eax
mov esi, dword [ebp - 0x300]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call sub.WS2_32.dll_WSACleanup
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]