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

Disassembly:
mov eax, 0x42ecb3
call fcn.0041c188
mov eax, 0x3040
call fcn.0041c260
cmp byte [0x43bbda], 0
jne 0x406c37
push str.SeRestorePrivilege
call fcn.0040750d
push str.SeCreateSymbolicLinkPrivilege
call fcn.0040750d
mov byte [0x43bbda], 1
push ebx
push esi
push edi
push 0x1418
lea ecx, [ebp - 0x28]
call fcn.00406bb7
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.0040e82c
lea eax, [ebp - 0x1028]
push eax
call fcn.004216d5
push 4
mov dword [ebp - 0x10], eax
lea esi, [ebp - 0x1028]
mov eax, esi
lea edi, [ebp - 0x2028]
push 0x42f4a4
push eax
call fcn.00422b77
add esp, 0x10
neg eax
sbb al, al
add al, 1
mov dword [ebp - 0x14], eax
je 0x406cd0
push 4
lea esi, [ebp - 0x1020]
mov eax, esi
push str.UNC_
push eax
call fcn.00422b77
add esp, 0xc
test eax, eax
jne 0x406cd0
push 0x5c
pop eax
mov word [ebp - 0x2028], ax
lea edi, [ebp - 0x2026]
lea esi, [ebp - 0x101a]
push esi
push edi
call fcn.004216b3
lea eax, [ebp - 0x2028]
push eax
call fcn.004216d5
mov edi, dword [ebp - 0x28]
add esp, 0xc
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 8]
cmp byte [eax + 0x518b], 0
jne 0x406d28
cmp byte [ebp - 0x14], 0
jne 0x406efa
lea esi, [ebx + 0x10f4]
push esi
call fcn.0040ae1c
test al, al
jne 0x406efa
push esi
lea eax, [ebx + 0x20]
push eax
call fcn.0040737b
test al, al
je 0x406efa
xor esi, esi
inc esi
push esi
push dword [ebp + 0xc]
call fcn.0040973d
cmp byte [ebx + 0x10e1], 0
jne 0x406d71
cmp byte [ebx + 0x20f4], 0
jne 0x406d71
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 0x406efa
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406d84
push 0
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x406efa
mov eax, dword [ebx + 0x10f0]
cmp eax, 3
jne 0x406def
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.004216b3
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.004216b3
add esp, 0x10
jmp 0x406e65
cmp eax, 2
je 0x406dfc
cmp eax, esi
jne 0x406efa
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.004216b3
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.004216b3
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 0x406efa
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 0x406f24
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push 0
push 0x14
call fcn.00406934
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x522
jne 0x406ed4
push 0x16
call fcn.00403c77
mov ecx, 0x43bbf8
call fcn.00406b2a
push 9
mov ecx, 0x43bbf8
call fcn.00406ae2
cmp byte [ebx + 0x10e1], 0
push esi
je 0x406f1c
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
xor bl, bl
test edi, edi
je 0x406f07
push edi
call fcn.004216f0
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 0x406efa
lea ecx, [ebp - 0x304c]
call fcn.00408e6b
lea ecx, [ebp - 0x304c]
mov byte [ebp - 4], 1
call fcn.00408f0d
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.0040947e
lea ecx, [ebp - 0x304c]
call fcn.00408f0d
mov eax, dword [ebp + 8]
cmp byte [eax + 0x519c], 0
jne 0x406fae
push dword [ebx + 0x1c]
push esi
call fcn.00409b32
lea ecx, [ebp - 0x304c]
call fcn.00408ea1
xor ebx, ebx
inc ebx
jmp 0x406efc