Function at 0x46c260
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x505bf0
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x5651c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x3c], ecx
mov edi, dword [ecx + 0x18]
mov ebx, dword [ecx + 0x1c]
cmp edi, ebx
je 0x46c5bb
nop dword [eax]
lea eax, [ebp - 0x28]
mov ecx, edi
push eax
call fcn.004648e0
mov dword [ebp - 0x30], eax
mov dword [ebp - 4], 0
cmp dword [eax + 0x14], 8
jb 0x46c2c0
mov eax, dword [eax]
mov dword [ebp - 0x30], eax
call fcn.00406d01
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je case.0x46c3d0.1
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
cmp ecx, 0x51e0b8
jne 0x46c2ea
lock inc dword [eax + 0x14]
lea esi, [eax + 8]
jmp 0x46c2f0
mov ecx, eax
call edx
mov esi, eax
add esi, 0x10
mov dword [ebp - 0x34], esi
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x46c476
test eax, 0xffff0000
jne 0x46c3f1
movzx eax, ax
mov ecx, eax
mov dword [ebp - 0x30], eax
call fcn.0040912c
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x46c4f4
mov ecx, dword [ebp - 0x30]
shr ecx, 4
inc ecx
push 6
movzx ecx, cx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x46c4f4
push dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
mov edx, eax
call fcn.0040918e
add esp, 4
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x46c4f4
movzx edx, word [eax]
mov dword [ebp - 0x30], edx
test edx, edx
js case.0x46c3d0.22
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x46c38a
push edx
lea ecx, [ebp - 0x34]
call fcn.004069f7
mov esi, dword [ebp - 0x34]
mov eax, dword [ebp - 0x2c]
movzx ecx, word [eax]
add eax, 2
mov dword [ebp - 0x2c], eax
cmp ecx, 0xffffffff
jne 0x46c3b2
test eax, eax
jne 0x46c3a3
xor ecx, ecx
jmp 0x46c3b1
push eax
call fcn.004d828d
mov ecx, eax
add esp, 4
mov eax, dword [ebp - 0x2c]
inc ecx
push ecx
push eax
push dword [ebp - 0x30]
push esi
call fcn.004d83e0
add esp, 0x10
cmp eax, 0x50
ja case.0x46c3d0.1
movzx eax, byte [eax + 0x46c62c]
jmp dword [eax*4 + 0x46c61c]
mov eax, dword [ebp - 0x30]
cmp eax, dword [esi - 8]
jg case.0x46c3d0.22
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
jmp 0x46c4f4
push eax
call fcn.004d828d
add esp, 4
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x46c476
mov ecx, dword [esi - 0xc]
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x38], ecx
mov ecx, edx
sub ecx, esi
sar ecx, 1
mov dword [ebp - 0x40], ecx
test eax, eax
js case.0x46c3d0.22
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, dword [ebp - 0x2c]
or eax, ecx
jge 0x46c43e
push dword [ebp - 0x2c]
lea ecx, [ebp - 0x34]
call fcn.004069f7
mov esi, dword [ebp - 0x34]
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x40]
mov ecx, esi
push dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x38]
ja 0x46c462
mov edx, dword [esi - 8]
lea eax, [esi + eax*2]
push eax
call fcn.00409332
mov eax, dword [ebp - 0x2c]
add esp, 8
jmp 0x46c3da
push edx
mov edx, dword [esi - 8]
call fcn.004068e0
mov eax, dword [ebp - 0x2c]
add esp, 8
jmp 0x46c3da
cmp dword [esi - 0xc], 0
lea ecx, [esi - 0x10]
mov eax, dword [ecx]
mov dword [ebp - 0x38], eax
je 0x46c4f4
cmp dword [ecx + 0xc], 0
lea edx, [ecx + 0xc]
jge 0x46c4a5
cmp dword [esi - 8], 0
jl case.0x46c3d0.22
xor eax, eax
mov dword [esi - 0xc], 0
mov word [esi], ax
jmp 0x46c4f4
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x46c4d4
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, 0x51e0b8
jne 0x46c4d0
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x46c4d4
mov ecx, edx
call esi
mov ecx, dword [ebp - 0x38]
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x51e0b8
jne 0x46c4ec
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x46c4ee
call edx
add eax, 0x10
mov dword [ebp - 0x34], eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x34]
call fcn.0046fd90
mov esi, dword [ebp - 0x34]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x46c53f
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, 0x51e0b8
jne 0x46c53d
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x46c53f
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x46c599
mov ecx, dword [ebp - 0x28]
inc eax
cmp eax, 0x7fffffff
ja 0x46c617
add eax, eax
cmp eax, 0x1000
jb 0x46c590
test cl, 0x1f
jne 0x46c617
mov eax, dword [ecx - 4]
cmp eax, ecx
jae 0x46c617
sub ecx, eax
cmp ecx, 4
jb 0x46c617
cmp ecx, 0x23
ja 0x46c617
mov ecx, eax
push ecx
call fcn.004d2078
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
add edi, 0x18
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
cmp edi, ebx
jne 0x46c2a0
mov ecx, dword [ebp - 0x3c]
mov edi, dword [ecx + 0x1c]
mov esi, dword [ecx + 0x18]
cmp esi, edi
je 0x46c5d7
push ecx
mov ecx, esi
call fcn.0046cbb0
add esi, 0x18
cmp esi, edi
jne 0x46c5c5
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ecx + 0x18]
mov dword [ecx + 0x1c], eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004d207d
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00406e83
push 0x8007000e
call fcn.00406e83
push 0x80004005
call fcn.00406e83
call fcn.004d7db2
xlatb
ret