Function at 0x442220
Capabilities:
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4aa0e5
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x4e4050]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
call fcn.004293a0
cmp byte [eax + 0x1c], 0
je 0x44231c
call fcn.004293a0
test byte [eax + 0x20], 4
je 0x44231c
call fcn.004293a0
mov edi, eax
call fcn.00404500
test eax, eax
je 0x4426a8
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x14]
push str.DoErase_started.
call fcn.0040cb50
call fcn.00404500
test eax, eax
je 0x4426a8
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x10]
push 0
push 0x4c4068
call fcn.00402670
push ecx
lea eax, [ebp - 0x14]
push eax
push ecx
lea eax, [ebp - 0x10]
mov ecx, edi
push eax
call fcn.004296e0
mov byte [ebp - 4], 2
or eax, 0xffffffff
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4422fa
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x44231c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor edi, edi
cmp dword [esi + 0x18], edi
jle 0x4424db
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x442355
mov eax, dword [ecx]
mov edx, dword [eax + 0x28]
test edi, edi
js 0x4426b2
cmp edi, dword [esi + 0x18]
lea ebx, [esi + 0x18]
jge 0x4426b2
mov eax, dword [esi + 0x14]
push 0
push 9
push dword [eax + edi*4]
call edx
jmp 0x442360
lea ebx, [esi + 0x18]
test edi, edi
js 0x4426b2
cmp edi, dword [ebx]
jge 0x4426b2
mov eax, dword [esi + 0x14]
lea ecx, [edi*4]
push dword [eax + ecx]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4424ad
call fcn.004293a0
cmp byte [eax + 0x1c], 0
je 0x4424ad
call fcn.004293a0
test byte [eax + 0x20], 1
je 0x4424ad
call fcn.004293a0
mov dword [ebp - 0x18], eax
call fcn.00404500
test eax, eax
je 0x4426a8
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0xc
lea ecx, [ebp - 0x10]
push 0x17
push str.Failed_to_delete_file:
call fcn.00402670
cmp edi, dword [ebx]
jge 0x4426b2
mov eax, dword [esi + 0x14]
lea ecx, [edi*4]
mov edx, dword [eax + ecx]
test edx, edx
je 0x442410
mov ecx, edx
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4423f7
sub ecx, ebx
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x10]
call fcn.00402670
push 0xc
push str._LastError:
lea ecx, [ebp - 0x10]
call fcn.00402670
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x10]
call fcn.004290a0
mov ebx, eax
call fcn.00404500
test eax, eax
je 0x4426a8
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x14]
push 0
push 0x4c4068
call fcn.00402670
push ecx
push ebx
push ecx
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x14]
push eax
call fcn.004296e0
mov byte [ebp - 4], 0xc
or eax, 0xffffffff
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x44248b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4424ad
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x4424bb
mov eax, dword [ecx]
push 1
call dword [eax + 0x18]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x4424d1
mov eax, dword [ecx]
mov eax, dword [eax + 0x1c]
call eax
test al, al
jne 0x442694
inc edi
cmp edi, dword [esi + 0x18]
jl 0x442327
xor edi, edi
cmp dword [esi + 0xc], edi
jle 0x442694
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x442514
mov eax, dword [ecx]
mov edx, dword [eax + 0x28]
test edi, edi
js 0x4426b2
cmp edi, dword [esi + 0xc]
lea ebx, [esi + 0xc]
jge 0x4426b2
mov eax, dword [esi + 8]
push 0
push 9
push dword [eax + edi*4]
call edx
jmp 0x44251f
lea ebx, [esi + 0xc]
test edi, edi
js 0x4426b2
cmp edi, dword [ebx]
jge 0x4426b2
mov eax, dword [esi + 8]
lea ecx, [edi*4]
push dword [eax + ecx]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x44266a
call fcn.004293a0
cmp byte [eax + 0x1c], 0
je 0x44266a
call fcn.004293a0
test byte [eax + 0x20], 1
je 0x44266a
call fcn.004293a0
mov dword [ebp - 0x18], eax
call fcn.00404500
test eax, eax
je 0x4426a8
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0x16
lea ecx, [ebp - 0x10]
push str.Failed_to_delete_folder:
call fcn.0040cb50
cmp edi, dword [ebx]
jge 0x4426b2
mov eax, dword [esi + 8]
lea ecx, [edi*4]
mov edx, dword [eax + ecx]
test edx, edx
je 0x4425cd
mov ecx, edx
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4425b4
sub ecx, ebx
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x10]
call fcn.00402670
push 0xc
push str._LastError:
lea ecx, [ebp - 0x10]
call fcn.00402670
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x10]
call fcn.004290a0
mov ebx, eax
call fcn.00404500
test eax, eax
je 0x4426a8
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 0x19
lea ecx, [ebp - 0x14]
push 0
push 0x4c4068
call fcn.00402670
push ecx
push ebx
push ecx
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x14]
push eax
call fcn.004296e0
mov byte [ebp - 4], 0x16
or eax, 0xffffffff
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x442648
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x44266a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x442678
mov eax, dword [ecx]
push 1
call dword [eax + 0x18]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x44268a
mov eax, dword [ecx]
mov eax, dword [eax + 0x1c]
call eax
test al, al
jne 0x442694
inc edi
cmp edi, dword [esi + 0xc]
jl 0x4424e6
xor eax, eax
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.004027c0
push 0x8000000b
call fcn.004027c0
int3