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

Disassembly:
mov eax, 0x42ecd5
call fcn.0041c188
mov eax, 0x3040
call fcn.0041c260
cmp byte [0x43cbda], 0
jne 0x406c3a
push str.SeRestorePrivilege
call fcn.00407510
push str.SeCreateSymbolicLinkPrivilege
call fcn.00407510
mov byte [0x43cbda], 1
push ebx
push esi
push edi
push 0x1418
lea ecx, [ebp - 0x28]
call fcn.00401546
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.0040e831
lea eax, [ebp - 0x1028]
push eax
call fcn.004216e5
push 4
mov dword [ebp - 0x10], eax
lea esi, [ebp - 0x1028]
mov eax, esi
lea edi, [ebp - 0x2028]
push 0x4304a4
push eax
call fcn.00422b87
add esp, 0x10
neg eax
sbb al, al
add al, 1
mov dword [ebp - 0x14], eax
je 0x406cd3
push 4
lea esi, [ebp - 0x1020]
mov eax, esi
push str.UNC_
push eax
call fcn.00422b87
add esp, 0xc
test eax, eax
jne 0x406cd3
push 0x5c
pop eax
mov word [ebp - 0x2028], ax
lea edi, [ebp - 0x2026]
lea esi, [ebp - 0x101a]
push esi
push edi
call fcn.004216c3
lea eax, [ebp - 0x2028]
push eax
call fcn.004216e5
mov edi, dword [ebp - 0x28]
add esp, 0xc
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 8]
cmp byte [eax + 0x518b], 0
jne 0x406d2b
cmp byte [ebp - 0x14], 0
jne 0x406efd
lea esi, [ebx + 0x10f4]
push esi
call fcn.0040ae1f
test al, al
jne 0x406efd
push esi
lea eax, [ebx + 0x20]
push eax
call fcn.0040737e
test al, al
je 0x406efd
xor esi, esi
inc esi
push esi
push dword [ebp + 0xc]
call fcn.00409740
cmp byte [ebx + 0x10e1], 0
jne 0x406d74
cmp byte [ebx + 0x20f4], 0
jne 0x406d74
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 0x406efd
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406d87
push 0
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x406efd
mov eax, dword [ebx + 0x10f0]
cmp eax, 3
jne 0x406df2
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.004216c3
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.004216c3
add esp, 0x10
jmp 0x406e68
cmp eax, 2
je 0x406dff
cmp eax, esi
jne 0x406efd
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.004216c3
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.004216c3
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 0x406efd
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 0x406f27
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 0x406ed7
push 0x16
call fcn.00403c8b
mov ecx, 0x43cbf8
call fcn.00406b4c
push 9
mov ecx, 0x43cbf8
call fcn.00406b04
cmp byte [ebx + 0x10e1], 0
push esi
je 0x406f1f
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
xor bl, bl
test edi, edi
je 0x406f0a
push edi
call fcn.00421700
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 0x406efd
lea ecx, [ebp - 0x304c]
call fcn.00408e6e
lea ecx, [ebp - 0x304c]
mov byte [ebp - 4], 1
call fcn.00408f10
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.00409481
lea ecx, [ebp - 0x304c]
call fcn.00408f10
mov eax, dword [ebp + 8]
cmp byte [eax + 0x519c], 0
jne 0x406fb1
push dword [ebx + 0x1c]
push esi
call fcn.00409b35
lea ecx, [ebp - 0x304c]
call fcn.00408ea4
xor ebx, ebx
inc ebx
jmp 0x406eff