Function at 0x40e6d0
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bf72d
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x507074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi]
or ebx, 0xffffffff
cmp dword [eax - 0xc], 0x104
jl 0x40e91b
call fcn.0040eac0
test al, al
jne 0x40e91b
call fcn.004043d0
mov ecx, eax
test ecx, ecx
je 0x40e931
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x14]
push 0x4df724
call fcn.00403470
test al, al
jne 0x40e75a
push 4
push 0x4df724
lea ecx, [ebp - 0x14]
call fcn.004035e0
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x14]
mov eax, dword [edi]
push dword [eax - 0xc]
push eax
call fcn.00402420
mov esi, dword [ebp - 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
cmp eax, 1
sete byte [ebp - 0xd]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40e79e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov al, byte [ebp - 0xd]
test al, al
jne 0x40e906
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
call fcn.00429720
mov dword [ebp - 0x1c], eax
call fcn.004043d0
test eax, eax
je 0x40e931
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 5
lea ecx, [ebp - 0x14]
push 0x1c
push str.Failed_to_delete_directory:
call fcn.00402420
mov edx, dword [edi]
test edx, edx
je 0x40e80e
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e7f5
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x14]
call fcn.00402420
push 0xc
push str._LastError
lea ecx, [ebp - 0x14]
call fcn.00402420
mov edi, dword [ebp - 0x18]
lea ecx, [ebp - 0x14]
push edi
call fcn.004291e0
mov esi, eax
push 1
push 0x4e1614
mov ecx, esi
call fcn.00402420
push 0
mov edx, edi
lea ecx, [ebp - 0x20]
call fcn.0040db50
add esp, 4
mov byte [ebp - 4], 6
mov edx, dword [eax]
test edx, edx
je 0x40e86f
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e857
sub ecx, edi
sar ecx, 1
push ecx
push edx
mov ecx, esi
call fcn.00402420
call fcn.004043d0
test eax, eax
je 0x40e931
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x18]
push 0
push 0x4df9a0
call fcn.00402420
push ecx
push esi
push ecx
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
push eax
call fcn.00429a60
mov byte [ebp - 4], 6
mov eax, ebx
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e8c9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 5
mov eax, ebx
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e8e7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x40e906
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov al, byte [ebp - 0xd]
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 dword [edi]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
cmp eax, 1
sete al
mov byte [ebp - 0xd], al
jmp 0x40e7a1
push 0x80004005
call fcn.00402570
int3