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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x21c
mov eax, dword [0x47d144]
xor eax, esp
mov dword [esp + 0x218], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [esp + 0x10]
push esi
push edi
push 0x208
push 0
push eax
mov dword [esp + 0x20], ecx
call fcn.00440840
mov edi, dword [ebp + 0xc]
mov esi, 1
mov eax, edi
add esp, 0xc
and eax, esi
mov dword [esp + 0x10], eax
cmp esi, eax
jne 0x409af5
push 0x104
lea eax, [esp + 0x1c]
push eax
call dword [0x47d07c]
test eax, eax
je 0x409c7c
lea eax, [esp + 0x18]
push 0x5c
push eax
call fcn.0043f52b
add esp, 8
test eax, eax
je 0x409c7c
xor ecx, ecx
mov word [eax], cx
jmp 0x409bd4
mov eax, edi
and eax, 2
cmp esi, eax
jne 0x409b13
lea eax, [esp + 0x18]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
jmp 0x409bcc
mov eax, edi
and eax, 8
cmp esi, eax
jne 0x409baf
lea eax, [esp + 0x18]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x409c7c
lea ecx, [esp + 0x18]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409b40
sub ecx, edx
sar ecx, 1
je 0x409b74
mov eax, 0x5c
cmp ax, word [esp + ecx*2 + 0x16]
je 0x409b74
push 0x471e4c
lea eax, [esp + 0x1c]
push 0x104
push eax
call fcn.00447669
add esp, 0xc
push str.eset
lea eax, [esp + 0x1c]
push 0x104
push eax
call fcn.00447669
add esp, 0xc
lea eax, [esp + 0x18]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x409bd4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x409c7c
jmp 0x409bd4
mov eax, edi
and eax, 4
cmp esi, eax
jne 0x409c7c
lea eax, [esp + 0x18]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x409c7c
test ebx, ebx
je 0x409c64
lea ecx, [esp + 0x18]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409be3
sub ecx, edx
sar ecx, 1
je 0x409c17
mov eax, 0x5c
cmp ax, word [esp + ecx*2 + 0x16]
je 0x409c17
push 0x471e4c
lea eax, [esp + 0x1c]
push 0x104
push eax
call fcn.00447669
add esp, 0xc
push ebx
lea eax, [esp + 0x1c]
push 0x104
push eax
call fcn.00447669
add esp, 0xc
test eax, eax
jne 0x409cd4
push eax
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x409c4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x409c7c
test edi, 0x100
je 0x409c64
push 6
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [esp + 0x18]
call fcn.00409d10
test al, al
jne 0x409c8f
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
add esi, esi
cmp esi, 0xff
jae 0x409cd4
mov eax, dword [esp + 0x10]
jmp 0x409ab8
test edi, 0x100
je 0x409ca4
push 2
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [esp + 0x18]
push eax
push 0x104
push dword [esp + 0x1c]
call fcn.004476de
add esp, 0xc
test eax, eax
sete al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x218]
xor ecx, esp
call fcn.004281b1
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x224]
xor al, al
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004281b1
mov esp, ebp
pop ebp
ret