Function at 0x406a15
Capabilities:
Create directory
Delete directory
Delete file

Disassembly:
mov eax, 0x42e621
call fcn.0041bafc
mov eax, 0x3040
call fcn.0041bbd0
cmp byte [0x43bbca], 0
jne 0x406a4d
push str.SeRestorePrivilege
call fcn.00407323
push str.SeCreateSymbolicLinkPrivilege
call fcn.00407323
mov byte [0x43bbca], 1
push ebx
push esi
push edi
push 0x1418
lea ecx, [ebp - 0x28]
call fcn.004069cd
mov ebx, dword [ebp + 0x10]
and dword [ebp - 4], 0
push 0x800
lea eax, [ebx + 0x10f4]
push eax
lea eax, [ebp - 0x1028]
push eax
call fcn.0040e5b0
lea eax, [ebp - 0x1028]
push eax
call fcn.00421015
push 4
mov dword [ebp - 0x10], eax
lea esi, [ebp - 0x1028]
mov eax, esi
lea edi, [ebp - 0x2028]
push 0x42f4a4
push eax
call fcn.004224b7
add esp, 0x10
neg eax
sbb al, al
add al, 1
mov dword [ebp - 0x14], eax
je 0x406ae6
push 4
lea esi, [ebp - 0x1020]
mov eax, esi
push str.UNC_
push eax
call fcn.004224b7
add esp, 0xc
test eax, eax
jne 0x406ae6
push 0x5c
pop eax
mov word [ebp - 0x2028], ax
lea edi, [ebp - 0x2026]
lea esi, [ebp - 0x101a]
push esi
push edi
call fcn.00420ff3
lea eax, [ebp - 0x2028]
push eax
call fcn.00421015
mov edi, dword [ebp - 0x28]
add esp, 0xc
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 8]
cmp byte [eax + 0x518b], 0
jne 0x406b3e
cmp byte [ebp - 0x14], 0
jne 0x406d10
lea esi, [ebx + 0x10f4]
push esi
call fcn.0040abba
test al, al
jne 0x406d10
push esi
lea eax, [ebx + 0x20]
push eax
call fcn.00407191
test al, al
je 0x406d10
xor esi, esi
inc esi
push esi
push dword [ebp + 0xc]
call fcn.004094be
cmp byte [ebx + 0x10e1], 0
jne 0x406b87
cmp byte [ebx + 0x20f4], 0
jne 0x406b87
xor eax, eax
push eax
push 0x80
push esi
push eax
push eax
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x406d10
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406b9a
push 0
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x406d10
mov eax, dword [ebx + 0x10f0]
cmp eax, 3
jne 0x406c05
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp + 0x10]
add eax, ecx
mov dword [edi], 0xa0000003
lea esi, [ecx + ecx]
mov word [edi + 0xa], si
lea eax, [eax*2 + 0xc]
mov word [edi + 4], ax
xor eax, eax
mov dword [edi + 6], eax
lea eax, [ebp - 0x1028]
push eax
lea eax, [edi + 0x10]
push eax
call fcn.00420ff3
lea eax, [esi + 2]
mov word [edi + 0xc], ax
mov eax, dword [ebp + 0x10]
add eax, eax
mov word [edi + 0xe], ax
lea eax, [ebp - 0x2028]
push eax
mov eax, dword [ebp - 0x10]
add eax, 9
lea eax, [edi + eax*2]
push eax
call fcn.00420ff3
add esp, 0x10
jmp 0x406c7b
cmp eax, 2
je 0x406c12
cmp eax, esi
jne 0x406d10
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp + 0x10]
add eax, ecx
mov dword [edi], 0xa000000c
lea esi, [ecx + ecx]
mov word [edi + 0xa], si
lea eax, [eax*2 + 0x10]
mov word [edi + 4], ax
xor eax, eax
mov dword [edi + 6], eax
lea eax, [ebp - 0x1028]
push eax
lea eax, [edi + 0x14]
push eax
call fcn.00420ff3
lea eax, [esi + 2]
mov word [edi + 0xc], ax
mov eax, dword [ebp + 0x10]
add eax, eax
mov word [edi + 0xe], ax
lea eax, [ebp - 0x2028]
push eax
mov eax, dword [ebp - 0x10]
add eax, 0xb
lea eax, [edi + eax*2]
push eax
call fcn.00420ff3
xor eax, eax
add esp, 0x10
cmp byte [ebp - 0x14], al
sete al
mov dword [edi + 0x10], eax
mov esi, dword [ebp + 0xc]
xor eax, eax
push eax
push 0x2200000
push 3
push eax
push eax
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, eax
mov dword [ebp + 0xc], ecx
cmp ecx, 0xffffffff
je 0x406d10
xor edx, edx
lea eax, [ebp - 0x18]
push edx
push eax
movzx eax, word [edi + 4]
push edx
push edx
add eax, 8
push eax
push edi
push 0x900a4
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x406d3a
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push 0
push 0x14
call fcn.0040674b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x522
jne 0x406cea
push 0x16
call fcn.00403a8e
mov ecx, 0x43bbe8
call fcn.0041f82c
push 9
mov ecx, 0x43bbe8
call fcn.004068f9
cmp byte [ebx + 0x10e1], 0
push esi
je 0x406d32
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
xor bl, bl
test edi, edi
je 0x406d1d
push edi
call fcn.00421030
pop ecx
mov ecx, dword [ebp - 0xc]
mov al, bl
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0xc
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x406d10
lea ecx, [ebp - 0x304c]
call fcn.00408bec
lea ecx, [ebp - 0x304c]
mov byte [ebp - 4], 1
call fcn.00408c8e
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x3048], eax
lea eax, [ebx + 0x1040]
mov ecx, dword [edx + 0x6294]
neg ecx
sbb ecx, ecx
and ecx, eax
lea eax, [ebx + 0x1038]
push ecx
mov ecx, dword [edx + 0x6290]
neg ecx
sbb ecx, ecx
and ecx, eax
lea eax, [ebx + 0x1030]
push ecx
mov ecx, dword [edx + 0x628c]
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
lea ecx, [ebp - 0x304c]
call fcn.004091ff
lea ecx, [ebp - 0x304c]
call fcn.00408c8e
mov eax, dword [ebp + 8]
cmp byte [eax + 0x519c], 0
jne 0x406dc4
push dword [ebx + 0x1c]
push esi
call fcn.004098b3
lea ecx, [ebp - 0x304c]
call fcn.00408c22
xor ebx, ebx
inc ebx
jmp 0x406d12