Function at 0x470320
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5064c8
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x5651c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov dword [ebp - 0x20], ecx
call fcn.00406d01
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x470369
push 0x80004005
call fcn.00406e83
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x51e0b8
jne 0x47037e
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x470380
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 1
mov ecx, dword [esi]
mov edx, dword [ecx - 0xc]
lea eax, [edx - 1]
test eax, eax
js 0x4705cf
cmp eax, edx
jg 0x4705cf
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
or edi, 0xffffffff
cmp word [ecx + eax*2], 0x5c
jne 0x470478
lea eax, [edx - 1]
mov ecx, esi
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00444ed9
mov byte [ebp - 4], 2
mov edx, dword [eax]
mov esi, dword [ebp - 0x10]
add esi, 0xfffffff0
lea ecx, [edx - 0x10]
cmp ecx, esi
je 0x47043d
cmp dword [esi + 0xc], 0
jl 0x470431
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x470431
call fcn.0040737c
mov dword [ebp - 0x18], eax
lea edx, [esi + 0xc]
mov ecx, edi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x470426
mov edx, dword [esi]
push esi
mov ecx, dword [edx]
mov eax, dword [ecx + 4]
cmp ecx, 0x51e0b8
jne 0x470422
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call ebx
mov eax, dword [ebp - 0x18]
add eax, 0x10
mov dword [ebp - 0x10], eax
jmp 0x47043d
mov ecx, edx
call eax
mov eax, dword [ebp - 0x18]
add eax, 0x10
mov dword [ebp - 0x10], eax
jmp 0x47043d
push dword [edx - 0xc]
lea ecx, [ebp - 0x10]
push edx
call fcn.0040937e
mov byte [ebp - 4], 1
mov eax, edi
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x4704ee
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, 0x51e0b8
jne 0x470472
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call ebx
jmp 0x4704ee
mov ecx, edx
call esi
jmp 0x4704ee
mov esi, dword [ebp - 0x10]
lea eax, [ecx - 0x10]
mov dword [ebp - 0x1c], eax
add esi, 0xfffffff0
lea eax, [ecx - 0x10]
cmp eax, esi
je 0x4704ee
cmp dword [esi + 0xc], 0
jl 0x4704e4
mov eax, dword [eax]
cmp eax, dword [esi]
jne 0x4704e4
mov ecx, dword [ebp - 0x1c]
call fcn.0040737c
mov dword [ebp - 0x1c], eax
mov ecx, edi
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4704d9
mov edx, dword [esi]
push esi
mov ecx, dword [edx]
mov eax, dword [ecx + 4]
cmp ecx, 0x51e0b8
jne 0x4704d5
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call ebx
mov eax, dword [ebp - 0x1c]
add eax, 0x10
mov dword [ebp - 0x10], eax
jmp 0x4704ee
mov ecx, edx
call eax
mov eax, dword [ebp - 0x1c]
add eax, 0x10
mov dword [ebp - 0x10], eax
jmp 0x4704ee
push edx
push ecx
lea ecx, [ebp - 0x10]
call fcn.0040937e
mov esi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x10]
mov ecx, dword [esi]
mov eax, dword [eax - 0xc]
cmp eax, dword [ecx - 0xc]
jge 0x470577
push 0x5c
push ecx
call fcn.004d5852
add esp, 8
test eax, eax
jne 0x470512
or eax, 0xffffffff
jmp 0x470516
sub eax, dword [esi]
sar eax, 1
push eax
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
call fcn.00444ed9
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x14]
cmp dword [eax - 0xc], 0
je 0x470542
push dword [esi]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea edx, [ebp - 0x10]
lea ecx, [ebp - 0x14]
call fcn.00470320
mov byte [ebp - 4], 1
mov eax, edi
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x470577
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, 0x51e0b8
jne 0x470573
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call ebx
jmp 0x470577
mov ecx, edx
call esi
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], edi
dec edi
test edi, edi
jg 0x4705a7
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, 0x51e0b8
jne 0x4705b9
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, edx
call esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00406e83
int3