Function at 0x470310
Capabilities:
Create directory
Delete directory
Delete file
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4bc
push ebx
xor edx, edx
push esi
mov esi, dword [ebp + 8]
push edi
xor eax, eax
mov word [esp + 0x270], dx
mov ecx, 0x95
lea edi, [esp + 0x272]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [esp + 0x18], dx
mov ecx, 0x95
lea edi, [esp + 0x1a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp dword [ebp + 0x18], edx
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], edx
je 0x47038b
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x47038b
mov esi, 0x587
push esi
push str.Calling_restore_for_directory_that_already_exists___returning_error_0x_08x
push str.Verbatim
call fcn.004572b0
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0xc]
mov edi, edi
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x4703a0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
push 0
push eax
push ecx
push 0
push 0
push 0x410f0000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebx], eax
je 0x470467
test eax, eax
je 0x470467
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x258
lea edx, [esp + 0x274]
push edx
push esi
mov dword [ebx], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test eax, eax
je 0x470489
lea eax, [esp + 0x270]
push 0x5c
push eax
call dword [sym.imp.MSVCR71.dll_wcsrchr]
add esp, 8
test eax, eax
je 0x470489
add eax, 2
push eax
lea ecx, [esi + 0x20c]
push ecx
call dword [sym.imp.MSVCR71.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x4704ac
mov edi, dword [esp + 0x10]
cmp edi, 0x13
je 0x470457
push edi
push esi
push str._sIBM1CSL_d
lea edx, [esp + 0x24]
push 0x258
push edx
call fcn.00403fa3
add esp, 0x14
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
inc edi
cmp edi, 0x14
mov dword [esp + 0x10], edi
jne 0x470390
jmp 0x47048d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.Unable_to_set_short_name_for_file__s___Windows_return__0x_08x
push str.Engine
call fcn.004572b0
add esp, 0x10
mov dword [esp + 0x14], 0x514
mov edi, dword [esp + 0x10]
push esi
push str.Unable_to_successfully_match_the_short_name_for_file__s
push str.Engine
call fcn.004572b0
add esp, 0xc
test edi, edi
jne 0x4704ac
mov dword [esp + 0x10], 1
mov eax, dword [esp + 0x10]
xor edi, edi
test eax, eax
jbe 0x4704f7
push edi
push esi
push str._sIBM1CSL_d
lea ecx, [esp + 0x24]
push 0x258
push ecx
call fcn.00403fa3
mov eax, dword [ebp + 0x18]
add esp, 0x14
test eax, eax
je 0x4704e3
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x4704ee
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esp + 0x10]
inc edi
cmp edi, eax
jb 0x4704b6
mov ecx, dword [ebp + 0x10]
push 0
push ecx
push 3
push 0
push 0
push 0x410f0000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebx], eax
je 0x47051a
test eax, eax
jne 0x47053b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.Unable_to_set_short_name_for_file__s___Windows_return__0x_08x
push str.Engine
call fcn.004572b0
add esp, 0x10
mov esi, 0x514
jmp 0x470545
mov eax, dword [esp + 0x14]
test eax, eax
je 0x470565
mov esi, eax
mov eax, dword [ebx]
test eax, eax
je 0x470382
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx], 0xffffffff
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x47057a
mov edx, dword [esi + 0x23a]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret