Function at 0x405010
Capabilities:
Query environment variable

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebx, dword [esp + 0x78]
mov eax, dword [esp + 0x74]
test ebx, ebx
mov dword [eax], 0
mov dword [esp + 0x1c], ebx
je 0x405186
lea eax, [esp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call fcn.00410fc0
test eax, eax
jne 0x405126
mov edi, dword [esp + 0x38]
add edi, 2
mov dword [esp], edi
call sub.msvcrt.dll_malloc
mov esi, eax
mov eax, dword [esp + 0x70]
mov dword [eax], esi
xor eax, eax
test esi, esi
je 0x40515e
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], 0x413531
mov dword [esp], eax
call sub.msvcrt.dll_fopen
test eax, eax
mov ebp, eax
je 0x405246
lea esi, [esi]
test edi, edi
je 0x4050e8
mov dword [esp + 8], ebp
mov dword [esp + 4], edi
mov dword [esp], esi
call sub.msvcrt.dll_fgets
test eax, eax
je 0x405166
mov dword [esp], esi
call sub.msvcrt.dll_strlen
test eax, eax
jne 0x4050cb
jmp 0x405166
sub eax, 1
test eax, eax
mov byte [esi + eax], 0
je 0x405090
cmp byte [esi + eax - 1], 0x1f
jle 0x4050c0
cmp eax, 0x21
jbe 0x405090
cmp byte [esi + 0x20], 0x7c
jne 0x405090
add eax, 1
sub edi, eax
add esi, eax
test edi, edi
jne 0x405094
mov dword [esp], str.Buffer_too_small___perhaps_license_file_was_modified_while_reading_it
call sub.msvcrt.dll__strdup
mov edx, dword [esp + 0x74]
mov dword [edx], eax
mov edx, dword [esp + 0x70]
mov eax, dword [edx]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [esp + 0x70]
test ebx, ebx
mov dword [eax], 0
je 0x4052a9
mov dword [esp], ebp
call sub.msvcrt.dll_fclose
xor eax, eax
jmp 0x40515e
mov dword [esp], 0x800
call sub.msvcrt.dll_malloc
mov edx, dword [esp + 0x74]
test eax, eax
mov dword [edx], eax
je 0x405154
mov edx, dword [esp + 0x1c]
mov dword [esp + 4], str.License_file__s_does_not_exist
mov dword [esp], eax
mov dword [esp + 8], edx
call sub.msvcrt.dll_sprintf
xor eax, eax
test ebx, ebx
je 0x40522d
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
test ebx, ebx
mov byte [esi], 0
je 0x405298
mov dword [esp], ebp
call sub.msvcrt.dll_fclose
add esp, 0x5c
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.ACTIVESTATE_LICENSE
call sub.msvcrt.dll_getenv
test eax, eax
je 0x4051aa
mov dword [esp], eax
call sub.msvcrt.dll__strdup
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x405031
mov ecx, dword [esp + 0x74]
lea edx, [esp + 0x4c]
lea eax, [esp + 0x48]
mov dword [esp], 0
call fcn.004043f0
mov edx, eax
xor eax, eax
test edx, edx
je 0x40515e
mov eax, dword [esp + 0x4c]
add eax, 0x14
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [esp + 0x1c], eax
je 0x405285
mov esi, dword [esp + 0x48]
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
mov dword [esp], eax
mov edi, eax
call sub.msvcrt.dll_strlen
add edi, eax
mov dword [edi], 0x69746341
mov dword [edi + 4], 0x74536576
mov dword [edi + 8], 0x2e657461
mov dword [edi + 0xc], 0x63696c
mov dword [esp], esi
call sub.msvcrt.dll_free
jmp 0x405031
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
mov dword [esp], edx
call sub.msvcrt.dll_free
mov eax, dword [esp + 0x18]
jmp 0x40515e
mov dword [esp], esi
call sub.msvcrt.dll_free
mov dword [esp], 0x800
call sub.msvcrt.dll_malloc
mov edx, dword [esp + 0x74]
test eax, eax
mov dword [edx], eax
je 0x405154
mov edx, dword [esp + 0x1c]
mov dword [esp + 4], str.Cannot_read_license_file__s
mov dword [esp], eax
mov dword [esp + 8], edx
call sub.msvcrt.dll_sprintf
jmp 0x405154
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call sub.msvcrt.dll_free
xor eax, eax
jmp 0x40515e
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_free
jmp 0x405171
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_free
jmp 0x40511a