Function at 0x4012c1
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 0x401357
call fcn.004014b5
mov ebx, eax
test ebx, ebx
mov dword [ebp - 8], ebx
jne 0x401357
push str.HOME
call esi
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x401357
push str.USERPROFILE
call esi
mov ebx, eax
pop ecx
test ebx, ebx
mov dword [ebp - 4], str.Application_Data
jne 0x401351
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 0x401351
push str.windir
call esi
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x401351
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 0x401497
cmp dword [ebp - 4], 0
jne 0x401377
push ebx
call sub.MSVCRT.dll_strlen
cmp eax, 2
pop ecx
jne 0x401370
cmp byte [ebx + 1], 0x3a
mov dword [ebp - 4], 0x40e1fc
je 0x401377
mov dword [ebp - 4], 0x4107b0
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 0x4013d1
cmp cl, 0x2f
jne 0x4013ce
mov byte [eax], 0x5c
inc eax
jmp 0x4013c0
mov eax, dword [edi]
cmp eax, 3
jle 0x4013ea
mov ecx, dword [esi]
cmp byte [ecx + eax - 1], 0x5c
jne 0x4013ea
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.0040154f
pop ecx
test eax, eax
pop ecx
je 0x401497
mov eax, dword [esi]
mov ecx, dword [edi]
add eax, ecx
cmp byte [eax - 1], 0x5c
je 0x401418
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 0x401440
test byte [ebp - 0x25], 0x40
jne 0x401489
cmp dword [ebp + 0x14], 0
jne 0x401466
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 0x401497
push dword [esi]
call dword [sym.imp.MSVCRT.dll__mkdir]
test eax, eax
pop ecx
je 0x401489
push 0x800
call dword [sym.imp.MSVCRT.dll_malloc]
mov dword [ebx], eax
push dword [esi]
push str.Could_not_create_directory__s
jmp 0x40145a
push ebx
push dword [esi]
call fcn.0040154f
pop ecx
test eax, eax
pop ecx
jne 0x40149b
xor eax, eax
jmp 0x4014b0
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