Function at 0x1039759
Capabilities:
Check if file exists

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x14]
push esi
xor esi, esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], esi
cmp dword [ebp + 0x10], esi
jne 0x103978b
cmp eax, esi
je 0x103978b
push 0x6f8
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10398fd
push ebx
push edi
call sym.spoolsv.exe_PrvWaitForSpoolerInitialization
mov edi, dword [0x10491bc]
mov ebx, dword [ebp + 0x18]
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
cmp edi, esi
mov esi, dword [ebp + 0x1c]
je 0x1039871
and dword [esi], 0
and dword [ebx], 0
push esi
push ebx
push dword [ebp - 4]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [edi + 0xa8]
mov dword [ebp + 0x18], eax
test eax, eax
jne 0x1039828
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp + 0xc], 2
mov dword [ebp + 0x1c], eax
jne 0x1039811
cmp eax, 0x7c
je 0x10397e6
cmp eax, 0x7b
jne 0x1039811
and dword [ebp + 0x1c], 0
push esi
push ebx
push dword [ebp - 4]
push dword [ebp + 0x10]
push dword [ebp + 8]
push edi
call fcn.010396ba
test eax, eax
jne 0x103980a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x1c], eax
jmp 0x1039811
mov dword [ebp - 0x10], 1
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x103982f
and dword [esi], 0
mov dword [ebp - 0x14], eax
cmp eax, 0x7a
je 0x103982f
and dword [ebx], 0
jmp 0x103982f
mov dword [ebp - 0x10], 1
mov eax, dword [esi]
mov ecx, dword [ebp + 0xc]
add dword [ebp - 0xc], eax
dec ecx
je 0x1039845
dec ecx
jne 0x10398b9
imul eax, eax, 0x14
add dword [ebp + 0x10], eax
jmp 0x103984e
mov ecx, dword [ebp + 0x10]
lea eax, [ecx + eax*4]
mov dword [ebp + 0x10], eax
mov eax, dword [ebx]
cmp eax, dword [ebp - 4]
ja 0x103985a
sub dword [ebp - 4], eax
jmp 0x103985e
and dword [ebp - 4], 0
add dword [ebp - 8], eax
cmp dword [ebp + 0x18], 2
je 0x1039871
mov edi, dword [edi]
test edi, edi
jne 0x10397ac
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
mov dword [ebx], eax
mov dword [esi], ecx
cmp eax, dword [ebp + 0x14]
jbe 0x10398ea
push 0x7a
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [0x1049104]
cmp eax, 0x1049104
je 0x1039940
test byte [eax + 0x1c], 1
je 0x1039940
push 0x1023b20
push 0xb
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01023f56
jmp 0x1039940
mov eax, dword [0x1049104]
cmp eax, 0x1049104
je 0x10398e0
test byte [eax + 0x1c], 1
je 0x10398e0
push dword [ebp + 0xc]
push 0x1023b20
push 0xa
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034754
push 0x7c
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1039940
xor eax, eax
cmp dword [ebp - 0x10], eax
je 0x1039902
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
inc eax
pop edi
pop ebx
pop esi
leave
ret 0x18
cmp dword [ebp - 0x14], eax
je 0x10398f8
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [0x1049104]
cmp eax, 0x1049104
je 0x1039940
test byte [eax + 0x1c], 1
je 0x1039940
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x1049104]
push 0x1023b20
push 0xc
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034754
xor eax, eax
jmp 0x10398fb