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

Disassembly:
mov eax, 0x4410
call fcn.00408ee0
push ebx
push ebp
push esi
push edi
mov edi, 1
push 0
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x18], edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
mov eax, dword [esp + 0x4430]
cmp eax, edi
mov dword [esp + 0x10], edi
jl 0x405dd0
mov dword [esp + 0x10], eax
lea eax, [esp + 0x420]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, dword [esp + 0x4434]
mov ebp, dword [esp + 0x4428]
mov ebx, dword [esp + 0x4424]
push ebp
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x405e11
mov ecx, dword [esp + 0x1c]
push ebx
call fcn.004058e0
test al, al
jne 0x405e8e
push 0x400
lea ecx, [esp + 0x1824]
push ecx
push 0x2f
push esi
call fcn.00402100
push edi
lea edx, [esp + 0x1834]
push edx
lea eax, [esp + 0x38]
push eax
call fcn.00408f1d
add esp, 0x1c
push 1
push 0x424db2
lea ecx, [esp + 0x28]
push ecx
push 0
call dword [0x42fc7c]
cmp eax, 2
jne 0x405df8
push 0x400
lea edx, [esp + 0x24]
push edx
push 0x2e
push esi
call fcn.00402100
add esp, 0x10
push 0x24
push 0x424db2
lea eax, [esp + 0x28]
push eax
push 0
call dword [0x42fc7c]
cmp eax, 6
jne 0x405df8
push 0
call fcn.004090ef
push ebx
lea ecx, [esp + 0x824]
push str.__s_
push ecx
call fcn.00408f1d
mov eax, dword [esp + 0x4438]
add esp, 0xc
mov edi, 0x424db2
mov esi, eax
mov ecx, 1
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x405f09
lea edi, [esp + 0x820]
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x405ec5
mov cx, word [0x425958]
mov word [edi], cx
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405ee0
lea edi, [esp + 0x820]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x405ef1
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 + 0x1c]
cmp byte [edx], 0
je 0x405f29
push 0
push str.CreateProcess
lea eax, [esp + 0x828]
push eax
push 0
call dword [0x42fc7c]
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x405fa6
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x4430]
test eax, eax
je 0x405f52
dec dword [esp + 0x10]
push 0
call esi
push 0x433c64
push 0x433c20
push 0
push 0
push 0x30
push 0
push 0
push 0
lea ecx, [esp + 0x840]
push ecx
push ebx
call edi
test eax, eax
jne 0x405fc5
cmp dword [esp + 0x10], 1
jl 0x406002
mov eax, dword [esp + 0x4430]
test eax, eax
je 0x406002
mov edx, dword [esp + 0x1c]
cmp byte [edx], 0
jne 0x406002
push 1
call ebp
mov eax, dword [esp + 0x10]
test eax, eax
jg 0x405f43
lea ecx, [esp + 0x420]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4410
ret 0x14
mov edi, dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov esi, 0x103
mov ecx, dword [0x433c64]
lea eax, [esp + 0x18]
push eax
push ecx
call edi
test eax, eax
jne 0x405fe6
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x405ff6
mov dword [esp + 0x14], 0
push 1
call ebp
cmp dword [esp + 0x18], esi
je 0x405fd0
jmp 0x405fa6
push 0
push 0
lea edx, [esp + 0x1c]
push edx
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov eax, dword [esp + 0x14]
push eax
push ebx
lea ecx, [esp + 0x1c28]
push str.Error_executing__s_n_s
push ecx
call fcn.00408f1d
add esp, 0x10
push reloc.kernel32.dll_UnhandledExceptionFilter
push str.Exec_And_Wait
lea edx, [esp + 0x1c28]
push edx
push 0
call dword [0x42fc7c]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x405fa6