Function at 0x405800
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x412cd0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc0c
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x10], esp
xor esi, esi
push edi
push esi
push 0x478
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.DLL_OpenProcess]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [ebp - 0x18], ebx
je 0x405a38
cmp ebx, esi
je 0x405a38
mov esi, edi
call fcn.004057b0
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x14], esi
je 0x405a1e
test esi, esi
je 0x405a1e
push edi
mov edi, ebx
call fcn.004054e0
test eax, eax
jne 0x4058b4
mov eax, dword [ebp + 8]
push eax
push str.InjectProcessW9X_0x_x_:_Process_is_not_Half_Life_
call fcn.00402530
add esp, 8
push esi
call dword [sym.imp.KERNEL32.DLL_ResumeThread]
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
call esi
push ebx
call esi
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push ebx
call fcn.00405070
add esp, 4
push 0x8000
push ebx
call dword [sym.imp.KERNEL32.DLL_SetPriorityClass]
push 0x400
lea ecx, [ebp - 0x418]
push ecx
push 0
mov byte [ebp - 0x418], 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
push 0
push 0
lea edx, [ebp - 0x818]
push edx
lea eax, [ebp - 0xc18]
push eax
lea ecx, [ebp - 0x418]
push ecx
call fcn.0040a8c6
mov eax, 0x41a08c
add esp, 0x14
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405910
lea edi, [ebp - 0x818]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x405920
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x818]
dec edi
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x405940
mov eax, dword [str..dll]
mov dx, word [0x413efc]
mov ecx, dword [0x4180a0]
push eax
push ecx
mov word [edi], dx
lea edx, [ebp - 0x818]
push edx
lea eax, [ebp - 0xc18]
push eax
lea ecx, [ebp - 0x418]
push ecx
call fcn.0040a836
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
lea edx, [ebp - 0x418]
push edx
push eax
push edi
push str.InjectProcessW9X_0x_x_:_Info:_Found_active_game_process___s.exe_._Injecting___s_
call fcn.00402530
mov edx, dword [ebp - 0x14]
add esp, 0x24
lea ecx, [ebp - 0x418]
push ecx
mov ecx, ebx
call fcn.00404690
mov esi, eax
test esi, esi
jle 0x4059bd
push esi
push edi
push str.InjectProcessW9X_0x_x_:_Failed:_Couldnt_hook_into_game_process.
call fcn.00402530
add esp, 0xc
jmp 0x4059f5
jge 0x4059d0
push esi
push edi
push str.InjectProcessW9X_0x_x_:_Failed:_Couldnt_load_cd.dll_in_process.
call fcn.00402530
add esp, 0xc
jmp 0x4059f5
push edi
push str.InjectProcessW9X_0x_x_:_Info:_Successfully_hooked_in_to_game_process.
call fcn.00402530
add esp, 8
call fcn.00407010
test eax, eax
jne 0x4059f5
push edi
push str.InjectProcessW9X_0x_x_:_Info:_..but_C_D_failed_to_load___
call fcn.00402530
add esp, 8
mov edx, dword [ebp - 0x14]
mov edi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
push edx
call edi
push ebx
call edi
mov ecx, dword [ebp - 0xc]
xor eax, eax
pop edi
test esi, esi
pop esi
sete al
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8
push edi
push str.InjectProcessW9X_0x_x_:_OpenActiveThread___failed_
call fcn.00402530
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x40589f
push edi
push str.InjectProcessW9X_0x_x_:_OpenProcess___failed_
call fcn.00402530
add esp, 8
jmp 0x40589f