Function at 0x1005c5b
Capabilities:
Check if file exists

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
push edi
xor edi, edi
mov dword [ebp - 0x20], 1
mov dword [ebp - 8], 0x7b
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], ebx
cmp ebx, edi
je 0x1005ca7
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, di
jne 0x1005c8d
sub eax, edx
sar eax, 1
inc eax
cmp eax, 0x21b
ja 0x101de12
push esi
call sym.spoolsv.exe_PrvWaitForSpoolerInitialization
cmp ebx, edi
je 0x1005cc9
push 0x1005d94
push ebx
call dword [sym.imp.msvcrt.dll_wcsstr]
mov esi, eax
pop ecx
pop ecx
cmp esi, edi
jne 0x101de24
push 0x2c
call sym.spoolsv.exe_PrvDllAllocSplMem
mov esi, eax
mov dword [ebp - 0x1c], esi
cmp esi, edi
je 0x101de40
or dword [esi + 0x1c], 0xffffffff
mov dword [esi], 0x6060
mov dword [esi + 0x20], edi
mov dword [esi + 0x28], edi
cmp dword [ebp - 4], edi
je 0x1005d05
push dword [ebp - 4]
call sym.spoolsv.exe_PrvAllocSplStr
mov dword [esi + 0x24], eax
cmp eax, edi
je 0x101de4f
mov ebx, dword [ebp + 0x10]
cmp ebx, edi
je 0x1005d11
cmp dword [ebx + 4], edi
jne 0x1005d36
call sym.spoolsv.exe_PrvCheckLocalCall
test eax, eax
jne 0x1005d36
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 4]
push edi
call sym.spoolsv.exe_PrvbGetDevModePerUser
test eax, eax
je 0x1005d36
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x101de69
cmp dword [ebp + 0x1c], edi
je 0x1019a80
push dword [ebp + 0x18]
mov esi, dword [0x10491bc]
push dword [ebp + 0x14]
lea eax, [ebp - 0xc]
push ebx
push eax
push dword [ebp - 4]
call dword [esi + 0xf4]
mov edi, eax
cmp edi, 1
jne 0x1019a67
mov eax, dword [ebp - 0x1c]
mov dword [eax + 4], esi
mov ecx, dword [ebp - 0xc]
mov dword [eax + 8], ecx
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
push dword [ebp - 0x14]
call sym.spoolsv.exe_PrvDllFreeSplMem
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 8]
jne 0x101df6d
mov eax, dword [ebp - 0x20]
pop esi
pop edi
pop ebx
leave
ret 0x18
lea eax, [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01019916
cmp edi, 2
je 0x1019b0f
mov edi, 0x1049318
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [ebp - 4]
call fcn.01019977
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
jne 0x101de90
push dword [ebp - 4]
call fcn.01019b60
cmp dword [ebp - 0x18], 0
mov esi, eax
jne 0x101defd
test esi, esi
jne 0x101df21
mov eax, dword [0x10491bc]
mov esi, dword [eax]
test esi, esi
je 0x1019b0f
cmp esi, dword [ebp - 0x10]
je 0x1019b0b
push 0x10198c8
push dword [esi + 4]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
test eax, eax
mov eax, dword [ebp - 4]
pop ecx
jne 0x1019aeb
mov eax, dword [ebp + 8]
push dword [ebp + 0x18]
lea ecx, [ebp - 8]
push dword [ebp + 0x14]
push ecx
push ebx
lea ecx, [ebp - 0xc]
push ecx
push eax
push esi
call fcn.010199f4
dec eax
je 0x1005d64
dec eax
je 0x1019b0f
mov esi, dword [esi]
jmp 0x1019ac8
push dword [ebp - 0x1c]
call fcn.0100370b
cmp dword [ebp - 8], 0x7b
jne 0x1019b24
mov dword [ebp - 8], 0x709
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetLastError]
and dword [ebp - 0x20], 0
mov eax, dword [0x1049104]
cmp eax, 0x1049104
je 0x1005d75
test byte [eax + 0x1c], 1
je 0x1005d75
jmp 0x101df47
cmp eax, 1
je 0x1005d64
jmp 0x1019b0f
push 0x709
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1005d8d
push ebx
call sym.spoolsv.exe_PrvAllocSplStr
mov dword [ebp - 4], eax
cmp eax, edi
je 0x101de62
sub esi, ebx
sar esi, 1
xor ecx, ecx
mov word [eax + esi*2], cx
jmp 0x1005cc9
cmp dword [ebp - 4], ebx
je 0x101de62
push dword [ebp - 4]
call sym.spoolsv.exe_PrvDllFreeSplStr
jmp 0x101de62
cmp dword [ebp - 4], ebx
je 0x101de5c
push dword [ebp - 4]
call sym.spoolsv.exe_PrvDllFreeSplStr
push esi
call fcn.0100370b
xor eax, eax
jmp 0x1005d8c
cmp ebx, edi
je 0x101de7a
mov ecx, dword [ebx]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebx + 8]
mov dword [ebp - 0x24], ecx
jmp 0x101de80
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x2c]
mov dword [ebp + 0x10], eax
mov ebx, eax
jmp 0x1005d36
push dword [ebp + 0x18]
lea eax, [ebp - 0xc]
push dword [ebp + 0x14]
push ebx
push eax
push dword [ebp - 4]
call dword [esi + 0xf4]
mov ebx, eax
test ebx, ebx
jne 0x101deb5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x32
je 0x101deba
cmp ebx, 0x32
jne 0x101dec9
push dword [ebp + 0x10]
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 4]
call dword [esi + 0x10]
mov ebx, eax
cmp ebx, 1
je 0x1005d64
lea eax, [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01019916
cmp ebx, 2
je 0x1019b0f
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x18], 1
mov dword [ebp - 0x10], esi
jmp 0x1019aa5
cmp esi, dword [ebp - 0x10]
je 0x1019ab9
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [ebp - 4]
call fcn.0103cebc
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1019ab9
cmp esi, dword [ebp - 0x10]
je 0x1019b0f
push dword [ebp + 0x18]
lea eax, [ebp - 8]
push dword [ebp + 0x14]
push eax
push ebx
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 4]
push esi
call fcn.010199f4
jmp 0x1019b50
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 8]
mov eax, dword [0x1049104]
push 0x1023a9c
push 0xa
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0103a009
jmp 0x1005d75
push eax
call sym.spoolsv.exe_PrvDllFreeSplStr
jmp 0x1005d89