Function at 0x40e7f0
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c08ad
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x50a074]
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 0x40ea3b
call fcn.0040ebe0
test al, al
jne 0x40ea3b
call fcn.004043d0
mov ecx, eax
test ecx, ecx
je 0x40ea51
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 0x4e5104
call fcn.00403470
test al, al
jne 0x40e87a
push 4
push 0x4e5104
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 0x40e8be
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov al, byte [ebp - 0xd]
test al, al
jne 0x40ea26
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
call fcn.00429890
mov dword [ebp - 0x1c], eax
call fcn.004043d0
test eax, eax
je 0x40ea51
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 0x40e92e
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e915
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.00429350
mov esi, eax
push 1
push 0x4e7018
mov ecx, esi
call fcn.00402420
push 0
mov edx, edi
lea ecx, [ebp - 0x20]
call fcn.0040dc70
add esp, 4
mov byte [ebp - 4], 6
mov edx, dword [eax]
test edx, edx
je 0x40e98f
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e977
sub ecx, edi
sar ecx, 1
push ecx
push edx
mov ecx, esi
call fcn.00402420
call fcn.004043d0
test eax, eax
je 0x40ea51
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 0x4e6df8
call fcn.00402420
push ecx
push esi
push ecx
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
push eax
call fcn.00429bd0
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 0x40e9e9
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 0x40ea07
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 0x40ea26
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 0x40e8c1
push 0x80004005
call fcn.00402570
int3