Function at 0x100080d0
Capabilities:
Access peb ldr_data
Create process on windows
Query environment variable
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x10026ab0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
push esi
push edi
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
mov eax, dword [0x10030f6c]
xor ebx, ebx
mov dword [esp + 0x30], 0x3c
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], str.open
mov dword [esp + 0x4c], 5
mov dword [esp + 0x34], 0x40
mov dword [esp + 0xc], eax
push 0x1003407c
lea ecx, [esp + 0x14]
mov dword [esp + 0x78], ebx
call fcn.1001f19d
push 0x400
push 0x400
lea ecx, [esp + 0x14]
mov byte [esp + 0x7c], 1
call fcn.1001f508
mov ecx, dword [esp + 0x84]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0xffffffffffffffff
lea ecx, [esp + 0x10]
call fcn.1001f558
push ebx
push 0x10030a74
lea ecx, [esp + 0x14]
call fcn.1001e480
mov esi, eax
cmp esi, 0xffffffff
je 0x100081f1
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0xc]
mov eax, dword [edx - 8]
sub eax, esi
sub eax, 2
push eax
lea eax, [esp + 0x84]
push eax
call fcn.1001e35c
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x78], 2
call fcn.1001f270
lea ecx, [esp + 0x80]
mov byte [esp + 0x74], 1
call fcn.1001f129
lea ecx, [esp + 0x80]
push esi
push ecx
lea ecx, [esp + 0x14]
call fcn.1001e3d8
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x78], 3
call fcn.1001f270
lea ecx, [esp + 0x80]
mov byte [esp + 0x74], 1
call fcn.1001f129
mov esi, dword [esp + 0x7c]
push ebx
lea ecx, [esp + 0x10]
mov dword [esp + 0x4c], esi
call fcn.1001f508
push ebx
lea ecx, [esp + 0x14]
mov dword [esp + 0x44], eax
call fcn.1001f508
mov edx, dword [esp + 0x40]
push eax
push edx
push esi
push str.RunAndWait___Directory:___s___File_:___s___Parameters_:___s_
mov dword [esp + 0x54], eax
call fcn.10002680
add esp, 0x10
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x100082ef
cmp dword [esp + 0x68], ebx
je 0x100082af
cmp byte [esp + 0x84], bl
je 0x100082af
mov esi, dword [sym.imp.USER32.dll_PeekMessageW]
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
push ebp
mov ebp, dword [sym.imp.USER32.dll_DispatchMessageW]
push 1
push ebx
push ebx
lea ecx, [esp + 0x24]
push ebx
push ecx
call esi
test eax, eax
je 0x1000828c
lea edx, [esp + 0x18]
push edx
call edi
lea eax, [esp + 0x18]
push eax
call ebp
push 1
push ebx
push ebx
lea ecx, [esp + 0x24]
push ebx
push ecx
call esi
test eax, eax
jne 0x1000826e
mov edx, dword [esp + 0x6c]
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x1000825e
mov eax, dword [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x6c], ebx
pop ebp
push 0x2710
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp + 0x10]
mov byte [esp + 0x74], bl
call fcn.1001f129
lea ecx, [esp + 0xc]
mov dword [esp + 0x74], 0xffffffff
call fcn.1001f129
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
add esp, 0x6c
ret
push str.RunAndWait___ShellExecuteEx_function_fail
call fcn.10002680
add esp, 4
lea ecx, [esp + 0x10]
mov byte [esp + 0x74], bl
call fcn.1001f129
lea ecx, [esp + 0xc]
mov dword [esp + 0x74], 0xffffffff
call fcn.1001f129
mov ecx, dword [esp + 0x6c]
pop edi
pop esi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x6c
ret