Function at 0x403360
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x440cde
mov eax, dword fs:[0]
push eax
sub esp, 0x138
mov eax, dword [0x453d50]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 4], 0
mov dword [ebp - 0x144], eax
mov ebx, ecx
mov dword [ebp - 0x140], 0
call fcn.0041657f
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4033c3
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x128], esi
mov dword [ebp - 4], 1
call fcn.0041657f
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4033f6
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x12c], eax
mov byte [ebp - 4], 2
call fcn.0041657f
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x403426
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x138], eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x134], 0
test ebx, ebx
je 0x40357d
lea esi, [ebp - 0x134]
mov ecx, ebx
call fcn.00402f80
cmp eax, 1
jne 0x403577
mov esi, dword [ebp - 0x134]
lea ecx, [ebp - 0x130]
push ecx
push 0
push 0
push 2
push 0
push esi
mov dword [ebp - 0x130], 0
call sub.WINSPOOL.DRV_GetPrinterDriverW
mov eax, dword [ebp - 0x130]
test eax, eax
je 0x403503
mov ebx, eax
call fcn.004020f0
mov ebx, eax
test ebx, ebx
je 0x403503
mov eax, dword [ebp - 0x130]
lea edx, [ebp - 0x130]
push edx
push eax
push ebx
push 2
push 0
push esi
call sub.WINSPOOL.DRV_GetPrinterDriverW
cmp eax, 1
jne 0x4034ef
mov esi, dword [ebx + 0x10]
test esi, esi
je 0x4034ef
lea eax, [ebp - 0x13c]
call fcn.00403160
push eax
lea ecx, [ebp - 0x128]
mov byte [ebp - 4], 4
call fcn.00401a40
lea ecx, [ebp - 0x13c]
mov byte [ebp - 4], 3
call fcn.004119a0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x403503
push ebx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0x128]
cmp dword [ecx - 0xc], 0
je 0x40356b
mov eax, dword [ebp - 0x134]
call fcn.00403080
mov esi, eax
test esi, esi
je 0x403540
push esi
lea ecx, [ebp - 0x12c]
call fcn.00401a60
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x403540
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
call fcn.00402fe0
mov esi, eax
test esi, esi
je 0x40356b
push esi
lea ecx, [ebp - 0x138]
call fcn.00401a60
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x40356b
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [ebp - 0x134]
push edx
call sub.WINSPOOL.DRV_ClosePrinter
mov esi, dword [ebp - 0x128]
call fcn.0041657f
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x403597
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
mov ebx, dword [ebp - 0x144]
add eax, 0x10
mov dword [ebx], eax
cmp dword [esi - 0xc], 0
mov dword [ebp - 0x140], 1
je 0x40367c
mov ecx, dword [ebp - 0x12c]
cmp dword [ecx - 0xc], 0
je 0x40367c
mov edx, dword [ebp - 0x138]
cmp dword [edx - 0xc], 0
je 0x40367c
push str.EBAPI.DLL
push esi
call fcn.00425239
add esp, 8
test eax, eax
je 0x40365c
push str.EBAPI2.DLL
push esi
call fcn.00425239
add esp, 8
test eax, eax
je 0x40365c
lea eax, [ebp - 0x128]
push eax
mov ecx, str.EBAPI3.DLL
call fcn.00401ab0
test eax, eax
je 0x40365c
push 0x114
lea ecx, [ebp - 0x124]
push 0
push ecx
call fcn.00428e00
add esp, 0xc
lea edx, [ebp - 0x124]
push edx
mov dword [ebp - 0x124], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp eax, 1
jne 0x40365c
cmp dword [ebp - 0x114], 2
jne 0x40365c
cmp dword [ebp - 0x120], 5
jae 0x403666
mov eax, dword [ebp - 0x138]
push esi
push eax
jmp 0x40366e
mov ecx, dword [ebp - 0x12c]
push esi
push ecx
push str._s_s
push ebx
call fcn.00403bc0
add esp, 0x10
mov edx, dword [ebx]
push edx
push str.EBAPI_Path___s__r_n
push 0x4582a0
call fcn.004024c0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x138]
add eax, 0xfffffff0
add esp, 0xc
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4036b7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x12c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4036dd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4036fd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00425035
mov esp, ebp
pop ebp
ret 4