Function at 0x40e350
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a018d
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x4e3050]
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 0x40e59b
call fcn.0040e740
test al, al
jne 0x40e59b
call fcn.004042d0
mov ecx, eax
test ecx, ecx
je 0x40e5b1
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 0x4c13a4
call fcn.00403430
test al, al
jne 0x40e3da
push 4
push 0x4c13a4
lea ecx, [ebp - 0x14]
call fcn.004035a0
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 0x40e41e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov al, byte [ebp - 0xd]
test al, al
jne 0x40e586
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
call fcn.00428db0
mov dword [ebp - 0x1c], eax
call fcn.004042d0
test eax, eax
je 0x40e5b1
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 0x40e48e
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e475
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.00428870
mov esi, eax
push 1
push 0x4c32b8
mov ecx, esi
call fcn.00402420
push 0
mov edx, edi
lea ecx, [ebp - 0x20]
call fcn.0040d870
add esp, 4
mov byte [ebp - 4], 6
mov edx, dword [eax]
test edx, edx
je 0x40e4ef
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e4d7
sub ecx, edi
sar ecx, 1
push ecx
push edx
mov ecx, esi
call fcn.00402420
call fcn.004042d0
test eax, eax
je 0x40e5b1
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 0x4c3098
call fcn.00402420
push ecx
push esi
push ecx
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
push eax
call fcn.004290f0
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 0x40e549
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 0x40e567
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 0x40e586
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 0x40e421
push 0x80004005
call fcn.00402570
int3