Function at 0x46a820
Capabilities:
Check if file exists
Copy file
Delete directory
Delete file
Get common file path
Get file attributes
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53ee3c
mov eax, dword fs:[0]
push eax
sub esp, 0x424
mov eax, dword [0x597644]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x430], esi
test esi, esi
je 0x46abdc
test ebx, ebx
je 0x46abdc
call fcn.00412520
mov ecx, eax
test ecx, ecx
je 0x46abfa
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x42c], eax
push esi
lea ecx, [ebp - 0x424]
mov dword [ebp - 4], 0
call fcn.00415430
lea eax, [ebp - 0x42c]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x424]
push eax
call fcn.00468600
mov edx, dword [ebp - 0x424]
or edi, 0xffffffff
add esp, 8
mov byte [ebp - 4], 0
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x46a8d8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x42c]
cmp dword [esi - 0xc], 0
jne 0x46a8ee
xor edi, edi
or ebx, 0xffffffff
jmp 0x46abbc
call fcn.00412520
mov ecx, eax
test ecx, ecx
je 0x46ac04
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x428], eax
push ebx
lea ecx, [ebp - 0x424]
mov byte [ebp - 4], 2
call fcn.00415430
lea eax, [ebp - 0x428]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x424]
push eax
call fcn.00468600
mov edx, dword [ebp - 0x424]
add esp, 8
mov byte [ebp - 4], 2
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x46a956
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x428]
push esi
push edi
call fcn.005085bf
add esp, 8
test eax, eax
je 0x46ab99
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.004dda00
lea ecx, [ebp - 0x420]
mov eax, ebx
mov esi, ecx
add esp, 0xc
sub eax, esi
mov edx, 0x104
mov esi, eax
nop word [eax + eax]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x46a9be
movzx eax, word [esi + ecx]
test ax, ax
je 0x46a9be
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x46a9a0
lea eax, [ecx - 2]
test edx, edx
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x420]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, dword [ebp - 0x42c]
test eax, eax
je 0x46aa59
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004dda00
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0
push 0x5519d0
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x218]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x46aa59
push 4
push 0
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x46ab1d
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x46ab1d
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x46ab1d
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x46aaa1
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x46ab1d
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x46aabc
test al, 0x10
je 0x46aabc
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x46ab1d
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004dda00
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0
push 0x5519d0
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x218]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
lea eax, [ebp - 0x218]
je 0x46ab7a
push 4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push 0
push ebx
push dword [ebp - 0x430]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x46ab99
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004dda00
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0
push 0x5519d0
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x218]
push 0
push eax
push dword [ebp - 0x430]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push 5
push ebx
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
or ebx, 0xffffffff
mov byte [ebp - 4], 0
lea edx, [edi - 0x10]
mov eax, ebx
mov edi, 1
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x46abbc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x46abd8
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
jmp 0x46abde
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004982ff
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.0040ada0
push 0x80004005
call fcn.0040ada0
int3