Function at 0x4c9e20
Capabilities:
Check if file exists
Delete file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c802e
mov eax, dword fs:[0]
push eax
sub esp, 0xee4
mov eax, dword [0x66a8c4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4c9e60
jmp 0x4ca3be
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [ebp - 0x440], eax
cmp dword [ebp - 0x440], 0
je 0x4c9e7e
jmp 0x4ca3be
xor edx, edx
mov word [ebp - 0x64c], dx
push 0x206
push 0
lea eax, [ebp - 0x64a]
push eax
call fcn.00591690
add esp, 0xc
xor ecx, ecx
mov word [ebp - 0x85c], cx
push 0x206
push 0
lea edx, [ebp - 0x85a]
push edx
call fcn.00591690
add esp, 0xc
xor eax, eax
mov word [ebp - 0x43c], ax
push 0x206
push 0
lea ecx, [ebp - 0x43a]
push ecx
call fcn.00591690
add esp, 0xc
push 0x5dad38
lea ecx, [ebp - 0x2c]
call fcn.004016d0
mov dword [ebp - 4], 0
lea edx, [ebp - 0x85c]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x64c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004c9910
add esp, 8
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x878]
push eax
call fcn.004c9ae0
add esp, 8
mov byte [ebp - 4], 1
push 3
push 0
lea ecx, [ebp - 0xec4]
push ecx
lea ecx, [ebp - 0x878]
call fcn.00418c10
mov dword [ebp - 0xec8], eax
mov edx, dword [ebp - 0xec8]
mov dword [ebp - 0xecc], edx
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0xecc]
call fcn.00401790
push eax
push 0x5dad3c
lea eax, [ebp - 0x43c]
push eax
call fcn.00593005
add esp, 0xc
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xec4]
call fcn.00401750
lea ecx, [ebp - 0x43c]
add ecx, 0xfffffffe
mov dword [ebp - 0xed0], ecx
mov edx, dword [ebp - 0xed0]
mov ax, word [edx + 2]
mov word [ebp - 0xed2], ax
add dword [ebp - 0xed0], 2
cmp word [ebp - 0xed2], 0
jne 0x4c9f95
mov edi, dword [ebp - 0xed0]
mov ecx, dword [str.temp_]
mov dword [edi], ecx
mov edx, dword [0x5dad48]
mov dword [edi + 4], edx
mov eax, dword [0x5dad4c]
mov dword [edi + 8], eax
lea ecx, [ebp - 0x43c]
push ecx
lea ecx, [ebp - 0x2c]
call fcn.00419c70
xor edx, edx
mov word [ebp - 0x234], dx
push 0x206
push 0
lea eax, [ebp - 0x232]
push eax
call fcn.00591690
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x234]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov dword [ebp - 0x87c], 0
push 0
movzx edx, word [ebp - 0x234]
push edx
lea ecx, [ebp - 0x2c]
call fcn.00417bb0
mov dword [ebp - 0x880], eax
cmp dword [ebp - 0x880], 0
jne 0x4ca04b
mov dword [ebp - 0x87c], 1
cmp dword [ebp - 0x87c], 0
jne 0x4ca085
lea eax, [ebp - 0x43c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4ca085
lea ecx, [ebp - 0x43c]
push ecx
call fcn.004c92e0
add esp, 4
push 4
push 0
lea edx, [ebp - 0x43c]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x650], 0
mov dword [ebp - 0x884], 0
mov eax, 1
test eax, eax
je 0x4ca3a0
mov dword [ebp - 0x888], 1
xor ecx, ecx
mov word [ebp - 0xa94], cx
push 0x206
push 0
lea edx, [ebp - 0xa92]
push edx
call fcn.00591690
add esp, 0xc
xor eax, eax
mov word [ebp - 0xc9c], ax
push 0x206
push 0
lea ecx, [ebp - 0xc9a]
push ecx
call fcn.00591690
add esp, 0xc
cmp dword [ebp - 0x884], 0
jne 0x4ca142
lea edx, [ebp - 0x64c]
push edx
lea eax, [ebp - 0x85c]
push eax
push 0x5dad50
lea ecx, [ebp - 0xa94]
push ecx
call fcn.00593005
add esp, 0x10
lea edx, [ebp - 0x64c]
push edx
lea ecx, [ebp - 0x878]
call fcn.00401790
push eax
push str._s_s.del
lea eax, [ebp - 0xc9c]
push eax
call fcn.00593005
add esp, 0x10
jmp 0x4ca16b
mov ecx, dword [ebp - 0x884]
push ecx
lea edx, [ebp - 0x64c]
push edx
lea eax, [ebp - 0x85c]
push eax
push str._s_s.del_d
lea ecx, [ebp - 0xa94]
push ecx
call fcn.00593005
add esp, 0x14
lea edx, [ebp - 0xc9c]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00593571
add esp, 8
lea ecx, [ebp - 0xa94]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4ca1a2
lea edx, [ebp - 0xa94]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [ebp - 0x888], eax
cmp dword [ebp - 0x888], 0
jne 0x4ca1eb
cmp dword [ebp - 0x884], 0xa
jl 0x4ca1d7
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x878]
call fcn.00401750
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00401750
jmp 0x4ca3be
mov eax, dword [ebp - 0x884]
add eax, 1
mov dword [ebp - 0x884], eax
jmp 0x4ca099
cmp dword [ebp - 0x87c], 0
jne 0x4ca332
xor ecx, ecx
mov word [ebp - 0xea4], cx
push 0x206
push 0
lea edx, [ebp - 0xea2]
push edx
call fcn.00591690
add esp, 0xc
lea ecx, [ebp - 0x2c]
call fcn.00401790
push eax
push 0x5dad90
lea eax, [ebp - 0x43c]
push eax
call fcn.00593005
add esp, 0xc
lea ecx, [ebp - 0xea4]
push ecx
lea edx, [ebp - 0xc9c]
push edx
call fcn.004c9910
add esp, 8
lea eax, [ebp - 0xea4]
mov dword [ebp - 0xed8], eax
mov ecx, dword [ebp - 0xed8]
mov dword [ebp - 0xedc], ecx
mov edx, dword [ebp - 0xed8]
mov ax, word [edx]
mov word [ebp - 0xede], ax
add dword [ebp - 0xed8], 2
cmp word [ebp - 0xede], 0
jne 0x4ca262
mov ecx, dword [ebp - 0xed8]
sub ecx, dword [ebp - 0xedc]
mov edx, dword [ebp - 0xedc]
mov dword [ebp - 0xee4], edx
mov dword [ebp - 0xee8], ecx
lea eax, [ebp - 0x43c]
add eax, 0xfffffffe
mov dword [ebp - 0xeec], eax
mov ecx, dword [ebp - 0xeec]
mov dx, word [ecx + 2]
mov word [ebp - 0xeee], dx
add dword [ebp - 0xeec], 2
cmp word [ebp - 0xeee], 0
jne 0x4ca2b0
mov edi, dword [ebp - 0xeec]
mov esi, dword [ebp - 0xee4]
mov eax, dword [ebp - 0xee8]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 1
lea ecx, [ebp - 0x43c]
push ecx
lea edx, [ebp - 0xc9c]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0xea8], eax
cmp dword [ebp - 0xea8], 0
je 0x4ca332
lea eax, [ebp - 0x43c]
push eax
push 0x5dad98
lea ecx, [ebp - 0xc9c]
push ecx
call fcn.00593005
add esp, 0xc
push 3
lea edx, [ebp - 0xa94]
push edx
lea eax, [ebp - 0xc9c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea ecx, [ebp - 0xc9c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4ca36a
push 5
push 0
lea edx, [ebp - 0xc9c]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push 5
push 0
lea eax, [ebp - 0xa94]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x878]
call fcn.00401750
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00401750
jmp 0x4ca3be
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x878]
call fcn.00401750
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00401750
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00590c4b
mov esp, ebp
pop ebp
ret