Function at 0x401640
Capabilities:
Check if file exists
Create process on windows
Get common file path
Get file attributes
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2d4
mov eax, dword [0x5279f0]
xor eax, esp
mov dword [esp + 0x2d0], eax
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
test ecx, ecx
je 0x40166c
cmp byte [ecx], 0x3a
je 0x401688
inc ecx
jne 0x401664
mov eax, 0x7f
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2d0]
xor ecx, esp
call fcn.004c22ab
mov esp, ebp
pop ebp
ret 0x10
inc ecx
je 0x40166c
call fcn.00401530
mov ebx, eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40166c
test eax, 0x11746
jne 0x40166c
push 0
call fcn.004c37ed
lea edi, [esp + 0xcc]
add esp, 4
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], edx
mov esi, ebx
sub edi, ebx
mov cl, byte [esi]
mov byte [edi + esi], cl
lea esi, [esi + 1]
test cl, cl
jne 0x4016c2
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4016d3
sub eax, edx
js 0x4016f4
mov edi, edi
mov cl, byte [esp + eax + 0xc8]
cmp cl, 0x5c
je 0x4016f4
cmp cl, 0x2f
je 0x4016f4
dec eax
jns 0x4016e0
test eax, eax
je 0x40170d
cmp eax, 0x104
jae 0x4018b1
mov byte [esp + eax + 0xc8], 0
jmp 0x401723
lea eax, [esp + 0xc8]
push eax
push 0
push 0
push 0x28
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
push 0x3c
lea eax, [esp + 0x28]
push 0
push eax
call fcn.004c46b0
lea eax, [esp + 0xd4]
add esp, 0xc
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x28], 0x3c
mov dword [esp + 0x2c], 0x140
mov dword [esp + 0x34], str.open
mov dword [esp + 0x44], 5
mov dword [esp + 0x38], ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
je 0x40166c
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x40166c
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x60]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [esp + 0x5c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
call fcn.004c37ed
mov esi, eax
add esp, 4
sub esi, dword [esp + 0x20]
lea ecx, [esp + 0xc]
sbb edx, dword [esp + 0x10]
mov dword [esp + 0x14], edx
call fcn.00403650
lea ecx, [esp + 0x78]
call fcn.004018c0
lea ecx, [esp + 0xa0]
call fcn.004018c0
push esi
push ebx
push str.__path_:__s____duration_:_d_
lea eax, [esp + 0x1dc]
push 0x104
push eax
call fcn.004c2bfd
push ecx
mov ecx, esp
push str.Genuine_InstallClick_Application_Launcher
call fcn.00401a10
sub esp, 0x18
mov ecx, esp
push str.X_InstallClick_From_SubID
call fcn.00401a10
lea ecx, [esp + 0xa8]
call fcn.004013e0
lea eax, [esp + 0x1d0]
push eax
lea ecx, [esp + 0x64]
call fcn.00401a10
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0x94]
call fcn.00402020
cmp dword [esp + 0x74], 0x10
jb 0x401854
push dword [esp + 0x60]
call fcn.004c358d
add esp, 4
push 0
push 0
lea eax, [esp + 0xa8]
push eax
lea eax, [esp + 0x84]
push eax
push str.http:__localhost:65353_notify
lea ecx, [esp + 0x20]
call fcn.004039c0
mov esi, dword [esp + 0x1c]
lea ecx, [esp + 0xa0]
call fcn.00401930
lea ecx, [esp + 0x78]
call fcn.00401930
lea ecx, [esp + 0xc]
call fcn.004036d0
mov ecx, dword [esp + 0x2dc]
pop edi
mov eax, esi
pop esi
pop ebx
xor ecx, esp
call fcn.004c22ab
mov esp, ebp
pop ebp
ret 0x10
call fcn.004c36c8
int3