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

Disassembly:
push ebp
lea ebp, [esp - 0x804]
sub esp, 0x804
push 0xffffffffffffffff
push 0x100449c3
mov eax, dword fs:[0]
push eax
sub esp, 0xac
mov eax, dword [0x1006d1fc]
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.100027d0
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 0x1005f61c
push eax
mov ecx, dword [eax]
mov byte [ebp - 4], 3
call dword [ecx]
test eax, eax
js 0x1000217f
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x10]
push edx
push 0x1005f63c
push 0x1005f62c
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 0x100021c1
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x10002190
sub ecx, edx
sar ecx, 1
lea edi, [ecx + 1]
cmp edi, 0x3fffffff
jg 0x100021c1
add edi, edi
mov eax, edi
call fcn.1001f1e0
mov eax, esp
push 3
push edi
push esi
push eax
call fcn.10003d03
mov ebx, eax
mov esi, dword [ebp - 0x14]
xor edi, edi
test esi, esi
je 0x100021eb
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x100021cf
sub ecx, edx
sar ecx, 1
lea edi, [ecx + 1]
cmp edi, 0x3fffffff
jle 0x100021ef
xor edi, edi
mov eax, edi
jmp 0x10002206
add edi, edi
mov eax, edi
call fcn.1001f1e0
mov eax, esp
push 3
push edi
push esi
push eax
call fcn.10003d03
xor edi, edi
push ebx
push eax
push 0x100494b4
lea eax, [ebp]
push 0x400
push eax
call fcn.10008840
push 0x44
pop esi
push esi
lea eax, [ebp - 0xb8]
push edi
push eax
call fcn.10022500
mov eax, dword [ebp - 0x40]
mov ebx, edi
push 5
add eax, 0x68
mov dword [ebp - 0xb8], esi
push 0x100494c0
push eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x40], eax
call fcn.10024520
add esp, 0x2c
test eax, eax
jne 0x100024e0
mov eax, 0x400
xor ebx, ebx
push eax
mov dword [ebp - 0x20], eax
lea eax, [ebp + 0x400]
push ebx
push eax
call fcn.10022500
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 0x100494c8
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.10006af6
test eax, eax
je 0x100022ce
cmp dword [ebp - 0x4c], 0
je 0x1000258e
push dword [ebp - 0x4c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1000258e
mov esi, dword [ebp - 0x4c]
lea ecx, [ebp - 0x58]
push ebx
push 0x100494d4
push esi
call fcn.10006af6
test eax, eax
je 0x10002305
cmp dword [ebp - 0x58], 0
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x100022f5
push dword [ebp - 0x58]
call edi
test esi, esi
je 0x1000258e
push esi
call edi
jmp 0x1000258e
mov edi, dword [ebp - 0x58]
lea ecx, [ebp - 0x64]
push ebx
push 0x100494e0
push edi
call fcn.10006af6
test eax, eax
je 0x10002343
cmp dword [ebp - 0x64], 0
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x1000232c
push dword [ebp - 0x64]
call ebx
test edi, edi
je 0x10002333
push edi
call ebx
test esi, esi
je 0x1000258e
push esi
call ebx
jmp 0x1000258e
push ebx
push dword [ebp - 0x40]
mov ebx, dword [ebp - 0x64]
lea ecx, [ebp - 0x38]
push ebx
call fcn.10006af6
test eax, eax
je 0x1000238a
cmp dword [ebp - 0x38], 0
je 0x10002366
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x10002371
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x1000237c
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x1000258e
push esi
jmp 0x100022c3
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp + 0x400]
push eax
push 0x10049510
lea ecx, [ebp - 0x38]
call fcn.10007324
test eax, eax
jne 0x10002357
push eax
mov byte [ebp - 0x21], al
lea eax, [ebp - 0x21]
push eax
push 0x1004951c
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov dword [ebp - 0x3c], eax
test eax, eax
jne 0x1000240c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
jne 0x10002357
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 0x100023dc
sub edx, dword [ebp - 0x20]
push 1
lea eax, [edx + 6]
add eax, ecx
push eax
mov dword [ebp - 0x20], eax
call fcn.1002430f
mov dword [ebp - 0x2c], eax
pop ecx
pop ecx
test eax, eax
jne 0x10002452
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x10002357
jmp 0x10002446
push 1
push eax
call fcn.1002430f
mov dword [ebp - 0x28], eax
pop ecx
pop ecx
test eax, eax
je 0x10002357
push dword [ebp - 0x3c]
push eax
push 0x10049524
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov ecx, eax
mov dword [ebp - 0x3c], ecx
test ecx, ecx
jne 0x100023d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x100023cd
mov eax, dword [ebp - 0x28]
push eax
call fcn.10023ed7
pop ecx
jmp 0x10002357
lea ecx, [ebp + 0x400]
push ecx
push dword [ebp - 0x20]
push eax
call fcn.100244bc
push 0x1004952c
push dword [ebp - 0x20]
push dword [ebp - 0x2c]
call fcn.100244bc
add esp, 0x18
cmp dword [ebp - 0x3c], 0
jbe 0x1000249d
push 0x10049534
push dword [ebp - 0x20]
push dword [ebp - 0x2c]
call fcn.100244bc
mov eax, dword [ebp - 0x28]
push eax
push dword [ebp - 0x20]
push dword [ebp - 0x2c]
call fcn.100244bc
add esp, 0x18
push dword [ebp - 0x2c]
push 0x10049538
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
cmp dword [ebp - 0x38], 0
je 0x100024ba
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x100024c5
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x100024d0
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x100024db
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 0x10002508
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x100024ec
sub ecx, edx
sar ecx, 1
lea edi, [ecx + 1]
cmp edi, 0x3fffffff
jle 0x1000250c
xor edi, edi
mov eax, edi
jmp 0x10002521
add edi, edi
mov eax, edi
call fcn.1001f1e0
mov eax, esp
push 3
push edi
push esi
push eax
call fcn.10003d03
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.1001bd9e
add esp, 0x28
test eax, eax
je 0x10002553
push 0x1388
push dword [ebp - 0x74]
call dword [sym.imp.USER32.dll_WaitForInputIdle]
push 5
push 0x10049540
push dword [ebp - 0x40]
call fcn.10024520
add esp, 0xc
test eax, eax
jne 0x10002575
push ebx
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test ebx, ebx
je 0x10002580
push ebx
call fcn.10023ed7
pop ecx
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x1000258e
push eax
call fcn.10023ed7
pop ecx
mov eax, dword [ebp - 0x10]
mov byte [ebp - 4], 2
test eax, eax
je 0x1000259f
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x18]
mov byte [ebp - 4], 1
test eax, eax
je 0x100025b0
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.1001efb2
add ebp, 0x804
leave
ret 0x10