Function at 0x414af0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x524
mov eax, dword [0x5d7b20]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
push edi
mov edi, dword [ebp + 0xc]
push eax
mov dword [ebp - 0x520], ebx
mov dword [ebp - 0x51c], eax
mov dword [ebp - 0x524], eax
call esi
lea eax, [ebp - 0x518]
push eax
mov dword [ebp - 0x518], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [ebp - 0x508]
cmp eax, 1
jne 0x414c55
push 0
call esi
lea ecx, [ebp - 0x524]
push ecx
lea edx, [ebp - 0x51c]
push edx
push 0
push 0
push 2
push 0
push 1
call sub.WINSPOOL.DRV_EnumPrintersW
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x414bcc
mov eax, dword [ebp - 0x51c]
test eax, eax
je 0x414bcc
push 0x167f
push str.DevConFunc.cpp
push eax
call fcn.0043e4e0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x414bcc
mov edx, dword [ebp - 0x51c]
lea eax, [ebp - 0x524]
push eax
lea ecx, [ebp - 0x51c]
push ecx
push edx
push esi
push 2
push 0
push 1
call sub.WINSPOOL.DRV_EnumPrintersW
test eax, eax
jne 0x414bdf
push esi
call fcn.0043e500
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
call ebx
cmp eax, dword [edi]
jb 0x414c1c
mov ecx, dword [esi + 4]
push ecx
call ebx
inc eax
push esi
mov dword [edi], eax
call fcn.0043e500
add esp, 4
push 0x7a
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 4]
mov eax, dword [ebp - 0x520]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov ecx, dword [esi + 4]
push ecx
call ebx
inc eax
push esi
mov dword [edi], eax
call fcn.0043e500
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x414c3f
cmp dword [ebp - 0x514], 5
jb 0x414cc6
push str.winspool.drv
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
je 0x414bcc
push str.GetDefaultPrinterW
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x414ca2
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
push edi
push ebx
call eax
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test edi, edi
jne 0x414c3f
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
push 0x200
lea edx, [ebp - 0x404]
push edx
push 0x56e4f8
push str.device
push str.windows
call dword [sym.imp.KERNEL32.dll_GetProfileStringW]
test eax, eax
je 0x414bcc
lea eax, [ebp - 0x520]
push eax
lea ecx, [ebp - 0x404]
push 0x56b914
push ecx
mov dword [ebp - 0x520], 0
call fcn.0053fdc5
add esp, 0xc
lea edx, [ebp - 0x404]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, dword [edi]
jb 0x414d4c
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
push 0x7a
mov dword [edi], eax
call esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x404]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea edx, [ebp - 0x404]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
mov dword [edi], eax
jmp 0x414c3f