Function at 0x4021e0
Capabilities:
Create directory
Get common file path
Set environment variable

Disassembly:
push 0xffffffffffffffff
push 0x429571
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x130
push ebx
push ebp
push esi
mov ebx, ecx
mov byte [esp + 0xf], 0
mov al, byte [esp + 0xf]
push edi
push 0
lea ecx, [esp + 0x18]
mov dword [esp + 0x38], ebx
mov byte [esp + 0x18], al
call fcn.00404060
mov edi, 0x42ea90
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x42ea90
lea ecx, [esp + 0x1c]
call fcn.00404250
mov eax, dword [esp + 0x150]
mov dword [esp + 0x148], 0
test eax, eax
je 0x40255f
push str.TEMP
call fcn.00422dcf
mov edx, eax
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
lea ecx, [esp + 0x1c]
call fcn.00404250
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x402319
push 0x42c4d8
call fcn.00422dcf
mov edx, eax
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
lea ecx, [esp + 0x1c]
call fcn.00404250
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x402319
lea ecx, [esp + 0x38]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x40255f
lea edi, [esp + 0x38]
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x3b], 0
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esp + 0x38]
push ecx
push edx
lea ecx, [esp + 0x1c]
call fcn.00404250
mov edi, str.TEMP
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.TEMP
lea ecx, [esp + 0x1c]
call fcn.00404190
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40255f
mov esi, dword [esp + 0x18]
test esi, esi
jne 0x402326
mov esi, 0x42a138
mov al, byte [esp + 0x13]
push 0
lea ecx, [esp + 0x28]
mov byte [esp + 0x28], al
call fcn.00404060
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x28]
push ebp
call fcn.00403e70
test al, al
je 0x402375
mov edi, dword [esp + 0x28]
mov ecx, ebp
mov edx, ecx
push ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x28]
call fcn.00405860
lea eax, [esp + 0x24]
mov ecx, ebx
push eax
mov byte [esp + 0x14c], 1
call fcn.004038c0
test al, al
push 1
lea ecx, [esp + 0x28]
sete bl
mov byte [esp + 0x14c], 0
call fcn.00404060
test bl, bl
je 0x4023c3
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x4023b2
mov eax, 0x42a138
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x40255f
mov esi, dword [esp + 0x18]
test esi, esi
jne 0x4023d0
mov esi, 0x42a138
mov cl, byte [esp + 0x13]
push 0
mov byte [esp + 0x28], cl
lea ecx, [esp + 0x28]
call fcn.00404060
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x28]
push ebp
call fcn.00403e70
test al, al
je 0x40241f
mov edi, dword [esp + 0x28]
mov ecx, ebp
mov edx, ecx
push ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x28]
call fcn.00405860
mov ecx, dword [esp + 0x34]
lea eax, [esp + 0x24]
push eax
mov byte [esp + 0x14c], 2
call fcn.004038c0
test al, al
push 1
lea ecx, [esp + 0x28]
sete bl
mov byte [esp + 0x14c], 0
call fcn.00404060
test bl, bl
jne 0x40255f
push 0x42c4d8
call fcn.00422dcf
add esp, 4
test eax, eax
jne 0x402487
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x402473
mov eax, 0x42a138
push eax
push 0x42c4d8
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
je 0x40255f
mov ebp, dword [esp + 0x1c]
lea esi, [ebp - 1]
cmp ebp, esi
jb 0x4024ce
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4024ce
mov cl, byte [eax - 1]
test cl, cl
je 0x4024ba
cmp cl, 0xff
je 0x4024ba
push 0
push ebp
lea ecx, [esp + 0x1c]
call fcn.00403e70
mov ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4024ca
mov byte [eax - 1], 0xff
mov ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
add eax, esi
jmp 0x4024d3
mov eax, 0x42a138
cmp byte [eax], 0x5c
je 0x402540
mov edi, 0x42c4d4
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
mov ecx, dword [0x42a13c]
sub ecx, ebp
cmp ecx, esi
ja 0x4024fe
call fcn.004220b6
mov ebp, dword [esp + 0x1c]
test esi, esi
jbe 0x402540
add ebp, esi
push 0
push ebp
lea ecx, [esp + 0x1c]
call fcn.00403e70
test al, al
je 0x402540
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov ecx, esi
mov esi, 0x42c4d4
lea edi, [eax + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], ebp
mov byte [eax + ebp], 0
mov ecx, dword [0x42a13c]
lea edx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x154]
push 0
push edx
call fcn.00403ae0
mov byte [esp + 0x13], 1
mov ecx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
test ecx, ecx
pop ebx
je 0x402587
mov al, byte [ecx - 1]
test al, al
je 0x40257d
cmp al, 0xff
je 0x40257d
dec al
mov byte [ecx - 1], al
jmp 0x402587
dec ecx
push ecx
call fcn.0042240d
add esp, 4
mov ecx, dword [esp + 0x130]
mov al, byte [esp + 3]
mov dword fs:[0], ecx
add esp, 0x13c
ret 4