Function at 0x412294
Capabilities:
Delete file
Get common file path
Set environment variable
Set file attributes

Disassembly:
push ebp
mov ebp, esp
mov ecx, 6
push 0
push 0
dec ecx
jne 0x41229c
push ecx
push ebx
push esi
push edi
mov eax, dword [0x413bf0]
mov byte [eax], 1
mov eax, 0x411578
call fcn.00405a14
xor eax, eax
push ebp
push 0x412641
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x413a88]
xor edx, edx
mov dword [eax], edx
lea eax, [ebp - 0x14]
call fcn.00410ea0
mov edx, dword [ebp - 0x14]
mov eax, 0x418b2c
call fcn.004042f4
lea edx, [ebp - 0x18]
mov eax, dword [0x418b2c]
call fcn.00410db4
mov edx, dword [ebp - 0x18]
mov eax, 0x418b2c
call fcn.004042f4
mov eax, 0x418b30
mov edx, 0x800
call fcn.004048e8
push 0x800
mov eax, dword [0x418b30]
call fcn.004046b4
push eax
mov eax, dword [0x418b2c]
call fcn.004046b4
push eax
call sub.kernel32.dll_GetShortPathNameA
mov edx, 0x418b30
xchg edx, eax
call fcn.004048e8
mov eax, 0x418b2c
mov edx, dword [0x418b30]
call fcn.004042f4
xor eax, eax
mov dword [0x418b28], eax
mov bl, 1
xor eax, eax
push ebp
push 0x4124ca
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x412658
push 0xa
mov ecx, dword [0x413b14]
mov ecx, dword [ecx]
mov dl, 1
mov eax, dword [0x40f6bc]
call fcn.00410844
mov dword [0x418b28], eax
mov dl, 1
mov eax, dword [0x40f640]
call fcn.004036d4
mov esi, eax
push 0
push 0
mov edx, dword [0x418b28]
mov eax, esi
call fcn.00410264
xor ecx, ecx
xor edx, edx
mov eax, esi
mov edi, dword [eax]
call dword [edi + 0x14]
mov edx, 0x412668
mov eax, esi
call fcn.004112f0
xor ecx, ecx
xor edx, edx
mov eax, esi
mov edi, dword [eax]
call dword [edi + 0x14]
mov edx, 0x418a98
mov ecx, 0x90
mov eax, esi
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, esi
call fcn.00410708
mov eax, dword [0x418b28]
call fcn.00403704
push 0x412694
push 0xa
mov ecx, dword [0x413b14]
mov ecx, dword [ecx]
mov dl, 1
mov eax, dword [0x40f6bc]
call fcn.00410844
mov dword [0x418b28], eax
push 0
push 0
mov edx, dword [0x418b28]
mov eax, esi
call fcn.00410264
xor ecx, ecx
xor edx, edx
mov eax, esi
mov edi, dword [eax]
call dword [edi + 0x14]
mov edx, 0x412668
mov eax, esi
call fcn.004112f0
mov eax, 0x800
call fcn.00402d84
mov edi, eax
push edi
push 0
push 0x41269c
mov eax, dword [0x418b2c]
call fcn.004046b4
push eax
call sub.kernel32.dll_GetTempFileNameA
lea eax, [ebp - 0x20]
mov edx, 0x418a98
call fcn.00404504
mov eax, dword [ebp - 0x20]
push eax
lea eax, [ebp - 0x24]
mov edx, edi
call fcn.00404498
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x1c]
pop edx
call fcn.00407278
mov edx, dword [ebp - 0x1c]
mov eax, 0x418b3c
call fcn.004042f4
mov eax, edi
call fcn.00402da0
mov eax, 0x418b34
mov edx, dword [0x418b3c]
call fcn.004042f4
mov edx, dword [0x418b34]
mov eax, esi
call fcn.00410684
push 2
mov eax, dword [0x418b34]
call fcn.004046b4
push eax
call sub.kernel32.dll_SetFileAttributesA
mov eax, esi
call fcn.00403704
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4124d6
xor edx, edx
push ebp
push 0x41261f
push dword fs:[edx]
mov dword fs:[edx], esp
test bl, bl
je 0x412607
lea eax, [ebp - 0x28]
call fcn.00410fb8
mov eax, dword [ebp - 0x28]
call fcn.004046b4
push eax
push 0x4126a0
call sub.kernel32.dll_SetEnvironmentVariableA
mov eax, 0x418b30
call fcn.004042a0
mov eax, dword [0x418b2c]
test eax, eax
je 0x41251f
sub eax, 4
mov eax, dword [eax]
mov esi, eax
dec esi
test esi, esi
jl 0x412564
inc esi
xor edi, edi
mov eax, dword [0x418b2c]
movzx ebx, byte [eax + edi - 1]
cmp bl, 0x26
je 0x412551
lea eax, [ebp - 0x2c]
mov edx, ebx
call fcn.00404488
mov edx, dword [ebp - 0x2c]
mov eax, 0x418b30
call fcn.00404548
jmp 0x412560
mov eax, 0x418b30
mov edx, 0x4126b0
call fcn.00404548
inc edi
dec esi
jne 0x412529
mov eax, 0x418b2c
mov edx, dword [0x418b30]
call fcn.004042f4
mov eax, dword [0x413c68]
cmp dword [eax], 2
jne 0x4125b2
push 0x4126bc
push dword [0x418b34]
push 0x4126d0
lea eax, [ebp - 0x30]
mov edx, dword [0x413bb0]
mov edx, dword [edx]
call fcn.00404498
push dword [ebp - 0x30]
mov eax, 0x418b38
mov edx, 4
call fcn.00404610
jmp 0x4125e4
push 0x4126dc
push dword [0x418b34]
push 0x4126d0
lea eax, [ebp - 0x34]
mov edx, dword [0x413bb0]
mov edx, dword [edx]
call fcn.00404498
push dword [ebp - 0x34]
mov eax, 0x418b38
mov edx, 4
call fcn.00404610
mov eax, dword [0x418b38]
call fcn.00411470
mov ebx, eax
mov eax, dword [0x418b34]
call fcn.004046b4
push eax
call sub.kernel32.dll_DeleteFileA
mov eax, dword [0x413a88]
mov dword [eax], ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x412626
mov eax, dword [0x418b28]
call fcn.00403704
ret