Function at 0x499b77
Capabilities:
Create process on windows

Disassembly:
push 0xa4
push 0x4f1518
call fcn.0049b9e8
xor ebx, ebx
xor ecx, ecx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x30], ebx
cmp dword [ebp + 8], ebx
je 0x499f2a
mov esi, dword [ebp + 0xc]
cmp esi, ebx
je 0x499f2a
mov al, byte [esi]
cmp al, 0x77
je 0x499bb2
cmp al, 0x72
jne 0x499f2a
mov al, byte [esi + 1]
cmp al, 0x74
jne 0x499bc0
mov ecx, 0x4000
jmp 0x499bc9
cmp al, 0x62
jne 0x499bc9
mov ecx, 0x8000
or ecx, 0x80
push ecx
push 0x400
lea eax, [ebp - 0x3c]
push eax
call fcn.004a2330
add esp, 0xc
cmp eax, 0xffffffff
je 0x499f2a
xor edi, edi
cmp byte [esi], 0x77
jne 0x499bfd
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x28], ebx
inc edi
mov dword [ebp - 0x24], edi
jmp 0x499c0a
xor eax, eax
inc eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], ebx
inc edi
push 9
call fcn.0049b916
pop ecx
test eax, eax
jne 0x499c2f
push dword [ebp - 0x3c]
call fcn.0049a52c
push dword [ebp - 0x38]
call fcn.0049a52c
pop ecx
pop ecx
xor eax, eax
jmp 0x499f2d
push 9
call fcn.0049b9b6
pop ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x50], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [ebp - 0x54], eax
mov esi, dword [ebp - 0x28]
lea esi, [ebp + esi*4 - 0x3c]
mov eax, dword [esi]
push 2
push edi
push ebx
lea ecx, [ebp - 0x2c]
push ecx
push dword [ebp - 0x54]
mov ecx, eax
sar ecx, 5
and eax, 0x1f
lea eax, [eax + eax*8]
mov ecx, dword [ecx*4 + 0x51a420]
push dword [ecx + eax*4]
push dword [ebp - 0x54]
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x499ef5
push dword [esi]
call fcn.0049a52c
mov eax, dword [ebp - 0x28]
mov dword [ebp + eax*4 - 0x50], ebx
push dword [ebp + 0xc]
mov eax, dword [ebp - 0x24]
push dword [ebp + eax*4 - 0x3c]
call fcn.004a222b
add esp, 0xc
mov dword [ebp - 0x20], eax
cmp eax, ebx
je 0x499ef5
xor edi, edi
call fcn.00499b24
mov dword [ebp - 0x44], eax
cmp eax, ebx
je 0x499ee2
push str.COMSPEC
call fcn.00496ecc
pop ecx
mov dword [ebp - 0x1c], eax
cmp eax, ebx
jne 0x499cfc
call fcn.004980c9
cmp dword [eax], 2
je 0x499ce6
call fcn.004980c9
cmp dword [eax], 0xd
jne 0x499cfc
test byte [0x511d4d], 0x80
mov eax, str.command.com
jne 0x499cf9
mov eax, str.cmd.exe
mov dword [ebp - 0x1c], eax
push 0x44
pop esi
push esi
push ebx
lea eax, [ebp - 0xb4]
push eax
call fcn.004976c0
add esp, 0xc
mov dword [ebp - 0xb4], esi
mov dword [ebp - 0x88], 0x100
mov eax, dword [0x51a420]
cmp dword [ebp - 0x34], ebx
mov ecx, dword [ebp - 0x2c]
je 0x499d2f
mov ecx, dword [eax]
mov dword [ebp - 0x7c], ecx
cmp dword [ebp - 0x34], 1
mov ecx, dword [ebp - 0x2c]
je 0x499d3e
mov ecx, dword [eax + 0x24]
mov dword [ebp - 0x78], ecx
mov eax, dword [eax + 0x48]
mov dword [ebp - 0x74], eax
push dword [ebp - 0x1c]
call fcn.00496dc0
mov edi, eax
push dword [ebp + 8]
call fcn.00496dc0
add edi, eax
mov esi, str.__c
push esi
call fcn.00496dc0
lea eax, [edi + eax + 1]
push eax
call fcn.004978fc
add esp, 0x10
mov edi, eax
mov dword [ebp - 0x48], edi
cmp edi, ebx
je 0x499ee2
push dword [ebp - 0x1c]
push edi
call fcn.00496980
push esi
push edi
call fcn.00496990
push dword [ebp + 8]
push edi
call fcn.00496990
push ebx
push dword [ebp - 0x1c]
call fcn.0049704e
add esp, 0x20
cmp eax, 0xffffffff
je 0x499dce
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0xb4]
push eax
push ebx
push ebx
push ebx
push 1
push ebx
push ebx
push edi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov dword [ebp - 0x30], eax
jmp 0x499eb5
push str.PATH
call fcn.00496ecc
mov dword [ebp - 0x40], eax
mov dword [esp], 0x104
call fcn.004978fc
pop ecx
mov esi, eax
mov dword [ebp - 0x5c], esi
cmp esi, ebx
jne 0x499dfd
push edi
call fcn.00497557
pop ecx
jmp 0x499ee2
push 0x103
push esi
push dword [ebp - 0x40]
call fcn.004a21bc
add esp, 0xc
mov dword [ebp - 0x40], eax
cmp eax, ebx
je 0x499eab
cmp byte [esi], bl
je 0x499eab
push esi
call fcn.00496dc0
pop ecx
lea edi, [eax + esi - 1]
mov dword [ebp - 0x60], edi
mov al, byte [edi]
cmp al, 0x5c
jne 0x499e43
push 0x5c
push esi
call fcn.004a19cb
pop ecx
pop ecx
cmp edi, eax
jmp 0x499e45
cmp al, 0x2f
je 0x499e54
push 0x4ee434
push esi
call fcn.00496990
pop ecx
pop ecx
push dword [ebp - 0x1c]
call fcn.00496dc0
mov edi, eax
push esi
call fcn.00496dc0
pop ecx
pop ecx
add edi, eax
cmp edi, 0x104
jae 0x499eab
push dword [ebp - 0x1c]
push esi
call fcn.00496990
push ebx
push esi
call fcn.0049704e
add esp, 0x10
cmp eax, 0xffffffff
je 0x499dfd
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0xb4]
push eax
push ebx
push ebx
push ebx
push 1
push ebx
push ebx
push dword [ebp - 0x48]
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov dword [ebp - 0x30], eax
push esi
call fcn.00497557
pop ecx
mov edi, dword [ebp - 0x48]
push edi
call fcn.00497557
pop ecx
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x30], ebx
je 0x499edd
mov ecx, dword [ebp - 0x70]
mov dword [ebp - 0x58], ecx
mov eax, dword [ebp - 0x44]
mov dword [eax + 4], ecx
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
jmp 0x499f21
mov eax, dword [ebp - 0x44]
mov dword [eax], ebx
push dword [ebp - 0x20]
call fcn.00497344
pop ecx
mov eax, dword [ebp - 0x24]
mov dword [ebp + eax*4 - 0x50], ebx
mov dword [ebp - 0x20], ebx
mov eax, dword [ebp - 0x28]
shl eax, 2
cmp dword [ebp + eax - 0x50], ebx
je 0x499f0b
push dword [ebp + eax - 0x3c]
call fcn.0049a52c
pop ecx
mov eax, dword [ebp - 0x24]
shl eax, 2
cmp dword [ebp + eax - 0x50], ebx
je 0x499f21
push dword [ebp + eax - 0x3c]
call fcn.0049a52c
pop ecx
or dword [ebp - 4], 0xffffffff
call fcn.00499f33
mov eax, dword [ebp - 0x20]
call fcn.0049ba23
ret