Function at 0x4026d6
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x8cc
mov eax, dword [0x40b818]
and byte [ebp + 0x77], 0
push ebx
xor bl, bl
cmp byte [eax], bl
push esi
push edi
je 0x402753
movzx esi, bl
movsx eax, byte [esi + eax]
push eax
call fcn.00403480
test eax, eax
pop ecx
jne 0x402732
mov eax, dword [0x40b818]
movsx eax, byte [esi + eax]
push eax
call fcn.004034ae
test eax, eax
pop ecx
jne 0x402732
mov eax, dword [0x40b818]
mov cl, byte [esi + eax]
cmp cl, 0x20
je 0x402737
cmp cl, 0x5f
je 0x402737
cmp cl, 0x2d
je 0x402737
jmp 0x402748
mov eax, dword [0x40b818]
movzx ecx, byte [ebp + 0x77]
mov dl, byte [esi + eax]
inc byte [ebp + 0x77]
mov byte [ebp + ecx - 0x254], dl
inc bl
movzx ecx, bl
cmp byte [ecx + eax], 0
jne 0x4026f3
movzx eax, byte [ebp + 0x77]
and byte [ebp + eax - 0x254], 0
mov eax, dword [0x40b820]
and byte [ebp + 0x77], 0
xor bl, bl
cmp byte [eax], bl
je 0x4027cb
movzx esi, bl
movsx eax, byte [esi + eax]
push eax
call fcn.00403480
test eax, eax
pop ecx
jne 0x4027ad
mov eax, dword [0x40b820]
movsx eax, byte [esi + eax]
push eax
call fcn.004034ae
test eax, eax
pop ecx
jne 0x4027ad
mov eax, dword [0x40b820]
mov cl, byte [esi + eax]
cmp cl, 0x20
je 0x4027b2
cmp cl, 0x5f
je 0x4027b2
cmp cl, 0x2d
je 0x4027b2
jmp 0x4027c0
mov eax, dword [0x40b820]
movzx ecx, byte [ebp + 0x77]
mov dl, byte [esi + eax]
inc byte [ebp + 0x77]
mov byte [ebp + ecx + 0x40], dl
inc bl
movzx ecx, bl
cmp byte [ecx + eax], 0
jne 0x40276e
movzx eax, byte [ebp + 0x77]
and byte [ebp + eax + 0x40], 0
cmp word [0x40b808], 1
lea eax, [ebp - 0x254]
mov esi, 0x40da08
mov edi, 0x40db90
push eax
jne 0x402800
push edi
push str._s_on__s
push esi
call fcn.00402ede
add esp, 0x10
jmp 0x402813
lea eax, [ebp + 0x40]
push eax
push edi
push str._s_on__s___s_
push esi
call fcn.00402ede
add esp, 0x14
push esi
lea eax, [ebp - 0x654]
push str.rundll32_printui.dll_PrintUIEntry__dl__q__n___s_
push eax
call fcn.00402ede
lea eax, [ebp - 0x654]
push eax
call fcn.00402255
add esp, 0x10
test eax, eax
jne 0x402842
push 0x7d8
jmp 0x40294e
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x40d9c8
push 0x40da88
push edi
push esi
lea eax, [ebp - 0x654]
push str.rundll32_printui.dll_PrintUIEntry__if__u__b___s___m___s___f___s___r__s_
push eax
call fcn.00402ede
lea eax, [ebp - 0x654]
push eax
call fcn.00402255
add esp, 0x1c
test eax, eax
je 0x402838
push 0x200
lea eax, [ebp - 0x854]
push eax
movzx eax, word [0x40b834]
add eax, 0xbc3
push eax
push dword [0x40b814]
call dword [sym.imp.USER32.dll_LoadStringA]
push 0x24
push dword [0x40b82c]
lea eax, [ebp - 0x854]
push eax
push dword [0x40b830]
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
jne 0x4028eb
push esi
lea eax, [ebp - 0x654]
push str.rundll32_printui.dll_PrintUIEntry__y__n___s_
push eax
call fcn.00402ede
lea eax, [ebp - 0x654]
push eax
call fcn.00402255
add esp, 0x10
test eax, eax
je 0x402838
lea eax, [ebp - 0x54]
push eax
mov dword [ebp - 0x54], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x4029cd
push 2
pop ebx
cmp dword [ebp - 0x44], ebx
jne 0x4029cd
cmp dword [ebp - 0x50], 6
jb 0x4029cd
or dword [ebp + 0x6c], 0xffffffff
lea eax, [ebp + 0x60]
push eax
lea eax, [ebp + 0x6c]
push eax
xor edi, edi
push esi
mov dword [0x40b838], 1
mov dword [ebp + 0x60], edi
mov dword [ebp + 0x64], edi
mov dword [ebp + 0x68], 0xf000c
call sub.WINSPOOL.DRV_OpenPrinterA
test eax, eax
jne 0x402958
push 0x7d6
call fcn.0040104c
pop ecx
xor eax, eax
jmp 0x4029d0
lea eax, [ebp + 0x70]
push eax
push edi
push edi
push ebx
push dword [ebp + 0x6c]
mov dword [ebp + 0x70], edi
call sub.WINSPOOL.DRV_GetPrinterA
test eax, eax
jne 0x402979
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4029c1
cmp dword [ebp + 0x70], edi
je 0x4029c1
push dword [ebp + 0x70]
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
cmp esi, edi
je 0x4029c1
lea eax, [ebp + 0x70]
push eax
push dword [ebp + 0x70]
push esi
push ebx
push dword [ebp + 0x6c]
call sub.WINSPOOL.DRV_GetPrinterA
test eax, eax
je 0x4029ba
or byte [esi + 0x35], 0x10
push edi
push esi
push ebx
push dword [ebp + 0x6c]
call sub.WINSPOOL.DRV_SetPrinterA
test eax, eax
je 0x4029ba
xor edi, edi
inc edi
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push dword [ebp + 0x6c]
call sub.WINSPOOL.DRV_ClosePrinter
mov eax, edi
jmp 0x4029d0
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
add ebp, 0x78
leave
ret