Function at 0x40f516
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5a4
push ebx
push esi
push edi
and byte [ebp - 0x1a4], 0
push 1
mov esi, ecx
pop ebx
xor eax, eax
push 0x40
lea edi, [ebp - 0x1a3]
pop ecx
mov dword [ebp - 0x10], ebx
push dword [ebp + 8]
rep stosd dword es:[edi], eax
push dword [esi + 0x54]
stosw word es:[edi], ax
push str._Autoup___s::ExecuteAPMAutoup_ExecuteAPMAutoup__d__starts
push ebx
stosb byte es:[edi], al
call fcn.00408bf4
lea eax, [ebp - 0x1a4]
push 0x104
xor edi, edi
push eax
mov ax, word [esi + 0x58]
push edi
push edi
push edi
push edi
push eax
call fcn.004266e9
add esp, 0x2c
test ax, ax
je 0x40f907
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call fcn.0040f932
test eax, eax
jne 0x40f928
push 0x3c
mov dword [ebp + 0xc], edi
mov dword [ebp - 0xc], edi
pop edi
push edi
push eax
lea eax, [ebp - 0x5c]
push eax
call fcn.004369c0
lea eax, [ebp - 0x1a4]
add esp, 0xc
lea ecx, [esi + 0x50]
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x44], eax
call fcn.00406a8a
lea ecx, [esi + 0x4c]
mov dword [ebp - 0x4c], eax
call fcn.00406a8a
cmp dword [ebp + 8], 0
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x58], 0x440
mov dword [ebp - 0x40], ebx
je 0x40f5e4
mov eax, str.PreCopy
mov edi, str.PostCopy
jmp 0x40f5eb
mov edi, str.PostCopy
mov eax, edi
push dword [ebp - 0x44]
push eax
push dword [esi + 0x54]
push str._Autoup___s::_s_Directory:_s
push ebx
call fcn.00408bf4
add esp, 0x14
cmp dword [ebp + 8], 0
mov eax, str.PreCopy
jne 0x40f60d
mov eax, edi
push dword [ebp - 0x4c]
push eax
push dword [esi + 0x54]
push str._Autoup___s::_s_lpFile:_s
push ebx
call fcn.00408bf4
add esp, 0x14
cmp dword [ebp + 8], 0
mov eax, str.PreCopy
jne 0x40f62f
mov eax, edi
push dword [ebp - 0x48]
push eax
push dword [esi + 0x54]
push str._Autoup___s::_s_lpParameters:_s
push ebx
call fcn.00408bf4
add esp, 0x14
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp + 8], 0
mov dword [ebp - 4], eax
mov eax, str.PreCopy
jne 0x40f667
mov eax, edi
push dword [ebp - 8]
push eax
push dword [esi + 0x54]
push str._Autoup___s::_s_ShellExecuteEx_return:_d
push ebx
call fcn.00408bf4
add esp, 0x14
cmp dword [ebp - 8], 0
je 0x40f691
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40f691
mov dword [ebp + 0xc], eax
jmp 0x40f7da
and byte [ebp - 0x5a4], 0
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x5a3]
rep stosd dword es:[edi], eax
push dword [esi + 0x4c]
stosw word es:[edi], ax
push dword [esi + 0x50]
stosb byte es:[edi], al
lea eax, [ebp - 0x1a4]
push eax
push str._s_s__s
lea eax, [ebp - 0x5a4]
push 0x400
push eax
call fcn.0040cc1f
xor edi, edi
add esp, 0x18
cmp dword [ebp + 8], edi
mov eax, str.PreCopy
jne 0x40f6e1
mov eax, str.PostCopy
push dword [ebp - 4]
push eax
push dword [esi + 0x54]
push str._Autoup___s::_s__ShellExecuteEx_Failed.___u_
push ebx
call fcn.00408bf4
add esp, 0x14
cmp dword [ebp + 8], edi
mov eax, str.PreCopy
jne 0x40f705
mov eax, str.PostCopy
lea ecx, [ebp - 0x1a4]
push ecx
push eax
push dword [esi + 0x54]
push str._Autoup___s::_s__createprocess_Directory:_s
push ebx
call fcn.00408bf4
add esp, 0x14
cmp dword [ebp + 8], edi
mov eax, str.PreCopy
jne 0x40f72d
mov eax, str.PostCopy
lea ecx, [ebp - 0x5a4]
push ecx
push eax
push dword [esi + 0x54]
push str._Autoup___s::_s__createprocess_szCommand:_s
push ebx
call fcn.00408bf4
push 0x44
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004369c0
push 0x10
lea eax, [ebp - 0x20]
push edi
push eax
mov dword [ebp - 0xa0], 0x44
call fcn.004369c0
add esp, 0x2c
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0xa0]
push eax
lea eax, [ebp - 0x1a4]
push eax
push edi
push edi
push edi
push edi
lea eax, [ebp - 0x5a4]
push edi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40f7a7
mov eax, dword [ebp - 0x20]
mov edi, str.PostCopy
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
jmp 0x40f7e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp + 8], edi
mov dword [ebp - 4], eax
mov ecx, str.PreCopy
jne 0x40f7bf
mov ecx, str.PostCopy
push eax
push dword [esi + 0x50]
push ecx
push dword [esi + 0x54]
push str._Autoup___s::_s__FAILED_to_CreateProcess_for__s___u_
push ebx
call fcn.00408bf4
add esp, 0x18
mov edi, str.PostCopy
xor eax, eax
cmp dword [ebp - 8], eax
je 0x40f8e1
xor eax, eax
cmp dword [ebp + 0xc], eax
je 0x40f8e1
cmp dword [ebp + 8], eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov eax, str.PreCopy
jne 0x40f802
mov eax, edi
push dword [esi + 0x50]
push eax
push dword [esi + 0x54]
push str._Autoup___s::_s__s_executed_successfully
push ebx
call fcn.00408bf4
add esp, 0x14
push 0x3e8
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor ecx, ecx
cmp eax, ecx
je 0x40f866
cmp eax, 0x102
jne 0x40f8a7
cmp dword [ebp - 8], 0x384
jge 0x40f840
inc dword [ebp - 8]
jmp 0x40f89c
cmp dword [ebp + 8], ecx
mov dword [ebp - 4], ecx
mov eax, str.PreCopy
jne 0x40f84f
mov eax, edi
push dword [esi + 0x4c]
push eax
push dword [esi + 0x54]
push str._Autoup___s::_s_FAILED_to_wait_for__s:time_over
push ebx
call fcn.00408bf4
add esp, 0x14
jmp 0x40f89c
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
cmp dword [ebp + 8], 0
mov eax, str.PreCopy
jne 0x40f880
mov eax, edi
push dword [ebp - 0x10]
push dword [esi + 0x4c]
push eax
push dword [esi + 0x54]
push str._Autoup___s::_s__s_exit_code__d_
push ebx
call fcn.00408bf4
add esp, 0x18
and dword [ebp - 4], 0
cmp dword [ebp - 4], 0
je 0x40f8c9
jmp 0x40f817
cmp dword [ebp + 8], ecx
mov ecx, str.PreCopy
jne 0x40f8b3
mov ecx, edi
push eax
push dword [esi + 0x4c]
push ecx
push dword [esi + 0x54]
push str._Autoup___s::_s_FAILED_to_wait_for__s:_d
push ebx
call fcn.00408bf4
add esp, 0x18
push dword [ebp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
cmp dword [ebp - 0xc], 0
je 0x40f928
push dword [ebp - 0xc]
call esi
jmp 0x40f928
cmp dword [ebp + 8], eax
mov eax, str.PreCopy
jne 0x40f8ed
mov eax, edi
push dword [ebp - 4]
push dword [esi + 0x4c]
push eax
push dword [esi + 0x54]
push str._Autoup___s::_s_Failed_to_execute__s_GetLastErr:_u_
push ebx
call fcn.00408bf4
add esp, 0x18
jmp 0x40f928
cmp dword [ebp + 8], edi
mov eax, str.PreCopy
jne 0x40f916
mov eax, str.PostCopy
push eax
push dword [esi + 0x54]
push str._Autoup___s::_s_AhnUpCtl_GetInfo_fail
push ebx
call fcn.00408bf4
add esp, 0x10
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
leave
ret 8