Function at 0x4178d0
Capabilities:
Delete directory

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x18
push ebx
push esi
mov esi, ecx
push edi
mov ecx, dword [eax + 0x78]
test ecx, ecx
je 0x4178ee
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x18
ret 0xc
mov edi, dword [esp + 0x30]
mov eax, dword [edi]
mov ecx, dword [eax - 8]
test ecx, ecx
jne 0x417909
pop edi
pop esi
mov eax, 2
pop ebx
add esp, 0x18
ret 0xc
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsRootW]
test eax, eax
je 0x417922
pop edi
pop esi
mov eax, 4
pop ebx
add esp, 0x18
ret 0xc
mov eax, dword [edi]
cmp dword [eax - 8], 4
jl 0x417b79
cmp word [eax + 2], 0x3a
jne 0x417b79
xor ebx, ebx
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
test eax, eax
jne 0x4179af
mov ebx, 1
mov ecx, dword [0x4881a0]
mov eax, dword [edi]
lea edx, [esp + 0x30]
push ebp
mov dword [esp + 0x34], ecx
push edx
push eax
mov ecx, esi
mov dword [esp + 0x18], 0
call fcn.004172a0
mov ebp, dword [esp + 0x2c]
test eax, eax
je 0x417a05
mov esi, dword [ebp + 4]
lea eax, [esp + 0x34]
push eax
mov ecx, ebp
call fcn.004196b0
mov ecx, dword [ebp + 4]
mov dword [esp + 0x30], eax
cmp eax, ecx
je 0x4179ee
mov eax, dword [eax + 0xc]
mov ecx, dword [esp + 0x34]
push eax
push ecx
call fcn.0044bf2b
add esp, 8
test eax, eax
jl 0x4179ee
lea eax, [esp + 0x30]
jmp 0x4179f9
cmp eax, 0x50
je 0x4179d0
cmp eax, 0xb7
je 0x4179d0
sub eax, 5
pop edi
neg eax
sbb eax, eax
pop esi
and al, 0xfc
pop ebx
add eax, 5
add esp, 0x18
ret 0xc
push edi
mov ecx, esi
call fcn.00417eb0
test eax, eax
jne 0x41794c
pop edi
pop esi
mov eax, 5
pop ebx
add esp, 0x18
ret 0xc
mov edx, dword [ebp + 4]
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], edx
cmp dword [eax], esi
je 0x417a05
mov dword [esp + 0x10], 6
test ebx, ebx
je 0x417a12
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x417b3c
mov ecx, dword [esp + 0x34]
mov eax, dword [ecx - 8]
test eax, eax
je 0x417b3c
mov edi, dword [ebp + 4]
mov ecx, dword [0x4918b4]
mov al, 1
mov esi, dword [edi + 4]
cmp esi, ecx
je 0x417a6a
mov eax, dword [esi + 0xc]
mov edx, dword [esp + 0x34]
push eax
push edx
mov edi, esi
call fcn.0044bf2b
add esp, 8
test eax, eax
setl al
test al, al
je 0x417a5f
mov esi, dword [esi]
jmp 0x417a62
mov esi, dword [esi + 8]
cmp esi, dword [0x4918b4]
jne 0x417a3f
mov cl, byte [ebp + 8]
test cl, cl
je 0x417a93
lea eax, [esp + 0x30]
lea ecx, [esp + 0x34]
push eax
push ecx
push edi
lea edx, [esp + 0x20]
push esi
push edx
mov ecx, ebp
mov byte [esp + 0x44], 1
call fcn.00418f90
jmp 0x417b1f
test al, al
mov dword [esp + 0x2c], edi
je 0x417ad9
lea eax, [esp + 0x30]
mov ecx, ebp
push eax
call fcn.00431740
mov ecx, dword [esp + 0x2c]
mov edx, dword [eax]
cmp ecx, edx
jne 0x417ad0
lea edx, [esp + 0x30]
lea eax, [esp + 0x34]
push edx
push eax
push edi
lea ecx, [esp + 0x20]
push esi
push ecx
mov ecx, ebp
mov byte [esp + 0x44], 1
call fcn.00418f90
jmp 0x417b1f
lea ecx, [esp + 0x2c]
call fcn.004197e0
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x34]
push ecx
mov eax, dword [edx + 0xc]
push eax
call fcn.0044bf2b
add esp, 8
test eax, eax
jge 0x417b11
lea edx, [esp + 0x30]
lea eax, [esp + 0x34]
push edx
push eax
push edi
lea ecx, [esp + 0x20]
push esi
push ecx
mov ecx, ebp
mov byte [esp + 0x44], 1
call fcn.00418f90
jmp 0x417b1f
lea edx, [esp + 0x30]
mov byte [esp + 0x30], 0
push edx
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x20]
call fcn.0042bb50
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x18]
push ecx
push edx
lea ecx, [esp + 0x28]
call fcn.0042bb50
mov eax, dword [esp + 0x34]
mov edx, dword [0x4881a4]
pop ebp
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x417b6c
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x417b6c
mov edx, dword [esp + 0x30]
add edx, 0xfffffff4
push edx
call fcn.004472d3
add esp, 4
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
add esp, 0x18
ret 0xc
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x18
ret 0xc