Function at 0x42f440
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5584f7
mov eax, dword fs:[0]
push eax
sub esp, 0x23c
mov eax, dword [0x5d7b20]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
lea ecx, [ebp - 0x248]
call fcn.00459852
mov dword [ebp - 4], 0
call fcn.0044c104
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x42f49c
push 0x80004005
call fcn.00403e70
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x220], edi
mov byte [ebp - 4], 1
call fcn.0044c104
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x42f4cc
push 0x80004005
call fcn.00403e70
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x21c], eax
mov byte [ebp - 4], 2
call fcn.0044c104
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x42f4fc
push 0x80004005
call fcn.00403e70
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x224], esi
push 0x208
lea ecx, [ebp - 0x218]
push 0
push ecx
mov byte [ebp - 4], 3
call fcn.0053e550
mov edx, dword [ebx + 0xd8]
add esp, 0xc
cmp dword [edx - 0xc], 0
je 0x42f772
lea ecx, [ebp - 0x218]
push ecx
mov ecx, ebx
call sym.DelDrv.exe_private:_void___thiscall_CPrinterDriverInf::GetPrinterDriverDir_wchar_t__
lea eax, [ebp - 0x218]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x42f550
sub eax, edx
sar eax, 1
lea edx, [eax - 1]
cmp edx, 0x102
ja 0x42f772
lea eax, [ebp + eax*2 - 0x218]
mov ecx, 0x5c
cmp cx, word [eax - 2]
je 0x42f585
mov edx, ecx
mov word [eax], dx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x224]
call fcn.00405db0
push 0x5777c4
lea ecx, [ebp - 0x218]
push 0x104
push ecx
call fcn.0053e396
add esp, 0xc
push 0
lea edx, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x248]
call fcn.004598f9
test eax, eax
je 0x42f756
lea esp, [esp]
lea ecx, [ebp - 0x248]
call fcn.004594c2
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x22c], eax
call fcn.00459814
test eax, eax
jne 0x42f73e
mov eax, dword [ebp - 0x248]
mov edx, dword [eax + 0x38]
push 0x10
lea ecx, [ebp - 0x248]
call edx
test eax, eax
jne 0x42f73e
lea eax, [ebp - 0x228]
push eax
lea ecx, [ebp - 0x248]
call fcn.00459bd5
push eax
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 4
call fcn.00405460
mov eax, dword [ebp - 0x228]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42f657
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x220]
call fcn.004184d0
mov edi, dword [ebp - 0x220]
mov ecx, dword [edi - 8]
mov eax, 1
sub eax, dword [edi - 4]
or ecx, eax
jge 0x42f68a
push 0
lea ecx, [ebp - 0x220]
call fcn.004045b0
mov edi, dword [ebp - 0x220]
test edi, edi
je 0x42f6b5
mov eax, dword [ebx + 0xd8]
cmp dword [eax - 0xc], 0
jl 0x42f6b5
push edi
push eax
call fcn.0053ea56
add esp, 8
test eax, eax
je 0x42f6b5
sub eax, dword [ebx + 0xd8]
sar eax, 1
cmp eax, 0xffffffff
jne 0x42f72e
lea ecx, [ebp - 0x224]
push ecx
lea ecx, [ebp - 0x21c]
call fcn.00405460
mov eax, dword [edi - 0xc]
push eax
push edi
lea ecx, [ebp - 0x21c]
call fcn.00405330
mov esi, dword [ebp - 0x21c]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
or ecx, eax
jge 0x42f6ff
push 0
lea ecx, [ebp - 0x21c]
call fcn.004045b0
mov esi, dword [ebp - 0x21c]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push esi
test eax, eax
je 0x42f712
push str.::DeletePrinterDriverDirectoryFiles__Delete_OK_____1_s___n
jmp 0x42f717
push str.::DeletePrinterDriverDirectoryFiles__Delete_Error_____1_s___n
push 5
call fcn.00403ab0
add esp, 0xc
lea ecx, [ebp - 0x21c]
call fcn.00404540
jmp 0x42f73e
push edi
push str.::DeletePrinterDriverDirectoryFiles__Delete_Skip_____1_s___n
push 5
call fcn.00403ab0
add esp, 0xc
cmp dword [ebp - 0x22c], 0
jne 0x42f5d0
lea ecx, [ebp - 0x248]
call fcn.004593dc
mov eax, dword [ebp - 0x224]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x42f786
lea eax, [esi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [ebp - 4], 2
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42f792
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42f7b8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42f7d8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x248]
mov dword [ebp - 4], 0xffffffff
call fcn.00459884
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret