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

Disassembly:
push ebp
lea ebp, [esp - 0x804]
sub esp, 0x804
push 0xffffffffffffffff
push 0x10040da3
mov eax, dword fs:[0]
push eax
sub esp, 0xa4
mov eax, dword [0x1006a1fc]
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 - 0x24], ebx
xor eax, eax
push eax
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_EnableWindow]
mov ecx, ebx
call fcn.1000269c
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 0x1005c64c
push eax
mov ecx, dword [eax]
mov byte [ebp - 4], 3
call dword [ecx]
test eax, eax
js 0x100020f3
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x10]
push edx
push 0x1005c66c
push 0x1005c65c
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 0x10002135
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x10002104
sub ecx, edx
sar ecx, 1
lea edi, [ecx + 1]
cmp edi, 0x3fffffff
jg 0x10002135
add edi, edi
mov eax, edi
call fcn.1001e180
mov eax, esp
push 3
push edi
push esi
push eax
call fcn.10034373
mov ebx, eax
mov esi, dword [ebp - 0x14]
xor edi, edi
test esi, esi
je 0x1000215f
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x10002143
sub ecx, edx
sar ecx, 1
lea edi, [ecx + 1]
cmp edi, 0x3fffffff
jle 0x10002163
xor edi, edi
mov eax, edi
jmp 0x1000217a
add edi, edi
mov eax, edi
call fcn.1001e180
mov eax, esp
push 3
push edi
push esi
push eax
call fcn.10034373
xor edi, edi
push ebx
push eax
push 0x10044e24
lea eax, [ebp]
push 0x400
push eax
call fcn.100082eb
push 0x44
pop esi
push esi
lea eax, [ebp - 0xb0]
push edi
push eax
call fcn.10020dd0
mov dword [ebp - 0xb0], esi
mov ebx, edi
mov esi, dword [ebp - 0x24]
push 5
add esi, 0x68
mov dword [ebp - 0x28], edi
push 0x10044e30
push esi
mov dword [ebp - 0x5c], esi
call fcn.100233a0
add esp, 0x2c
test eax, eax
jne 0x100023ac
mov eax, 0x400
push eax
mov dword [ebp - 0x28], eax
lea eax, [ebp + 0x400]
push edi
push eax
call fcn.10020dd0
xor eax, eax
lea ecx, [ebp - 0x58]
add esp, 0xc
mov dword [ebp - 0x58], eax
mov edi, 0x20019
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
push edi
push 0x10044e38
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
call fcn.10034373
test eax, eax
je 0x1000224c
lea ecx, [ebp - 0x34]
call fcn.10003fa0
lea ecx, [ebp - 0x40]
call fcn.10003fa0
lea ecx, [ebp - 0x4c]
call fcn.10003fa0
lea ecx, [ebp - 0x58]
call fcn.10003fa0
jmp 0x1000245a
push edi
push 0x10044e44
push dword [ebp - 0x58]
lea ecx, [ebp - 0x4c]
call fcn.10034373
test eax, eax
jne 0x10002227
push edi
push 0x10044e50
push dword [ebp - 0x4c]
lea ecx, [ebp - 0x40]
call fcn.10034373
lea ecx, [ebp - 0x34]
test eax, eax
jne 0x1000222a
push edi
push esi
push dword [ebp - 0x40]
call fcn.10034373
lea ecx, [ebp - 0x34]
test eax, eax
jne 0x1000222a
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp + 0x400]
push eax
push 0x10044e6c
call fcn.10034373
test eax, eax
jne 0x10002227
mov edi, dword [sym.imp.kernel32.dll_GetEnvironmentVariableA]
push eax
mov byte [ebp - 0x1d], al
lea eax, [ebp - 0x1d]
push eax
push 0x10044e78
call edi
mov esi, eax
test esi, esi
jne 0x10002306
call dword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0xcb
jne 0x10002227
lea ecx, [ebp + 0x400]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100022d8
sub ecx, edx
push 1
lea eax, [ecx + 6]
add eax, esi
push eax
mov dword [ebp - 0x24], eax
call fcn.10034373
mov edi, eax
mov dword [ebp - 0x28], edi
pop ecx
pop ecx
test edi, edi
jne 0x1000233f
test ebx, ebx
je 0x10002227
jmp 0x10002333
push 1
push esi
call fcn.10034373
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x10002227
push esi
push ebx
push 0x10044e80
call edi
mov esi, eax
test esi, esi
jne 0x100022cf
call dword [sym.imp.kernel32.dll_GetLastError]
test eax, eax
je 0x100022cf
push ebx
call fcn.10034373
pop ecx
jmp 0x10002227
lea eax, [ebp + 0x400]
push eax
push dword [ebp - 0x24]
push edi
call fcn.10034373
push 0x10044e88
push dword [ebp - 0x24]
push edi
call fcn.10034373
add esp, 0x18
test esi, esi
je 0x1000237e
mov esi, dword [ebp - 0x24]
push 0x10044e90
push esi
push edi
call fcn.10034373
push ebx
push esi
push edi
call fcn.10034373
add esp, 0x18
push edi
push 0x10044e94
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
lea ecx, [ebp - 0x34]
call fcn.10003fa0
lea ecx, [ebp - 0x40]
call fcn.10003fa0
lea ecx, [ebp - 0x4c]
call fcn.10003fa0
lea ecx, [ebp - 0x58]
call fcn.10003fa0
xor edi, edi
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x100023d4
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x100023b8
sub ecx, edx
sar ecx, 1
lea edi, [ecx + 1]
cmp edi, 0x3fffffff
jle 0x100023d8
xor edi, edi
mov eax, edi
jmp 0x100023ed
add edi, edi
mov eax, edi
call fcn.1001e180
mov eax, esp
push 3
push edi
push esi
push eax
call fcn.10034373
lea ecx, [ebp - 0x6c]
push ecx
lea ecx, [ebp - 0xb0]
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.10034373
add esp, 0x28
test eax, eax
je 0x1000241f
push 0x1388
push dword [ebp - 0x6c]
call dword [sym.imp.USER32.dll_WaitForInputIdle]
push 5
push 0x10044e9c
push dword [ebp - 0x5c]
call fcn.100233a0
add esp, 0xc
test eax, eax
jne 0x10002441
push ebx
push str.PATH
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
test ebx, ebx
je 0x1000244c
push ebx
call fcn.10034373
pop ecx
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x1000245a
push eax
call fcn.10034373
pop ecx
mov eax, dword [ebp - 0x10]
mov byte [ebp - 4], 2
test eax, eax
je 0x1000246b
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x18]
mov byte [ebp - 4], 1
test eax, eax
je 0x1000247c
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 - 0xc0]
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.1001df6b
add ebp, 0x804
leave
ret 0x10