Function at 0x415780
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x535ab7
mov eax, dword fs:[0]
push eax
sub esp, 0x23c
mov eax, dword [0x5a6a30]
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.00439ce1
mov dword [ebp - 4], 0
call fcn.0042aa6c
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4157dc
push 0x80004005
call fcn.004010e0
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.0042aa6c
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x41580c
push 0x80004005
call fcn.004010e0
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.0042aa6c
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x41583c
push 0x80004005
call fcn.004010e0
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.0051eb70
mov edx, dword [ebx + 0xd8]
add esp, 0xc
cmp dword [edx - 0xc], 0
je 0x415ab2
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 0x415890
sub eax, edx
sar eax, 1
lea edx, [eax - 1]
cmp edx, 0x102
ja 0x415ab2
lea eax, [ebp + eax*2 - 0x218]
mov ecx, 0x5c
cmp cx, word [eax - 2]
je 0x4158c5
mov edx, ecx
mov word [eax], dx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x224]
call fcn.004020d0
push 0x54baac
lea ecx, [ebp - 0x218]
push 0x104
push ecx
call fcn.0051f22b
add esp, 0xc
push 0
lea edx, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x248]
call fcn.00439d88
test eax, eax
je 0x415a96
lea esp, [esp]
lea ecx, [ebp - 0x248]
call fcn.00439951
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x22c], eax
call fcn.00439ca3
test eax, eax
jne 0x415a7e
mov eax, dword [ebp - 0x248]
mov edx, dword [eax + 0x38]
push 0x10
lea ecx, [ebp - 0x248]
call edx
test eax, eax
jne 0x415a7e
lea eax, [ebp - 0x228]
push eax
lea ecx, [ebp - 0x248]
call fcn.0043a064
push eax
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 4
call fcn.00404a70
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 0x415997
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x220]
call fcn.00401c70
mov edi, dword [ebp - 0x220]
mov ecx, dword [edi - 8]
mov eax, 1
sub eax, dword [edi - 4]
or ecx, eax
jge 0x4159ca
push 0
lea ecx, [ebp - 0x220]
call fcn.004015a0
mov edi, dword [ebp - 0x220]
test edi, edi
je 0x4159f5
mov eax, dword [ebx + 0xd8]
cmp dword [eax - 0xc], 0
jl 0x4159f5
push edi
push eax
call fcn.0051ed78
add esp, 8
test eax, eax
je 0x4159f5
sub eax, dword [ebx + 0xd8]
sar eax, 1
cmp eax, 0xffffffff
jne 0x415a6e
lea ecx, [ebp - 0x224]
push ecx
lea ecx, [ebp - 0x21c]
call fcn.00404a70
mov eax, dword [edi - 0xc]
push eax
push edi
lea ecx, [ebp - 0x21c]
call fcn.004049b0
mov esi, dword [ebp - 0x21c]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
or ecx, eax
jge 0x415a3f
push 0
lea ecx, [ebp - 0x21c]
call fcn.004015a0
mov esi, dword [ebp - 0x21c]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push esi
test eax, eax
je 0x415a52
push str.::DeletePrinterDriverDirectoryFiles__Delete_OK_____1_s___n
jmp 0x415a57
push str.::DeletePrinterDriverDirectoryFiles__Delete_Error_____1_s___n
push 5
call fcn.00403750
add esp, 0xc
lea ecx, [ebp - 0x21c]
call fcn.00401530
jmp 0x415a7e
push edi
push str.::DeletePrinterDriverDirectoryFiles__Delete_Skip_____1_s___n
push 5
call fcn.00403750
add esp, 0xc
cmp dword [ebp - 0x22c], 0
jne 0x415910
lea ecx, [ebp - 0x248]
call fcn.0043986b
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 0x415ac6
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 0x415ad2
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 0x415af8
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 0x415b18
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.00439d13
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.0051e701
mov esp, ebp
pop ebp
ret