Function at 0x404740
Capabilities:
Delete directory

Disassembly:
push 0xffffffffffffffff
push 0x43e0f8
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 0x40478b
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 0x4047ba
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.00428e6e
add esp, 8
test eax, eax
je 0x404830
sub eax, dword [esi]
cmp eax, 0xffffffff
je 0x404830
push eax
lea ecx, [esp + 0x20]
push ecx
mov ecx, esi
call fcn.00401c90
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x30], 3
call fcn.004020e0
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 0x40482c
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.004020e0
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push 0x5c
push esi
call fcn.00428e6e
add esp, 8
test eax, eax
je 0x404944
sub eax, esi
cmp eax, 0xffffffff
je 0x404944
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.00401c90
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea edi, [esi - 0x10]
mov byte [esp + 0x2c], 4
cmp eax, edi
je 0x4048dd
cmp dword [edi + 0xc], 0
lea esi, [edi + 0xc]
jl 0x4048cb
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x4048cb
push eax
call fcn.00401690
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
test eax, eax
jg 0x4048c2
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 0x4048dd
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.00401a80
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 0x404902
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x20], 0
je 0x404781
push ebx
push esi
call fcn.00429955
add esp, 8
test eax, eax
je 0x40492a
mov eax, dword [esi - 0xc]
cmp eax, dword [ebx - 0xc]
jle 0x40492a
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push 0x5c
push esi
call fcn.00428e6e
add esp, 8
test eax, eax
je 0x404944
sub eax, esi
cmp eax, 0xffffffff
jne 0x404872
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 0x404965
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 0x404986
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 0x4049ae
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