Function at 0x4010d4
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 0x401172
push str.ACTIVESTATE_LICENSE
call dword [sym.imp.MSVCRT.dll_getenv]
test eax, eax
pop ecx
je 0x401110
push eax
call dword [sym.imp.MSVCRT.dll__strdup]
test eax, eax
pop ecx
mov dword [ebp - 4], eax
jne 0x401172
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.004012c1
add esp, 0x10
test eax, eax
je 0x40121a
mov eax, dword [ebp - 8]
add eax, 0x14
push eax
call esi
test eax, eax
pop ecx
mov dword [ebp - 4], eax
jne 0x401150
push dword [ebp + 0x14]
call dword [sym.imp.MSVCRT.dll_free]
jmp 0x401219
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 0x4011b1
push 0x800
call esi
pop ecx
mov ecx, dword [ebp + 0xc]
test eax, eax
mov dword [ecx], eax
je 0x4011a8
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 0x40121a
push dword [ebp - 4]
jmp 0x401145
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 0x40121a
push 0x40e164
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp + 0x14], eax
test eax, eax
pop ecx
jne 0x401221
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 0x40120e
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 0x40121a
push dword [ebp - 4]
call edi
pop ecx
xor eax, eax
jmp 0x4012bc
mov esi, dword [ebp - 8]
test esi, esi
je 0x40126b
push dword [ebp + 0x14]
push esi
push edi
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
je 0x401267
push edi
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
je 0x401267
cmp byte [eax + edi - 1], 0x20
jge 0x401253
dec eax
mov byte [eax + edi], 0
jne 0x401245
cmp eax, 0x22
jl 0x401263
cmp byte [edi + 0x20], 0x7c
jne 0x401263
inc eax
sub esi, eax
add edi, eax
test esi, esi
jne 0x401228
test esi, esi
jne 0x40129a
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 0x401296
push dword [ebp - 4]
call esi
pop ecx
xor esi, esi
jmp 0x4012b0
and byte [edi], 0
cmp dword [ebp + 0x10], 0
jne 0x4012ad
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