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

Disassembly:
mov eax, 0x42ecb5
call fcn.0041c160
mov eax, 0x3040
call fcn.0041c230
cmp byte [0x43bbda], 0
jne 0x406c39
push str.SeRestorePrivilege
call fcn.0040750f
push str.SeCreateSymbolicLinkPrivilege
call fcn.0040750f
mov byte [0x43bbda], 1
push ebx
push esi
push edi
push 0x1418
lea ecx, [ebp - 0x28]
call fcn.00401571
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.0040e83c
lea eax, [ebp - 0x1028]
push eax
call fcn.004216c5
push 4
mov dword [ebp - 0x10], eax
lea esi, [ebp - 0x1028]
mov eax, esi
lea edi, [ebp - 0x2028]
push str.___
push eax
call fcn.00422b67
add esp, 0x10
neg eax
sbb al, al
add al, 1
mov dword [ebp - 0x14], eax
je 0x406cd2
push 4
lea esi, [ebp - 0x1020]
mov eax, esi
push str.UNC_
push eax
call fcn.00422b67
add esp, 0xc
test eax, eax
jne 0x406cd2
push 0x5c
pop eax
mov word [ebp - 0x2028], ax
lea edi, [ebp - 0x2026]
lea esi, [ebp - 0x101a]
push esi
push edi
call fcn.004216a3
lea eax, [ebp - 0x2028]
push eax
call fcn.004216c5
mov edi, dword [ebp - 0x28]
add esp, 0xc
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 8]
cmp byte [eax + 0x518b], 0
jne 0x406d2a
cmp byte [ebp - 0x14], 0
jne 0x406efc
lea esi, [ebx + 0x10f4]
push esi
call fcn.0040ae2c
test al, al
jne 0x406efc
push esi
lea eax, [ebx + 0x20]
push eax
call fcn.0040737d
test al, al
je 0x406efc
xor esi, esi
inc esi
push esi
push dword [ebp + 0xc]
call fcn.0040973f
cmp byte [ebx + 0x10e1], 0
jne 0x406d73
cmp byte [ebx + 0x20f4], 0
jne 0x406d73
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 0x406efc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406d86
push 0
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x406efc
mov eax, dword [ebx + 0x10f0]
cmp eax, 3
jne 0x406df1
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.004216a3
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.004216a3
add esp, 0x10
jmp 0x406e67
cmp eax, 2
je 0x406dfe
cmp eax, esi
jne 0x406efc
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.004216a3
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.004216a3
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 0x406efc
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 0x406f26
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push 0
push 0x14
call fcn.00406956
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x522
jne 0x406ed6
push 0x16
call fcn.00403c99
mov ecx, 0x43bbf8
call fcn.00420f89
push 9
mov ecx, 0x43bbf8
call fcn.00406b04
cmp byte [ebx + 0x10e1], 0
push esi
je 0x406f1e
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
xor bl, bl
test edi, edi
je 0x406f09
push edi
call fcn.004216e0
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 0x406efc
lea ecx, [ebp - 0x304c]
call fcn.00408e6d
lea ecx, [ebp - 0x304c]
mov byte [ebp - 4], 1
call fcn.00408f0f
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.00409480
lea ecx, [ebp - 0x304c]
call fcn.00408f0f
mov eax, dword [ebp + 8]
cmp byte [eax + 0x519c], 0
jne 0x406fb0
push dword [ebx + 0x1c]
push esi
call fcn.00409b34
lea ecx, [ebp - 0x304c]
call fcn.00408ea3
xor ebx, ebx
inc ebx
jmp 0x406efe