Function at 0x406ffc
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, 0x4152eb
call fcn.0040bd83
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.0040b135
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.0040b135
add esp, 0xc
lea eax, [ebp + 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40709e
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.00406f97
pop ecx
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x10], edi
call fcn.004025bd
test eax, eax
jbe 0x407101
push dword [ebp - 0x10]
lea ecx, [ebp - 0x20]
call fcn.004025d3
cmp dword [eax + 0x18], 0x10
jb 0x4070d9
mov eax, dword [eax + 4]
jmp 0x4070dc
add eax, 4
push eax
push str.run1
call fcn.0040c0e4
test eax, eax
pop ecx
pop ecx
lea ecx, [ebp - 0x20]
je 0x40729b
inc dword [ebp - 0x10]
call fcn.004025bd
cmp dword [ebp - 0x10], eax
jb 0x4070c3
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.004029cd
lea eax, [ebp + 0x1c]
push eax
mov byte [ebp - 4], 1
call fcn.00406a8a
mov esi, dword [ebp + 0x20]
pop ecx
push 0x10
pop ebx
cmp dword [ebp + 0x34], ebx
jae 0x407138
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 0x407259
push edi
lea ecx, [ebp - 0x20]
call fcn.004025d3
mov esi, dword [eax + 0x14]
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
lea eax, [eax + esi + 2]
push eax
lea ecx, [ebp]
call fcn.00406696
push 0x416438
lea eax, [ebp + 0x13c]
push eax
push str._run1_shortcut_
lea ecx, [ebp]
mov byte [ebp - 4], 2
call fcn.004066b8
mov ecx, eax
call fcn.004066b8
mov ecx, eax
call fcn.004066b8
mov eax, dword [ebp + 0x14]
inc eax
push eax
call fcn.0040bfd7
cmp dword [ebp + 0x18], ebx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 4]
pop ecx
jae 0x4071cf
lea eax, [ebp + 4]
push eax
mov eax, dword [ebp + 0x14]
inc eax
push eax
push dword [ebp - 0x10]
call fcn.0040b275
push 0x44
pop esi
push esi
lea eax, [ebp - 0x74]
push edi
push eax
call fcn.004013de
push ebx
lea eax, [ebp - 0x30]
push edi
push eax
mov dword [ebp - 0x74], esi
call fcn.004013de
mov eax, dword [ebp + 0x20]
add esp, 0x24
cmp dword [ebp + 0x34], ebx
jae 0x407207
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 0x407241
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.0040b8ea
pop ecx
push edi
push 1
lea ecx, [ebp]
mov byte [ebp - 4], 1
call fcn.00404b84
lea eax, [ebp + 0x1c]
push eax
call fcn.004067a2
pop ecx
push edi
push 1
lea ecx, [ebp + 0x1c]
call fcn.00404b84
lea ecx, [ebp - 0x20]
call fcn.00406c55
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.0040b060
add ebp, 0x350
leave
ret
call fcn.00406c55
mov al, 1
jmp 0x407278