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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x22c
mov eax, dword [0x40a020]
xor eax, esp
mov dword [esp + reloc.ADVAPI32.dll_EventWrite], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
xor edi, edi
push edi
push edi
push 1
push edi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_HeapSetInformation]
mov dword [esp + 0x24], edi
mov ecx, 0x4011ec
mov eax, ebx
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x402c46
test dx, dx
je 0x402c42
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x402c46
add eax, 4
add ecx, 4
test dx, dx
jne 0x402c20
mov eax, edi
jmp 0x402c4b
sbb eax, eax
sbb eax, reloc.ADVAPI32.dll_EventWrite
mov esi, dword [sym.imp.DUI70.dll_StartMessagePump]
test eax, eax
jne 0x402c61
push edi
call fcn.00402a80
test eax, eax
je 0x402cab
call esi
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x14]
push eax
lea edi, [esp + 0x24]
lea ebx, [esp + 0x14]
call fcn.004033ff
test eax, eax
je 0x402cab
xor ebx, ebx
cmp dword [esp + 0x14], 2
jne 0x402cfc
push 1
push 0x106b
push ebx
call dword [sym.imp.ntdll.dll_WinSqmIncrementDWORD]
cmp dword [esp + 0x20], ebx
jne 0x402cb2
push dword [esp + 0x10]
call fcn.00402ae1
cmp dword [0x40a8c8], ebx
je 0x402cab
call esi
xor eax, eax
jmp 0x402ea4
cmp dword [esp + 0x20], 1
jne 0x402cfc
call fcn.00403377
test eax, eax
je 0x402cfc
push 1
call fcn.00402a80
push 0x104
lea eax, [esp + 0x2c]
push eax
push 0x401150
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x102
ja 0x402cab
push reloc.ADVAPI32.dll_RegisterTraceGuidsW
push ebx
push dword [esp + 0x24]
lea eax, [esp + 0x34]
push eax
push ebx
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
jmp 0x402cab
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
js 0x402cab
call fcn.0040295c
mov dword [0x40a8e0], ebx
mov dword [0x40a8d0], ebx
mov dword [0x40a8e8], 1
mov dword [0x40a8ec], ebx
mov dword [0x40a8cc], 0x401240
mov dword [0x40a040], 0x40a8d0
call fcn.00402a31
push 1
push 1
push 1
push 0x400000
push 0xe
mov dword [esp + 0x20], ebx
call dword [sym.imp.DUI70.dll_InitProcessPriv]
test eax, eax
js 0x402e24
push 2
call dword [sym.imp.DUI70.dll_InitThread]
test eax, eax
js 0x402e24
cmp dword [esp + 0x14], 2
je 0x402d85
push dword [esp + 0x14]
call fcn.00403ff9
jmp 0x402e24
mov edi, dword [esp + 0x18]
lea eax, [esp + 0xc]
push eax
push 4
push 0xca0000
push ebx
mov eax, 0x80000000
push eax
push eax
push eax
push eax
push 0x20
push edi
call dword [sym.imp.USER32.dll_LoadIconW]
push eax
push ebx
push 0x4010f8
call dword [sym.imp.DUI70.dll_public:_static_long_int___stdcall_DirectUI::NativeHWNDHost::Create_unsigned_short_int_const___struct_HWND_____struct_HICON_____int__int__int__int__int__int__unsigned_int__class_DirectUI::NativeHWNDHost___]
cmp dword [esp + 0xc], 0
je 0x402e32
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x14]
lea eax, [esp + 0x18]
push edi
push eax
push dword [esp + 0x1c]
call fcn.00403179
test eax, eax
js 0x402e24
push dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
call dword [sym.imp.DUI70.dll_public:_void___thiscall_DirectUI::Element::EndDefer_unsigned_long_int_]
mov eax, dword [esp + 0xc]
push 1
push ebx
push ebx
push 0x64
push 0x64
push 0xffffffffffffffff
push dword [eax + 4]
call dword [sym.imp.USER32.dll_SetWindowPos]
mov ecx, dword [esp + 0xc]
push 1
call dword [sym.imp.DUI70.dll_public:_void___thiscall_DirectUI::NativeHWNDHost::ShowWindow_int_]
mov eax, dword [esp + 0xc]
push dword [eax + 4]
call fcn.004034c9
xor eax, eax
inc eax
push eax
mov dword [esp + 0x28], eax
call fcn.00402a80
call esi
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x402e32
call dword [sym.imp.DUI70.dll_public:_void___thiscall_DirectUI::NativeHWNDHost::Destroy_void_]
call dword [sym.imp.DUI70.dll_UnInitThread]
push 0x400000
call dword [sym.imp.DUI70.dll_UnInitProcessPriv]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov esi, dword [0x40a040]
mov edi, 0x40a040
cmp esi, edi
je 0x402e80
jmp 0x402e76
mov eax, dword [esi + 8]
or eax, dword [esi + 0xc]
je 0x402e74
push dword [esi + 0xc]
push dword [esi + 8]
call dword [sym.imp.ADVAPI32.dll_UnregisterTraceGuids]
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov esi, dword [esi]
test esi, esi
jne 0x402e5a
mov dword [0x40a040], edi
call fcn.0040298c
cmp dword [0x40a8c8], 0
je 0x402ea0
call dword [sym.imp.DUI70.dll_StartMessagePump]
push dword [0x40a8c8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + reloc.ADVAPI32.dll_EventWrite]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040838b
mov esp, ebp
pop ebp
ret 0x10