Function at 0x401860
Capabilities:
Delete directory
Delete file

Disassembly:
sub esp, 0x564
push esi
push edi
xor esi, esi
mov ecx, 8
xor eax, eax
lea edi, [esp + 0xc]
mov dword [esp + 8], esi
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
push eax
push str.C:Program_FilesHPNon_Driver_CIO_Components
call dword [sym.imp.MSVCRT.dll__stat]
add esp, 8
test eax, eax
jne 0x401a58
mov ecx, 0x7f
lea edi, [esp + 0x16d]
mov byte [esp + 0x16c], al
push ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push ebp
mov ecx, 0x4f
xor eax, eax
lea edi, [esp + 0x38]
mov dword [esp + 0x34], esi
push str.The_Directory_C:Program_FilesHPNon_Driver_CIO_Components_Exists
rep stosd dword es:[edi], eax
push str.Info
call fcn.00401850
mov edi, str.C:Program_FilesHPNon_Driver_CIO_Components
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x174]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x174]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str..isu
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x34]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x178]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x401a1a
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x375]
mov byte [esp + 0x374], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, str.C:Program_FilesHPNon_Driver_CIO_Components
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x374]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x374]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x60]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x374]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
cmp eax, 1
jne 0x4019e3
lea ecx, [esp + 0x174]
push ecx
push str.Removed_File
jmp 0x4019ed
push str.Could_not_remove_files_from_directory
push str.Error
call fcn.00401850
add esp, 8
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
lea edx, [esp + 0x34]
lea eax, [esp + 0x174]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x401951
push str.C:Program_FilesHPNon_Driver_CIO_Components
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
pop ebp
cmp eax, 1
pop ebx
jne 0x401a43
push str._nDirectory_Removed_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 4
pop edi
pop esi
add esp, 0x564
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._nDirectory_could_not_be_removed__d_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
pop edi
pop esi
add esp, 0x564
ret