Function at 0x40ec50
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a0d3d
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x4e4050]
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 0x40ee9b
call fcn.0040f050
test al, al
jne 0x40ee9b
call fcn.00404500
mov ecx, eax
test ecx, ecx
je 0x40eeb1
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 0x4c2374
call fcn.00403660
test al, al
jne 0x40ecda
push 4
push 0x4c2374
lea ecx, [ebp - 0x14]
call fcn.004037d0
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x14]
mov eax, dword [edi]
push dword [eax - 0xc]
push eax
call fcn.00402670
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 0x40ed1e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov al, byte [ebp - 0xd]
test al, al
jne 0x40ee86
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
call fcn.00429410
mov dword [ebp - 0x1c], eax
call fcn.00404500
test eax, eax
je 0x40eeb1
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.00402670
mov edx, dword [edi]
test edx, edx
je 0x40ed8e
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ed75
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x14]
call fcn.00402670
push 0xc
push str._LastError
lea ecx, [ebp - 0x14]
call fcn.00402670
mov edi, dword [ebp - 0x18]
lea ecx, [ebp - 0x14]
push edi
call fcn.00428ed0
mov esi, eax
push 1
push 0x4c4248
mov ecx, esi
call fcn.00402670
push 0
mov edx, edi
lea ecx, [ebp - 0x20]
call fcn.0040d5b0
add esp, 4
mov byte [ebp - 4], 6
mov edx, dword [eax]
test edx, edx
je 0x40edef
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40edd7
sub ecx, edi
sar ecx, 1
push ecx
push edx
mov ecx, esi
call fcn.00402670
call fcn.00404500
test eax, eax
je 0x40eeb1
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 0x4c4078
call fcn.00402670
push ecx
push esi
push ecx
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
push eax
call fcn.00429750
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 0x40ee49
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 0x40ee67
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 0x40ee86
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 0x40ed21
push 0x80004005
call fcn.004027c0
int3