Function at 0x500a20
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ab6b6
mov eax, dword fs:[0]
push eax
sub esp, 0xa78
mov eax, dword [0x608554]
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 esi, ecx
mov dword [ebp - 0xa70], esi
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0xa7c], eax
cmp byte [esi + 8], bl
jne 0x500a7a
mov dword [0x6183ec], 4
mov eax, 0x80010004
jmp 0x500d08
mov eax, dword [esi + 4]
cmp eax, 1
je 0x500cf9
cmp eax, 3
je 0x500cf9
push 0x800
lea eax, [ebp - 0xa18]
push 0
push eax
call fcn.00571c00
add esp, 0xc
call fcn.00550b4e
mov ecx, eax
test ecx, ecx
je 0x500d26
mov eax, dword [ecx]
call dword [eax + 0xc]
mov dword [ebp - 0xa80], eax
add eax, 0x10
mov dword [ebp - 0xa84], eax
lea eax, [esi + 0xc]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0xa6c]
call fcn.00500d40
push 0x400
lea eax, [ebp - 0xa18]
mov byte [ebp - 4], 1
push eax
push 1
mov ecx, esi
call fcn.005027c0
test eax, eax
je 0x500c98
cmp dword [ebp - 0xa58], 8
lea eax, [ebp - 0xa6c]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
cmovae eax, dword [ebp - 0xa6c]
push eax
call esi
mov edi, eax
lea eax, [ebp - 0xa18]
push eax
call esi
add edi, eax
cmp edi, 0x400
jae 0x500b53
cmp dword [ebp - 0xa58], 8
lea eax, [ebp - 0xa6c]
cmovae eax, dword [ebp - 0xa6c]
push eax
lea eax, [ebp - 0xa18]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0xa18]
push eax
call edi
mov esi, dword [ebp - 0xa70]
test eax, eax
jne 0x500b8e
mov ecx, esi
call fcn.00501b30
mov ebx, eax
test ebx, ebx
jne 0x500ca7
lea eax, [ebp - 0xa18]
push eax
call edi
test eax, eax
je 0x500c98
push 8
push 0
lea eax, [ebp - 0xa18]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x500c98
push str.DriverFileInstaller
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xa78], eax
test eax, eax
jne 0x500bd3
mov ebx, 0x80010022
mov dword [0x6183ec], 0x22
jmp 0x500c78
push str.DriverFileInstallerFixed
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xa74], eax
test eax, eax
jne 0x500bfa
mov ebx, 0x80010022
mov dword [0x6183ec], 0x22
jmp 0x500c78
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00571c00
add esp, 0xc
mov dword [ebp - 0xa70], 0
lea eax, [ebp - 0xa70]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [ebp - 0xa78]
test eax, eax
je 0x500c61
mov ecx, dword [ebp - 0xa7c]
cmp dword [ebp - 0xa70], 0
push 1
setne al
mov byte [ecx], al
call dword [ebp - 0xa74]
test eax, eax
jne 0x500c78
mov ebx, 0x80010070
mov dword [0x6183ec], 0x70
jmp 0x500c78
push 0
mov ebx, 0x8001006f
mov dword [0x6183ec], 0x6f
call dword [ebp - 0xa74]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test ebx, ebx
jne 0x500ca7
xor eax, eax
cmp dword [esi + 4], 4
sete al
lea eax, [eax*2 + 1]
mov dword [esi + 4], eax
jmp 0x500ca7
mov ebx, 0x80010022
mov dword [0x6183ec], 0x22
lea ecx, [ebp - 0xa24]
call fcn.00409b00
lea ecx, [ebp - 0xa3c]
call fcn.00403570
lea ecx, [ebp - 0xa54]
call fcn.00403570
lea ecx, [ebp - 0xa6c]
call fcn.00403570
mov edx, dword [ebp - 0xa80]
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x500cf5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
jmp 0x500d08
mov dword [0x6183ec], 0x71
mov eax, 0x80010071
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.0056d977
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.004013a0
int3