Function at 0x40a568
Capabilities:
Create process on windows
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x1440]
mov eax, 0x14bc
call fcn.0042b440
mov eax, dword [0x44edb8]
xor eax, ebp
mov dword [ebp + 0x143c], eax
mov eax, dword [ebp + 0x1448]
push ebx
push esi
push edi
mov esi, ecx
push dword [esi]
xor ebx, ebx
mov dword [ebp - 0x40], eax
mov byte [ebp - 0x31], bl
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + 0x105]
xor ecx, ecx
push 2
pop edx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004280de
pop ecx
mov dword [ebp - 0x38], eax
cmp eax, ebx
je 0x40a780
xor ecx, ecx
push 2
pop edx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004280de
pop ecx
mov dword [ebp - 0x3c], eax
cmp eax, ebx
je 0x40a777
push dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push dword [ebp - 0x38]
call edi
push dword [esi]
push dword [ebp - 0x3c]
call edi
push dword [ebp - 0x38]
mov byte [ebp - 0x32], 1
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
cmp eax, ebx
je 0x40a634
push 0x441c4c
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x40a634
cmp byte [esi + 0x11], bl
jne 0x40a64a
push dword [ebp - 0x38]
call fcn.0040a4d3
pop ecx
mov byte [ebp - 0x32], al
jmp 0x40a638
mov byte [esi + 0x10], 1
cmp byte [ebp - 0x32], bl
jne 0x40a64a
mov eax, dword [esi + 0x14]
cmp eax, ebx
je 0x40a64a
mov dword [eax], 0xc1
mov edi, dword [ebp - 0x3c]
push edi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
cmp byte [ebp - 0x32], bl
je 0x40a770
push dword [esi + 0x14]
lea ecx, [ebp - 0x31]
push dword [ebp - 0x38]
call fcn.0040a483
test al, al
je 0x40a770
push str.runas
lea ecx, [ebp - 0x30]
call fcn.00405a89
xor eax, eax
push 0x144e
mov word [ebp - 0x14], ax
lea eax, [ebp - 0x12]
push ebx
push eax
call fcn.0042a700
add esp, 0xc
push 0xa28
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0x38
lea eax, [ebp - 0x78]
push ebx
push eax
call fcn.0042a700
add esp, 0xc
mov dword [ebp - 0x7c], 0x3c
mov dword [ebp - 0x78], 0x440
mov dword [ebp - 0x74], ebx
cmp byte [esi + 0x10], bl
je 0x40a6d4
mov dword [ebp - 0x70], ebx
jmp 0x40a6e3
cmp dword [ebp - 0x18], 8
mov eax, dword [ebp - 0x2c]
jae 0x40a6e0
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x68], eax
xor eax, eax
cmp byte [esi + 8], bl
push 6
sete al
push ebx
mov dword [ebp - 0x64], edi
mov dword [ebp - 0x60], eax
call dword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
jl 0x40a765
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x40a754
cmp dword [ebp - 0x44], ebx
je 0x40a754
mov byte [ebp - 0x31], 1
cmp byte [esi + 9], bl
je 0x40a73b
cmp byte [esi + 8], bl
jne 0x40a73b
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_GetProcessId]
push eax
call fcn.0040a530
pop ecx
mov esi, dword [esi + 0xc]
cmp esi, ebx
je 0x40a749
mov eax, dword [ebp - 0x44]
mov dword [esi], eax
jmp 0x40a75f
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40a75f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x14]
mov dword [ecx], eax
call dword [sym.imp.ole32.dll_CoUninitialize]
push ebx
push 1
lea ecx, [ebp - 0x30]
call fcn.0040574b
push edi
call fcn.004299f4
pop ecx
push dword [ebp - 0x38]
call fcn.004299f4
pop ecx
mov ecx, dword [ebp + 0x143c]
mov al, byte [ebp - 0x31]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004298db
add ebp, 0x1440
leave
ret 4