Function at 0x4060f1
Capabilities:
Delete file
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4285f3
mov eax, dword fs:[0]
push eax
sub esp, 0x478
mov eax, dword [0x43a034]
xor eax, esp
mov dword [esp + 0x470], eax
push ebx
push esi
push edi
mov eax, dword [0x43a034]
xor eax, esp
push eax
lea eax, [esp + 0x488]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x2c]
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x14], eax
call fcn.004016e1
xor ebx, ebx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x490], ebx
call fcn.004016e1
lea ecx, [esp + 0x4c]
mov byte [esp + 0x490], 1
call fcn.004016e1
lea ecx, [esp + 0x3c]
mov byte [esp + 0x490], 2
call fcn.004016e1
push edi
mov ecx, edi
mov byte [esp + 0x494], 3
call fcn.0040ead5
mov eax, dword [esp + 0x1c]
pop ecx
push eax
mov ecx, eax
call fcn.0040ead5
mov eax, dword [esp + 0x18]
pop ecx
push eax
mov ecx, eax
call fcn.0040ead5
pop ecx
push edi
push dword [esp + 0x1c]
mov ecx, esi
call fcn.00405e5d
test al, al
jne 0x4061c6
mov ebx, 0xffff
jmp 0x406339
push 0x4329b0
lea ecx, [esp + 0x60]
call fcn.00403a9f
lea eax, [esp + 0x5c]
mov byte [esp + 0x490], 4
push eax
lea eax, [esp + 0x30]
push eax
call fcn.00404b0a
lea ecx, [esp + 0x5c]
mov byte [esp + 0x490], 3
call fcn.004015bf
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x50]
call fcn.00402d7c
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x40]
call fcn.00402d7c
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x20]
call fcn.00402d7c
push str..tok
lea ecx, [esp + 0x50]
call fcn.00408c4d
push 0x432cbc
lea ecx, [esp + 0x40]
call fcn.00408c4d
push 0x432cc8
lea ecx, [esp + 0x20]
call fcn.00408c4d
lea eax, [esp + 0x4c]
push eax
call fcn.00404bc0
lea eax, [esp + 0x3c]
push eax
call fcn.00404bc0
lea eax, [esp + 0x1c]
push eax
call fcn.00404bc0
lea eax, [esp + 0x274]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x6c]
push eax
mov edx, 0x104
call fcn.0040ecd1
pop ecx
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push dword [esp + 0x3c]
mov eax, dword [esp + 0x18]
mov ecx, esi
push dword [esp + 0x50]
push dword [esp + 0x24]
push eax
push edi
push dword [esp + 0x2c]
call fcn.00406385
lea ecx, [esi + 0x16c8]
mov dword [esp + 0x14], eax
call fcn.0040ac17
push 1
lea ecx, [esi + 0x1750]
call fcn.0040a1eb
push dword [esp + 0x4c]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esp + 0x3c]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esp + 0x14], 0
je 0x40630f
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [esp + 0x274]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp dword [esp + 0x14], 0
jne 0x406339
cmp byte [esi + 0x16c0], 0
je 0x406339
push 0xa032
mov ecx, esi
call fcn.004041c2
lea ecx, [esp + 0x3c]
call fcn.004015bf
lea ecx, [esp + 0x4c]
call fcn.004015bf
lea ecx, [esp + 0x1c]
call fcn.004015bf
lea ecx, [esp + 0x2c]
call fcn.004015bf
mov eax, ebx
mov ecx, dword [esp + 0x488]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x470]
xor ecx, esp
call fcn.004126d0
mov esp, ebp
pop ebp
ret 0xc