Function at 0x40b0c9
Capabilities:
Query environment variable

Disassembly:
push 0x54
push 0x415cf8
call fcn.0040be68
xor eax, eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 4], eax
inc eax
mov dword [0x419e38], eax
mov dword [0x41a29c], eax
call fcn.0040a4da
push 9
lea eax, [ebp - 0x30]
push eax
push str.MPCL_WRITE_PIPE_HANDLE
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
call edi
neg eax
sbb eax, eax
neg eax
push eax
call fcn.0040a2a1
lea eax, [ebp - 0x30]
push eax
call fcn.0040a323
pop ecx
pop ecx
mov esi, eax
push 9
lea eax, [ebp - 0x30]
push eax
push str.MPCL_READ_PIPE_HANDLE
call edi
neg eax
sbb eax, eax
neg eax
push eax
call fcn.0040a2a1
lea eax, [ebp - 0x30]
push eax
call fcn.0040a323
mov ebx, eax
push 0x10
call fcn.00408299
add esp, 0xc
test eax, eax
je 0x40b168
mov dword [eax], vtable.ProcessChannel.0
or dword [eax + 4], 0xffffffff
mov dword [eax], vtable.PipeProcessChannel.0
mov dword [eax + 8], esi
mov dword [eax + 0xc], ebx
mov esi, eax
jmp 0x40b16a
xor esi, esi
push 0xa
lea eax, [ebp - 0x30]
push eax
push str.MPCL_SERVER_ID
call edi
neg eax
sbb eax, eax
neg eax
push eax
call fcn.0040a2a1
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.MSVCR80.dll__wtoi]
mov ecx, dword [0x41ab64]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
mov dword [ecx + 4], eax
mov edi, 0x415a28
push edi
call fcn.0040a23c
add esp, 0xc
mov dword [ebp - 0x34], 0x298
mov eax, dword [esi]
push 4
lea ecx, [ebp - 0x34]
push ecx
mov ecx, esi
call dword [eax]
mov ecx, esi
call fcn.0040a07f
sub eax, 0x29e
je 0x40b1ed
dec eax
je 0x40b1e4
xor eax, eax
push eax
push eax
push eax
push 1
call dword [sym.imp.KERNEL32.dll_RaiseException]
and dword [0x41a2b8], 0
jmp 0x40b1f7
mov dword [0x41a2b8], 1
xor ebx, ebx
cmp dword [ebp - 0x3c], ebx
jne 0x40b4d8
mov ecx, esi
call fcn.0040a07f
sub eax, 0x29a
je 0x40b475
dec eax
jne 0x40b1f7
push 0x18
call fcn.00408299
pop ecx
cmp eax, ebx
je 0x40b22d
push esi
mov ecx, eax
call fcn.0040a6f8
mov ebx, eax
mov dword [ebp - 0x58], 0x298
mov eax, dword [esi]
push 4
lea ecx, [ebp - 0x58]
push ecx
mov ecx, esi
call dword [eax]
mov eax, dword [ebx]
sub eax, 0
je 0x40b33a
dec eax
je 0x40b25a
push edi
call fcn.0040a23c
pop ecx
jmp 0x40b1d5
mov eax, dword [ebx + 8]
mov ecx, dword [eax + 0x14]
mov dword [ebp - 0x34], ecx
mov ecx, dword [0x417030]
mov dword [ecx + 0x1c], eax
push dword [0x417030]
call fcn.0040239c
mov eax, dword [ebx + 8]
push dword [eax + 8]
push edi
call fcn.0040a23c
push fcn.00407667
push 0
push dword [0x417030]
mov eax, dword [ebp - 0x34]
imul eax, eax, 0xc
push dword [eax + 0x4148a0]
call fcn.00406147
mov dword [0x419130], eax
push edi
call fcn.0040a23c
add esp, 0x20
mov dword [ebp - 0x64], 0x299
mov eax, dword [esi]
push 4
lea ecx, [ebp - 0x64]
push ecx
mov ecx, esi
call dword [eax]
mov eax, dword [0x419130]
mov dword [ebp - 0x48], eax
mov eax, dword [esi]
push 4
lea ecx, [ebp - 0x48]
push ecx
mov ecx, esi
call dword [eax]
mov eax, dword [0x4188e8]
test eax, eax
je 0x40b30a
push eax
push edi
call fcn.0040a23c
pop ecx
pop ecx
mov dword [ebp - 0x40], 0x29c
mov eax, dword [esi]
push 4
lea ecx, [ebp - 0x40]
push ecx
mov ecx, esi
call dword [eax]
push dword [0x4188e8]
mov ecx, esi
call fcn.0040a0ae
jmp 0x40b324
push edi
call fcn.0040a23c
pop ecx
mov dword [ebp - 0x50], 0x29d
mov eax, dword [esi]
push 4
lea ecx, [ebp - 0x50]
push ecx
mov ecx, esi
call dword [eax]
push 1
call fcn.0040856c
pop ecx
push 1
mov ecx, ebx
call fcn.0040a6dc
jmp 0x40b1f7
mov eax, dword [ebx + 8]
mov eax, dword [eax + 0x14]
imul eax, eax, 0xc
mov ecx, dword [ebx + 0xc]
mov eax, dword [eax + 0x4148a0]
mov eax, dword [eax + ecx*4]
imul eax, eax, 0x24
add eax, 0x417950
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x38], 0
je 0x40b374
cmp eax, dword [ebp - 0x38]
je 0x40b374
push dword [ebp - 0x38]
call fcn.00408eb8
pop ecx
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x38], eax
mov ecx, dword [0x417030]
mov dword [ecx + 8], eax
mov eax, dword [ebx + 8]
mov ecx, dword [0x417030]
mov dword [ecx + 0x1c], eax
push dword [0x417030]
call fcn.0040239c
push dword [0x417030]
call fcn.00403bb2
mov eax, dword [0x417030]
mov eax, dword [eax + 8]
and dword [eax + 0xc], 0xfffffff7
push dword [ebx + 0xc]
mov eax, dword [ebx + 8]
push dword [eax + 8]
push edi
call fcn.0040a23c
push dword [0x417030]
call fcn.00407667
mov dword [0x419130], eax
push edi
call fcn.0040a23c
add esp, 0x1c
mov dword [ebp - 0x60], 0x299
mov eax, dword [esi]
push 4
lea ecx, [ebp - 0x60]
push ecx
mov ecx, esi
call dword [eax]
mov eax, dword [0x419130]
mov dword [ebp - 0x44], eax
mov eax, dword [esi]
push 4
lea ecx, [ebp - 0x44]
push ecx
mov ecx, esi
call dword [eax]
cmp dword [0x419130], 0
je 0x40b40b
push 1
call fcn.0040856c
pop ecx
mov eax, dword [0x4188e8]
test eax, eax
je 0x40b43f
push eax
push edi
call fcn.0040a23c
pop ecx
pop ecx
mov dword [ebp - 0x4c], 0x29c
mov eax, dword [esi]
push 4
lea ecx, [ebp - 0x4c]
push ecx
mov ecx, esi
call dword [eax]
push dword [0x4188e8]
mov ecx, esi
call fcn.0040a0ae
jmp 0x40b459
push edi
call fcn.0040a23c
pop ecx
mov dword [ebp - 0x54], 0x29d
mov eax, dword [esi]
push 4
lea ecx, [ebp - 0x54]
push ecx
mov ecx, esi
call dword [eax]
mov ecx, ebx
call fcn.00409fe8
test eax, eax
je 0x40b1f7
push 1
call fcn.0040856c
pop ecx
jmp 0x40b1f7
mov dword [ebp - 0x5c], 0x298
mov eax, dword [esi]
push 4
lea ecx, [ebp - 0x5c]
push ecx
mov ecx, esi
call dword [eax]
push edi
call fcn.0040a23c
pop ecx
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
push esi
call fcn.004082af
mov dword [esp], fcn.00407667
push ebx
push dword [0x417030]
push 0x417ac0
call fcn.00406147
add esp, 0x10
mov dword [ebp - 0x3c], 1
jmp 0x40b1f7
mov dword [ebp - 4], 0xfffffffe
call fcn.0040beb0
ret