Function at 0x404916
Capabilities:
Create process on windows
Query environment variable
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68c
push ebx
push esi
push edi
push 0x44
pop esi
xor ebx, ebx
push esi
lea eax, [ebp - 0x74]
push ebx
push eax
call fcn.00406340
push 1
lea eax, [ebp - 0x14]
pop edi
mov dword [ebp - 0x74], esi
push 0x10
push ebx
push eax
mov dword [ebp - 0x48], edi
mov word [ebp - 0x44], di
call fcn.00406340
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov esi, 0x208
mov dword [ebp - 4], eax
push esi
lea eax, [ebp - 0x27c]
push ebx
push eax
call fcn.00406340
push dword [ebp + 8]
lea eax, [ebp - 0x27c]
push 0x410980
push eax
call fcn.0040649a
lea eax, [ebp - 0x27c]
push eax
call fcn.0040d82c
add esp, 0x1c
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0x27c]
push str..exe
push eax
call fcn.00406cb0
pop ecx
test eax, eax
pop ecx
jne 0x404a8d
lea eax, [ebp - 0x27c]
push str..com
push eax
call fcn.00406cb0
pop ecx
test eax, eax
pop ecx
jne 0x404a8d
lea eax, [ebp - 0x27c]
push str..bat
push eax
call fcn.00406cb0
pop ecx
test eax, eax
pop ecx
jne 0x404a8d
push esi
lea eax, [ebp - 0x68c]
push ebx
push eax
call fcn.00406340
lea eax, [ebp - 0x68c]
push eax
lea eax, [ebp - 0x27c]
push eax
call fcn.00404851
add esp, 0x14
test eax, eax
je 0x404a52
mov esi, dword [sym.imp.USER32.dll_LoadStringA]
mov edi, 0x104
lea eax, [ebp - 0x380]
push edi
push eax
push 0x2b
push ebx
call esi
lea eax, [ebp - 0x484]
push edi
push eax
push 3
push ebx
call esi
lea eax, [ebp - 0x484]
push ebx
push eax
lea eax, [ebp - 0x380]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push 1
pop eax
jmp 0x404b4a
push esi
lea eax, [ebp - 0x27c]
push ebx
push eax
call fcn.00406340
push dword [ebp + 8]
call fcn.0040475b
push 0x477184
lea eax, [ebp - 0x68c]
push dword [ebp + 8]
push eax
lea eax, [ebp - 0x27c]
push str.__s___s__s
push eax
call fcn.0040649a
add esp, 0x24
jmp 0x404abf
push esi
lea eax, [ebp - 0x27c]
push ebx
push eax
call fcn.00406340
push dword [ebp + 8]
call fcn.0040475b
push 0x477184
lea eax, [ebp - 0x27c]
push dword [ebp + 8]
push str.__s___s
push eax
call fcn.0040649a
add esp, 0x20
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x74]
push eax
push ebx
push dword [ebp - 4]
lea eax, [ebp - 0x27c]
push 0x4000020
push ebx
push ebx
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
cmp esi, ebx
je 0x404b48
cmp byte [ebp + 0xc], bl
je 0x404b48
mov esi, dword [sym.imp.USER32.dll_PeekMessageA]
push edi
push ebx
push ebx
lea eax, [ebp - 0x30]
push ebx
push eax
call esi
test eax, eax
je 0x404b1f
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x404afb
push 0xfa
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x404afb
push dword [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x14]
call esi
xor eax, eax
jmp 0x404b4a
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret