Function at 0x51af50
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x557238
mov eax, dword fs:[0]
push eax
sub esp, 0x10
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 esi, edx
mov dword [ebp - 0x18], esi
mov ebx, ecx
call fcn.00411fd0
mov ecx, eax
test ecx, ecx
je 0x51b13f
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 1
mov edi, dword [esi]
or esi, 0xffffffff
mov edx, dword [edi - 0xc]
test edx, edx
je 0x51b04f
lea ecx, [edx - 1]
test ecx, ecx
js 0x51b149
cmp ecx, edx
jg 0x51b149
cmp word [edi + ecx*2], 0x5c
jne 0x51b04f
push ecx
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x1c]
push eax
call fcn.00409d90
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 0x51b02f
cmp dword [edi + 0xc], 0
jl 0x51b023
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x51b023
call fcn.0040a1d0
mov dword [ebp - 0x18], eax
lea edx, [edi + 0xc]
mov ecx, esi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x51b01b
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 0x51b02f
push dword [edx - 0xc]
lea ecx, [ebp - 0x10]
push edx
call fcn.004126c0
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 0x51b09f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x51b09f
lea ecx, [edi - 0x10]
mov edi, dword [ebp - 0x10]
add edi, 0xfffffff0
cmp ecx, edi
je 0x51b09f
cmp dword [edi + 0xc], 0
jl 0x51b091
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x51b091
call fcn.0040a1d0
mov dword [ebp - 0x1c], eax
lea edx, [edi + 0xc]
mov ecx, esi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x51b089
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1c]
add eax, 0x10
mov dword [ebp - 0x10], eax
jmp 0x51b09f
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x10]
push edx
push dword [eax]
call fcn.004126c0
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebx]
mov eax, dword [eax - 0xc]
cmp eax, dword [ecx - 0xc]
jge 0x51b10e
push 0x5c
push ecx
call fcn.00522f4c
add esp, 8
test eax, eax
jne 0x51b0c0
or eax, 0xffffffff
jmp 0x51b0c4
sub eax, dword [ebx]
sar eax, 1
push eax
lea eax, [ebp - 0x14]
mov ecx, ebx
push eax
call fcn.00409d90
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x14]
cmp dword [eax - 0xc], 0
je 0x51b0f0
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea edx, [ebp - 0x10]
lea ecx, [ebp - 0x14]
call fcn.0051af50
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 0x51b10e
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 0x51b12d
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.004126a0
push 0x80070057
call fcn.004126a0
int3