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

Disassembly:
mov eax, 0x4654
call fcn.00424360
mov eax, dword [esp + 0x4664]
mov dword [esp + 4], ecx
mov ecx, 1
cmp eax, ecx
mov dword [esp + 8], 0xffffffff
mov dword [esp + 0xc], ecx
mov dword [esp], ecx
jl 0x413e50
mov dword [esp], eax
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x664]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, dword [esp + 0x4678]
mov edi, dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebp, dword [sym.imp.KERNEL32.dll_FindClose]
lea ebx, [ebx]
mov ecx, dword [esp + 0x466c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x413ec2
mov eax, dword [esp + 0x4668]
lea edx, [esp + 0x124]
push edx
push eax
xor bl, bl
call edi
cmp eax, 0xffffffff
je 0x413ec2
test byte [esp + 0x124], 0x10
jne 0x413eb7
mov bl, 1
push eax
call ebp
test bl, bl
jne 0x413f60
push 0x400
lea ecx, [esp + 0x1a68]
push ecx
push 0x2f
call fcn.00408270
lea edx, [esp + 0x2c]
push edx
call fcn.004076c0
movsx eax, byte [esp + 0x30]
push eax
push esi
lea ecx, [esp + 0x1a7c]
push ecx
lea edx, [esp + 0x280]
push edx
call fcn.00424a8c
add esp, 0x20
push 1
push 0x446a11
lea eax, [esp + 0x26c]
push eax
push 0
call dword [0x457308]
cmp eax, 2
jne 0x413e80
push 0x400
lea ecx, [esp + 0x268]
push ecx
push 0x2e
call fcn.00408270
add esp, 0xc
push 0x124
push 0x446a11
lea edx, [esp + 0x26c]
push edx
push 0
call dword [0x457308]
cmp eax, 6
jne 0x413e80
push 0
call fcn.00424a4c
mov eax, dword [esp + 0x4668]
push eax
lea ecx, [esp + 0xa68]
push 0x4479f4
push ecx
call fcn.00424a8c
mov eax, dword [esp + 0x467c]
add esp, 0xc
mov edi, 0x446a11
mov esi, eax
mov ecx, 1
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x413fdd
lea edi, [esp + 0xa64]
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x413fa0
mov cx, word [0x447c4c]
mov word [edi], cx
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x413fb4
lea edi, [esp + 0xa64]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x413fc5
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [esp + 0x14]
cmp byte [edx], 0
je 0x413ffd
push 0
push str.CreateProcess
lea eax, [esp + 0xa6c]
push eax
push 0
call dword [0x457308]
mov edi, dword [esp + 0x10]
test edi, edi
jle 0x4140d5
mov ebp, dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, dword [esp + 0x4674]
test esi, esi
je 0x414021
dec edi
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4140cd
mov edx, dword [esp + 0x4668]
push 0x45e484
push 0x45e440
push 0
push 0
push 0x30
push 0
push 0
push 0
lea ecx, [esp + 0xa84]
push ecx
push edx
call ebp
test eax, eax
je 0x4140b7
mov edi, esi
mov dword [esp + 0x10], edi
jmp 0x414070
mov ecx, dword [0x45e484]
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x4140f4
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x414096
mov dword [esp + 0x1c], 0
push 1
call ebx
test esi, esi
je 0x4140a7
dec edi
test edi, edi
mov dword [esp + 0x10], edi
jle 0x4140d5
cmp dword [esp + 0x18], 0x103
je 0x414070
mov edi, dword [esp + 0x10]
jmp 0x4140cd
cmp edi, 1
jl 0x4140fe
test esi, esi
jne 0x4140c9
mov edx, dword [esp + 0x14]
cmp byte [edx], 0
jne 0x4140fe
push 1
call ebx
test edi, edi
jg 0x414015
lea eax, [esp + 0x664]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4654
ret 0x14
mov dword [esp + 0x18], 0
jmp 0x4140d5
push 0
push 0
lea eax, [esp + 0x1c]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x4668]
push ecx
push edx
lea eax, [esp + 0x1e6c]
push str.Error_executing__s_n_s
push eax
call fcn.00424a8c
add esp, 0x10
push 0x40
push str.Exec_And_Wait
lea ecx, [esp + 0x1e6c]
push ecx
push 0
call dword [0x457308]
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4140d5