Function at 0x4176b4
Capabilities:
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff004
push eax
add esp, 0xffffff9c
push ebx
push esi
push edi
mov eax, 0x4e2e34
call fcn.004c0cc0
lea edi, [ebp - 0x1064]
mov esi, 0x4e18e4
mov ecx, 0x400
lea eax, [ebp - 0x1064]
rep movsd dword es:[edi], dword [esi]
push 0x1000
push eax
push 0x4e2a6b
call sub.KERNEL32.DLL_GetEnvironmentVariableA
test eax, eax
jg 0x41770b
xor eax, eax
mov edx, dword [ebp - 0x60]
mov dword fs:[0], edx
jmp 0x4179cd
mov word [ebp - 0x50], 0x14
lea edx, [ebp - 0x1064]
lea eax, [ebp - 4]
call fcn.004cc624
inc dword [ebp - 0x44]
xor ecx, ecx
mov word [ebp - 0x50], 8
mov word [ebp - 0x50], 0x20
mov dword [ebp - 8], ecx
xor eax, eax
inc dword [ebp - 0x44]
mov edx, 0x4e2a70
mov word [ebp - 0x50], 8
mov word [ebp - 0x50], 0x2c
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x10]
inc dword [ebp - 0x44]
mov word [ebp - 0x50], 8
mov word [ebp - 0x50], 0x38
mov word [ebp - 0x50], 0x44
call fcn.004cc624
inc dword [ebp - 0x44]
mov ecx, dword [eax]
mov dl, 1
mov eax, dword [0x476fec]
call fcn.004775f8
mov dword [ebp - 0x64], eax
dec dword [ebp - 0x44]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.004cc874
mov word [ebp - 0x50], 0x50
mov edx, SysReAllocString
mov eax, dword [ebp - 0x64]
call fcn.004cc564
mov word [ebp - 0x50], 0x5c
mov edx, str.TypeLib8EC38516_F1A9_479C_B2A8_99048465131E1.00_
lea eax, [ebp - 0x14]
call fcn.004cc624
inc dword [ebp - 0x44]
mov edx, dword [eax]
xor ecx, ecx
mov eax, dword [ebp - 0x64]
call fcn.00477234
push eax
dec dword [ebp - 0x44]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.004cc874
pop ecx
test cl, cl
je 0x4178ae
mov word [ebp - 0x50], 0x68
mov edx, 0x4e2aae
lea eax, [ebp - 0x20]
call fcn.004cc624
inc dword [ebp - 0x44]
lea edx, [ebp - 0x24]
mov ecx, dword [eax]
xor eax, eax
push ecx
mov dword [ebp - 0x24], eax
push edx
mov edx, 0x4e2aad
inc dword [ebp - 0x44]
lea eax, [ebp - 0x1c]
call fcn.004cc624
inc dword [ebp - 0x44]
mov edx, str.win32
mov ecx, dword [eax]
lea eax, [ebp - 0x18]
push ecx
call fcn.004cc624
inc dword [ebp - 0x44]
mov edx, dword [eax]
mov eax, dword [ebp - 0x64]
pop ecx
call fcn.0047768c
lea edx, [ebp - 0x24]
lea eax, [ebp - 8]
call fcn.004cc8a4
dec dword [ebp - 0x44]
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.004cc874
dec dword [ebp - 0x44]
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.004cc874
dec dword [ebp - 0x44]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.004cc874
dec dword [ebp - 0x44]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.004cc874
mov word [ebp - 0x50], 0x74
xor ecx, ecx
mov dword [ebp - 0x28], ecx
lea edx, [ebp - 0x28]
inc dword [ebp - 0x44]
mov eax, dword [ebp - 8]
call fcn.0047b454
lea edx, [ebp - 0x28]
lea eax, [ebp - 0xc]
call fcn.004cc8a4
dec dword [ebp - 0x44]
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.004cc874
mov word [ebp - 0x50], 0x38
jmp 0x4178c1
mov word [ebp - 0x50], 8
mov ebx, dword [ebp - 0x64]
mov dword [ebp - 0x30], ebx
test ebx, ebx
je 0x4178ef
mov eax, dword [ebx]
mov dword [ebp - 0x2c], eax
mov word [ebp - 0x50], 0x8c
mov edx, 3
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x50], 0x80
cmp word [ebp - 0x4e], 0
je 0x4178f7
ret
mov word [ebp - 0x50], 0x98
mov edx, 0x4e2aaf
lea eax, [ebp - 0x34]
call fcn.004cc624
inc dword [ebp - 0x44]
xor ecx, ecx
mov dword [ebp - 0x38], ecx
lea ecx, [ebp - 0x38]
inc dword [ebp - 0x44]
lea edx, [ebp - 0x34]
lea eax, [ebp - 4]
call fcn.004cc8cc
lea eax, [ebp - 0x38]
xor edx, edx
mov dword [ebp - 0x3c], edx
lea ecx, [ebp - 0x3c]
inc dword [ebp - 0x44]
lea edx, [ebp - 0xc]
call fcn.004cc8cc
lea edx, [ebp - 0x3c]
lea eax, [ebp - 4]
call fcn.004cc8a4
dec dword [ebp - 0x44]
lea eax, [ebp - 0x3c]
mov edx, 2
call fcn.004cc874
dec dword [ebp - 0x44]
lea eax, [ebp - 0x38]
mov edx, 2
call fcn.004cc874
dec dword [ebp - 0x44]
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.004cc874
cmp dword [ebp - 4], 0
je 0x41797f
mov ecx, dword [ebp - 4]
jmp 0x417984
mov ecx, 0x4e2ab6
push ecx
push str.PATH
call sub.KERNEL32.DLL_SetEnvironmentVariableA
mov al, 1
mov edx, 2
push eax
lea eax, [ebp - 0xc]
dec dword [ebp - 0x44]
call fcn.004cc874
dec dword [ebp - 0x44]
lea eax, [ebp - 8]
mov edx, 2
call fcn.004cc874
dec dword [ebp - 0x44]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004cc874
pop eax
mov edx, dword [ebp - 0x60]
mov dword fs:[0], edx
mov esp, ebp
mov edi, dword [ebp - 0x1070]
mov esi, dword [ebp - 0x106c]
mov ebx, dword [ebp - 0x1068]
pop ebp
ret