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

Disassembly:
mov eax, 0x42ec8b
call fcn.0041c16c
mov eax, 0x3040
call fcn.0041c240
cmp byte [0x43bbda], 0
jne 0x406c01
push str.SeRestorePrivilege
call fcn.004074d7
push str.SeCreateSymbolicLinkPrivilege
call fcn.004074d7
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.0040e847
lea eax, [ebp - 0x1028]
push eax
call fcn.004216b5
push 4
mov dword [ebp - 0x10], eax
lea esi, [ebp - 0x1028]
mov eax, esi
lea edi, [ebp - 0x2028]
push 0x42f4a4
push eax
call fcn.00422b57
add esp, 0x10
neg eax
sbb al, al
add al, 1
mov dword [ebp - 0x14], eax
je 0x406c9a
push 4
lea esi, [ebp - 0x1020]
mov eax, esi
push str.UNC_
push eax
call fcn.00422b57
add esp, 0xc
test eax, eax
jne 0x406c9a
push 0x5c
pop eax
mov word [ebp - 0x2028], ax
lea edi, [ebp - 0x2026]
lea esi, [ebp - 0x101a]
push esi
push edi
call fcn.00421693
lea eax, [ebp - 0x2028]
push eax
call fcn.004216b5
mov edi, dword [ebp - 0x28]
add esp, 0xc
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 8]
cmp byte [eax + 0x518b], 0
jne 0x406cf2
cmp byte [ebp - 0x14], 0
jne 0x406ec4
lea esi, [ebx + 0x10f4]
push esi
call fcn.0040adf9
test al, al
jne 0x406ec4
push esi
lea eax, [ebx + 0x20]
push eax
call fcn.00407345
test al, al
je 0x406ec4
xor esi, esi
inc esi
push esi
push dword [ebp + 0xc]
call fcn.004096ef
cmp byte [ebx + 0x10e1], 0
jne 0x406d3b
cmp byte [ebx + 0x20f4], 0
jne 0x406d3b
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 0x406ec4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406d4e
push 0
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x406ec4
mov eax, dword [ebx + 0x10f0]
cmp eax, 3
jne 0x406db9
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.00421693
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.00421693
add esp, 0x10
jmp 0x406e2f
cmp eax, 2
je 0x406dc6
cmp eax, esi
jne 0x406ec4
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.00421693
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.00421693
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 0x406ec4
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 0x406eee
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push 0
push 0x14
call fcn.00401f25
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x522
jne 0x406e9e
push 0x16
call fcn.00403c8d
mov ecx, 0x43bbf8
call fcn.00420f99
push 9
mov ecx, 0x43bbf8
call fcn.00406acc
cmp byte [ebx + 0x10e1], 0
push esi
je 0x406ee6
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
xor bl, bl
test edi, edi
je 0x406ed1
push edi
call fcn.004216d0
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 0x406ec4
lea ecx, [ebp - 0x304c]
call fcn.00408e1d
lea ecx, [ebp - 0x304c]
mov byte [ebp - 4], 1
call fcn.00408ebf
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.00409430
lea ecx, [ebp - 0x304c]
call fcn.00408ebf
mov eax, dword [ebp + 8]
cmp byte [eax + 0x519c], 0
jne 0x406f78
push dword [ebx + 0x1c]
push esi
call fcn.00409ae4
lea ecx, [ebp - 0x304c]
call fcn.00408e53
xor ebx, ebx
inc ebx
jmp 0x406ec6