Function at 0x401b3a
Capabilities:
Check if file exists
Copy file
Delete file
Get file attributes
Move file

Disassembly:
push 0x310
mov eax, 0x413cbe
call fcn.004129bf
xor eax, eax
xor ebx, ebx
push 0x206
mov word [ebp - 0x308], ax
lea eax, [ebp - 0x306]
push ebx
push eax
call fcn.00405210
add esp, 0xc
lea eax, [ebp - 0x308]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x308]
push 0x5c
push eax
call fcn.00403de4
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x401ee4
xor eax, eax
mov word [edi + 2], ax
mov ecx, dword [0x41d1e0]
mov dword [ebp - 0x310], ecx
lea eax, [ebp - 0x308]
mov dword [ebp - 4], ebx
push eax
lea eax, [ebp - 0x310]
push str._sconfig.ini
push eax
call fcn.00402823
mov esi, dword [ebp - 0x310]
add esp, 0xc
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push esi
push 0x4196e0
push str.DownloadURL
push 0x419698
call ebx
push esi
push 0x4196e0
push str.copyfile
push 0x419698
call ebx
call fcn.00401955
test eax, eax
je 0x401ed5
xor ecx, ecx
call fcn.00401897
xor eax, eax
mov word [edi + 4], ax
mov eax, dword [0x41d1e0]
mov dword [ebp - 0x314], eax
lea eax, [ebp - 0x308]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x314]
push str._sp2pdll_harewareError.dll
push eax
call fcn.00402823
mov edi, dword [ebp - 0x314]
push 0x7530
push edi
push str.http:__dl.kuaiwan.com_kuaiwan_plugin_P2PDll.rar
call dword [sym.imp.Http.dll_public:_static_bool___cdecl_NetTool::DownloadURL_wchar_t_const___wchar_t_const___long_int_]
add esp, 0x18
push esi
test al, al
je 0x401e7a
push 0x419684
push str.DownloadURL
push 0x419698
call ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401ec6
push 0x63
lea eax, [ebp - 0x9b]
mov byte [ebp - 0x9c], 0
push 0
push eax
call fcn.00405210
pop ecx
pop ecx
lea edx, [ebp - 0x9c]
mov ecx, edi
call fcn.004016f8
mov eax, dword [0x41d1e0]
mov dword [ebp - 0x318], eax
mov dword [ebp - 0x30c], eax
lea eax, [ebp - 0x308]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x318]
push str._sp2pdll.dll
push eax
call fcn.00402823
lea eax, [ebp - 0x308]
push eax
lea eax, [ebp - 0x30c]
push str._sp2pdll1.dll
push eax
call fcn.00402823
mov ebx, dword [ebp - 0x318]
add esp, 0x1c
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x401d1f
push dword [ebp - 0x30c]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [ebp - 0x30c]
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
push dword [ebp - 0x30c]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 1
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push edi
mov dword [ebp - 0x31c], eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x63
lea eax, [ebp - 0xff]
mov byte [ebp - 0x100], 0
push 0
push eax
call fcn.00405210
pop ecx
pop ecx
lea edx, [ebp - 0x100]
mov ecx, ebx
call fcn.004016f8
pop ecx
lea ecx, [ebp - 0x9c]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401d66
sub ecx, edx
je 0x401df5
lea ecx, [ebp - 0x100]
lea eax, [ebp - 0x9c]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401da1
test dl, dl
je 0x401d9d
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401da1
add eax, 2
add ecx, 2
test dl, dl
jne 0x401d81
xor eax, eax
jmp 0x401da6
sbb eax, eax
or eax, 1
test eax, eax
jne 0x401df5
lea ecx, [ebp - 0x9c]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401db3
sub ecx, edx
lea edi, [ecx + 1]
cmp edi, 0x3fffffff
jle 0x401dcb
xor eax, eax
jmp 0x401de3
lea eax, [edi + edi]
call fcn.0040ffd0
mov ecx, esp
lea edx, [ebp - 0x9c]
push 3
push edi
call fcn.004024b1
push esi
push eax
push 0x4196bc
push 0x419698
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [ebp - 0x31c], 0
mov ecx, 0x419688
push esi
mov eax, 0x419684
cmove eax, ecx
push eax
push str.copyfile
push 0x419698
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
xor eax, eax
lea edi, [ebp - 0x36]
push 9
mov word [ebp - 0x38], ax
pop ecx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x419b48
lea eax, [ebp - 0x38]
push 0x14
push eax
call fcn.00402495
add esp, 0x10
lea eax, [ebp - 0x38]
push esi
push eax
push str.copyfileError
push 0x419698
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea ecx, [ebp - 0x30c]
mov byte [ebp - 4], 2
call fcn.004011e6
lea ecx, [ebp - 0x318]
mov byte [ebp - 4], 1
call fcn.004011e6
jmp 0x401ec6
push 0x419688
push str.DownloadURL
push 0x419698
call ebx
xor eax, eax
lea edi, [ebp - 0x36]
push 9
mov word [ebp - 0x38], ax
pop ecx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x419b48
lea eax, [ebp - 0x38]
push 0x14
push eax
call fcn.00402495
add esp, 0x10
lea eax, [ebp - 0x38]
push esi
push eax
push str.DownloadURLError
push 0x419698
call ebx
lea ecx, [ebp - 0x314]
mov byte [ebp - 4], 0
call fcn.004011e6
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x310]
call fcn.004011e6
lea esp, [ebp - 0x32c]
call fcn.004129b0
ret