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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5769cd
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
push ebx
push esi
push edi
mov eax, dword [0x5e8024]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp byte [esi + 0x66], 0
xorps xmm0, xmm0
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
movlpd qword [ebp - 0x28], xmm0
jne 0x4d9899
cmp word [esi + 0x56], 0
jbe 0x4d99d6
mov eax, dword [ebp + 8]
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x1c], 0x5935fc
mov dword [ebp - 0x18], edi
mov dword [ebp - 4], 0
cmp edi, 0xffffffff
jne 0x4d98f2
call ebx
mov edi, eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffff
mov dword [ebp - 0x1c], 0x5935fc
call eax
mov dword [ebp - 0x18], 0
jmp 0x4d992e
lea eax, [ebp - 0x28]
push eax
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
jne 0x4d9961
call ebx
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x1c], 0x5935fc
test edi, edi
je 0x4d992b
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call eax
mov dword [ebp - 0x18], 0
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x4d9982
cmp byte [esi + 0x3c], 0
je 0x4d9cc4
cmp dword [esi + 0x50], 0
je 0x4d9cc4
mov eax, dword [esi + 0x38]
lea ecx, [esi + 0x38]
call dword [eax + 4]
mov ecx, dword [esi + 0x50]
push 0
push edi
push 0
mov edx, dword [ecx]
call dword [edx + 0x24]
jmp 0x4d9cc4
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x1c], 0x5935fc
test edi, edi
je 0x4d9982
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call eax
mov dword [ebp - 0x18], 0
lea edi, [esi + 0x68]
push edi
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
jne 0x4d99c7
call ebx
cmp byte [esi + 0x3c], 0
mov edi, eax
je 0x4d9cc4
cmp dword [esi + 0x50], 0
je 0x4d9cc4
mov edx, dword [esi + 0x38]
lea ecx, [esi + 0x38]
call dword [edx + 4]
mov ecx, dword [esi + 0x50]
push 0
push edi
push 0
mov eax, dword [ecx]
call dword [eax + 0x24]
jmp 0x4d9cc4
lea eax, [ebp - 0x28]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
test eax, eax
je 0x4d9994
cmp word [esi + 0x56], 0
lea eax, [esi + 0x56]
jbe 0x4d9a22
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 0x4d9994
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
js 0x4d9a22
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.00409540
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x10]
push 5
push str..part
call fcn.00419d30
push 0
xor dl, dl
lea ecx, [ebp - 0x10]
call fcn.0049a9e0
mov edi, eax
add esp, 4
test edi, edi
je 0x4d9a8f
cmp byte [esi + 0x3c], 0
je 0x4d9ca2
cmp dword [esi + 0x50], 0
je 0x4d9ca2
mov eax, dword [esi + 0x38]
lea ecx, [esi + 0x38]
call dword [eax + 4]
mov ecx, dword [esi + 0x50]
push 0
push edi
push 0
mov eax, dword [ecx]
call dword [eax + 0x24]
jmp 0x4d9ca2
cmp byte [esi + 0x54], 0
je 0x4d9b8c
push dword [ebp - 0x10]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4d9b8c
mov dword [ebp - 0x20], 0xc
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov byte [ebp - 4], 4
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov byte [ebp - 4], 5
push 1
push ecx
push 0x5a6694
lea ecx, [ebp - 0x58]
call fcn.004d91c0
push 1
push ecx
push str.S_1_5_18
lea ecx, [ebp - 0x58]
call fcn.004d91c0
lea ecx, [ebp - 0x58]
call fcn.004d9740
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 - 0x10]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
xor edi, edi
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
jne 0x4d9b46
call ebx
mov edi, eax
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x58]
call fcn.004d9070
test edi, edi
je 0x4d9b8c
cmp byte [esi + 0x3c], 0
je 0x4d9ca2
cmp dword [esi + 0x50], 0
je 0x4d9ca2
mov eax, dword [esi + 0x38]
lea ecx, [esi + 0x38]
call dword [eax + 4]
mov ecx, dword [esi + 0x50]
push 0
push edi
push 0
mov eax, dword [ecx]
call dword [eax + 0x24]
jmp 0x4d9ca2
xor eax, eax
mov ecx, 2
cmp byte [esi + 0x34], al
cmovne eax, ecx
push eax
mov eax, dword [ebp + 8]
push 0
push esi
push 0x4dd970
push dword [ebp - 0x10]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CopyFileExW]
test eax, eax
jne 0x4d9be7
call ebx
cmp byte [esi + 0x2e], 0
mov edi, eax
je 0x4d9bde
cmp byte [esi + 4], 0
je 0x4d9bde
cmp dword [esi + 0x18], 0
je 0x4d9bde
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov ecx, dword [esi + 0x18]
push 0
push edi
push 0
mov eax, dword [ecx]
call dword [eax + 0x24]
test edi, edi
je 0x4d9c1a
jmp 0x4d9ca2
cmp byte [esi + 0x2c], 0
je 0x4d9c1a
cmp byte [esi + 0x2d], 0
je 0x4d9c1a
cmp byte [esi + 4], 0
mov edi, dword [esi + 0x30]
je 0x4d9c1a
cmp byte [esi + 5], 0
je 0x4d9c1a
cmp dword [esi + 0x18], 0
je 0x4d9c1a
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov ecx, dword [esi + 0x18]
push 0
push edi
mov eax, dword [ecx]
call dword [eax + 0x14]
mov eax, dword [ebp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [eax]
call edi
mov eax, dword [ebp + 0xc]
push dword [eax]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x4d9c79
push eax
mov eax, dword [ebp + 0xc]
push dword [eax]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x4d9c74
call ebx
cmp byte [esi + 0x3c], 0
mov edi, eax
je 0x4d9ca2
cmp dword [esi + 0x50], 0
je 0x4d9ca2
mov eax, dword [esi + 0x38]
lea ecx, [esi + 0x38]
call dword [eax + 4]
mov ecx, dword [esi + 0x50]
push 0
push edi
push 0
mov eax, dword [ecx]
call dword [eax + 0x24]
jmp 0x4d9ca2
push dword [ebp - 0x10]
call edi
cmp byte [esi + 0x3c], 0
je 0x4d9ca0
cmp byte [esi + 0x3d], 0
je 0x4d9ca0
cmp dword [esi + 0x50], 0
je 0x4d9ca0
mov eax, dword [esi + 0x38]
lea ecx, [esi + 0x38]
call dword [eax + 4]
mov ecx, dword [esi + 0x50]
push 0
push 1
mov eax, dword [ecx]
call dword [eax + 0x14]
xor edi, edi
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov esi, dword [ebp - 0x10]
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4d9cc4
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
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