Function at 0x40265b
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 0x4026f9
push str.ACTIVESTATE_LICENSE
call dword [sym.imp.MSVCRT.dll_getenv]
cmp eax, edi
pop ecx
je 0x40269a
push eax
call dword [sym.imp.MSVCRT.dll__strdup]
cmp eax, edi
pop ecx
mov dword [ebp - 4], eax
jne 0x4026f9
test byte [ebp + 0x14], 1
push edi
lea eax, [ebp + 0x14]
push ebx
push eax
lea eax, [ebp + 0xc]
push eax
call fcn.00402843
add esp, 0x10
test eax, eax
je 0x40279c
mov eax, dword [ebp + 0x14]
add eax, 0x14
push eax
call esi
cmp eax, edi
pop ecx
mov dword [ebp - 4], eax
jne 0x4026d7
push dword [ebp + 0xc]
call dword [sym.imp.MSVCRT.dll_free]
jmp 0x40279b
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 0x402736
push 0x800
call esi
cmp eax, edi
pop ecx
mov dword [ebx], eax
je 0x40272c
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 0x40279c
push dword [ebp - 4]
jmp 0x4026cc
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 0x40279c
push 0x40e80c
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp + 0xc], eax
test eax, eax
pop ecx
jne 0x4027a3
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 0x402790
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 0x40279c
push dword [ebp - 4]
call edi
pop ecx
xor eax, eax
jmp 0x40283e
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x4027ed
push dword [ebp + 0xc]
push esi
push edi
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
je 0x4027e9
push edi
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
je 0x4027e9
cmp byte [eax + edi - 1], 0x20
jge 0x4027d5
dec eax
mov byte [eax + edi], 0
jne 0x4027c7
cmp eax, 0x22
jb 0x4027e5
cmp byte [edi + 0x20], 0x7c
jne 0x4027e5
inc eax
sub esi, eax
add edi, eax
test esi, esi
jne 0x4027aa
test esi, esi
jne 0x40281c
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 0x402818
push dword [ebp - 4]
call edi
pop ecx
xor esi, esi
jmp 0x402832
and byte [edi], 0
cmp dword [ebp + 0x10], 0
jne 0x40282f
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