Function at 0x406b6e
Capabilities:
Accept command line arguments
Check if file exists
Copy file
Create process on windows
Get common file path
Get file attributes
Terminate process

Disassembly:
push ebp
sub esp, 0x34c
lea ebp, [esp - 4]
mov eax, dword [0x41a4c0]
xor eax, ebp
mov dword [ebp + 0x34c], eax
push 0x68
mov eax, 0x414e9e
call fcn.0040b8c4
mov esi, 0x104
push esi
lea eax, [ebp + 0x244]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push str.lpk.dll
lea eax, [ebp + 0x244]
push esi
push eax
call fcn.0040ac75
add esp, 0xc
push 8
xor edi, edi
push edi
lea eax, [ebp + 0x244]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push esi
lea eax, [ebp + 0x240]
push eax
push edi
call ebx
push str..local
lea eax, [ebp + 0x240]
push 0x10a
push eax
call fcn.0040ac75
add esp, 0xc
lea eax, [ebp + 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x406c10
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 4], edi
call fcn.00405d7b
pop ecx
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x10], edi
call fcn.0040210f
test eax, eax
jbe 0x406c73
push dword [ebp - 0x10]
lea ecx, [ebp - 0x20]
call fcn.00402125
cmp dword [eax + 0x18], 0x10
jb 0x406c4b
mov eax, dword [eax + 4]
jmp 0x406c4e
add eax, 4
push eax
push str.run1
call fcn.0040bc30
test eax, eax
pop ecx
pop ecx
lea ecx, [ebp - 0x20]
je 0x406e0d
inc dword [ebp - 0x10]
call fcn.0040210f
cmp dword [ebp - 0x10], eax
jb 0x406c35
push esi
lea eax, [ebp + 0x13c]
push eax
push edi
call ebx
push edi
lea ecx, [ebp + 0x1c]
mov dword [ebp + 0x34], 0xf
call fcn.00402530
lea eax, [ebp + 0x1c]
push eax
mov byte [ebp - 4], 1
call fcn.0040586e
mov esi, dword [ebp + 0x20]
pop ecx
push 0x10
pop ebx
cmp dword [ebp + 0x34], ebx
jae 0x406caa
lea esi, [ebp + 0x20]
lea eax, [ebp + 0x13c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
push eax
push esi
lea eax, [ebp + 0x38]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineA]
push 1
lea eax, [ebp + 0x38]
push eax
lea eax, [ebp + 0x13c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x406dcb
push edi
lea ecx, [ebp - 0x20]
call fcn.00402125
mov esi, dword [eax + 0x14]
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
lea eax, [eax + esi + 2]
push eax
lea ecx, [ebp]
call fcn.0040545c
push 0x416424
lea eax, [ebp + 0x13c]
push eax
push str._run1_shortcut_
lea ecx, [ebp]
mov byte [ebp - 4], 2
call fcn.0040547e
mov ecx, eax
call fcn.0040547e
mov ecx, eax
call fcn.0040547e
mov eax, dword [ebp + 0x14]
inc eax
push eax
call fcn.0040bdcc
cmp dword [ebp + 0x18], ebx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 4]
pop ecx
jae 0x406d41
lea eax, [ebp + 4]
push eax
mov eax, dword [ebp + 0x14]
inc eax
push eax
push dword [ebp - 0x10]
call fcn.0040b121
push 0x44
pop esi
push esi
lea eax, [ebp - 0x74]
push edi
push eax
call fcn.004013f8
push ebx
lea eax, [ebp - 0x30]
push edi
push eax
mov dword [ebp - 0x74], esi
call fcn.004013f8
mov eax, dword [ebp + 0x20]
add esp, 0x24
cmp dword [ebp + 0x34], ebx
jae 0x406d79
lea eax, [ebp + 0x20]
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x74]
push ecx
push eax
push edi
push edi
push edi
push edi
push edi
push dword [ebp - 0x10]
lea eax, [ebp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x406db3
push 0xffffffffffffffff
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x2c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x30]
call esi
push dword [ebp - 0x10]
call fcn.0040b42b
pop ecx
push edi
push 1
lea ecx, [ebp]
mov byte [ebp - 4], 1
call fcn.004043f9
lea eax, [ebp + 0x1c]
push eax
call fcn.00405586
pop ecx
push edi
push 1
lea ecx, [ebp + 0x1c]
call fcn.004043f9
lea ecx, [ebp - 0x20]
call fcn.00405a39
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x34c]
xor ecx, ebp
call fcn.0040aba0
add ebp, 0x350
leave
ret
call fcn.00405a39
mov al, 1
jmp 0x406dea