Function at 0x406470
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x48a181
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x220
mov eax, dword [0x4a9198]
push ebx
push esi
mov esi, ecx
push edi
push esi
mov dword [esp + 0x228], eax
call fcn.00403bf0
add esp, 4
test eax, eax
je 0x406512
lea eax, [esp + 0x14]
push esi
push eax
call fcn.00403d30
lea ecx, [esp + 0x1c]
push 0x48ef32
push ecx
mov dword [esp + 0x244], 0
call fcn.00404f20
add esp, 0x10
test al, al
je 0x4064e9
lea edx, [esp + 0x14]
push edx
push esi
call fcn.00403790
add esp, 8
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x234], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406512
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
call fcn.0047c701
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0xc], eax
xor eax, eax
mov word [esp + 0x18], 0
mov ecx, 0x81
lea edi, [esp + 0x1a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esi]
push eax
lea eax, [esp + 0x1c]
mov ebx, 1
push eax
mov dword [esp + 0x23c], ebx
call dword [sym.imp.kernel32.dll_lstrcpyW]
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.shlwapi.dll_PathRemoveFileSpecW]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x10]
push 0x48ef2c
push eax
call fcn.00402db0
lea ecx, [esp + 0x18]
push ecx
call fcn.00403bf0
add esp, 0x10
test eax, eax
jne 0x4065c6
lea edx, [esp + 0xc]
push edx
call fcn.00404300
add esp, 4
test eax, eax
jne 0x4065c6
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
mov dword [esp + 0x234], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4065bf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, ebx
jmp 0x4066c0
push esi
mov ecx, esi
call fcn.00405f20
test al, al
jne 0x40664e
push esi
lea eax, [esp + 0x14]
push eax
mov ecx, esi
call fcn.004051f0
mov ecx, dword [esp + 0x10]
push ecx
mov byte [esp + 0x238], 2
call dword [sym.imp.shlwapi.dll_PathIsDirectoryEmptyW]
test eax, eax
je 0x40661e
lea edx, [esp + 0x10]
push edx
call fcn.00403640
mov eax, dword [esp + 0x14]
add esp, 4
push eax
call dword [sym.imp.kernel32.dll_RemoveDirectoryW]
mov eax, dword [esp + 0x10]
mov byte [esp + 0x234], bl
or edx, 0xffffffff
jmp 0x406637
mov ecx, esi
call fcn.00405850
or edx, 0xffffffff
test al, al
mov eax, dword [esp + 0x10]
mov byte [esp + 0x234], bl
je 0x40667b
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40664e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
mov dword [esp + 0x234], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406677
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
xor eax, eax
jmp 0x4066c0
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406692
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
mov dword [esp + 0x234], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4066bb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, 2
mov ecx, dword [esp + 0x22c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x224]
call fcn.0046a6a2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret