Function at 0x40f540
Capabilities:
Create process on windows
Enumerate gui resources
Query environment variable

Disassembly:
mov eax, 0x14b8
call fcn.00440690
mov eax, dword [0x468d80]
xor eax, esp
mov dword [esp + 0x14b4], eax
mov eax, dword [esp + 0x14bc]
push ebx
push ebp
push esi
mov esi, ecx
mov ecx, dword [esi]
push edi
xor bl, bl
push ecx
mov dword [esp + 0x18], eax
mov byte [esp + 0x17], bl
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ebp, [eax + 0x105]
xor ecx, ecx
mov eax, ebp
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0043e26f
mov edi, eax
add esp, 4
test edi, edi
je 0x40f78c
xor ecx, ecx
mov eax, ebp
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0043e26f
mov ebx, eax
add esp, 4
mov dword [esp + 0x18], ebx
test ebx, ebx
je 0x40f77d
mov eax, dword [esi]
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push eax
push edi
call ebp
mov ecx, dword [esi]
push ecx
push ebx
call ebp
push edi
mov bl, 1
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
test eax, eax
je 0x40f6bc
push str..exe
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x40f6bc
cmp byte [esi + 0x11], al
jne 0x40f622
mov ecx, edi
call fcn.0040f4d0
mov bl, al
test bl, bl
jne 0x40f622
mov eax, dword [esi + 0x14]
test eax, eax
je 0x40f622
mov dword [eax], 0xc1
mov ebp, dword [esp + 0x18]
push ebp
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test bl, bl
je 0x40f774
mov edx, dword [esi + 0x14]
push edx
push edi
lea ecx, [esp + 0x1b]
call fcn.0040f460
test al, al
je 0x40f774
push str.runas
lea ecx, [esp + 0x5c]
call fcn.00408af0
push 0x144e
xor ebx, ebx
lea ecx, [esp + 0x7a]
xor eax, eax
push ebx
push ecx
mov word [esp + 0x80], ax
call fcn.0043f950
mov eax, dword [esp + 0x20]
add esp, 0xc
push 0xa28
lea edx, [esp + 0x78]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0x38
lea ecx, [esp + 0x24]
push ebx
push ecx
call fcn.0043f950
add esp, 0xc
mov dword [esp + 0x1c], 0x3c
mov dword [esp + 0x20], 0x440
mov dword [esp + 0x24], ebx
cmp byte [esi + 0x10], bl
je 0x40f6c5
mov dword [esp + 0x28], ebx
jmp 0x40f6de
mov byte [esi + 0x10], 1
jmp 0x40f622
cmp dword [esp + 0x70], 8
jb 0x40f6d6
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x28], edx
jmp 0x40f6de
lea eax, [esp + 0x5c]
mov dword [esp + 0x28], eax
xor edx, edx
cmp byte [esi + 8], dl
push 6
sete dl
lea ecx, [esp + 0x78]
push ebx
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], edx
call dword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
jl 0x40f76b
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x40f75a
mov eax, dword [esp + 0x54]
cmp eax, ebx
je 0x40f75a
cmp byte [esi + 9], 0
mov byte [esp + 0x13], 1
je 0x40f746
cmp byte [esi + 8], 0
jne 0x40f746
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessId]
push eax
push 0x40f4f0
call dword [sym.imp.USER32.dll_EnumWindows]
mov eax, dword [esp + 0x54]
mov esi, dword [esi + 0xc]
cmp esi, ebx
je 0x40f751
mov dword [esi], eax
jmp 0x40f765
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40f765
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x14]
mov dword [ecx], eax
call dword [sym.imp.ole32.dll_CoUninitialize]
lea ecx, [esp + 0x58]
call fcn.00408610
push ebp
call fcn.0043eee7
add esp, 4
push edi
call fcn.0043eee7
mov al, byte [esp + 0x17]
add esp, 4
jmp 0x40f78e
mov al, bl
mov ecx, dword [esp + 0x14c4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0043eed8
add esp, 0x14b8
ret 4