Function at 0x4b5940
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x53273c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x108]
push edi
push 0x104
push eax
push 0
mov dword [0x544ad0], 1
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
mov byte [ebp + eax - 0x108], 0
lea eax, [ebp - 0x108]
push eax
call fcn.004d0290
add esp, 8
test eax, eax
je 0x4b5997
mov byte [eax + 1], 0
push dword [0x5320cc]
call fcn.004d4ed6
add esp, 4
test eax, eax
jne 0x4b59ef
push str.ampl
push esi
call fcn.004d0bf0
add esp, 8
test eax, eax
je 0x4b59ef
mov esi, dword [str.AMPL_INSTALL_DIR]
lea eax, [ebp - 0x108]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
cmp dword [0x544ad0], 0
lea eax, [ebp - 0x108]
push eax
push esi
jne 0x4b59e7
call fcn.00467bb0
jmp 0x4b59ec
call fcn.004e5a56
add esp, 8
push ebx
push dword [0x5320a0]
mov dword [ebp - 0x210], 0
call fcn.004d4ed6
add esp, 4
test eax, eax
je 0x4b5a1f
push eax
call fcn.004b4ec0
mov ebx, eax
mov dword [ebp - 0x210], ebx
jmp 0x4b5ae5
cmp byte [ebp - 0x108], 0
je 0x4b5aaf
xor ecx, ecx
nop
mov al, byte [ebp + ecx - 0x108]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x20d], al
test al, al
jne 0x4b5a30
mov edx, dword [str.ampl.env]
mov esi, edx
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x4b5a50
lea edi, [ebp - 0x20c]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4b5a60
mov ecx, edx
lea eax, [ebp - 0x20c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push 0x4fcad0
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.004d5440
add esp, 8
test eax, eax
je 0x4b5aaf
push eax
call fcn.004d5359
lea eax, [ebp - 0x20c]
push eax
call fcn.004b4ec0
mov ebx, eax
add esp, 8
mov dword [ebp - 0x210], ebx
test ebx, ebx
jne 0x4b5af0
push 0x104
lea eax, [ebp - 0x20c]
push eax
push dword [0x532098]
call fcn.004b4990
add esp, 0xc
test eax, eax
je 0x4b5bb0
lea eax, [ebp - 0x20c]
push eax
call fcn.004b4ec0
mov ebx, eax
mov dword [ebp - 0x210], eax
add esp, 4
test ebx, ebx
je 0x4b5bb0
push dword [0x5320a4]
call fcn.004d4ed6
add esp, 4
test eax, eax
jne 0x4b5bb0
cmp byte [ebp - 0x108], al
je 0x4b5b79
xor ecx, ecx
mov al, byte [ebp + ecx - 0x108]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x20d], al
test al, al
jne 0x4b5b10
mov edx, dword [str.ampl.lic]
mov esi, edx
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x4b5b30
lea edi, [ebp - 0x20c]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4b5b40
mov ecx, edx
lea eax, [ebp - 0x20c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push 0x4fcad0
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.004d5440
add esp, 8
test eax, eax
je 0x4b5b79
push eax
call fcn.004d5359
add esp, 4
jmp 0x4b5b9b
push 0x104
lea eax, [ebp - 0x20c]
push eax
push dword [0x53209c]
call fcn.004b4990
add esp, 0xc
neg eax
sbb eax, eax
neg eax
je 0x4b5bb0
lea eax, [ebp - 0x20c]
push eax
push dword [0x5320a4]
call fcn.004b5900
add esp, 8
cmp byte [ebp - 0x108], 0
je 0x4b5ccd
push dword [0x532088]
call fcn.004d4ed6
mov esi, eax
add esp, 4
test esi, esi
je 0x4b5ccd
mov ecx, esi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4b5be0
sub ecx, edx
mov edx, dword [0x53208c]
lea edi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4b5bf2
sub edx, edi
lea edi, [ebp - 0x108]
lea ebx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x4b5c04
sub edi, ebx
inc ecx
lea eax, [edi + edx]
add eax, ecx
push eax
call fcn.004b58c0
mov ebx, eax
add esp, 4
mov edx, ebx
sub edx, esi
mov cl, byte [esi]
lea esi, [esi + 1]
mov byte [edx + esi - 1], cl
test cl, cl
jne 0x4b5c22
mov edx, dword [0x53208c]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x4b5c37
sub edx, esi
lea edi, [ebx - 1]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4b5c43
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp - 0x108]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x4b5c61
sub edx, esi
lea edi, [ebx - 1]
nop dword [eax]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4b5c70
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x503bec
call fcn.004b4ae0
add esp, 4
test eax, eax
je 0x4b5ca5
push ebx
push 0x503bec
call fcn.004b5900
add esp, 8
push 0x503be4
call fcn.004b4ae0
add esp, 4
test eax, eax
je 0x4b5cc4
push ebx
push 0x503be4
call fcn.004b5900
add esp, 8
push ebx
call fcn.004d2dae
add esp, 4
push str.solver
call fcn.004d4ed6
add esp, 4
pop ebx
test eax, eax
jne 0x4b5d72
push dword [0x5320a8]
call fcn.004d4ed6
mov edi, eax
add esp, 4
test edi, edi
je 0x4b5d52
mov edx, str.none
mov ecx, edi
nop
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x4b5d20
test al, al
je 0x4b5d1c
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x4b5d20
add ecx, 2
add edx, 2
test al, al
jne 0x4b5d00
xor eax, eax
jmp 0x4b5d25
sbb eax, eax
or eax, 1
test eax, eax
mov esi, 0x4fc5ab
mov eax, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
cmovne esi, edi
push esi
push str.solver
call eax
push esi
cmp dword [0x544ad0], 0
push str.solver
jne 0x4b5d6a
call fcn.00467bb0
jmp 0x4b5d6f
mov eax, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push str.minos
push str.solver
call eax
push str.minos
jmp 0x4b5d3d
call fcn.004e5a56
add esp, 8
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x210]
xor ecx, ebp
pop edi
mov dword [0x544ad0], 0
pop esi
call fcn.004ceaf9
mov esp, ebp
pop ebp
ret