Function at 0x401050
Capabilities:
Check if file exists
Create process on windows
Create process suspended
Get file attributes
Query or enumerate registry value
Read .ini file
Resume thread
Set environment variable
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0xb1b8
call fcn.004018a0
mov eax, dword [0x41a004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push edi
push 0x208
mov dword [ebp - 0xb164], eax
lea eax, [ebp - 0x30c]
push 0
push eax
call fcn.00402430
push 0x208
lea eax, [ebp - 0x71c]
push 0
push eax
call fcn.00402430
push 0x208
lea eax, [ebp - 0x514]
push 0
push eax
call fcn.00402430
push 0x208
lea eax, [ebp - 0x924]
push 0
push eax
call fcn.00402430
push 0x208
lea eax, [ebp - 0xd34]
push 0
push eax
call fcn.00402430
push 0x2000
lea eax, [ebp - 0x3144]
push 0
push eax
call fcn.00402430
add esp, 0x48
lea eax, [ebp - 0x104]
push 0x100
push 0
push eax
call fcn.00402430
add esp, 0xc
lea eax, [ebp - 0x30c]
push 0x208
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
inc eax
test eax, eax
jle 0x401155
nop dword [eax]
nop word [eax + eax]
lea ecx, [eax + eax]
cmp word [ebp + ecx - 0x30c], 0x5c
je 0x401145
dec eax
test eax, eax
jg 0x401130
jmp 0x401155
lea eax, [ebp - 0x30a]
push str.ColdClientLoader.ini
add eax, ecx
push eax
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [ebp - 0x30c]
push eax
call ebx
cmp eax, 0xffffffff
jne 0x401194
push 0x10
push str.ColdClientLoader
push str.Couldnt_find_the_configuration_file_ColdClientLoader.ini_.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401891
mov esp, ebp
pop ebp
ret 0x10
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x30c]
push eax
push 0x104
lea eax, [ebp - 0x71c]
push eax
push 0x41321c
push str.SteamClient64Dll
push str.SteamClient
call esi
lea eax, [ebp - 0x30c]
push eax
push 0x104
lea eax, [ebp - 0x514]
push eax
push 0x41321c
push str.SteamClientDll
push str.SteamClient
call esi
lea eax, [ebp - 0x30c]
push eax
push 0x104
lea eax, [ebp - 0x924]
push eax
push 0
push 0x41327c
push str.SteamClient
call esi
lea eax, [ebp - 0x30c]
push eax
push 0x104
lea eax, [ebp - 0xd34]
push eax
push 0
push str.ExeRunDir
push str.SteamClient
call esi
lea eax, [ebp - 0x30c]
push eax
push 0x1000
lea eax, [ebp - 0x3144]
push eax
push 0
push str.ExeCommandLine
push str.SteamClient
call esi
lea eax, [ebp - 0x30c]
push eax
push 0x100
lea eax, [ebp - 0x104]
push eax
push 0
push str.AppId
push str.SteamClient
call esi
cmp word [ebp - 0x104], 0
je 0x401865
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea eax, [ebp - 0x104]
push eax
push str.SteamAppId
call esi
lea eax, [ebp - 0x104]
push eax
push str.SteamGameId
call esi
lea eax, [ebp - 0x104]
push eax
push str.SteamOverlayGameId
call esi
push 0x208
lea eax, [ebp - 0xb2c]
push 0
push eax
call fcn.00402430
add esp, 0xc
lea eax, [ebp - 0x71c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
jle 0x4012e2
cmp word [ebp + eax*2 - 0x71c], 0x5c
je 0x401321
dec eax
test eax, eax
jg 0x4012d2
lea eax, [ebp - 0x71c]
push eax
lea eax, [ebp - 0xb2c]
push eax
call edi
mov ecx, 0x208
lea eax, [ebp - 0x71c]
nop dword [eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x401300
push ecx
lea eax, [ebp - 0x71c]
push eax
push 0x104
lea eax, [ebp - 0xb2c]
push eax
call esi
lea eax, [ebp - 0x514]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jle 0x401342
cmp word [ebp + eax*2 - 0x514], 0x5c
je 0x401381
dec eax
test eax, eax
jg 0x401332
lea eax, [ebp - 0x514]
push eax
lea eax, [ebp - 0xb2c]
push eax
call edi
mov ecx, 0x208
lea eax, [ebp - 0x514]
nop dword [eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x401360
push ecx
lea eax, [ebp - 0x514]
push eax
push 0x104
lea eax, [ebp - 0xb2c]
push eax
call esi
lea eax, [ebp - 0x924]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jle 0x4013a2
cmp word [ebp + eax*2 - 0x924], 0x5c
je 0x4013e1
dec eax
test eax, eax
jg 0x401392
lea eax, [ebp - 0x924]
push eax
lea eax, [ebp - 0xb2c]
push eax
call edi
mov ecx, 0x208
lea eax, [ebp - 0x924]
nop dword [eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x4013c0
push ecx
lea eax, [ebp - 0x924]
push eax
push 0x104
lea eax, [ebp - 0xb2c]
push eax
call esi
lea eax, [ebp - 0xd34]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jle 0x401402
cmp word [ebp + eax*2 - 0xd34], 0x5c
je 0x401441
dec eax
test eax, eax
jg 0x4013f2
lea eax, [ebp - 0xd34]
push eax
lea eax, [ebp - 0xb2c]
push eax
call edi
mov ecx, 0x208
lea eax, [ebp - 0xd34]
nop dword [eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x401420
push ecx
lea eax, [ebp - 0xd34]
push eax
push 0x104
lea eax, [ebp - 0xb2c]
push eax
call esi
lea eax, [ebp - 0x71c]
push eax
call ebx
cmp eax, 0xffffffff
jne 0x401460
push 0x10
push str.ColdClientLoader
push str.Couldnt_find_the_requested_SteamClient64Dll.
jmp 0x401871
lea eax, [ebp - 0x514]
push eax
call ebx
cmp eax, 0xffffffff
jne 0x40147f
push 0x10
push str.ColdClientLoader
push str.Couldnt_find_the_requested_SteamClientDll.
jmp 0x401871
lea eax, [ebp - 0x924]
push eax
call ebx
cmp eax, 0xffffffff
jne 0x40149e
push 0x10
push str.ColdClientLoader
push str.Couldnt_find_the_requested_Exe_file.
jmp 0x401871
mov dword [ebp - 0xb148], 0
mov dword [ebp - 0xb15c], 0x771f810d
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push 0x208
mov dword [ebp - 0xb160], eax
lea eax, [ebp - 0xf3c]
push 0
push eax
mov byte [ebp - 0xb149], 0
mov dword [ebp - 0xb150], 1
call fcn.00402430
push 0x208
lea eax, [ebp - 0x1144]
push 0
push eax
call fcn.00402430
add esp, 0x18
mov dword [ebp - 0xb154], 0x104
lea eax, [ebp - 0xb148]
mov dword [ebp - 0xb158], 0x104
push eax
push 0xf003f
push 0
push str.SoftwareValveSteamActiveProcess
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4015ed
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0xb154]
push eax
lea eax, [ebp - 0xf3c]
mov byte [ebp - 0xb149], 1
push eax
lea eax, [ebp - 0xb150]
push eax
push 0
push str.SteamClientDll
push dword [ebp - 0xb148]
call esi
lea eax, [ebp - 0xb158]
push eax
lea eax, [ebp - 0x1144]
push eax
lea eax, [ebp - 0xb150]
push eax
push 0
push str.SteamClientDll64
push dword [ebp - 0xb148]
call esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea eax, [ebp - 0xb15c]
push 4
push eax
push 4
push 0
push str.ActiveUser
push dword [ebp - 0xb148]
call esi
push 4
lea eax, [ebp - 0xb160]
push eax
push 4
push 0
push 0x413480
push dword [ebp - 0xb148]
call esi
lea eax, [ebp - 0x514]
push eax
call ebx
cmp eax, 0xffffffff
je 0x40162c
lea eax, [ebp - 0x514]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 1]
push eax
lea eax, [ebp - 0x514]
push eax
jmp 0x401633
push 0
lea eax, [ebp - 0xb148]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SoftwareValveSteamActiveProcess
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x401587
push 0x10
push str.ColdClientLoader
push str.Unable_to_patch_Steam_process_informations_on_the_Windows_registry.
jmp 0x401871
push 0
push 0x413484
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 1
push 0
push str.SteamClientDll
push dword [ebp - 0xb148]
call edi
lea eax, [ebp - 0x71c]
push eax
call ebx
cmp eax, 0xffffffff
je 0x401676
lea eax, [ebp - 0x71c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 1]
push eax
lea eax, [ebp - 0x71c]
push eax
jmp 0x40167d
push 0
push 0x413484
push 1
push 0
push str.SteamClientDll64
push dword [ebp - 0xb148]
call edi
push str.Public
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push str.Public
push 1
push 0
push str.Universe
push dword [ebp - 0xb148]
call esi
push dword [ebp - 0xb148]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call ebx
push 0x44
lea eax, [ebp - 0xb1b8]
push 0
push eax
call fcn.00402430
add esp, 0xc
lea eax, [ebp - 0xb1b8]
mov ecx, 0x44
nop dword [eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x4016e0
xorps xmm0, xmm0
mov dword [ebp - 0xb1b8], 0x44
movups xmmword [ebp - 0xb174], xmm0
mov ecx, 0x10
lea eax, [ebp - 0xb174]
nop word [eax + eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x401710
push 0x8000
push ecx
lea eax, [ebp - 0xb144]
push eax
call fcn.00402430
push dword [ebp - 0xb164]
lea eax, [ebp - 0x3144]
push eax
lea eax, [ebp - 0x924]
push eax
push str.__ls___ls__ls
lea eax, [ebp - 0xb144]
push 0x4000
push eax
call fcn.00401010
add esp, 0x24
cmp word [ebp - 0x924], 0
je 0x401857
lea eax, [ebp - 0xb174]
push eax
lea eax, [ebp - 0xb1b8]
push eax
lea eax, [ebp - 0xd34]
push eax
push 0
push 4
push 1
push 0
push 0
lea eax, [ebp - 0xb144]
push eax
lea eax, [ebp - 0x924]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x401857
push dword [ebp - 0xb170]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push 0xffffffffffffffff
push dword [ebp - 0xb170]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0xb170]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0xb174]
call esi
cmp byte [ebp - 0xb149], 0
je 0x401842
lea eax, [ebp - 0xb148]
push eax
push 0xf003f
push 0
push str.SoftwareValveSteamActiveProcess
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401842
push dword [ebp - 0xb154]
lea eax, [ebp - 0xf3c]
push eax
push 1
push 0
push str.SteamClientDll
push dword [ebp - 0xb148]
call edi
push dword [ebp - 0xb158]
lea eax, [ebp - 0x1144]
push eax
push 1
push 0
push str.SteamClientDll64
push dword [ebp - 0xb148]
call edi
push dword [ebp - 0xb148]
call ebx
pop esi
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401891
mov esp, ebp
pop ebp
ret 0x10
push 0x10
push str.ColdClientLoader
push str.Unable_to_load_the_requested_EXE_file.
jmp 0x401871
push 0x10
push str.ColdClientLoader
push str.You_forgot_to_set_the_AppId.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [ebp - 4]
mov eax, 1
pop esi
pop edi
xor ecx, ebp
pop ebx
call fcn.00401891
mov esp, ebp
pop ebp
ret 0x10