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

Disassembly:
push ebp
lea ebp, [esp - 0x804]
sub esp, 0x804
push 0xffffffffffffffff
push 0x10042843
mov eax, dword fs:[0]
push eax
sub esp, 0xac
mov eax, dword [0x1006b1fc]
xor eax, ebp
mov dword [ebp + 0x800], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x40], ebx
xor eax, eax
push eax
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_EnableWindow]
mov ecx, ebx
call fcn.1000280e
movzx eax, word [ebp + 0x810]
push eax
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_EndDialog]
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x44]
lea edx, [ebp - 0x18]
push edx
push 0x1005d62c
push eax
mov ecx, dword [eax]
mov byte [ebp - 4], 3
call dword [ecx]
test eax, eax
js 0x100021bd
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x10]
push edx
push 0x1005d64c
push 0x1005d63c
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0x1c]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x78]
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0x14]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x98]
mov esi, dword [ebp - 0x1c]
xor ebx, ebx
mov byte [ebp], bl
test esi, esi
je 0x100021ff
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x100021ce
sub ecx, edx
sar ecx, 1
lea edi, [ecx + 1]
cmp edi, 0x3fffffff
jg 0x100021ff
add edi, edi
mov eax, edi
call fcn.1001f330
mov eax, esp
push 3
push edi
push esi
push eax
call fcn.10003d69
mov ebx, eax
mov esi, dword [ebp - 0x14]
xor edi, edi
test esi, esi
je 0x10002229
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x1000220d
sub ecx, edx
sar ecx, 1
lea edi, [ecx + 1]
cmp edi, 0x3fffffff
jle 0x1000222d
xor edi, edi
mov eax, edi
jmp 0x10002244
add edi, edi
mov eax, edi
call fcn.1001f330
mov eax, esp
push 3
push edi
push esi
push eax
call fcn.10003d69
xor edi, edi
push ebx
push eax
push 0x10045f9c
lea eax, [ebp]
push 0x400
push eax
call fcn.10008858
push 0x44
pop esi
push esi
lea eax, [ebp - 0xb8]
push edi
push eax
call fcn.10022670
mov eax, dword [ebp - 0x40]
mov ebx, edi
push 5
add eax, 0x68
mov dword [ebp - 0xb8], esi
push 0x10045fa8
push eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x40], eax
call fcn.10024500
add esp, 0x2c
test eax, eax
jne 0x1000251e
mov eax, 0x400
xor ebx, ebx
push eax
mov dword [ebp - 0x20], eax
lea eax, [ebp + 0x400]
push ebx
push eax
call fcn.10022670
add esp, 0xc
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov ebx, 0x20019
push ebx
push 0x10045fb0
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.10006b74
test eax, eax
je 0x1000230c
cmp dword [ebp - 0x4c], 0
je 0x100025cc
push dword [ebp - 0x4c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x100025cc
mov esi, dword [ebp - 0x4c]
lea ecx, [ebp - 0x58]
push ebx
push 0x10045fcc
push esi
call fcn.10006b74
test eax, eax
je 0x10002343
cmp dword [ebp - 0x58], 0
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x10002333
push dword [ebp - 0x58]
call edi
test esi, esi
je 0x100025cc
push esi
call edi
jmp 0x100025cc
mov edi, dword [ebp - 0x58]
lea ecx, [ebp - 0x64]
push ebx
push 0x10045fd8
push edi
call fcn.10006b74
test eax, eax
je 0x10002381
cmp dword [ebp - 0x64], 0
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x1000236a
push dword [ebp - 0x64]
call ebx
test edi, edi
je 0x10002371
push edi
call ebx
test esi, esi
je 0x100025cc
push esi
call ebx
jmp 0x100025cc
push ebx
push dword [ebp - 0x40]
mov ebx, dword [ebp - 0x64]
lea ecx, [ebp - 0x38]
push ebx
call fcn.10006b74
test eax, eax
je 0x100023c8
cmp dword [ebp - 0x38], 0
je 0x100023a4
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x100023af
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x100023ba
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x100025cc
push esi
jmp 0x10002301
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp + 0x400]
push eax
push 0x10045ff4
lea ecx, [ebp - 0x38]
call fcn.100073a2
test eax, eax
jne 0x10002395
push eax
mov byte [ebp - 0x21], al
lea eax, [ebp - 0x21]
push eax
push 0x10046000
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov dword [ebp - 0x3c], eax
test eax, eax
jne 0x1000244a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
jne 0x10002395
mov ecx, dword [ebp - 0x3c]
lea edx, [ebp + 0x400]
lea eax, [edx + 1]
mov dword [ebp - 0x20], eax
mov al, byte [edx]
inc edx
test al, al
jne 0x1000241a
sub edx, dword [ebp - 0x20]
lea eax, [ecx + 6]
add eax, edx
push 1
push eax
mov dword [ebp - 0x20], eax
call fcn.100242e5
mov dword [ebp - 0x2c], eax
pop ecx
pop ecx
test eax, eax
jne 0x10002490
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x10002395
jmp 0x10002484
push 1
push eax
call fcn.100242e5
mov dword [ebp - 0x28], eax
pop ecx
pop ecx
test eax, eax
je 0x10002395
push dword [ebp - 0x3c]
push eax
push 0x10046008
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov ecx, eax
mov dword [ebp - 0x3c], ecx
test ecx, ecx
jne 0x1000240e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x1000240b
mov eax, dword [ebp - 0x28]
push eax
call fcn.10024031
pop ecx
jmp 0x10002395
lea ecx, [ebp + 0x400]
push ecx
push dword [ebp - 0x20]
push eax
call fcn.10024492
push 0x10046010
push dword [ebp - 0x20]
push dword [ebp - 0x2c]
call fcn.10024492
add esp, 0x18
cmp dword [ebp - 0x3c], 0
jbe 0x100024db
push 0x10046018
push dword [ebp - 0x20]
push dword [ebp - 0x2c]
call fcn.10024492
mov eax, dword [ebp - 0x28]
push eax
push dword [ebp - 0x20]
push dword [ebp - 0x2c]
call fcn.10024492
add esp, 0x18
push dword [ebp - 0x2c]
push 0x1004601c
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
cmp dword [ebp - 0x38], 0
je 0x100024f8
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x10002503
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x1000250e
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x10002519
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [ebp - 0x28]
xor edi, edi
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x10002546
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x1000252a
sub ecx, edx
sar ecx, 1
lea edi, [ecx + 1]
cmp edi, 0x3fffffff
jle 0x1000254a
xor edi, edi
mov eax, edi
jmp 0x1000255f
add edi, edi
mov eax, edi
call fcn.1001f330
mov eax, esp
push 3
push edi
push esi
push eax
call fcn.10003d69
lea ecx, [ebp - 0x74]
push ecx
lea ecx, [ebp - 0xb8]
push ecx
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
lea ecx, [ebp]
push ecx
push eax
call fcn.1001be98
add esp, 0x28
test eax, eax
je 0x10002591
push 0x1388
push dword [ebp - 0x74]
call dword [sym.imp.USER32.dll_WaitForInputIdle]
push 5
push 0x10046024
push dword [ebp - 0x40]
call fcn.10024500
add esp, 0xc
test eax, eax
jne 0x100025b3
push ebx
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test ebx, ebx
je 0x100025be
push ebx
call fcn.10024031
pop ecx
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x100025cc
push eax
call fcn.10024031
pop ecx
mov eax, dword [ebp - 0x10]
mov byte [ebp - 4], 2
test eax, eax
je 0x100025dd
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x18]
mov byte [ebp - 4], 1
test eax, eax
je 0x100025ee
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push dword [ebp - 0x14]
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
call esi
push dword [ebp - 0x1c]
call esi
xor eax, eax
lea esp, [ebp - 0xc8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x800]
xor ecx, ebp
call fcn.1001f12f
add ebp, 0x804
leave
ret 0x10