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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x450b9b
push eax
mov dword fs:[0], esp
sub esp, 0x228
push ebx
push ebp
mov ebp, dword [esp + 0x244]
push esi
push edi
mov ebx, ecx
mov eax, dword [ebp + 0x188]
test eax, eax
je 0x40d323
mov edi, dword [ebp + 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 0x40d290
cmp byte [esp + ecx + 0x13], 0x5c
je 0x40d290
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 0x40d333
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 0x40d4de
mov eax, dword [ebp + 0x188]
test eax, eax
je 0x40d3da
mov ecx, dword [esp + 0x248]
lea eax, [esp + 0x118]
push eax
push ecx
mov ecx, ebp
call fcn.004130a0
mov ebp, dword [ebp + 0x1a0]
push 0
push 0
lea eax, [esp + 0x120]
mov edx, dword [ebp]
push esi
push eax
mov ecx, ebp
call dword [edx + 0xc]
jmp 0x40d3ea
mov ecx, dword [esp + 0x248]
push esi
push ecx
mov ecx, ebp
call fcn.00413d40
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call ebp
mov edx, dword [0x46ed98]
mov dword [esp + 0x10], edx
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push ecx
mov ecx, ebx
mov dword [esp + 0x248], 0
call fcn.0040d500
test eax, eax
jne 0x40d457
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push eax
mov ecx, ebx
call fcn.0040db60
test eax, eax
jne 0x40d457
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push ecx
push edx
mov ecx, ebx
call fcn.0040e1a0
test eax, eax
jne 0x40d457
push eax
push eax
push str.Cant_preview_MS_Excel_document__because_MS_Excel_is_not_installed_on_your_system
mov ecx, ebx
call fcn.004302de
jmp 0x40d4ce
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push esi
call ebp
mov ecx, dword [ebx + 0x88]
mov edx, dword [ecx + 0x1c]
push edx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40d486
mov ecx, dword [ebx + 0x88]
push 5
call fcn.00431ca8
mov ecx, dword [ebx + 0x98]
push 0
call fcn.00431ca8
mov ecx, dword [ebx + 0x90]
push 0
call fcn.00431ca8
mov ecx, dword [ebx + 0x94]
mov eax, dword [ecx + 0x1c]
test eax, eax
je 0x40d4b4
push 0
call fcn.00431ca8
mov ecx, dword [ebx + 0x90]
push 0
call fcn.00431ca8
mov ecx, dword [ebx + 0xa8]
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