Function at 0x404520
Capabilities:
Delete directory

Disassembly:
push 0xffffffffffffffff
push 0x43e0a8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebp
push esi
push edi
mov eax, dword [0x45060c]
xor eax, esp
push eax
lea eax, [esp + 0x1c]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x24], 0
call fcn.0041a118
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40456a
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebp, [eax + 0x10]
mov dword [esp + 0x14], ebp
mov byte [esp + 0x24], 1
call fcn.0041a118
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x404599
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x10], edi
mov eax, dword [esi + 4]
add esi, 4
push 0x5c
push eax
mov byte [esp + 0x2c], 2
call fcn.00428e6e
add esp, 8
test eax, eax
je 0x40461d
sub eax, dword [esi]
cmp eax, 0xffffffff
je 0x40461d
push eax
lea ecx, [esp + 0x1c]
push ecx
mov ecx, esi
call fcn.00401c90
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x28], 3
call fcn.004020e0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x24], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40460b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x441968
lea ecx, [esp + 0x14]
call fcn.00401f40
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x2c]
push 0x5c
push ecx
call fcn.00428e6e
add esp, 8
test eax, eax
je 0x4046bb
sub eax, dword [esp + 0x2c]
cmp eax, 0xffffffff
je 0x4046bb
push eax
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x34]
call fcn.00401c90
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x28], 4
call fcn.004020e0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x24], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404680
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebp, dword [esp + 0x14]
push 0
push ebp
call fcn.00429a78
add esp, 8
test eax, eax
jne 0x4046bb
test ebp, ebp
setne al
test eax, eax
jne 0x4046a6
push 0x80004005
call fcn.00401090
push ebp
push edi
call fcn.00429955
add esp, 8
test eax, eax
je 0x4046bb
push ebp
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
lea eax, [edi - 0x10]
mov byte [esp + 0x24], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4046dc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
mov byte [esp + 0x24], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4046fd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov dword [esp + 0x24], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404725
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
add esp, 0x18
ret 4