Function at 0x1006f565
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0xc], ebx
jne 0x1006f597
call fcn.10055749
push ebx
push ebx
push ebx
push ebx
push ebx
mov dword [eax], 0x16
call fcn.100556b2
add esp, 0x14
or eax, 0xffffffff
jmp 0x1006f605
push esi
mov esi, dword [eax]
cmp esi, ebx
push edi
mov dword [ebp - 4], esi
je 0x1006f5f5
push 0x3d
push esi
call fcn.1006f8f6
mov edi, eax
cmp edi, ebx
pop ecx
pop ecx
mov dword [ebp - 0x14], edi
je 0x1006f5f5
cmp esi, edi
je 0x1006f5f5
xor eax, eax
cmp byte [edi + 1], bl
sete al
mov dword [ebp - 8], eax
mov eax, dword [0x1007de3c]
cmp eax, dword [0x1007de40]
jne 0x1006f5db
call fcn.1006f50b
mov dword [0x1007de3c], eax
cmp eax, ebx
jne 0x1006f63f
cmp dword [ebp + 0xc], ebx
je 0x1006f608
cmp dword [0x1007de44], ebx
je 0x1006f608
call fcn.1006ef2f
test eax, eax
je 0x1006f63f
call fcn.10055749
mov dword [eax], 0x16
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
cmp dword [ebp - 8], ebx
jne 0x1006f7c9
push 4
call fcn.1005177f
cmp eax, ebx
pop ecx
mov dword [0x1007de3c], eax
je 0x1006f600
mov dword [eax], ebx
cmp dword [0x1007de44], ebx
jne 0x1006f63f
push 4
call fcn.1005177f
cmp eax, ebx
pop ecx
mov dword [0x1007de44], eax
je 0x1006f600
mov dword [eax], ebx
mov esi, dword [0x1007de3c]
cmp esi, ebx
mov dword [ebp - 0x10], esi
je 0x1006f600
sub edi, dword [ebp - 4]
push dword [ebp - 4]
call fcn.1006f4b9
mov edi, eax
cmp edi, ebx
pop ecx
jl 0x1006f6c1
cmp dword [esi], ebx
je 0x1006f6c1
lea esi, [esi + edi*4]
mov eax, dword [esi]
cmp eax, dword [0x1007de40]
jb 0x1006f677
cmp eax, dword [0x1007f570]
jbe 0x1006f67e
push eax
call fcn.10051849
pop ecx
cmp dword [ebp - 8], ebx
jne 0x1006f69e
mov eax, dword [ebp - 4]
mov dword [esi], eax
mov eax, dword [ebp + 8]
mov dword [eax], ebx
jmp 0x1006f714
mov eax, dword [esi + 4]
mov dword [esi], eax
mov eax, dword [ebp - 0x10]
inc edi
lea esi, [eax + edi*4]
cmp dword [esi], ebx
jne 0x1006f692
cmp edi, 0x3fffffff
jae 0x1006f714
push 4
push edi
push dword [0x1007de3c]
call fcn.1006b8f7
add esp, 0xc
cmp eax, ebx
je 0x1006f714
jmp 0x1006f70f
cmp dword [ebp - 8], ebx
jne 0x1006f7bb
cmp edi, ebx
jge 0x1006f6d0
neg edi
lea eax, [edi + 2]
cmp eax, edi
jl 0x1006f600
cmp eax, 0x3fffffff
jae 0x1006f600
push eax
push 4
push dword [0x1007de3c]
call fcn.1006b8f7
add esp, 0xc
cmp eax, ebx
je 0x1006f600
mov edx, dword [ebp - 4]
lea ecx, [eax + edi*4]
mov dword [ecx], edx
mov dword [ecx + 4], ebx
mov ecx, dword [ebp + 8]
mov dword [ecx], ebx
mov dword [0x1007de3c], eax
cmp dword [ebp + 0xc], ebx
je 0x1006f7a5
mov edi, dword [ebp - 4]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1006f725
sub eax, edx
add eax, 2
push 1
push eax
call fcn.10058174
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x1006f7a5
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1006f746
sub eax, edx
push edi
add eax, 2
push eax
push esi
call fcn.1005c24d
add esp, 0xc
test eax, eax
je 0x1006f76e
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.1005560c
add esp, 0x14
mov ecx, dword [ebp - 8]
mov eax, esi
sub eax, edi
add eax, dword [ebp - 0x14]
mov byte [eax], bl
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x1006f79e
or dword [ebp - 0xc], 0xffffffff
call fcn.10055749
mov dword [eax], 0x2a
push esi
call fcn.10051849
pop ecx
cmp dword [ebp - 8], ebx
je 0x1006f7b3
push dword [ebp - 4]
call fcn.10051849
pop ecx
mov eax, dword [ebp - 0xc]
jmp 0x1006f603
push dword [ebp - 4]
call fcn.10051849
mov eax, dword [ebp + 8]
pop ecx
mov dword [eax], ebx
xor eax, eax
jmp 0x1006f603