Function at 0x41d140
Capabilities:
Check if file exists
Delete directory
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x445a3b
mov eax, dword fs:[0]
push eax
sub esp, 0x294
mov eax, dword [0x467060]
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 byte [ebp - 0x279], cl
xor eax, eax
mov dword [ebp - 4], 0
push eax
push 0x44acac
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.00405570
mov byte [ebp - 4], 1
cmp dword [ebp + 0x1c], 8
mov ecx, dword [ebp + 0x18]
mov edi, dword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void__]
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
cmp word [eax + ecx*2 - 2], 0x5c
jne 0x41d21a
lea eax, [ecx - 1]
push eax
push 0
lea eax, [ebp - 0x298]
push eax
lea ecx, [ebp + 8]
call fcn.00403de0
mov esi, eax
lea eax, [ebp + 8]
cmp eax, esi
je 0x41d206
cmp dword [ebp + 0x1c], 8
jb 0x41d1e9
push dword [ebp + 8]
call edi
add esp, 4
xor eax, eax
push esi
lea ecx, [ebp + 8]
mov dword [ebp + 0x1c], 7
mov dword [ebp + 0x18], 0
mov word [ebp + 8], ax
call fcn.004053a0
cmp dword [ebp - 0x284], 8
jb 0x41d21a
push dword [ebp - 0x298]
call edi
add esp, 4
push 0xffffffffffffffff
push 0
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x28]
call fcn.00405a00
push 2
push 0x44d984
lea ecx, [ebp - 0x28]
call fcn.00404020
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x278]
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
mov dword [ebp - 0x280], ebx
cmp ebx, 0xffffffff
jne 0x41d266
xor bl, bl
jmp 0x41d4a8
push 0x44aca8
lea edx, [ebp + 8]
lea ecx, [ebp - 0x298]
call fcn.0040d130
mov esi, eax
lea eax, [ebp - 0x28]
add esp, 4
cmp eax, esi
je 0x41d2b0
cmp dword [ebp - 0x14], 8
jb 0x41d293
push dword [ebp - 0x28]
call edi
add esp, 4
xor eax, eax
push esi
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.004053a0
cmp dword [ebp - 0x284], 8
jb 0x41d2c4
push dword [ebp - 0x298]
call edi
add esp, 4
lea edx, [ebp - 0x278]
mov ecx, ebx
call fcn.0041d0b0
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x41d3c6
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x41d2f0
mov ecx, 0x44ba14
lea eax, [ebp - 0x24c]
jmp 0x41d300
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41d326
test dx, dx
je 0x41d322
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41d326
add eax, 4
add ecx, 4
test dx, dx
jne 0x41d300
xor eax, eax
jmp 0x41d32b
sbb eax, eax
or eax, 1
test eax, eax
je 0x41d3a1
mov ecx, 0x4505f8
lea eax, [ebp - 0x24c]
lea ebx, [ebx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41d366
test dx, dx
je 0x41d362
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41d366
add eax, 4
add ecx, 4
test dx, dx
jne 0x41d340
xor eax, eax
jmp 0x41d36b
sbb eax, eax
or eax, 1
test eax, eax
je 0x41d3a1
test byte [ebp - 0x278], 0x10
lea eax, [ebp - 0x24c]
lea edx, [ebp - 0x28]
je 0x41d40b
sub esp, 0x18
mov ecx, esp
push eax
call fcn.0040d130
mov cl, byte [ebp - 0x279]
add esp, 4
call fcn.0041d140
add esp, 0x18
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ecx, dword [ebp - 0x280]
lea edx, [ebp - 0x278]
call fcn.0041d0b0
test eax, eax
jne 0x41d2f0
mov ebx, dword [ebp - 0x280]
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp byte [ebp - 0x279], 0
lea eax, [ebp + 8]
je 0x41d497
cmp dword [ebp + 0x1c], 8
cmovae eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x41d4a6
cmp dword [ebp + 0x1c], 8
push 1
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
push 0
push eax
call esi
jmp 0x41d4a6
push eax
lea ecx, [ebp - 0x298]
call fcn.0040d130
add esp, 4
mov esi, eax
cmp dword [esi + 0x14], 8
jb 0x41d424
mov esi, dword [esi]
cmp byte [ebp - 0x279], 0
je 0x41d461
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41d470
push 0x80
push esi
call ebx
push 0x80
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x41d470
push 4
push eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
call esi
jmp 0x41d476
push 0x80
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov byte [ebp - 4], 1
cmp dword [ebp - 0x284], 8
jb 0x41d3a7
push dword [ebp - 0x298]
call edi
add esp, 4
jmp 0x41d3a7
cmp dword [ebp + 0x1c], 8
cmovae eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov bl, 1
cmp dword [ebp - 0x14], 8
jb 0x41d4b6
push dword [ebp - 0x28]
call edi
add esp, 4
xor eax, eax
cmp dword [ebp + 0x1c], 8
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
jb 0x41d4d8
push dword [ebp + 8]
call edi
add esp, 4
mov al, bl
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.004413e6
mov esp, ebp
pop ebp
ret