Function at 0x401f30
Capabilities:
Check if file exists
Copy file
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c902d
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
push ebx
push esi
push edi
mov eax, dword [0x515080]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
cmp byte [ebx + 0x66], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x28], xmm0
jne 0x401f76
cmp word [ebx + 0x56], 0
lea eax, [ebx + 0x56]
jbe 0x402140
mov eax, dword [ebp + 8]
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocString
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x1c], 0x4ed624
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], 0
cmp esi, 0xffffffff
jne 0x401fc3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], esi
mov dword [ebp - 0x1c], 0x4ed624
push esi
jmp 0x401ff4
lea eax, [ebp - 0x28]
push eax
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
jne 0x40204d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x1c], 0x4ed624
test esi, esi
je 0x402001
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0
test edi, edi
je 0x40206d
cmp byte [ebx + 0x3c], 0
je 0x402045
cmp dword [ebx + 0x50], 0
je 0x402045
mov eax, dword [ebx + 0x38]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4e2514]
lea ecx, [ebx + 0x38]
call esi
mov edi, dword [ebx + 0x50]
mov ebx, dword [ebp - 0x10]
push 0
push ebx
mov edx, dword [edi]
push 0
mov esi, dword [edx + 0x24]
mov ecx, esi
call dword [0x4e2514]
mov ecx, edi
call esi
jmp 0x4023ec
mov ebx, dword [ebp - 0x10]
jmp 0x4023ec
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x1c], 0x4ed624
test esi, esi
je 0x40206d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0
lea esi, [ebx + 0x68]
push esi
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
jne 0x4020e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [ebx + 0x3c], 0
mov dword [ebp - 0x10], eax
je 0x4023ee
cmp dword [ebx + 0x50], 0
je 0x4023ee
mov eax, dword [ebx + 0x38]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4e2514]
lea ecx, [ebx + 0x38]
call esi
mov edi, dword [ebx + 0x50]
push 0
push dword [ebp - 0x10]
mov eax, dword [edi]
push 0
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x4e2514]
mov ecx, edi
call esi
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
test eax, eax
je 0x40207f
cmp word [ebx + 0x56], 0
lea eax, [ebx + 0x56]
jbe 0x402140
lea ecx, [ebp - 0x1c]
xorps xmm0, xmm0
push ecx
push eax
movlpd qword [ebp - 0x1c], xmm0
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
test eax, eax
je 0x40207f
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
js 0x402140
mov eax, 0xe0000013
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx]
sub ecx, 0x10
call fcn.00402750
add eax, 0x10
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x14]
push 5
push str..part
call fcn.004025b0
push ecx
lea ecx, [ebp - 0x14]
call fcn.0040f8c0
add esp, 4
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x402337
cmp byte [ebx + 0x54], al
je 0x402238
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x402238
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x20], 0xc
mov dword [ebp - 0x18], eax
call fcn.00409f20
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x58]
push 1
push 0x10000000
push 0x4ef394
call fcn.0040a110
push 1
push 0x10000000
push str.S_1_5_18
lea ecx, [ebp - 0x58]
call fcn.0040a110
lea ecx, [ebp - 0x58]
call fcn.0040a6a0
push 0
push 0x80
xor edx, edx
mov dword [ebp - 0x1c], eax
push 2
test eax, eax
lea ecx, [ebp - 0x20]
cmove ecx, edx
push ecx
push edx
push 0xc0000000
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
xor esi, esi
mov dword [ebp - 0x10], esi
cmp edi, 0xffffffff
jne 0x40221d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x10], eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x58]
call fcn.00409fc0
test esi, esi
jne 0x402337
xor eax, eax
mov ecx, 2
cmp byte [ebx + 0x34], al
cmovne eax, ecx
push eax
mov eax, dword [ebp + 8]
push 0
push ebx
push 0x401db0
push dword [ebp - 0x14]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CopyFileExW]
test eax, eax
jne 0x4022b6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [ebx + 0x2e], 0
mov dword [ebp - 0x10], eax
je 0x4022aa
cmp byte [ebx + 4], 0
je 0x4022aa
cmp dword [ebx + 0x18], 0
je 0x4022aa
mov eax, dword [ebx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4e2514]
mov ecx, ebx
call esi
mov edi, dword [ebx + 0x18]
push 0
push dword [ebp - 0x10]
mov eax, dword [edi]
push 0
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x4e2514]
mov ecx, edi
call esi
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x402304
mov ebx, dword [ebp - 0x10]
jmp 0x4023be
cmp byte [ebx + 0x2c], 0
je 0x402304
cmp byte [ebx + 0x2d], 0
je 0x402304
cmp byte [ebx + 4], 0
mov eax, dword [ebx + 0x30]
mov dword [ebp - 0x10], eax
je 0x402304
cmp byte [ebx + 5], 0
je 0x402304
cmp dword [ebx + 0x18], 0
je 0x402304
mov eax, dword [ebx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4e2514]
mov ecx, ebx
call esi
mov edi, dword [ebx + 0x18]
push 0
push dword [ebp - 0x10]
mov eax, dword [edi]
mov esi, dword [eax + 0x14]
mov ecx, esi
call dword [0x4e2514]
mov ecx, edi
call esi
mov esi, dword [ebp + 0xc]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esi]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x40237f
push eax
push dword [esi]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x402376
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
cmp byte [ebx + 0x3c], 0
je 0x402371
cmp dword [ebx + 0x50], 0
je 0x402371
mov eax, dword [ebx + 0x38]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4e2514]
lea ecx, [ebx + 0x38]
call esi
mov edi, dword [ebx + 0x50]
push 0
push dword [ebp - 0x10]
mov eax, dword [edi]
push 0
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x4e2514]
mov ecx, edi
call esi
mov ebx, dword [ebp - 0x10]
jmp 0x4023be
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp byte [ebx + 0x3c], 0
je 0x4023bc
cmp byte [ebx + 0x3d], 0
je 0x4023bc
cmp dword [ebx + 0x50], 0
je 0x4023bc
mov eax, dword [ebx + 0x38]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4e2514]
lea ecx, [ebx + 0x38]
call esi
mov edi, dword [ebx + 0x50]
push 0
push 1
mov eax, dword [edi]
mov esi, dword [eax + 0x14]
mov ecx, esi
call dword [0x4e2514]
mov ecx, edi
call esi
xor ebx, ebx
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x4023ec
mov edi, dword [ecx]
push ecx
mov edx, dword [edi]
mov esi, dword [edx + 4]
mov ecx, esi
call dword [0x4e2514]
mov ecx, edi
call esi
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8