Function at 0x4051b0
Capabilities:
Copy file
Set file attributes

Disassembly:
sub esp, 0x13c
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x1c], ecx
push str.netapi32
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x10], ebp
je 0x40540d
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.NetShareGetInfo
push ebp
call esi
mov edi, eax
push str.NetApiBufferFree
push ebp
mov dword [esp + 0x2c], edi
call esi
test edi, edi
mov dword [esp + 0x20], eax
je 0x405406
test eax, eax
je 0x405406
mov edi, dword [esp + 0x150]
push 0x5c
push edi
call fcn.004068e0
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
je 0x405406
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x104
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x405406
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push eax
push 0x40d8e8
mov edx, dword [ecx + 0xc]
push edx
push str._s_s_s
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
add esp, 0x14
push 0x80
push esi
call ebp
push 0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x4053c2
push esi
push edi
push str._s_was_succesfully_copied_to__s_n
call fcn.004055b0
add esp, 0xc
push 0x80
push esi
call ebp
push esi
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x1c]
xor esi, esi
mov dword [esp + 0x14], 0
mov eax, dword [eax + 0xc]
test eax, eax
je 0x4052d9
lea ecx, [esp + 0x28]
push 0x80
push ecx
push 0xffffffffffffffff
push eax
push 1
push 0
lea esi, [esp + 0x40]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea edx, [esp + 0x14]
push edx
push 2
push str.ADMIN_
push esi
call dword [esp + 0x34]
test eax, eax
jne 0x40538c
push 0x104
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, dword [esp + 0x154]
test eax, eax
mov dword [esi], eax
jne 0x405319
mov eax, dword [esp + 0x10]
push eax
jmp 0x405407
mov edx, dword [esp + 0x14]
push 0
push 0
lea ecx, [esp + 0x50]
mov eax, dword [edx + 0x18]
push 0x104
push ecx
push 0xffffffffffffffff
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, dword [esp + 0x18]
mov eax, dword [esi]
lea edx, [esp + 0x48]
push ecx
push edx
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [esp + 0x24]
add esp, 0x10
push ecx
call dword [esp + 0x24]
mov edx, dword [esi]
push edx
push str.CServiceNT::CopyExeToRemoteAdmin___lpszResult___s_n
call fcn.004055b0
mov eax, dword [esp + 0x18]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x13c
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.NetShareGetInfo_failed__n
mov esi, eax
call fcn.004055b0
mov ecx, dword [esp + 0x14]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x13c
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push 0
mov ebp, eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
push edi
push str.Could_not_copy__s_to__s_n
call fcn.004055b0
mov edx, dword [esp + 0x1c]
add esp, 0xc
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebp
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x13c
ret 8
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x13c
ret 8