Function at 0x40c310
Capabilities:
Create directory
Delete file
Get common file path
Set current directory
Set environment variable

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x450a0b
push eax
mov dword fs:[0], esp
sub esp, 0x228
push ebx
mov ebx, dword [esp + 0x240]
push ebp
push esi
mov eax, dword [ebx + 0x188]
push edi
test eax, eax
mov ebp, ecx
je 0x40c423
mov edi, dword [ebx + 0x1f8]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x14]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
test ecx, ecx
jle 0x40c390
cmp byte [esp + ecx + 0x13], 0x5c
je 0x40c390
mov byte [esp + ecx + 0x14], 0x5c
mov byte [esp + ecx + 0x15], 0
mov edi, str.Temp
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x18]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edi, 0x46c8c0
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 0x46df70
call esi
lea ecx, [esp + 0x14]
push ecx
push str.TEMP
call esi
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
jmp 0x40c433
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov eax, dword [esp + 0x248]
or ecx, 0xffffffff
lea edx, [esp + 0x14]
push 0x2e
mov edi, dword [eax + 0x20]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
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 + 0x18]
push ecx
call fcn.0041e700
add esp, 8
lea edx, [esp + 0x14]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
or edi, 0xffffffff
cmp esi, edi
je 0x40c5f9
mov eax, dword [ebx + 0x188]
test eax, eax
je 0x40c4d9
mov ecx, dword [esp + 0x248]
lea eax, [esp + 0x118]
push eax
push ecx
mov ecx, ebx
call fcn.004130a0
mov ebx, dword [ebx + 0x1a0]
push 0
push 0
lea eax, [esp + 0x120]
mov edx, dword [ebx]
push esi
push eax
mov ecx, ebx
call dword [edx + 0xc]
jmp 0x40c4e9
mov ecx, dword [esp + 0x248]
push esi
push ecx
mov ecx, ebx
call fcn.00413d40
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call ebx
mov edx, dword [0x46ed98]
mov dword [esp + 0x10], edx
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push ecx
mov ecx, ebp
mov dword [esp + 0x248], 0
call fcn.0040cb50
test eax, eax
jne 0x40c559
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push eax
mov ecx, ebp
call fcn.0040cd70
test eax, eax
jne 0x40c559
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push ecx
push edx
mov ecx, ebp
call fcn.0040cf70
test eax, eax
jne 0x40c559
push eax
push eax
push str.Cant_preview_MS_Word_document__because_MS_Word_is_not_installed_on_your_system
mov ecx, ebp
call fcn.004302de
jmp 0x40c5e9
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push esi
call ebx
mov eax, dword [ebp + 0x98]
mov ecx, dword [esp + 0x10]
push ecx
push 0
mov edx, dword [eax + 0x1c]
push 0xc
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [ebp + 0x98]
push 5
call fcn.00431ca8
mov ecx, dword [ebp + 0x90]
push 0
call fcn.00431ca8
mov ecx, dword [ebp + 0x94]
mov eax, dword [ecx + 0x1c]
test eax, eax
je 0x40c5ae
push 0
call fcn.00431ca8
mov ecx, dword [ebp + 0xa8]
push 0
call fcn.00431ca8
mov eax, dword [ebp + 0x88]
mov ecx, dword [eax + 0x1c]
push ecx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40c5dc
mov ecx, dword [ebp + 0x88]
push 0
call fcn.00431ca8
mov ecx, dword [ebp + 0x9c]
push 0
call fcn.00431ca8
lea ecx, [esp + 0x10]
mov dword [esp + 0x240], edi
call fcn.004325f1
mov ecx, dword [esp + 0x238]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x234
ret 8