Function at 0x40f530
Capabilities:
Copy file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x318
push ebx
push esi
push edi
push str.UncopyInfrastructureFiles_n
mov ebx, 0x46abb8
push 2
mov esi, ecx
push ebx
call fcn.0040121a
add esp, 0xc
cmp dword [esi + 0x484], 0
jne 0x40f7dd
sub esp, 0xc
lea eax, [esi + 0x4ac]
mov ecx, esp
mov dword [ebp - 4], esp
push eax
call fcn.0041389e
mov ecx, esi
call fcn.0040f814
mov dl, byte [0x46a9b4]
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x10f]
mov byte [ebp - 0x110], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x213]
mov byte [ebp - 0x214], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esi + 0x4bc]
mov edi, dword [eax]
cmp eax, edi
je 0x40f660
mov eax, dword [edi + 0xc]
test eax, eax
jne 0x40f5c9
mov eax, 0x44f48c
push eax
lea eax, [ebp - 0x110]
push eax
call fcn.0042cc90
push str..temp
call fcn.0042cc10
mov ebx, eax
lea eax, [ebp - 0x110]
push eax
call fcn.0042cc10
sub eax, ebx
push eax
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.0042cda1
add esp, 0x1c
lea eax, [ebp - 0x214]
mov ebx, 0x46abb8
push eax
lea eax, [ebp - 0x110]
push eax
push str.Restoring__s_into__s_n
push 1
push ebx
call fcn.0040121a
add esp, 0x14
lea eax, [ebp - 0x214]
push 0
push eax
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea eax, [ebp - 0x214]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edi, dword [edi]
cmp dword [esi + 0x4bc], edi
jne 0x40f5bd
mov eax, dword [esi + 0x4bc]
and byte [ebp - 0x214], 0
and byte [ebp - 0x110], 0
mov edi, dword [eax]
cmp eax, edi
mov dword [ebp - 0xc], edi
je 0x40f7f8
mov eax, dword [esi + 0x4b0]
mov ecx, dword [eax]
cmp eax, ecx
mov dword [ebp - 8], ecx
je 0x40f7f8
jmp 0x40f699
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx + 0xc]
test ecx, ecx
jne 0x40f6a5
mov ecx, 0x44f48c
lea eax, [ebp - 0x110]
push ecx
push eax
call fcn.0042cc90
cmp dword [esi + 0x4bc], edi
pop ecx
pop ecx
je 0x40f706
jmp 0x40f6c1
mov edi, dword [ebp - 0xc]
mov eax, dword [edi + 0xc]
mov dword [ebp - 4], 0x44f48c
test eax, eax
je 0x40f6d2
mov dword [ebp - 4], eax
lea eax, [ebp - 0x110]
push eax
call fcn.0042cc10
push eax
lea eax, [ebp - 0x110]
push dword [ebp - 4]
push eax
call fcn.0042d377
add esp, 0x10
test eax, eax
je 0x40f7c7
mov edi, dword [edi]
cmp dword [esi + 0x4bc], edi
mov dword [ebp - 0xc], edi
jne 0x40f6be
mov al, byte [0x46a9b4]
push 0x40
mov byte [ebp - 0x318], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x317]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esi + 0x1a4]
test eax, eax
jne 0x40f730
mov eax, 0x44f48c
push eax
lea eax, [ebp - 0x318]
push eax
call fcn.0042cc90
lea eax, [ebp - 0x214]
push 0x104
push eax
lea eax, [ebp - 0x110]
push eax
call fcn.004027e3
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x318]
push eax
call fcn.0042cca0
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.0042cc90
add esp, 0x24
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x318]
push eax
push str.Restoring__s_into__s_n
push 1
push ebx
call fcn.0040121a
add esp, 0x14
lea eax, [ebp - 0x214]
push 1
push eax
lea eax, [ebp - 0x318]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea eax, [ebp - 0x214]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp dword [esi + 0x4b0], eax
mov dword [ebp - 8], eax
jne 0x40f696
jmp 0x40f7f8
sub esp, 0xc
lea eax, [esi + 0x4b8]
mov ecx, esp
mov dword [ebp - 4], esp
push eax
call fcn.0041389e
mov ecx, esi
call fcn.0040f814
mov ecx, esi
call fcn.0040f02e
push str.UncopyInfrastructureFiles_n
push 4
push ebx
call fcn.0040121a
add esp, 0xc
pop edi
pop esi
pop ebx
leave
ret