Function at 0x476bd0
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50d340
mov eax, dword fs:[0]
push eax
sub esp, 0x50
push ebx
push esi
push edi
mov eax, dword [0x572bb0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x18], edx
mov byte [ebp - 0xd], cl
mov dword [ebp - 4], 0
mov esi, 1
mov edi, dword [ebp + 8]
sub esi, dword [edi - 4]
mov eax, dword [edi - 8]
or eax, esi
jge 0x476c24
push 0
lea ecx, [ebp + 8]
call fcn.00471f40
mov edi, dword [ebp + 8]
lea ecx, [edi + 2]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x476c27
sub edi, ecx
mov edx, 2
sar edi, 1
xor ecx, ecx
lea esi, [edi + 2]
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004ea22e
mov ecx, dword [ebp + 8]
mov ebx, eax
mov eax, 1
add esp, 4
sub eax, dword [ecx - 4]
mov edx, dword [ecx - 8]
or edx, eax
jge 0x476c75
push 0
lea ecx, [ebp + 8]
call fcn.00471f40
mov ecx, dword [ebp + 8]
push ecx
push esi
push ebx
call fcn.004ec142
xor eax, eax
add esp, 0xc
mov dword [ebx + edi*2], eax
or edi, 0xffffffff
cmp byte [0x579b6b], al
je 0x476dec
call fcn.00460220
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x476cb0
push 0x80004005
call fcn.004712d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 1
lea eax, [ebp - 0x14]
push dword [ebp + 8]
push str.pszFrom___s_
push eax
call fcn.00472d30
add esp, 0xc
lea ecx, [ebp - 0x24]
push str.DeleteFileSystemElement
call fcn.00471bb0
mov byte [ebp - 4], 2
call fcn.00460220
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x476d02
push 0x80004005
call fcn.004712d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 3
push eax
lea edx, [ebp - 0x20]
lea ecx, [ebp - 0x28]
call fcn.00472fc0
add esp, 4
mov esi, eax
push 0x54c6b8
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 4
call fcn.00471bb0
push 0
push esi
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00473100
mov byte [ebp - 4], 4
mov ecx, edi
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x476d6c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
mov ecx, edi
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x476d8c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov ecx, edi
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x476dac
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov ecx, edi
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x476dcc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x476dec
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
mov eax, 0x14
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 3
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x50], 0
mov word [ebp - 0x4c], ax
jne 0x476e1c
mov eax, 0x54
mov word [ebp - 0x4c], ax
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x4a], 0
push eax
mov dword [ebp - 0x42], 0
mov dword [ebp - 0x46], 0
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
mov esi, eax
push ebx
mov dword [ebp - 0x3c], esi
call fcn.004ea229
add esp, 4
test esi, esi
sete al
mov byte [ebp - 0xd], al
test al, al
jne 0x477449
push str._error
lea ecx, [ebp - 0x28]
call fcn.00471bb0
push str.SHFileOperation_path
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 6
call fcn.00471c70
push str.DeleteFileSystemElement
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 7
call fcn.00471bb0
mov byte [ebp - 4], 8
call fcn.00460220
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x476ea8
push 0x80004005
call fcn.004712d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 9
push eax
lea edx, [ebp - 0x20]
lea ecx, [ebp - 0x38]
call fcn.00472fc0
lea ecx, [ebp + 8]
mov byte [ebp - 4], 0xa
push ecx
mov edx, eax
lea ecx, [ebp - 0x34]
call fcn.00472fc0
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0xb
push ecx
mov edx, eax
lea ecx, [ebp - 0x30]
call fcn.00472fc0
push esi
mov edx, eax
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x2c]
call fcn.00472f20
add esp, 0x10
mov esi, eax
push 0x54c6b8
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 0xd
call fcn.00471bb0
push 2
push esi
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 0xe
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.00473100
mov byte [ebp - 4], 0xd
mov ecx, edi
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x476f45
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xc
mov ecx, edi
mov edx, dword [ebp - 0x2c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x476f65
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xb
mov ecx, edi
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x476f85
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xa
mov ecx, edi
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x476fa5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 9
mov ecx, edi
mov edx, dword [ebp - 0x38]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x476fc5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 8
mov ecx, edi
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x476fe5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 7
mov ecx, edi
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477005
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 6
mov ecx, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477025
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, edi
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477045
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.DeleteFileSystemElement_SHFileOperation_
lea ecx, [ebp - 0x28]
call fcn.00471bb0
mov byte [ebp - 4], 0xf
call fcn.00460220
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x477072
push 0x80004005
call fcn.004712d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 0x10
push eax
lea edx, [ebp - 0x38]
lea ecx, [ebp - 0x30]
call fcn.00472fc0
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x34]
push dword [ebp - 0x3c]
mov edx, eax
call fcn.00472f20
add esp, 8
mov ecx, dword [ebp - 0x18]
push eax
mov byte [ebp - 4], 0x12
call fcn.00473a30
mov byte [ebp - 4], 0x11
mov ecx, edi
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4770d3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x10
mov ecx, edi
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4770f3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 0xf
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477110
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, edi
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477130
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x477441
push str.RemoveDirectory_error
lea ecx, [ebp - 0x24]
call fcn.00471c70
push str.DeleteFileSystemElement
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0x13
call fcn.00471bb0
mov byte [ebp - 4], 0x14
call fcn.00460220
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x47717d
push 0x80004005
call fcn.004712d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea ebx, [eax + 0x10]
mov dword [ebp - 0x3c], ebx
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 0x15
push eax
lea edx, [ebp - 0x3c]
lea ecx, [ebp - 0x34]
call fcn.00472fc0
add esp, 4
mov esi, eax
mov byte [ebp - 4], 0x16
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, esi
lea ecx, [ebp - 0x38]
call fcn.00472f20
push 2
mov edx, eax
mov byte [ebp - 4], 0x17
lea ecx, [ebp - 0x28]
call fcn.00473b30
mov byte [ebp - 4], 0x16
add esp, 8
mov edx, dword [ebp - 0x38]
mov ecx, edi
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4771ea
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x15
mov ecx, edi
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x47720a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [ebx - 0x10]
mov byte [ebp - 4], 0x14
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477227
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x13
mov ecx, edi
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477247
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, edi
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477267
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.RemoveDirectory_error_
lea ecx, [ebp - 0x28]
call fcn.00471bb0
mov byte [ebp - 4], 0x18
call fcn.00460220
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x477294
push 0x80004005
call fcn.004712d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea ebx, [eax + 0x10]
mov dword [ebp - 0x3c], ebx
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 0x19
push eax
lea edx, [ebp - 0x3c]
lea ecx, [ebp - 0x38]
call fcn.00472fc0
add esp, 4
mov esi, eax
mov byte [ebp - 4], 0x1a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, esi
lea ecx, [ebp - 0x20]
call fcn.00472f20
add esp, 4
mov byte [ebp - 4], 0x1c
mov ecx, edi
mov edx, dword [ebp - 0x38]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4772f1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [ebx - 0x10]
mov byte [ebp - 4], 0x1d
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x47730e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x1e
mov ecx, edi
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x47732e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x54c414
lea ecx, [ebp - 0x24]
call fcn.00471bb0
mov byte [ebp - 4], 0x1f
call fcn.00460220
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x47735b
push 0x80004005
call fcn.004712d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x3c], esi
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 0x20
push eax
lea edx, [ebp - 0x3c]
lea ecx, [ebp - 0x30]
call fcn.00472fc0
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0x21
push ecx
mov edx, eax
lea ecx, [ebp - 0x34]
call fcn.00472fc0
add esp, 8
mov ecx, dword [ebp - 0x18]
mov byte [ebp - 4], 0x22
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.0047a5d0
mov byte [ebp - 4], 0x21
mov ecx, edi
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4773c2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x20
mov ecx, edi
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4773e2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 0x1f
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4773ff
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x1e
mov ecx, edi
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x47741f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, edi
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477449
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x477449
mov ecx, dword [ebp - 0x18]
call fcn.00471aa0
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp + 8]
add esi, 0xfffffff0
lea eax, [esi + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x47746a
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [ebp - 0xd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret