Function at 0x40519d
Capabilities:
Create process on windows
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x360
push ebx
push esi
mov ebx, 0x40ca68
push edi
push ebx
call fcn.004057e6
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
pop ecx
test eax, eax
jbe 0x405327
mov dl, byte [0x40c008]
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x35f]
mov byte [ebp - 0x360], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x217]
mov byte [ebp - 0x218], dl
push 0x40
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x113]
mov byte [ebp - 0x114], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, 0x4086a4
push 0
push edi
push ebx
call fcn.004057b2
pop ecx
push eax
call fcn.00403dc5
add esp, 0xc
push eax
lea eax, [ebp - 0x360]
push eax
call esi
push 1
push edi
push ebx
call fcn.004057b2
pop ecx
push eax
call fcn.00403dc5
add esp, 0xc
push eax
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x360]
push eax
call fcn.00403f6e
pop ecx
push eax
lea eax, [ebp - 0x360]
push eax
call esi
lea eax, [ebp - 0x218]
push eax
call fcn.00403f6e
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x360]
push eax
call fcn.004044b5
lea eax, [ebp - 0x218]
push eax
call fcn.004044b5
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x360]
push eax
call fcn.00403ebc
lea eax, [ebp - 0x114]
push eax
call fcn.00403ea0
add esp, 0x14
test eax, eax
jne 0x4052c3
lea eax, [ebp - 0x114]
push eax
call fcn.00404386
pop ecx
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.00403ebc
lea eax, [ebp - 0x114]
push eax
call fcn.00403ea0
add esp, 0xc
test eax, eax
jne 0x4052f6
lea eax, [ebp - 0x114]
push eax
call fcn.00404386
pop ecx
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x360]
push eax
call fcn.004056b7
push ebx
call fcn.004057b9
push ebx
call fcn.004057e6
add esp, 0x14
test eax, eax
ja 0x4051c3
mov ebx, 0x408cc4
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x4056b2
mov al, byte [0x40c008]
push 0x40
mov byte [ebp - 0x114], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x113]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x10
xor eax, eax
pop ecx
lea edi, [ebp - 0x258]
rep stosd dword es:[edi], eax
mov edi, 0x40ca80
mov dword [ebp - 0x25c], 0x44
push edi
call fcn.004044b5
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push ebx
call fcn.00403f6e
pop ecx
push eax
lea eax, [ebp - 0x114]
push eax
call esi
lea eax, [ebp - 0x114]
push eax
call fcn.004044b5
push 3
lea eax, [ebp - 0x114]
pop esi
push esi
push eax
call fcn.00403bc5
push eax
push 0x4086a0
call fcn.00403d7f
add esp, 0x14
test eax, eax
je 0x4055b1
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.00403bc5
push eax
push 0x40869c
call fcn.00403d7f
add esp, 0x10
test eax, eax
je 0x4055b1
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.00403bc5
push eax
push 0x408698
call fcn.00403d7f
add esp, 0x10
test eax, eax
je 0x4055b1
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.00403bc5
push eax
push 0x408694
call fcn.00403d7f
add esp, 0x10
test eax, eax
je 0x40557e
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.00403bc5
push eax
push 0x408690
call fcn.00403d7f
add esp, 0x10
test eax, eax
je 0x40557e
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.00403bc5
push eax
push 0x40868c
call fcn.00403d7f
add esp, 0x10
test eax, eax
je 0x40557e
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.00403bc5
push eax
push 0x408688
call fcn.00403d7f
add esp, 0x10
test eax, eax
je 0x40557e
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.00403bc5
push eax
push 0x408684
call fcn.00403d7f
add esp, 0x10
test eax, eax
je 0x40557e
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.00403bc5
push eax
push 0x408680
call fcn.00403d7f
add esp, 0x10
test eax, eax
je 0x40557e
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.00403bc5
push eax
push 0x40867c
call fcn.00403d7f
add esp, 0x10
test eax, eax
je 0x40557e
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.00403bc5
push eax
push 0x408678
call fcn.00403d7f
add esp, 0x10
test eax, eax
je 0x40557e
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.00403bc5
push eax
push 0x408674
call fcn.00403d7f
add esp, 0x10
test eax, eax
je 0x40557e
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.00403bc5
push eax
push 0x408670
call fcn.00403d7f
add esp, 0x10
test eax, eax
je 0x40557e
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.00403bc5
push eax
push 0x40866c
call fcn.00403d7f
add esp, 0x10
test eax, eax
jne 0x4056b2
mov esi, 0x40c008
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0xa
push esi
lea eax, [ebp - 0x114]
push 0
push eax
push str.open
push dword [0x40cb84]
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
jmp 0x4056b2
lea eax, [ebp - 0x114]
push eax
call fcn.0040452b
test eax, eax
pop ecx
je 0x4056a3
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x114]
push 0x408668
push eax
call esi
push dword [ebp + 8]
call sub.MSVCRT.dll_strlen
cmp eax, 2
pop ecx
jae 0x4055ef
push 0x408dc8
jmp 0x4055f2
push dword [ebp + 8]
lea eax, [ebp - 0x114]
push eax
call esi
lea eax, [ebp - 0x10]
xor esi, esi
push eax
lea eax, [ebp - 0x25c]
push eax
push esi
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x114]
push esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x405656
push esi
mov esi, dword [sym.imp.USER32.dll_ShowWindow]
push dword [0x40cb84]
call esi
push 0xffffffffffffffff
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 5
push dword [0x40cb84]
call esi
push dword [ebp - 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x10]
call esi
jmp 0x4056b2
mov al, byte [0x40c008]
push 0x3f
mov byte [ebp - 0x214], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x213]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x214]
push str._s_could_not_be_executed.
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x214]
push 0x10
push str.Error
push eax
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x4056b2
lea eax, [ebp - 0x114]
push 5
push eax
call dword [sym.imp.KERNEL32.dll_WinExec]
pop edi
pop esi
pop ebx
leave
ret