Function at 0x40108f
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
mov esi, dword [sym.imp.MSVCRT.dll_malloc]
push edi
mov edi, dword [ebp + 0x10]
test edi, edi
mov dword [ebp - 4], edi
jne 0x40112d
push str.ACTIVESTATE_LICENSE
call dword [sym.imp.MSVCRT.dll_getenv]
test eax, eax
pop ecx
je 0x4010cb
push eax
call dword [sym.imp.MSVCRT.dll__strdup]
test eax, eax
pop ecx
mov dword [ebp - 4], eax
jne 0x40112d
push 0
lea eax, [ebp - 8]
push dword [ebp + 0xc]
test byte [ebp + 0x14], 1
push eax
lea eax, [ebp + 0x14]
push eax
call fcn.0040127c
add esp, 0x10
test eax, eax
je 0x4011d5
mov eax, dword [ebp - 8]
add eax, 0x14
push eax
call esi
test eax, eax
pop ecx
mov dword [ebp - 4], eax
jne 0x40110b
push dword [ebp + 0x14]
call dword [sym.imp.MSVCRT.dll_free]
jmp 0x4011d4
push str.ActiveState.lic
push dword [ebp + 0x14]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
push eax
call sub.MSVCRT.dll_strcat
push dword [ebp + 0x14]
call dword [sym.imp.MSVCRT.dll_free]
add esp, 0xc
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll__stat]
pop ecx
test eax, eax
pop ecx
je 0x40116c
push 0x800
call esi
pop ecx
mov ecx, dword [ebp + 0xc]
test eax, eax
mov dword [ecx], eax
je 0x401163
push dword [ebp - 4]
push str.License_file__s_does_not_exist
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
test edi, edi
jne 0x4011d5
push dword [ebp - 4]
jmp 0x401100
mov eax, dword [ebp - 0x18]
add eax, 2
push eax
mov dword [ebp - 8], eax
call esi
mov ebx, dword [ebp + 8]
mov edi, eax
test edi, edi
pop ecx
mov dword [ebx], edi
je 0x4011d5
push 0x40c14c
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp + 0x14], eax
test eax, eax
pop ecx
jne 0x4011dc
push edi
mov edi, dword [sym.imp.MSVCRT.dll_free]
call edi
mov dword [esp], 0x800
call esi
pop ecx
mov ecx, dword [ebp + 0xc]
test eax, eax
mov dword [ecx], eax
je 0x4011c9
push dword [ebp - 4]
push str.Cannot_read_license_file__s
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
cmp dword [ebp + 0x10], 0
jne 0x4011d5
push dword [ebp - 4]
call edi
pop ecx
xor eax, eax
jmp 0x401277
mov esi, dword [ebp - 8]
test esi, esi
je 0x401226
push dword [ebp + 0x14]
push esi
push edi
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
je 0x401222
push edi
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
je 0x401222
cmp byte [eax + edi - 1], 0x20
jge 0x40120e
dec eax
mov byte [eax + edi], 0
jne 0x401200
cmp eax, 0x22
jl 0x40121e
cmp byte [edi + 0x20], 0x7c
jne 0x40121e
inc eax
sub esi, eax
add edi, eax
test esi, esi
jne 0x4011e3
test esi, esi
jne 0x401255
push str.Buffer_too_small___perhaps_license_file_was_modified_while_reading_it
call dword [sym.imp.MSVCRT.dll__strdup]
mov ecx, dword [ebp + 0xc]
mov esi, dword [sym.imp.MSVCRT.dll_free]
mov dword [ecx], eax
push dword [ebx]
call esi
and dword [ebx], 0
cmp dword [ebp + 0x10], 0
pop ecx
pop ecx
jne 0x401251
push dword [ebp - 4]
call esi
pop ecx
xor esi, esi
jmp 0x40126b
and byte [edi], 0
cmp dword [ebp + 0x10], 0
jne 0x401268
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
push 1
pop esi
push dword [ebp + 0x14]
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret