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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x30b8
call fcn.00722ce0
mov eax, dword [0xee37e4]
xor eax, ebp
mov dword [ebp - 8], eax
cmp byte [0xf0e80c], 0
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x3090], edx
mov dword [ebp - 0x3094], ecx
mov dword [ebp - 0x309c], 1
jne 0x5d2124
mov ecx, str.SeRestorePrivilege
call fcn.005d2045
mov ecx, str.SeCreateSymbolicLinkPrivilege
call fcn.005d2045
mov byte [0xf0e80c], 1
push 0x1418
lea ecx, [ebp - 0x30b4]
call fcn.005c9b06
lea edx, [ebx + 0x1104]
push 0x800
lea ecx, [ebp - 0x100c]
call fcn.005cc069
pop ecx
lea ecx, [ebp - 0x100c]
xor esi, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x5d2156
push 4
sub ecx, edx
lea eax, [ebp - 0x100c]
sar ecx, 1
lea edi, [ebp - 0x200c]
push 0xeac224
push eax
mov dword [ebp - 0x308c], ecx
call fcn.0070e48a
add esp, 0xc
lea esi, [ebp - 0x1004]
test eax, eax
sete dl
test eax, eax
lea eax, [ebp - 0x100c]
mov byte [ebp - 0x3085], dl
cmovne esi, eax
test dl, dl
je 0x5d21d4
push 4
push str.UNC_
push esi
call fcn.0070e48a
mov dl, byte [ebp - 0x3085]
add esp, 0xc
test eax, eax
jne 0x5d21d4
push 0x5c
pop eax
mov word [ebp - 0x200c], ax
lea edi, [ebp - 0x200a]
add esi, 6
sub edi, esi
movzx eax, word [esi]
mov word [edi + esi], ax
lea esi, [esi + 2]
test ax, ax
jne 0x5d21d6
lea edi, [ebp - 0x200c]
xor esi, esi
lea ecx, [edi + 2]
mov ax, word [edi]
add edi, 2
cmp ax, si
jne 0x5d21f0
mov eax, dword [ebp - 0x3094]
sub edi, ecx
sar edi, 1
cmp byte [eax + 0x6197], 0
jne 0x5d2267
test dl, dl
jne 0x5d223f
lea esi, [ebx + 0x1104]
mov ecx, esi
call fcn.005ccc57
test al, al
jne 0x5d223f
mov ecx, dword [ebp - 0x3094]
lea edx, [ebx + 0x28]
push esi
mov esi, dword [ebp - 0x3090]
push esi
call fcn.005d2737
pop ecx
pop ecx
test al, al
jne 0x5d226d
xor eax, eax
mov byte [ebp - 0x309c], al
lea ecx, [ebp - 0x30b4]
call fcn.005c9b2b
mov ecx, dword [ebp - 8]
mov al, byte [ebp - 0x309c]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.006f3e28
leave
ret
mov esi, dword [ebp - 0x3090]
mov ecx, esi
call fcn.005d339e
cmp byte [ebx + 0x10f1], 0
jne 0x5d22ac
cmp byte [ebx + 0x2104], 0
jne 0x5d22ac
xor eax, eax
push eax
push 0x80
push 1
push eax
push eax
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x5d223f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x5d22ba
xor eax, eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x5d223f
mov eax, dword [ebx + 0x1100]
cmp eax, 3
jne 0x5d2363
mov edx, dword [ebp - 0x308c]
mov esi, dword [ebp - 0x30b4]
movzx eax, di
mov edi, esi
mov dword [ebp - 0x3098], eax
movzx ecx, dx
add eax, ecx
mov dword [esi], 0xa0000003
lea eax, [eax*2 + 0xc]
mov word [esi + 4], ax
xor eax, eax
mov dword [esi + 6], eax
lea eax, [ecx + ecx]
lea ecx, [ebp - 0x100c]
mov dword [ebp - 0x308c], eax
mov word [esi + 0xa], ax
mov eax, ecx
sub edi, eax
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edi + ecx + 0xe], ax
test ax, ax
jne 0x5d2312
mov eax, dword [ebp - 0x308c]
lea ecx, [ebp - 0x200c]
add eax, 2
mov word [esi + 0xc], ax
mov eax, dword [ebp - 0x3098]
add eax, eax
mov word [esi + 0xe], ax
lea eax, [edx*2 + 0x12]
mov edx, ecx
sub eax, edx
lea edx, [eax + esi]
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x5d234f
jmp 0x5d2413
cmp eax, 2
je 0x5d2371
cmp eax, 1
jne 0x5d223f
mov edx, dword [ebp - 0x308c]
mov esi, dword [ebp - 0x30b4]
movzx eax, di
mov edi, esi
mov dword [ebp - 0x308c], eax
movzx ecx, dx
add eax, ecx
mov dword [esi], 0xa000000c
lea eax, [eax*2 + 0x10]
mov word [esi + 4], ax
xor eax, eax
mov dword [esi + 6], eax
lea eax, [ecx + ecx]
lea ecx, [ebp - 0x100c]
mov dword [ebp - 0x3098], eax
mov word [esi + 0xa], ax
mov eax, ecx
sub edi, eax
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edi + ecx + 0x12], ax
test ax, ax
jne 0x5d23ba
mov eax, dword [ebp - 0x3098]
lea ecx, [ebp - 0x200c]
add eax, 2
mov word [esi + 0xc], ax
mov eax, dword [ebp - 0x308c]
add eax, eax
mov word [esi + 0xe], ax
lea eax, [edx*2 + 0x16]
mov edx, ecx
sub eax, edx
lea edx, [eax + esi]
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x5d23f7
movzx eax, byte [ebp - 0x3085]
xor eax, 1
mov dword [esi + 0x10], eax
mov edi, dword [ebp - 0x3090]
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 - 0x308c], ecx
cmp ecx, 0xffffffff
je 0x5d223f
xor edx, edx
lea eax, [ebp - 0x30a0]
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 0x5d24c8
mov eax, dword [ebp - 0x308c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x15
lea ecx, [ebp - 0x205c]
call fcn.005ca439
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x5d2493
cmp eax, 0x522
jne 0x5d2498
call fcn.005d168c
inc dword [0xef8e94]
mov dword [0xef8e90], 9
cmp byte [ebx + 0x10f1], 0
push edi
je 0x5d24bd
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x5d223f
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x5d223f
lea ecx, [ebp - 0x3084]
call fcn.005d285a
mov eax, dword [ebp - 0x3084]
call dword [eax + 8]
mov esi, dword [ebp - 0x3094]
xor ecx, ecx
mov eax, dword [ebp - 0x308c]
xor edx, edx
mov dword [ebp - 0x3080], eax
lea eax, [ebx + 0x1050]
cmp dword [esi + 0x74d8], edx
cmove eax, ecx
cmp dword [esi + 0x74d4], edx
push eax
lea eax, [ebx + 0x1048]
cmove eax, ecx
cmp dword [esi + 0x74d0], edx
push eax
lea eax, [ebx + 0x1040]
cmove eax, ecx
lea ecx, [ebp - 0x3084]
push eax
call fcn.005d2fa7
lea ecx, [ebp - 0x3084]
call fcn.005d2bd3
cmp byte [esi + 0x63aa], 0
jne 0x5d254b
mov edx, dword [ebx + 0x24]
mov ecx, edi
call fcn.005d36b0
lea ecx, [ebp - 0x3084]
call fcn.005d28b1
jmp 0x5d2247