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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10043b65
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x10059084]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
test esi, esi
je 0x1001f96c
xor eax, eax
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x30], 0
lea edx, [ecx + 2]
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1001f6c3
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x40]
call fcn.100077a0
sub esp, 0x18
mov dword [ebp - 4], 0
mov edx, esp
mov ecx, esi
mov dword [edx], 0
lea edi, [ecx + 2]
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1001f701
sub ecx, edi
sar ecx, 1
push ecx
push esi
mov ecx, edx
call fcn.100077a0
lea ecx, [ebp - 0x28]
call fcn.1001efa0
add esp, 0x18
lea ecx, [ebp - 0x40]
push eax
call fcn.10003760
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x1001f767
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1001f75d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1001f988
push edx
push ecx
call fcn.10025ac5
add esp, 8
mov ebx, dword [ebp - 0x30]
test ebx, ebx
je 0x1001f936
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 0
push 0
push str.PATH
call edi
mov esi, eax
test esi, esi
je 0x1001f936
xor ecx, ecx
lea eax, [esi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.10025e1d
add esp, 4
mov dword [ebp - 0x48], eax
push esi
push eax
push str.PATH
call edi
test eax, eax
je 0x1001f92b
mov esi, dword [ebp - 0x48]
xor eax, eax
mov ecx, esi
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1001f7e0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.100077a0
mov byte [ebp - 4], 1
test ebx, ebx
je 0x1001f8de
cmp dword [ebp - 0x2c], 8
lea edx, [ebp - 0x40]
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x28]
cmovae edx, dword [ebp - 0x40]
cmp dword [ebp - 0x14], 8
mov dword [ebp - 0x4c], edx
cmovae ecx, dword [ebp - 0x28]
mov dword [ebp - 0x44], ecx
cmp ebx, eax
ja 0x1001f87e
movzx edi, word [edx]
sub eax, ebx
inc eax
mov esi, ecx
lea eax, [ecx + eax*2]
mov dword [ebp - 0x50], eax
sub eax, esi
mov ecx, 0
sar eax, 1
je 0x1001f856
cmp word [esi], di
je 0x1001f854
cmp eax, 1
je 0x1001f856
add esi, 2
dec eax
cmp word [esi], di
jne 0x1001f846
mov ecx, esi
mov esi, ecx
test esi, esi
je 0x1001f87e
push ebx
call fcn.100045c0
add esp, 4
test eax, eax
je 0x1001f874
mov edx, dword [ebp - 0x4c]
add esi, 2
mov eax, dword [ebp - 0x50]
jmp 0x1001f836
sub esi, dword [ebp - 0x44]
sar esi, 1
cmp esi, 0xffffffff
jne 0x1001f8de
push 0x10052c84
lea ecx, [ebp - 0x28]
call fcn.1001fae0
cmp dword [ebp - 0x2c], 8
lea ecx, [ebp - 0x40]
mov eax, dword [ebp - 0x14]
cmovae ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x18]
sub eax, edx
cmp ebx, eax
ja 0x1001f8cc
cmp dword [ebp - 0x14], 8
lea esi, [ebp - 0x28]
lea eax, [ebx + ebx]
cmovae esi, dword [ebp - 0x28]
lea edi, [edx + ebx]
push eax
push ecx
mov dword [ebp - 0x18], edi
lea eax, [esi + edx*2]
push eax
call fcn.10027920
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
jmp 0x1001f8de
push ebx
push ecx
mov byte [ebp - 0x44], 0
lea ecx, [ebp - 0x28]
push dword [ebp - 0x44]
push ebx
call fcn.10005e50
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x1001f92b
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1001f921
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1001f98d
push edx
push ecx
call fcn.10025ac5
add esp, 8
push dword [ebp - 0x48]
call fcn.10025e26
add esp, 4
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x1001f96c
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1001f962
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1001f992
push edx
push ecx
call fcn.10025ac5
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10025a94
mov esp, ebp
pop ebp
ret
call fcn.1002a52f
call fcn.1002a52f
call fcn.1002a52f
int3