Function at 0x4034c0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4425ce
mov eax, dword fs:[0]
push eax
sub esp, 0x138
mov eax, dword [0x454d50]
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.00417cef
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x403523
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.00417cef
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x403556
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.00417cef
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x403586
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 0x4036dd
lea esi, [ebp - 0x134]
mov ecx, ebx
call fcn.004030e0
cmp eax, 1
jne 0x4036d7
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 0x403663
mov ebx, eax
call fcn.00402250
mov ebx, eax
test ebx, ebx
je 0x403663
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 0x40364f
mov esi, dword [ebx + 0x10]
test esi, esi
je 0x40364f
lea eax, [ebp - 0x13c]
call fcn.004032c0
push eax
lea ecx, [ebp - 0x128]
mov byte [ebp - 4], 4
call fcn.00401ba0
lea ecx, [ebp - 0x13c]
mov byte [ebp - 4], 3
call fcn.00413210
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x403663
push ebx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0x128]
cmp dword [ecx - 0xc], 0
je 0x4036cb
mov eax, dword [ebp - 0x134]
call fcn.004031e0
mov esi, eax
test esi, esi
je 0x4036a0
push esi
lea ecx, [ebp - 0x12c]
call fcn.00401bc0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x4036a0
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
call fcn.00403140
mov esi, eax
test esi, esi
je 0x4036cb
push esi
lea ecx, [ebp - 0x138]
call fcn.00401bc0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x4036cb
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.00417cef
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4036f7
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 0x4037dc
mov ecx, dword [ebp - 0x12c]
cmp dword [ecx - 0xc], 0
je 0x4037dc
mov edx, dword [ebp - 0x138]
cmp dword [edx - 0xc], 0
je 0x4037dc
push str.EBAPI.DLL
push esi
call fcn.004269a6
add esp, 8
test eax, eax
je 0x4037bc
push str.EBAPI2.DLL
push esi
call fcn.004269a6
add esp, 8
test eax, eax
je 0x4037bc
lea eax, [ebp - 0x128]
push eax
mov ecx, str.EBAPI3.DLL
call fcn.00401c10
test eax, eax
je 0x4037bc
push 0x114
lea ecx, [ebp - 0x124]
push 0
push ecx
call fcn.0042a570
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 0x4037bc
cmp dword [ebp - 0x114], 2
jne 0x4037bc
cmp dword [ebp - 0x120], 5
jae 0x4037c6
mov eax, dword [ebp - 0x138]
push esi
push eax
jmp 0x4037ce
mov ecx, dword [ebp - 0x12c]
push esi
push ecx
push str._s_s
push ebx
call fcn.00403d20
add esp, 0x10
mov edx, dword [ebx]
push edx
push str.EBAPI_Path___s__r_n
push 0x4592c0
call fcn.00402620
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 0x403817
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 0x40383d
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 0x40385d
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.004267a2
mov esp, ebp
pop ebp
ret 4