Function at 0x100174a0
Capabilities:
Set environment variable

Disassembly:
sub esp, 4
cmp dword [esp + 8], 0
push ebx
push esi
push edi
push ebp
je 0x100176e3
mov edx, dword [esp + 0x18]
push 0x3d
push edx
call fcn.100177c0
add esp, 8
mov ebp, eax
test ebp, ebp
je 0x100176e3
cmp ebp, dword [esp + 0x18]
je 0x100176e3
cmp byte [ebp + 1], 1
sbb eax, eax
mov ecx, dword [0x10024978]
neg eax
mov dword [esp + 0x10], eax
cmp dword [0x10024974], ecx
jne 0x10017502
mov eax, dword [0x10024974]
push eax
call fcn.10017750
add esp, 4
mov dword [0x10024974], eax
cmp dword [0x10024974], 0
jne 0x100175b2
cmp dword [esp + 0x1c], 0
je 0x10017539
cmp dword [0x1002497c], 0
je 0x10017539
call fcn.10016bf0
test eax, eax
je 0x100175b2
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [esp + 0x10], 0
je 0x1001754a
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x10024974], 0
jne 0x1001757e
push 4
call fcn.1000a6d0
add esp, 4
mov dword [0x10024974], eax
test eax, eax
jne 0x10017573
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, dword [0x10024974]
mov dword [eax], 0
cmp dword [0x1002497c], 0
jne 0x100175b2
push 4
call fcn.1000a6d0
add esp, 4
mov dword [0x1002497c], eax
test eax, eax
jne 0x100175a7
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, dword [0x1002497c]
mov dword [eax], 0
mov esi, dword [0x10024974]
sub ebp, dword [esp + 0x18]
mov edx, dword [esp + 0x18]
push ebp
push edx
call fcn.100176f0
add esp, 8
mov edi, eax
test edi, edi
jl 0x1001761a
cmp dword [esi], 0
je 0x1001761a
cmp dword [esp + 0x10], 0
je 0x10017611
lea ebx, [esi + edi*4]
mov eax, dword [ebx]
push eax
call fcn.1000a5f0
add esp, 4
cmp dword [ebx], 0
je 0x100175fe
mov eax, dword [ebx + 4]
add ebx, 4
inc edi
mov dword [ebx - 4], eax
cmp dword [ebx], 0
jne 0x100175ef
shl edi, 2
push edi
push esi
call fcn.10010590
add esp, 8
test eax, eax
je 0x10017662
jmp 0x1001765d
mov edx, dword [esp + 0x18]
mov dword [esi + edi*4], edx
jmp 0x10017662
cmp dword [esp + 0x10], 0
jne 0x100176d9
test edi, edi
jge 0x1001762b
neg edi
lea eax, [edi*4 + 8]
push eax
push esi
call fcn.10010590
add esp, 8
test eax, eax
jne 0x1001764d
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
lea ecx, [eax + edi*4]
mov edx, dword [esp + 0x18]
mov dword [ecx], edx
mov dword [ecx + 4], 0
mov dword [0x10024974], eax
cmp dword [esp + 0x1c], 0
je 0x100176cf
mov edi, dword [esp + 0x18]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.1000a6d0
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x100176cf
mov edi, dword [esp + 0x18]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp dword [esp + 0x10], 1
sbb ecx, ecx
lea eax, [ebp + ebx]
mov byte [eax], 0
lea eax, [eax + 1]
and ecx, eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push ebx
call fcn.1000a5f0
add esp, 4
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret