Function at 0x51a6a0
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56eaa8
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x5d0074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov dword [ebp - 0x20], ecx
call fcn.00413cd0
mov ecx, eax
test ecx, ecx
je 0x51a887
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 1
or esi, 0xffffffff
mov ebx, dword [edi]
mov edx, dword [ebx - 0xc]
test edx, edx
je 0x51a79c
lea ecx, [edx - 1]
test ecx, ecx
js 0x51a891
cmp ecx, edx
jg 0x51a891
cmp word [ebx + ecx*2], 0x5c
jne 0x51a79c
push ecx
lea eax, [ebp - 0x1c]
mov ecx, edi
push eax
call fcn.0040ba30
mov byte [ebp - 4], 2
mov edx, dword [eax]
mov edi, dword [ebp - 0x10]
add edi, 0xfffffff0
lea ecx, [edx - 0x10]
cmp ecx, edi
je 0x51a77c
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x51a770
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x51a770
call fcn.0040be70
mov dword [ebp - 0x18], eax
mov ecx, esi
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x51a768
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x18]
add eax, 0x10
mov dword [ebp - 0x10], eax
jmp 0x51a77c
push dword [edx - 0xc]
lea ecx, [ebp - 0x10]
push edx
call fcn.004143c0
mov byte [ebp - 4], 1
mov eax, esi
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51a7e4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x51a7e4
mov edi, dword [ebp - 0x10]
lea ecx, [ebx - 0x10]
add edi, 0xfffffff0
cmp ecx, edi
je 0x51a7e4
cmp dword [edi + 0xc], 0
jl 0x51a7da
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x51a7da
call fcn.0040be70
mov ebx, eax
lea edx, [edi + 0xc]
mov ecx, esi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x51a7d2
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
lea eax, [ebx + 0x10]
mov dword [ebp - 0x10], eax
jmp 0x51a7e4
push edx
push ebx
lea ecx, [ebp - 0x10]
call fcn.004143c0
mov ebx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebx]
mov eax, dword [eax - 0xc]
cmp eax, dword [ecx - 0xc]
jge 0x51a856
push 0x5c
push ecx
call fcn.0052266c
add esp, 8
test eax, eax
jne 0x51a808
or eax, 0xffffffff
jmp 0x51a80c
sub eax, dword [ebx]
sar eax, 1
push eax
lea eax, [ebp - 0x14]
mov ecx, ebx
push eax
call fcn.0040ba30
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x14]
cmp dword [eax - 0xc], 0
je 0x51a838
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea edx, [ebp - 0x10]
lea ecx, [ebp - 0x14]
call fcn.0051a6a0
mov byte [ebp - 4], 1
mov eax, esi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51a856
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x51a875
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
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 0x80004005
call fcn.004143a0
push 0x80070057
call fcn.004143a0
int3