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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100d5eb3
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x80
mov eax, dword [0x10102fa0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
cmp dword [ebp + 0xc], 1
jne 0x10021190
push 0x28
push 0
push 0x1011ecb0
call fcn.1008e210
add esp, 0xc
mov eax, dword [ebp + 8]
mov dword [0x1011ecd0], eax
mov ecx, dword [0x1011ecd0]
mov dword [0x1011edf0], ecx
mov dword [0x1011ecb0], 2
push 0x250
call fcn.1008e181
add esp, 4
mov dword [ebp - 0x80], eax
mov dword [ebp - 4], 0
cmp dword [ebp - 0x80], 0
je 0x1002109e
push 0
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 0x80]
call fcn.10065970
mov dword [ebp - 0x88], eax
jmp 0x100210a8
mov dword [ebp - 0x88], 0
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x7c], eax
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x7c]
mov dword [0x1011ecd8], ecx
mov edx, dword [0x1011ec68]
mov eax, dword [0x1011ec68]
mov ecx, dword [edx + 0x48]
xor ecx, dword [eax + 0x6c]
mov edx, dword [0x1011ec68]
xor ecx, dword [edx + 0x64]
and ecx, 0x40000
je 0x10021181
mov al, byte [0x101054e2]
mov byte [ebp - 0x70], al
push 0x3f
push 0
lea ecx, [ebp - 0x6f]
push ecx
call fcn.1008e210
add esp, 0xc
push 0x40
lea edx, [ebp - 0x70]
push edx
push 0x101054d0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x10021125
lea eax, [ebp - 0x70]
push eax
call fcn.100212c0
add esp, 4
mov dword [0x1011ede8], eax
push fcn.1002a550
lea ecx, [ebp - 0x30]
push ecx
call fcn.10021360
add esp, 8
mov dword [ebp - 0x8c], eax
mov edx, dword [ebp - 0x8c]
mov dword [ebp - 0x90], edx
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x90]
call fcn.10023070
push eax
push 0x101054d0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x30]
call fcn.10022f90
mov eax, 1
jmp 0x10021299
call fcn.1002a550
jmp 0x10021299
cmp dword [ebp + 0xc], 0
jne 0x10021254
mov eax, dword [0x1011ec68]
mov ecx, dword [0x1011ec68]
mov edx, dword [eax + 0x48]
xor edx, dword [ecx + 0x6c]
mov eax, dword [0x1011ec68]
xor edx, dword [eax + 0x64]
and edx, 0x40000
je 0x100211d4
push 0
push 0x101054d0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov eax, 1
jmp 0x10021299
mov dword [ebp - 4], 2
mov dword [ebp - 0x74], 1
cmp dword [0x1011ecd4], 0
je 0x1002121a
mov byte [ebp - 4], 3
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [0x1011ecd4]
mov dword [ebp - 0x74], eax
jmp 0x10021213
mov dword [ebp - 4], 2
call fcn.1002a520
mov eax, dword [ebp - 0x74]
jmp 0x10021299
mov dword [ebp - 0x78], 1
cmp dword [0x1011ecd4], 0
je 0x10021296
mov dword [ebp - 4], 6
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [0x1011ecd4]
mov dword [ebp - 0x78], eax
jmp 0x1002128f
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x78]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1008e707
mov esp, ebp
pop ebp
ret 0xc