Function at 0x4d7670
Capabilities:
Copy file
Delete file
Get common file path
Query environment variable
Set file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbc4
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x434], eax
mov dword [ebp - 0x438], eax
mov dword [ebp - 0x43c], eax
xor eax, eax
push ebp
push 0x4d78b2
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, 1
mov eax, dword [0x488f8c]
call fcn.004a7a90
mov dword [ebp - 4], eax
lea eax, [ebp - 0x228]
xor ecx, ecx
mov edx, 0x208
call fcn.004075e4
push 0x208
lea eax, [ebp - 0x228]
push eax
call sub.kernel32.dll_GetSystemDirectoryW
push 0x4d78c4
lea eax, [ebp - 0x228]
push eax
call sub.kernel32.dll_lstrcatW
xor eax, eax
mov dword [ebp - 0x18], eax
xor esi, esi
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x228]
push eax
call fcn.004d74d4
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x18], 0
jne 0x4d7749
push 0x104
lea eax, [ebp - 0x430]
push eax
push 0x4d78dc
call sub.kernel32.dll_ExpandEnvironmentStringsW
push 0
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x228]
push eax
call sub.kernel32.dll_CopyFileW
test eax, eax
je 0x4d7749
push 1
push 0
lea eax, [ebp - 0x430]
push eax
call sub.kernel32.dll_LoadLibraryExW_1
mov esi, eax
test esi, esi
je 0x4d7749
mov dword [ebp - 0x18], esi
cmp dword [ebp - 0x18], 0
je 0x4d7889
xor eax, eax
mov dword [ebp - 8], eax
push 0x4d7908
lea eax, [ebp - 0x228]
push eax
call sub.kernel32.dll_GetModuleHandleW_1
push eax
call fcn.00413e8c
mov ebx, eax
lea eax, [ebp - 8]
push eax
push 0
push 1
mov eax, dword [ebp - 0x18]
push eax
call ebx
mov ebx, eax
test ebx, ebx
je 0x4d7854
cmp dword [ebp - 8], 0
je 0x4d7854
mov byte [ebp - 0x11], 1
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x4d7854
dec eax
test eax, eax
jb 0x4d7854
inc eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0xc], 0
mov eax, dword [ebx + 0x20]
mov edi, dword [ebp - 0x18]
add eax, edi
mov edx, dword [ebp - 0xc]
add edx, edx
add edx, edx
add eax, edx
mov eax, dword [eax]
add eax, edi
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
cmp word [eax], 0x744e
jne 0x4d7848
mov eax, dword [ebx + 0x24]
add eax, edi
mov edx, dword [ebp - 0xc]
add edx, edx
add eax, edx
movzx eax, word [eax]
add eax, eax
add eax, eax
mov edx, dword [ebx + 0x1c]
add edx, edi
add eax, edx
mov eax, dword [eax]
add eax, dword [ebp - 0x18]
movzx edx, byte [ebp - 0x11]
add eax, edx
mov eax, dword [eax]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x434]
call fcn.004213c8
mov eax, dword [ebp - 0x434]
push eax
lea eax, [ebp - 0x43c]
mov edx, dword [ebp - 0x10]
mov ecx, 0
call fcn.0040a2cc
mov edx, dword [ebp - 0x43c]
lea eax, [ebp - 0x438]
call fcn.0040aa74
mov edx, dword [ebp - 0x438]
mov eax, dword [ebp - 4]
pop ecx
call fcn.004a6be8
inc dword [ebp - 0xc]
dec dword [ebp - 0x20]
jne 0x4d77b6
cmp dword [ebp - 0x1c], 0
je 0x4d7865
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_UnmapViewOfFile
jmp 0x4d7889
test esi, esi
je 0x4d786f
push esi
call sub.kernel32.dll_FreeLibrary_2
push 0
lea eax, [ebp - 0x430]
push eax
call sub.kernel32.dll_SetFileAttributesW
lea eax, [ebp - 0x430]
push eax
call sub.kernel32.dll_DeleteFileW
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d78b9
lea eax, [ebp - 0x43c]
call fcn.00409b94
lea eax, [ebp - 0x438]
mov edx, 2
call fcn.00409bd0
ret