Function at 0x4057e0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x425213
mov eax, dword fs:[0]
push eax
sub esp, 0x148
mov eax, dword [0x444624]
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, dword [ebp + 8]
lea eax, [ebp - 0xd4]
push eax
push 0
mov dword [ebp - 0xd4], 0
call sub.WINSPOOL.DRV_Ordinal_203
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov ecx, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0x34], ecx
mov cl, byte [ebp - 0xcd]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x68]
mov byte [ebp - 0x30], cl
lea ecx, [ebp - 0x38]
push eax
mov dword [ebp - 0x38], vtable.std::_Func_impl_no_alloc_class_std::_Binder_struct_std::_Unforced__int____stdcall___void___unsigned_long_int__void____void___int__struct_std::_Ph_1__const____int__wchar_t__.0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x44], 0
call fcn.00407e10
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x44], eax
test ecx, ecx
je 0x40588c
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
lea eax, [ebp - 0x38]
cmp ecx, eax
setne al
push eax
call edx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x40], 0
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], 0
call edi
cmp eax, 0x7a
jne 0x405924
mov eax, dword [ebp - 0xd4]
lea esi, [eax + eax]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp - 0x40]
mov byte [ebp - 4], 1
mov dword [ebp - 0x40], eax
test ecx, ecx
je 0x4058ee
mov dword [ebp - 0xe4], ecx
mov ecx, dword [ebp - 0x44]
test ecx, ecx
je 0x405c4d
mov eax, dword [ecx]
lea edx, [ebp - 0xe4]
push edx
call dword [eax + 8]
mov eax, dword [ebp - 0x40]
mov byte [ebp - 4], 0
test eax, eax
jne 0x405905
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor ebx, ebx
jmp 0x405bf0
lea ecx, [ebp - 0xd4]
push ecx
push eax
call sub.WINSPOOL.DRV_Ordinal_203
test eax, eax
jne 0x405924
call edi
cmp eax, 2
je 0x405924
xor ebx, ebx
jmp 0x405bf0
lea eax, [ebp - 0x100]
mov dword [ebp - 0xd8], 0
push eax
lea eax, [ebp - 0xd8]
mov dword [ebp - 0x100], 0x4104c8
push eax
mov dword [ebp - 0xf8], 2
mov dword [ebp - 0xf4], 0
mov dword [ebp - 0xf0], 2
call fcn.00401890
add esp, 8
mov dword [ebp - 0xe8], eax
lea eax, [ebp - 0xe8]
lea ecx, [ebp - 0x98]
push eax
call fcn.004011b0
mov eax, dword [ebp - 0x70]
mov byte [ebp - 4], 4
test eax, eax
je 0x4059fb
mov ecx, dword [ebp - 0xd8]
test ecx, ecx
je 0x4059fb
imul ecx, ecx, 0x54
mov esi, eax
mov dword [ebp - 0xcc], ecx
lea edi, [eax + ecx]
cmp esi, edi
je 0x4059d0
jmp 0x4059b0
push dword [ebx + 0x14]
push dword [esi + 0x10]
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
je 0x4059c7
add esi, 0x54
cmp esi, edi
jne 0x4059b0
mov eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0xcc]
test esi, esi
je 0x4059f5
add eax, ecx
cmp esi, eax
je 0x4059f5
push 0x70a
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [esi + 0x48]
shr ebx, 2
not ebx
and ebx, 1
jmp 0x405ba7
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x54
lea eax, [ebp - 0x154]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x405a06
mov dword [ebp - 0x12c], str.NT_EMF_1.006
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x144], eax
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x148], eax
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0x150], eax
lea eax, [ebp - 0x154]
push eax
push 2
push ecx
mov dword [ebp - 0x130], str.WinPrint
mov dword [ebp - 0x120], 0x41
call sub.WINSPOOL.DRV_AddPrinterW
mov esi, eax
test esi, esi
jne 0x405a77
call edi
cmp eax, 0x70a
jne 0x405a70
lea ebx, [esi + 1]
jmp 0x405ba7
xor ebx, ebx
jmp 0x405ba7
push sub.WINSPOOL.DRV_ClosePrinter
push esi
lea ecx, [ebp - 0xec]
call fcn.00401330
lea eax, [ebp - 0xe0]
mov byte [ebp - 4], 0xb
push eax
lea eax, [ebp - 0xdc]
mov dword [ebp - 0xdc], 1
push eax
push str.DefaultSpoolDirectory
push esi
mov dword [ebp - 0xe0], 0
call fcn.00404b20
add esp, 0x10
mov dword [ebp - 0xcc], eax
lea eax, [ebp - 0xcc]
lea ecx, [ebp - 0xc8]
push eax
call fcn.00401240
mov eax, dword [ebp - 0xa0]
test eax, eax
je 0x405b2b
cmp dword [ebp - 0xdc], 1
jne 0x405b2b
push dword [ebp - 0xe0]
lea ecx, [ebp - 0xcd]
push eax
push dword [ebx + 0x18]
call fcn.00402830
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
call edi
xor ebx, ebx
test eax, eax
sete bl
test eax, eax
jne 0x405b23
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x405b23
cmp word [eax], 0
je 0x405b23
push eax
call sub.WINSPOOL.DRV_Ordinal_204
mov eax, dword [ebp - 0xa0]
jmp 0x405b2d
xor ebx, ebx
mov byte [ebp - 4], 0xf
test eax, eax
je 0x405b55
mov ecx, dword [ebp - 0xa4]
mov dword [ebp - 0xcc], eax
test ecx, ecx
je 0x405c52
mov eax, dword [ecx]
lea edx, [ebp - 0xcc]
push edx
call dword [eax + 8]
mov ecx, dword [ebp - 0xa4]
test ecx, ecx
je 0x405b7c
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
lea eax, [ebp - 0xc8]
cmp ecx, eax
setne al
push eax
call edx
mov dword [ebp - 0xa4], 0
mov esi, dword [ebp - 0xe8]
test esi, esi
je 0x405ba7
or edi, 0xffffffff
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x405ba7
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], edi
dec edi
jne 0x405ba7
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov eax, dword [ebp - 0x70]
mov byte [ebp - 4], 0x10
test eax, eax
je 0x405bcf
mov ecx, dword [ebp - 0x74]
mov dword [ebp - 0xcc], eax
test ecx, ecx
je 0x405c57
mov eax, dword [ecx]
lea edx, [ebp - 0xcc]
push edx
call dword [eax + 8]
mov ecx, dword [ebp - 0x74]
test ecx, ecx
je 0x405bf0
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
lea eax, [ebp - 0x98]
cmp ecx, eax
setne al
push eax
call edx
mov dword [ebp - 0x74], 0
mov eax, dword [ebp - 0x40]
mov dword [ebp - 4], 0x11
test eax, eax
je 0x405c17
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0xcc], eax
test ecx, ecx
je 0x405c5c
mov eax, dword [ecx]
lea edx, [ebp - 0xcc]
push edx
call dword [eax + 8]
mov ecx, dword [ebp - 0x44]
test ecx, ecx
je 0x405c2f
mov esi, dword [ecx]
lea eax, [ebp - 0x68]
cmp ecx, eax
setne dl
movzx edx, dl
push edx
call dword [esi + 0x10]
mov eax, ebx
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 int.0041284a
mov esp, ebp
pop ebp
ret
call fcn.00412550
call fcn.00412550
call fcn.00412550
call fcn.00412550
int3