Function at 0x40127c
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 0x401312
call fcn.00401470
mov ebx, eax
test ebx, ebx
mov dword [ebp - 8], ebx
jne 0x401312
push str.HOME
call esi
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x401312
push str.USERPROFILE
call esi
mov ebx, eax
pop ecx
test ebx, ebx
mov dword [ebp - 4], str.Application_Data
jne 0x40130c
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 0x40130c
push str.windir
call esi
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x40130c
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 0x401452
cmp dword [ebp - 4], 0
jne 0x401332
push ebx
call sub.MSVCRT.dll_strlen
cmp eax, 2
pop ecx
jne 0x40132b
cmp byte [ebx + 1], 0x3a
mov dword [ebp - 4], 0x40c1e4
je 0x401332
mov dword [ebp - 4], 0x40e374
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 0x40138c
cmp cl, 0x2f
jne 0x401389
mov byte [eax], 0x5c
inc eax
jmp 0x40137b
mov eax, dword [edi]
cmp eax, 3
jle 0x4013a5
mov ecx, dword [esi]
cmp byte [ecx + eax - 1], 0x5c
jne 0x4013a5
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.0040150a
pop ecx
test eax, eax
pop ecx
je 0x401452
mov eax, dword [esi]
mov ecx, dword [edi]
add eax, ecx
cmp byte [eax - 1], 0x5c
je 0x4013d3
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 0x4013fb
test byte [ebp - 0x25], 0x40
jne 0x401444
cmp dword [ebp + 0x14], 0
jne 0x401421
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 0x401452
push dword [esi]
call dword [sym.imp.MSVCRT.dll__mkdir]
test eax, eax
pop ecx
je 0x401444
push 0x800
call dword [sym.imp.MSVCRT.dll_malloc]
mov dword [ebx], eax
push dword [esi]
push str.Could_not_create_directory__s
jmp 0x401415
push ebx
push dword [esi]
call fcn.0040150a
pop ecx
test eax, eax
pop ecx
jne 0x401456
xor eax, eax
jmp 0x40146b
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