Function at 0xcaf350
Capabilities:
Copy file
Delete file
Enumerate network shares
Query or enumerate registry key
Resolve function by parsing pe exports
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0xcd1187
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xed8
mov ecx, dword [esp + 0xee8]
push ebx
push ebp
push esi
lea eax, [esp + 0x1c]
push edi
push eax
push ecx
push 2
xor edi, edi
push 1
push 2
mov dword [esp + 0x34], edi
call sub.MPR.dll_WNetOpenEnumW
lea edx, [esp + 0x38]
lea eax, [esp + 0x268]
push edx
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x18]
push eax
push ecx
push edx
mov dword [esp + 0x24], 0xffffffff
mov dword [esp + 0x48], 0xc80
call sub.MPR.dll_WNetEnumResourceW
cmp eax, 0x103
je 0xcaf8ae
cmp eax, edi
jne 0xcaf8ae
mov eax, dword [esp + 0x14]
mov dword [esp + 0x50], edi
cmp eax, edi
jbe 0xcaf877
lea esi, [esp + 0x27c]
mov dword [esp + 0x48], esi
mov eax, dword [esi - 0xc]
lea ebp, [esi - 0x14]
cmp eax, 2
jne 0xcaf847
mov ecx, dword [esi]
lea eax, [esp + 0x1c]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
push ecx
call dword [sym.imp.ADVAPI32.dll_RegConnectRegistryW]
test eax, eax
jne 0xcaf85b
mov ecx, dword [esp + 0x1c]
push edi
push edi
push edi
lea edx, [esp + 0x30]
push edi
lea eax, [esp + 0x70]
push edx
push eax
push edi
push ecx
xor ebx, ebx
mov dword [esp + 0x44], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, 0x103
je 0xcaf838
cmp eax, edi
jne 0xcaf838
lea edx, [esp + 0x5c]
lea eax, [esp + 0x44]
push edx
mov edx, dword [esp + 0x20]
push eax
push edi
push 1
push 4
push edi
lea ecx, [esp + 0x78]
push edi
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, edi
jne 0xcaf80a
push 0xc
call fcn.00cc11d3
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, edi
mov dword [esp + 0xef0], edi
je 0xcaf498
push str.Admin_System32_tmp.hiv
mov ecx, eax
call fcn.00caec20
jmp 0xcaf49a
xor eax, eax
cmp eax, edi
mov dword [esp + 0xef0], 0xffffffff
mov dword [esp + 0x2c], eax
jne 0xcaf4b7
push 0x8007000e
call fcn.00cd03e0
mov esi, dword [ebp + 0x14]
push 0xc
mov dword [esp + 0xef4], 1
call fcn.00cc11d3
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, edi
mov byte [esp + 0xef0], 2
je 0xcaf4e9
push esi
mov ecx, eax
call fcn.00caec20
jmp 0xcaf4eb
xor eax, eax
cmp eax, edi
mov byte [esp + 0xef0], 1
mov dword [esp + 0x30], eax
jne 0xcaf505
push 0x8007000e
call fcn.00cd03e0
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x10]
push eax
push ecx
lea ecx, [esp + 0x38]
mov byte [esp + 0xef8], 3
call fcn.00caea30
mov ecx, dword [esp + 0x30]
cmp ecx, edi
je 0xcaf531
call fcn.00caece0
mov dword [esp + 0x30], edi
mov ecx, dword [esp + 0x2c]
mov byte [esp + 0xef0], 5
cmp ecx, edi
je 0xcaf54a
call fcn.00caece0
mov dword [esp + 0x2c], edi
mov eax, dword [esp + 0x10]
cmp eax, edi
je 0xcaf556
mov eax, dword [eax]
jmp 0xcaf558
xor eax, eax
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esp + 0x10]
cmp eax, edi
je 0xcaf570
mov eax, dword [eax]
jmp 0xcaf572
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [esp + 0x44]
push edi
push str.tmp.hiv
push edx
call fcn.00cb11f0
add esp, 0xc
cmp eax, edi
jne 0xcaf7cb
push 0xc
call fcn.00cc11d3
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, edi
mov byte [esp + 0xef0], 7
je 0xcaf5bc
push 0xcd62cc
mov ecx, eax
call fcn.00caec20
jmp 0xcaf5be
xor eax, eax
cmp eax, edi
mov byte [esp + 0xef0], 5
mov dword [esp + 0x34], eax
jne 0xcaf5d8
push 0x8007000e
call fcn.00cd03e0
push 0xc
mov byte [esp + 0xef4], 8
call fcn.00cc11d3
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, edi
mov byte [esp + 0xef0], 9
je 0xcaf608
lea ecx, [esp + 0x60]
push ecx
mov ecx, eax
call fcn.00caec20
jmp 0xcaf60a
xor eax, eax
cmp eax, edi
mov byte [esp + 0xef0], 8
mov dword [esp + 0x3c], eax
jne 0xcaf624
push 0x8007000e
call fcn.00cd03e0
push 0xc
mov byte [esp + 0xef4], 0xa
call fcn.00cc11d3
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, edi
mov byte [esp + 0xef0], 0xb
je 0xcaf654
push 0xcd62c8
mov ecx, eax
call fcn.00caec20
jmp 0xcaf656
xor eax, eax
cmp eax, edi
mov byte [esp + 0xef0], 0xa
mov dword [esp + 0x40], eax
jne 0xcaf670
push 0x8007000e
call fcn.00cd03e0
mov esi, dword [ebp + 0x14]
push 0xc
mov byte [esp + 0xef4], 0xc
add esi, 4
call fcn.00cc11d3
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, edi
mov byte [esp + 0xef0], 0xd
je 0xcaf6a2
push esi
mov ecx, eax
call fcn.00caec20
jmp 0xcaf6a4
xor eax, eax
cmp eax, edi
mov byte [esp + 0xef0], 0xc
mov dword [esp + 0x4c], eax
jne 0xcaf6be
push 0x8007000e
call fcn.00cd03e0
lea edx, [esp + 0x40]
lea eax, [esp + 0x54]
push edx
push eax
lea ecx, [esp + 0x54]
mov byte [esp + 0xef8], 0xe
call fcn.00caea30
lea ecx, [esp + 0x3c]
lea edx, [esp + 0x58]
push ecx
push edx
mov ecx, eax
mov byte [esp + 0xef8], 0xf
call fcn.00caea30
lea ecx, [esp + 0x34]
lea edx, [esp + 0x28]
push ecx
push edx
mov ecx, eax
mov byte [esp + 0xef8], 0x10
call fcn.00caea30
lea ecx, [esp + 0x58]
call fcn.00caebd0
lea ecx, [esp + 0x54]
call fcn.00caebd0
lea ecx, [esp + 0x4c]
call fcn.00caebd0
mov ecx, dword [esp + 0x40]
cmp ecx, edi
je 0xcaf737
call fcn.00caece0
mov dword [esp + 0x40], edi
mov ecx, dword [esp + 0x3c]
cmp ecx, edi
je 0xcaf748
call fcn.00caece0
mov dword [esp + 0x3c], edi
mov ecx, dword [esp + 0x34]
mov byte [esp + 0xef0], 5
cmp ecx, edi
je 0xcaf761
call fcn.00caece0
mov dword [esp + 0x34], edi
mov eax, dword [esp + 0x28]
cmp eax, edi
je 0xcaf76d
mov ecx, dword [eax]
jmp 0xcaf76f
xor ecx, ecx
mov eax, dword [esp + 0x10]
cmp eax, edi
je 0xcaf77b
mov eax, dword [eax]
jmp 0xcaf77d
xor eax, eax
push 1
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esp + 0x10]
cmp eax, edi
je 0xcaf799
mov eax, dword [eax]
jmp 0xcaf79b
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esp + 0x28]
cmp eax, edi
je 0xcaf7cb
mov esi, eax
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0xcaf7c7
cmp esi, edi
je 0xcaf7c7
push 1
mov ecx, esi
call fcn.00caf8e0
mov dword [esp + 0x28], edi
mov eax, dword [esp + 0x44]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x10]
mov dword [esp + 0xef0], 0xffffffff
cmp eax, edi
je 0xcaf80a
mov esi, eax
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0xcaf806
cmp esi, edi
je 0xcaf806
push 1
mov ecx, esi
call fcn.00caf8e0
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x1c]
push edi
push edi
push edi
lea ecx, [esp + 0x30]
push edi
lea edx, [esp + 0x70]
inc ebx
push ecx
push edx
push ebx
push eax
mov dword [esp + 0x44], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, 0x103
jne 0xcaf440
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esp + 0x48]
mov edx, dword [ebp + 0xc]
and edx, 2
cmp dl, 2
jne 0xcaf85b
push ebp
call fcn.00caf350
add esp, 4
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x14]
inc eax
add esi, 0x20
cmp eax, ecx
mov dword [esp + 0x50], eax
mov dword [esp + 0x48], esi
jb 0xcaf3e7
lea eax, [esp + 0x38]
lea ecx, [esp + 0x268]
push eax
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x18]
push ecx
push edx
push eax
mov dword [esp + 0x24], 0xffffffff
mov dword [esp + 0x48], 0xc80
call sub.MPR.dll_WNetEnumResourceW
cmp eax, 0x103
jne 0xcaf3c4
mov ecx, dword [esp + 0x20]
push ecx
call sub.MPR.dll_WNetCloseEnum
mov ecx, dword [esp + 0xee8]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0xee4
ret