Function at 0x40110e
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [sym.imp.MSVCRT.dll_malloc]
push edi
xor edi, edi
mov dword [ebp - 4], eax
cmp eax, edi
mov dword [ebx], edi
jne 0x4011ac
push str.ACTIVESTATE_LICENSE
call dword [sym.imp.MSVCRT.dll_getenv]
cmp eax, edi
pop ecx
je 0x40114d
push eax
call dword [sym.imp.MSVCRT.dll__strdup]
cmp eax, edi
pop ecx
mov dword [ebp - 4], eax
jne 0x4011ac
test byte [ebp + 0x14], 1
push edi
lea eax, [ebp + 0x14]
push ebx
push eax
lea eax, [ebp + 0xc]
push eax
call fcn.004012f6
add esp, 0x10
test eax, eax
je 0x40124f
mov eax, dword [ebp + 0x14]
add eax, 0x14
push eax
call esi
cmp eax, edi
pop ecx
mov dword [ebp - 4], eax
jne 0x40118a
push dword [ebp + 0xc]
call dword [sym.imp.MSVCRT.dll_free]
jmp 0x40124e
push str.ActiveState.lic
push dword [ebp + 0xc]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
push eax
call sub.MSVCRT.dll_strcat
push dword [ebp + 0xc]
call dword [sym.imp.MSVCRT.dll_free]
add esp, 0xc
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll__stat]
pop ecx
test eax, eax
pop ecx
je 0x4011e9
push 0x800
call esi
cmp eax, edi
pop ecx
mov dword [ebx], eax
je 0x4011df
push dword [ebp - 4]
push str.License_file__s_does_not_exist
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
cmp dword [ebp + 0x10], edi
jne 0x40124f
push dword [ebp - 4]
jmp 0x40117f
mov eax, dword [ebp - 0x14]
add eax, 2
push eax
mov dword [ebp + 0x14], eax
call esi
mov edi, eax
mov eax, dword [ebp + 8]
test edi, edi
pop ecx
mov dword [eax], edi
je 0x40124f
push 0x40c2c4
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp + 0xc], eax
test eax, eax
pop ecx
jne 0x401256
push edi
mov edi, dword [sym.imp.MSVCRT.dll_free]
call edi
mov dword [esp], 0x800
call esi
test eax, eax
pop ecx
mov dword [ebx], eax
je 0x401243
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 0x40124f
push dword [ebp - 4]
call edi
pop ecx
xor eax, eax
jmp 0x4012f1
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x4012a0
push dword [ebp + 0xc]
push esi
push edi
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
je 0x40129c
push edi
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
je 0x40129c
cmp byte [eax + edi - 1], 0x20
jge 0x401288
dec eax
mov byte [eax + edi], 0
jne 0x40127a
cmp eax, 0x22
jb 0x401298
cmp byte [edi + 0x20], 0x7c
jne 0x401298
inc eax
sub esi, eax
add edi, eax
test esi, esi
jne 0x40125d
test esi, esi
jne 0x4012cf
push str.Buffer_too_small___perhaps_license_file_was_modified_while_reading_it
call dword [sym.imp.MSVCRT.dll__strdup]
mov esi, dword [ebp + 8]
mov edi, dword [sym.imp.MSVCRT.dll_free]
mov dword [ebx], eax
push dword [esi]
call edi
and dword [esi], 0
cmp dword [ebp + 0x10], 0
pop ecx
pop ecx
jne 0x4012cb
push dword [ebp - 4]
call edi
pop ecx
xor esi, esi
jmp 0x4012e5
and byte [edi], 0
cmp dword [ebp + 0x10], 0
jne 0x4012e2
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
push 1
pop esi
push dword [ebp + 0xc]
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret