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

Disassembly:
push ebp
lea ebp, [esp - 0x3028]
mov eax, 0x3028
call fcn.0042f960
push 0xffffffffffffffff
push 0x443306
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x451a14]
xor eax, ebp
mov dword [ebp + 0x3024], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp byte [0x45c2ba], 0
mov eax, dword [ebp + 0x3030]
mov ebx, dword [ebp + 0x3038]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x3034]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ebx
jne 0x40d5dc
push str.SeRestorePrivilege
call fcn.0040e8c0
push str.SeCreateSymbolicLinkPrivilege
call fcn.0040e8c0
mov byte [0x45c2ba], 1
push 0x1418
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov byte [ebp - 0x24], 0
call fcn.004016f0
lea eax, [ebx + 0x1104]
mov dword [ebp - 4], 0
push 0x800
push eax
mov dword [ebp - 0x20], eax
lea eax, [ebp + 0x2024]
push eax
call fcn.00422a80
lea edi, [ebp + 0x2024]
lea ecx, [edi + 2]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x40d634
push 4
lea esi, [ebp + 0x2024]
sub edi, ecx
mov eax, esi
sar edi, 1
push str.___
push eax
lea ebx, [ebp + 0x1024]
call fcn.00436fb8
add esp, 0xc
test eax, eax
sete dl
mov byte [ebp - 0xd], dl
test dl, dl
je 0x40d6a4
push 4
lea esi, [ebp + 0x202c]
mov eax, esi
push str.UNC_
push eax
call fcn.00436fb8
mov dl, byte [ebp - 0xd]
add esp, 0xc
test eax, eax
jne 0x40d6a4
mov eax, 0x5c
lea ebx, [ebp + 0x1026]
mov word [ebp + 0x1024], ax
lea esi, [ebp + 0x2032]
sub ebx, esi
jmp 0x40d6b0
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ebx + esi - 2], ax
test ax, ax
jne 0x40d6b0
lea esi, [ebp + 0x1024]
lea ecx, [esi + 2]
lea esp, [esp]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x40d6d0
mov eax, dword [ebp - 0x1c]
sub esi, ecx
mov ebx, dword [ebp - 0x34]
sar esi, 1
cmp byte [eax + 0x6197], 0
jne 0x40d723
test dl, dl
jne 0x40d93b
push dword [ebp - 0x20]
call fcn.00416d00
test al, al
jne 0x40d93b
push dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
push dword [ebp - 0x14]
add eax, 0x28
push eax
push dword [ebp - 0x1c]
call fcn.0040e550
test al, al
je 0x40d93b
push 1
push dword [ebp - 0x14]
call fcn.004122c0
mov eax, dword [ebp - 0x18]
cmp byte [eax + 0x10f1], 0
jne 0x40d76f
cmp byte [eax + 0x2104], 0
jne 0x40d76f
push 0
push 0x80
push 1
push 0
push 0
push 0x40000000
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x40d93b
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40d782
push 0
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40d93b
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x1100]
cmp eax, 3
jne 0x40d807
lea eax, [edi + esi]
mov dword [ebx], 0xa0000003
lea eax, [eax*2 + 0xc]
mov word [ebx + 4], ax
lea ecx, [ebp + 0x2024]
xor eax, eax
lea edx, [ebx + 0x10]
mov dword [ebx + 6], eax
lea eax, [edi + edi]
mov word [ebx + 0xa], ax
mov eax, ecx
sub edx, eax
lea ecx, [ecx]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x40d7c0
lea eax, [edi*2 + 2]
mov word [ebx + 0xc], ax
lea ecx, [ebp + 0x1024]
lea eax, [esi + esi]
lea edx, [ebx + 0x12]
mov word [ebx + 0xe], ax
lea edx, [edx + edi*2]
mov eax, ecx
sub edx, eax
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x40d7f2
jmp 0x40d88e
cmp eax, 2
je 0x40d815
cmp eax, 1
jne 0x40d93b
lea eax, [edi + esi]
mov dword [ebx], 0xa000000c
lea eax, [eax*2 + 0x10]
mov word [ebx + 4], ax
lea ecx, [ebp + 0x2024]
xor eax, eax
lea edx, [ebx + 0x14]
mov dword [ebx + 6], eax
lea eax, [edi + edi]
mov word [ebx + 0xa], ax
mov eax, ecx
sub edx, eax
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x40d842
lea eax, [edi*2 + 2]
mov word [ebx + 0xc], ax
lea ecx, [ebp + 0x1024]
lea eax, [esi + esi]
lea edx, [ebx + 0x16]
mov word [ebx + 0xe], ax
lea edx, [edx + edi*2]
mov eax, ecx
sub edx, eax
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x40d874
movzx eax, byte [ebp - 0xd]
xor eax, 1
mov dword [ebx + 0x10], eax
mov edi, dword [ebp - 0x14]
push 0
push 0x2200000
push 3
push 0
push 0
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x20], esi
cmp esi, 0xffffffff
je 0x40d93b
movzx ecx, word [ebx + 4]
lea eax, [ebp - 0x38]
push 0
push eax
push 0
push 0
add ecx, 8
push ecx
push ebx
push 0x900a4
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40d993
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push 0
push 0x15
call fcn.004010e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x40d902
cmp eax, 0x522
jne 0x40d912
call fcn.00422e30
test al, al
jne 0x40d912
push 0x18
call fcn.004057b0
mov ecx, 0x45c338
call fcn.0040d310
push 9
mov ecx, 0x45c338
call fcn.0040d180
mov eax, dword [ebp - 0x18]
push edi
cmp byte [eax + 0x10f1], 0
je 0x40d98b
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
xor al, al
mov byte [ebp - 0xd], al
mov dword [ebp - 4], 2
test ebx, ebx
je 0x40d966
cmp byte [ebp - 0x24], 0
je 0x40d95a
push dword [ebp - 0x2c]
push ebx
call fcn.00420960
push ebx
call fcn.00433947
mov al, byte [ebp - 0xd]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x3024]
xor ecx, ebp
call fcn.0042f943
lea esp, [ebp + 0x3028]
pop ebp
ret 0xc
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40d93b
lea ecx, [ebp]
call fcn.00411190
mov eax, dword [ebp]
mov byte [ebp - 4], 1
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x445258]
lea ecx, [ebp]
call esi
mov edx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
mov dword [ebp + 4], eax
mov ecx, dword [edx + 0x74d8]
neg ecx
lea eax, [esi + 0x1050]
sbb ecx, ecx
and ecx, eax
lea eax, [esi + 0x1048]
push ecx
mov ecx, dword [edx + 0x74d4]
neg ecx
sbb ecx, ecx
and ecx, eax
lea eax, [esi + 0x1040]
push ecx
mov ecx, dword [edx + 0x74d0]
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
lea ecx, [ebp]
call fcn.00411ad0
lea ecx, [ebp]
call fcn.004112c0
mov eax, dword [ebp - 0x1c]
cmp byte [eax + 0x63aa], 0
jne 0x40da1c
push dword [esi + 0x24]
push edi
call fcn.00412c20
lea ecx, [ebp]
mov byte [ebp - 0xd], 1
call fcn.004111d0
mov al, byte [ebp - 0xd]
jmp 0x40d940