Function at 0x404760
Capabilities:
Delete directory

Disassembly:
push 0xffffffffffffffff
push 0x43e178
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov eax, dword [0x45060c]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x2c], 0
call fcn.0041a118
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4047ab
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0x2c], 1
call fcn.0041a118
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4047da
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x18], ebx
mov eax, dword [esi + 4]
add esi, 4
push 0x5c
push eax
mov byte [esp + 0x34], 2
call fcn.00428ef6
add esp, 8
test eax, eax
je 0x404850
sub eax, dword [esi]
cmp eax, 0xffffffff
je 0x404850
push eax
lea ecx, [esp + 0x20]
push ecx
mov ecx, esi
call fcn.00401cb0
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x30], 3
call fcn.00402100
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x2c], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40484c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x18]
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x18]
call fcn.00402100
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push 0x5c
push esi
call fcn.00428ef6
add esp, 8
test eax, eax
je 0x404964
sub eax, esi
cmp eax, 0xffffffff
je 0x404964
xor edx, edx
test ebx, ebx
setne dl
mov dword [esp + 0x20], edx
push eax
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x1c]
call fcn.00401cb0
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea edi, [esi - 0x10]
mov byte [esp + 0x2c], 4
cmp eax, edi
je 0x4048fd
cmp dword [edi + 0xc], 0
lea esi, [edi + 0xc]
jl 0x4048eb
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x4048eb
push eax
call fcn.004016b0
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
test eax, eax
jg 0x4048e2
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
lea esi, [ebp + 0x10]
mov dword [esp + 0x14], esi
jmp 0x4048fd
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.00401aa0
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x2c], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404922
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x20], 0
je 0x4047a1
push ebx
push esi
call fcn.004299d5
add esp, 8
test eax, eax
je 0x40494a
mov eax, dword [esi - 0xc]
cmp eax, dword [ebx - 0xc]
jle 0x40494a
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push 0x5c
push esi
call fcn.00428ef6
add esp, 8
test eax, eax
je 0x404964
sub eax, esi
cmp eax, 0xffffffff
jne 0x404892
lea eax, [ebx - 0x10]
mov byte [esp + 0x2c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404985
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [esp + 0x2c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4049a6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
mov dword [esp + 0x2c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4049ce
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 4