Function at 0x408cec
Capabilities:
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x448008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0x18]
mov eax, edx
mov edx, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x40], edx
push edi
test ecx, ecx
je 0x408f20
test eax, eax
je 0x408f20
cmp dword [eax + 0x50], ebx
je 0x408f20
xor eax, eax
lea edi, [ebp - 0x10]
stosd dword es:[edi], eax
push ecx
lea ecx, [ebp - 0x10]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.00414245
push ecx
push ecx
lea ecx, [ebp - 0x10]
call fcn.004146d3
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
and dword [ebp + 0xc], 0x10
je 0x408d68
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x10]
push esi
call fcn.0040880c
pop ecx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
cmp dword [ebp + 0x10], 2
jne 0x408ed0
lea ecx, [ebp - 0x10]
call fcn.004084ec
mov ecx, dword [ebp - 0x10]
call fcn.00408b4b
mov edi, dword [ebp - 0x38]
mov ecx, dword [edi + 0x50]
test ecx, ecx
je 0x408dab
movzx eax, word [ecx]
test ax, ax
je 0x408dab
push 0x5c
pop edx
cmp ax, dx
jne 0x408da2
cmp word [ecx + 2], dx
je 0x408de3
call fcn.00407bd7
test al, al
jne 0x408de3
push dword [edi + 0x50]
lea ecx, [ebp - 0x1c]
call fcn.00414245
push dword [edi]
lea ecx, [ebp - 0x28]
call fcn.00414245
lea edx, [ebp - 0x1c]
lea ecx, [ebp - 0x28]
call fcn.0040868f
lea ecx, [ebp - 0x28]
mov bl, al
call fcn.00414365
lea ecx, [ebp - 0x1c]
call fcn.00414365
test bl, bl
jne 0x408dee
xor ebx, ebx
mov dword [esi], 0xa0000077
jmp 0x408f14
xor eax, eax
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
lea edx, [ebp - 0x10]
lea ecx, [ebp - 0x28]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.00414717
xor eax, eax
lea edi, [ebp - 0x1c]
stosd dword es:[edi], eax
sub esp, 0xc
mov ecx, esp
stosd dword es:[edi], eax
push 0x4427c0
stosd dword es:[edi], eax
call fcn.00414245
mov ebx, dword [ebp - 0x38]
sub esp, 0xc
mov ecx, esp
push dword [ebx + 0x50]
call fcn.00414245
sub esp, 0xc
lea eax, [ebp - 0x28]
mov ecx, esp
push eax
call fcn.00414269
lea ecx, [ebp - 0x1c]
call fcn.00407cc8
add esp, 0x24
push dword [ebp - 0x1c]
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
xor ecx, ecx
inc ecx
test eax, eax
mov eax, dword [ebp + 0xc]
cmovne eax, ecx
xor ecx, ecx
test eax, eax
setne cl
add ecx, 2
push ecx
push dword [ebx + 0x50]
mov dword [ebp - 0x38], ecx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CreateSymbolicLinkW]
movzx edi, al
test al, al
jne 0x408ebc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x408ebc
xor eax, eax
lea edi, [ebp - 0x34]
stosd dword es:[edi], eax
sub esp, 0xc
mov ecx, esp
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x10]
push eax
call fcn.00414269
lea ecx, [ebp - 0x34]
call fcn.0040825a
add esp, 0xc
push dword [ebp - 0x38]
push dword [ebx + 0x50]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_CreateSymbolicLinkW]
lea ecx, [ebp - 0x34]
movzx edi, al
call fcn.00414365
lea ecx, [ebp - 0x1c]
call fcn.00414365
lea ecx, [ebp - 0x28]
call fcn.00414365
xor ebx, ebx
jmp 0x408eea
cmp dword [ebp + 0x10], 1
jne 0x408ef0
mov edi, dword [ebp - 0x38]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x40]
push dword [edi + 0x50]
call fcn.00408b9a
pop ecx
mov edi, eax
test edi, edi
je 0x408ef2
jmp 0x408f10
mov edi, ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x38], 0xa0000076
cmp eax, 0x522
je 0x408f0d
mov dword [ebp - 0x38], 0xa0000077
mov ebx, dword [ebp - 0x38]
mov dword [esi], ebx
mov ebx, edi
lea ecx, [ebp - 0x10]
call fcn.00414365
mov eax, ebx
jmp 0x408f22
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004219ad
leave
ret