Function at 0x405870
Capabilities:
Delete directory

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
mov edi, ecx
test edi, edi
je 0x405e83
call fcn.00402c20
mov esi, dword [0x4b4b94]
mov dword [ebp - 0xc], eax
mov ecx, dword [esi + 0x3cc]
test ecx, ecx
je 0x4058ca
push ecx
call dword [sym.imp.MMFS2.dll_Ordinal_174]
mov ecx, dword [0x4b4b94]
mov dword [ecx + 0x3cc], 0
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0x88]
test eax, eax
je 0x4058ed
push eax
call fcn.00478e8f
mov dword [esi + 0x88], 0
add esp, 4
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0x94]
test eax, eax
je 0x405910
push eax
call fcn.00478e8f
mov dword [esi + 0x94], 0
add esp, 4
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0xa8]
test eax, eax
je 0x405933
push eax
call fcn.00478e8f
mov dword [esi + 0xa8], 0
add esp, 4
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0xa4]
test eax, eax
je 0x405956
push eax
call fcn.00478e8f
mov dword [esi + 0xa4], 0
add esp, 4
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0x80]
test eax, eax
je 0x405979
push eax
call fcn.00478e8f
mov dword [esi + 0x80], 0
add esp, 4
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x40599c
push eax
call fcn.00478e8f
mov dword [esi + 0x8c], 0
add esp, 4
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0x90]
test eax, eax
je 0x4059bf
push eax
call fcn.00478e8f
mov dword [esi + 0x90], 0
add esp, 4
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0xcc]
test eax, eax
je 0x4059e2
push eax
call fcn.00478e8f
mov dword [esi + 0xcc], 0
add esp, 4
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0xd0]
test eax, eax
je 0x405a05
push eax
call fcn.00478e8f
mov dword [esi + 0xd0], 0
add esp, 4
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0xd4]
test eax, eax
je 0x405a28
push eax
call fcn.00478e8f
mov dword [esi + 0xd4], 0
add esp, 4
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0x41c]
test eax, eax
je 0x405a4b
push eax
call fcn.00478e8f
mov dword [esi + 0x41c], 0
add esp, 4
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0x420]
test eax, eax
je 0x405a6e
push eax
call fcn.00478e8f
mov dword [esi + 0x420], 0
add esp, 4
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0x26c]
test eax, eax
je 0x405a91
push eax
call fcn.00478e8f
mov dword [esi + 0x26c], 0
add esp, 4
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0x1f4]
test eax, eax
je 0x405ab4
push eax
call fcn.00478e8f
mov dword [esi + 0x1f4], 0
add esp, 4
mov esi, dword [0x4b4b94]
cmp byte [esi + 0x3ec], 0
je 0x405acb
push dword [esi + 0x3f0]
call fcn.0047962e
add esp, 4
call fcn.004583e0
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0xc0]
test eax, eax
je 0x405af3
push eax
call fcn.00478e8f
add esp, 4
mov dword [esi + 0xc0], 0
call fcn.00437bd0
call fcn.00438a10
call fcn.00439e40
call fcn.00426290
call fcn.00437040
call fcn.0044ec10
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0x3c8]
test eax, eax
je 0x405b34
push eax
call fcn.00478e8f
add esp, 4
mov dword [esi + 0x3c8], 0
mov eax, dword [0x4b4b6c]
test eax, eax
je 0x405b7d
test byte [0x4b4b7c], 0x40
je 0x405b62
push 0
push eax
call dword [sym.imp.MMFS2.dll_Ordinal_34]
test eax, eax
je 0x405b5d
push 0
mov ecx, eax
call dword [sym.imp.MMFS2.dll_Ordinal_340]
mov eax, dword [0x4b4b6c]
push eax
call dword [sym.imp.MMFS2.dll_Ordinal_14]
mov dword [0x4b4b6c], 0
mov dword [0x4b4b74], 0
mov eax, dword [0x4b4b94]
mov ecx, 1
mov dword [eax + 0x1d0], 0
mov eax, dword [0x4b4b94]
mov dword [eax + 0x1d4], 0
call fcn.00405ea0
mov eax, dword [edi + 0xac]
mov esi, dword [sym.imp.USER32.dll_DestroyIcon]
test eax, eax
je 0x405bc2
push eax
call esi
mov dword [edi + 0xac], 0
mov eax, dword [edi + 0x1b8]
test eax, eax
je 0x405bd9
push eax
call esi
mov dword [edi + 0x1b8], 0
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0xbc]
test eax, eax
je 0x405c02
push eax
call fcn.00478e8f
mov dword [esi + 0xbc], 0
add esp, 4
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0x3bc]
test eax, eax
je 0x405c25
push eax
call fcn.00478e8f
mov dword [esi + 0x3bc], 0
add esp, 4
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0x1a8]
mov ecx, dword [sym.imp.MMFS2.dll_Ordinal_419]
mov dword [ebp - 8], eax
test eax, eax
je 0x405c52
mov eax, dword [esi + 0x9c]
cmp eax, 0xffffffff
je 0x405c52
push eax
call ecx
mov esi, dword [0x4b4b94]
mov ecx, dword [sym.imp.MMFS2.dll_Ordinal_419]
mov dword [esi + 0x9c], 0xffffffff
mov eax, dword [0x4b4b94]
mov eax, dword [eax + 0x9c]
cmp eax, 0xffffffff
je 0x405c7e
push eax
call ecx
mov eax, dword [0x4b4b94]
mov dword [eax + 0x9c], 0xffffffff
mov esi, dword [edi + 0x174]
test esi, esi
je 0x405d1a
lea edx, [edi + 0x168]
jle 0x405cfd
cmp esi, dword [edi + 0x178]
jge 0x405cfd
mov eax, dword [edi + 0x184]
mov ecx, esi
add ecx, ecx
mov eax, dword [eax + ecx*8 + 8]
mov dword [ebp - 4], eax
test eax, eax
je 0x405cfd
mov ecx, dword [eax + 0x208]
test ecx, ecx
je 0x405ce9
push ecx
call fcn.0047a07a
mov eax, dword [ebp - 4]
push dword [eax + 0x208]
call fcn.00478e8f
mov eax, dword [ebp - 4]
add esp, 8
mov dword [eax + 0x208], 0
mov dword [eax + 0x214], 0
push 0x218
push eax
call fcn.00475679
add esp, 8
lea edx, [edi + 0x168]
push esi
mov ecx, edx
call dword [sym.imp.MMFS2.dll_Ordinal_688]
mov esi, dword [edi + 0x174]
lea edx, [edi + 0x168]
test esi, esi
jne 0x405c92
mov esi, dword [0x4b4bb0]
xor ecx, ecx
test esi, esi
jle 0x405d93
mov edx, dword [0x4b4bb8]
nop dword [eax]
cmp dword [edx], edi
je 0x405d3e
inc ecx
add edx, 4
cmp ecx, esi
jl 0x405d30
jmp 0x405d93
lea eax, [esi - 1]
cmp ecx, eax
jge 0x405d62
sub esi, ecx
lea eax, [esi*4 - 4]
push eax
lea eax, [edx + 4]
push eax
push edx
call fcn.004787b0
mov esi, dword [0x4b4bb0]
add esp, 0xc
sub esi, 1
mov dword [0x4b4bb0], esi
jne 0x405d93
mov eax, dword [0x4b4bb8]
mov dword [0x4b4bb4], 0
test eax, eax
je 0x405d93
push eax
call fcn.00478e8f
add esp, 4
mov dword [0x4b4bb8], 0
mov eax, dword [0x4b4b94]
mov eax, dword [eax + 0x98]
test eax, eax
je 0x405dcc
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov esi, dword [0x4b4b94]
mov eax, dword [esi + 0x98]
test eax, eax
je 0x405dcc
push eax
call fcn.00478e8f
add esp, 4
mov dword [esi + 0x98], 0
cmp dword [ebp - 8], 0
jne 0x405de0
cmp dword [0x4b4ba8], 0
je 0x405de0
call fcn.00457f70
mov eax, dword [ebp - 0xc]
mov dword [0x4b4b94], 0
cmp eax, edi
je 0x405df8
mov ecx, eax
call fcn.00402c20
lea ecx, [edi + 0x168]
call dword [sym.imp.MMFS2.dll_Ordinal_281]
mov eax, dword [edi + 0x2d4]
test eax, eax
je 0x405e17
push eax
call fcn.00478e8f
add esp, 4
mov ecx, 0x30
lea esi, [edi + 0x2d8]
mov dword [ebp - 4], ecx
mov eax, dword [esi]
test eax, eax
je 0x405e37
push eax
call fcn.00478e8f
mov ecx, dword [ebp - 4]
add esp, 4
add esi, 4
sub ecx, 1
mov dword [ebp - 4], ecx
jne 0x405e25
mov esi, dword [edi + 0x424]
test esi, esi
je 0x405e70
mov eax, dword [esi]
mov ecx, esi
push eax
push dword [eax]
lea eax, [ebp - 0xc]
push eax
call fcn.004072e0
push 0x2c
push dword [esi]
call fcn.00475679
push 8
push esi
call fcn.00475679
add esp, 0x10
push edi
mov dword [edi + 0x424], 0
call fcn.00478e8f
add esp, 4
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret