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

Disassembly:
mov eax, 0x43166f
call fcn.0041db3c
mov eax, 0x309c
call fcn.0041dc10
push ebx
xor ebx, ebx
inc ebx
cmp byte [0x43fd63], 0
push esi
push edi
mov dword [ebp - 0x1c], ebx
jne 0x406f5f
push str.SeRestorePrivilege
call fcn.00407988
push str.SeCreateSymbolicLinkPrivilege
call fcn.00407988
mov byte [0x43fd63], bl
push 0x1418
lea ecx, [ebp - 0x30]
call fcn.00406e30
mov ebx, dword [ebp + 0x10]
and dword [ebp - 4], 0
push 0x800
lea eax, [ebx + 0x1104]
push eax
lea eax, [ebp - 0x1080]
push eax
call fcn.0040fc3b
lea eax, [ebp - 0x1080]
push eax
call fcn.00422e63
push 4
mov dword [ebp - 0x18], eax
lea esi, [ebp - 0x1080]
mov eax, esi
lea edi, [ebp - 0x2080]
push 0x4327e4
push eax
call fcn.004250b8
add esp, 0x10
neg eax
sbb al, al
inc al
mov dword [ebp - 0x10], eax
test al, al
je 0x406ff7
push 4
lea esi, [ebp - 0x1078]
mov eax, esi
push str.UNC_
push eax
call fcn.004250b8
add esp, 0xc
test eax, eax
jne 0x406ff7
push 0x5c
pop eax
mov word [ebp - 0x2080], ax
lea edi, [ebp - 0x207e]
lea esi, [ebp - 0x1072]
push esi
push edi
call fcn.00425096
lea eax, [ebp - 0x2080]
push eax
call fcn.00422e63
mov esi, dword [ebp + 8]
add esp, 0xc
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
cmp byte [esi + 0x6197], 0
jne 0x407057
cmp byte [ebp - 0x10], 0
jne 0x40724c
lea eax, [ebx + 0x1104]
push eax
call fcn.0040b572
test al, al
jne 0x40724c
lea eax, [ebx + 0x1104]
push eax
push edi
lea eax, [ebx + 0x28]
push eax
push esi
call fcn.00407745
test al, al
je 0x40724c
xor esi, esi
inc esi
push esi
push edi
call fcn.00409d8f
cmp byte [ebx + 0x10f1], 0
jne 0x40709c
cmp byte [ebx + 0x2104], 0
jne 0x40709c
xor eax, eax
push eax
push 0x80
push esi
push eax
push eax
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x40724c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4070ad
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40724c
mov eax, dword [ebx + 0x1100]
cmp eax, 3
jne 0x40711e
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add eax, edx
mov dword [ecx], 0xa0000003
lea esi, [edx + edx]
mov word [ecx + 0xa], si
lea eax, [eax*2 + 0xc]
mov word [ecx + 4], ax
xor eax, eax
mov dword [ecx + 6], eax
lea eax, [ebp - 0x1080]
push eax
lea eax, [ecx + 0x10]
push eax
call fcn.00425096
lea eax, [esi + 2]
mov esi, dword [ebp - 0x30]
mov word [esi + 0xc], ax
mov eax, dword [ebp - 0x14]
add eax, eax
mov word [esi + 0xe], ax
lea eax, [ebp - 0x2080]
push eax
mov eax, dword [ebp - 0x18]
add eax, 9
lea eax, [esi + eax*2]
push eax
call fcn.00425096
add esp, 0x10
jmp 0x40719b
cmp eax, 2
je 0x40712b
cmp eax, esi
jne 0x40724c
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add eax, edx
mov dword [ecx], 0xa000000c
lea esi, [edx + edx]
mov word [ecx + 0xa], si
lea eax, [eax*2 + 0x10]
mov word [ecx + 4], ax
xor eax, eax
mov dword [ecx + 6], eax
lea eax, [ebp - 0x1080]
push eax
lea eax, [ecx + 0x14]
push eax
call fcn.00425096
lea eax, [esi + 2]
mov esi, dword [ebp - 0x30]
mov word [esi + 0xc], ax
mov eax, dword [ebp - 0x14]
add eax, eax
mov word [esi + 0xe], ax
lea eax, [ebp - 0x2080]
push eax
mov eax, dword [ebp - 0x18]
add eax, 0xb
lea eax, [esi + eax*2]
push eax
call fcn.00425096
mov eax, dword [ebp - 0x10]
add esp, 0x10
movzx eax, al
xor eax, 1
mov dword [esi + 0x10], eax
xor eax, eax
push eax
push 0x2200000
push 3
push eax
push eax
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, eax
mov dword [ebp - 0x10], ecx
cmp ecx, 0xffffffff
je 0x40724c
xor edx, edx
lea eax, [ebp - 0x34]
push edx
push eax
movzx eax, word [esi + 4]
push edx
push edx
add eax, 8
push eax
push esi
push 0x900a4
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x407276
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push 0
push 0x15
call fcn.00406b41
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x40720c
cmp eax, 0x522
jne 0x407227
call fcn.0040fe22
test al, al
jne 0x407227
push 0x18
lea ecx, [ebp - 0x80]
call fcn.0040144b
lea ecx, [ebp - 0x80]
call fcn.00410c37
mov esi, 0x43fe00
mov ecx, esi
call fcn.00422830
push 9
mov ecx, esi
call fcn.00406d59
cmp byte [ebx + 0x10f1], 0
push edi
je 0x40726e
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov byte [ebp - 0x1c], 0
lea ecx, [ebp - 0x30]
call fcn.00401480
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0x1c]
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 0x40724c
lea ecx, [ebp - 0x30a8]
call fcn.0040935b
push dword [ebp - 0x10]
lea ecx, [ebp - 0x30a8]
mov byte [ebp - 4], 1
call fcn.00407967
mov esi, dword [ebp + 8]
lea eax, [ebx + 0x1050]
mov ecx, dword [esi + 0x72d8]
neg ecx
sbb ecx, ecx
and ecx, eax
lea eax, [ebx + 0x1048]
push ecx
mov ecx, dword [esi + 0x72d4]
neg ecx
sbb ecx, ecx
and ecx, eax
lea eax, [ebx + 0x1040]
push ecx
mov ecx, dword [esi + 0x72d0]
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
lea ecx, [ebp - 0x30a8]
call fcn.00409aa2
lea ecx, [ebp - 0x30a8]
call fcn.00409410
cmp byte [esi + 0x61a8], 0
jne 0x4072f7
push dword [ebx + 0x24]
push edi
call fcn.0040a184
lea ecx, [ebp - 0x30a8]
call fcn.00409395
jmp 0x407250