Function at 0x4012f6
Capabilities:
Create directory
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
mov esi, dword [sym.imp.MSVCRT.dll_getenv]
push edi
push str.ACTIVESTATE_HOME
call esi
and dword [ebp - 8], 0
mov ebx, eax
test ebx, ebx
pop ecx
jne 0x40138c
call fcn.004014ea
mov ebx, eax
test ebx, ebx
mov dword [ebp - 8], ebx
jne 0x40138c
push str.HOME
call esi
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x40138c
push str.USERPROFILE
call esi
mov ebx, eax
pop ecx
test ebx, ebx
mov dword [ebp - 4], str.Application_Data
jne 0x401386
push str.HOMEDRIVE
call esi
mov ebx, eax
mov dword [esp], str.HOMEPATH
call esi
test ebx, ebx
pop ecx
mov dword [ebp - 4], eax
jne 0x401386
push str.windir
call esi
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x401386
push str.Couldnt_find_HOME___USERPROFILE___HOMEDRIVEHOMEPATH___windir
call dword [sym.imp.MSVCRT.dll__strdup]
pop ecx
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
jmp 0x4014cc
cmp dword [ebp - 4], 0
jne 0x4013ac
push ebx
call sub.MSVCRT.dll_strlen
cmp eax, 2
pop ecx
jne 0x4013a5
cmp byte [ebx + 1], 0x3a
mov dword [ebp - 4], 0x40c378
je 0x4013ac
mov dword [ebp - 4], 0x40c374
push dword [ebp - 4]
call sub.MSVCRT.dll_strlen
push ebx
mov esi, eax
call sub.MSVCRT.dll_strlen
mov edi, dword [ebp + 0xc]
add eax, esi
mov dword [edi], eax
add eax, 0x14
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, dword [ebp + 8]
add esp, 0xc
push dword [ebp - 4]
mov dword [esi], eax
push ebx
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
push eax
call sub.MSVCRT.dll_strcat
push dword [ebp - 8]
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esi]
add esp, 0xc
mov cl, byte [eax]
test cl, cl
je 0x401406
cmp cl, 0x2f
jne 0x401403
mov byte [eax], 0x5c
inc eax
jmp 0x4013f5
mov eax, dword [edi]
cmp eax, 3
jbe 0x40141f
mov ecx, dword [esi]
cmp byte [ecx + eax - 1], 0x5c
jne 0x40141f
dec eax
mov dword [edi], eax
mov ecx, dword [esi]
and byte [ecx + eax], 0
mov ebx, dword [ebp + 0x10]
push ebx
push dword [esi]
call fcn.004016c1
pop ecx
test eax, eax
pop ecx
je 0x4014cc
mov eax, dword [esi]
mov ecx, dword [edi]
add eax, ecx
cmp byte [eax - 1], 0x5c
je 0x40144d
mov byte [eax], 0x5c
inc dword [edi]
mov eax, dword [edi]
mov ecx, dword [esi]
and byte [ecx + eax], 0
push str.ActiveState
push dword [esi]
call sub.MSVCRT.dll_strcat
add dword [edi], 0xb
lea eax, [ebp - 0x2c]
push eax
push dword [esi]
call dword [sym.imp.MSVCRT.dll__stat]
add esp, 0x10
test eax, eax
jne 0x401475
test byte [ebp - 0x25], 0x40
jne 0x4014be
cmp dword [ebp + 0x14], 0
jne 0x40149b
push 0x800
call dword [sym.imp.MSVCRT.dll_malloc]
mov dword [ebx], eax
push dword [esi]
push str.Directory__s_does_not_exist
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
jmp 0x4014cc
push dword [esi]
call dword [sym.imp.MSVCRT.dll__mkdir]
test eax, eax
pop ecx
je 0x4014be
push 0x800
call dword [sym.imp.MSVCRT.dll_malloc]
mov dword [ebx], eax
push dword [esi]
push str.Could_not_create_directory__s
jmp 0x40148f
push ebx
push dword [esi]
call fcn.004016c1
pop ecx
test eax, eax
pop ecx
jne 0x4014d0
xor eax, eax
jmp 0x4014e5
mov eax, dword [esi]
mov ecx, dword [edi]
push 1
mov byte [eax + ecx], 0x5c
inc dword [edi]
mov edi, dword [edi]
mov eax, dword [esi]
and byte [eax + edi], 0
pop eax
pop edi
pop esi
pop ebx
leave
ret