Function at 0x10016490
Capabilities:
Check os version

Disassembly:
sub esp, 0x3fc
push ebx
push ebp
push esi
push edi
xor edx, edx
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x4c]
mov dword [esp + 0x48], edx
mov dword [esp + 0x1c], edx
rep stosd dword es:[edi], eax
mov dword [esp + 0x20], edx
call fcn.1000c760
mov ebx, dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ebp, eax
lea eax, [esp + 0x6c]
mov dword [esp + 0x34], ebp
push eax
mov dword [esp + 0x70], 0x94
call ebx
mov esi, dword [esp + 0x70]
mov edi, dword [esp + 0x74]
shl esi, 0x10
lea ecx, [esp + 0x48]
or esi, edi
push ecx
mov dword [esp + 0x34], esi
call fcn.1000c7b0
mov eax, dword [esp + 0x80]
add esp, 4
cmp eax, 2
jne 0x10016a06
cmp esi, 0x50000
jbe 0x10016a06
test ebp, ebp
je 0x10016579
mov eax, dword [esp + 0x48]
and eax, 0xffff
cmp eax, 6
je 0x10016556
cmp eax, 9
je 0x10016533
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x3fc
ret
mov edx, dword [esp + 0x418]
lea eax, [esp + 0x20c]
push edx
push str._s.NTAMD64
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
jmp 0x10016617
mov ecx, dword [esp + 0x418]
lea edx, [esp + 0x20c]
push ecx
push str._s.NTIA64
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
jmp 0x10016617
mov eax, dword [esp + 0x418]
lea ecx, [esp + 0x20c]
push eax
push str._s.NTX86
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov esi, dword [esp + 0x41c]
mov edi, dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineA]
add esp, 0xc
lea edx, [esp + 0x38]
lea eax, [esp + 0x20c]
push edx
push 0
push eax
push esi
call edi
test eax, eax
jne 0x10016617
mov ecx, dword [esp + 0x418]
lea edx, [esp + 0x20c]
push ecx
push str._s.NT
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea eax, [esp + 0x38]
lea ecx, [esp + 0x20c]
push eax
push 0
push ecx
push esi
call edi
test eax, eax
jne 0x10016617
mov edi, dword [esp + 0x418]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x20c]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x6c]
mov dword [esp + 0x6c], 0x9c
push ecx
call ebx
mov eax, dword [esp + 0x106]
push 0
and eax, 0xff
lea edx, [esp + 0x310]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x108]
and eax, 0xffff
push 0x100
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x41c]
push edx
push 2
push eax
mov dword [esp + 0x38], 2
call dword [sym.imp.SETUPAPI.dll_SetupGetMultiSzFieldA]
test eax, eax
je 0x100169b1
jmp 0x1001667b
mov ebp, dword [esp + 0x34]
mov al, byte [esp + 0x30c]
test al, al
je 0x100169b1
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x10c]
lea edx, [esp + 0x10c]
rep stosd dword es:[edi], eax
lea edi, [esp + 0x30c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov al, byte [esp + 0x10c]
lea esi, [esp + 0x10c]
test al, al
je 0x10016725
mov ecx, dword [sym.imp.MSVCRT.dll___mb_cur_max]
cmp dword [ecx], 1
jle 0x100166f1
movsx edx, byte [esi]
push 2
push edx
call dword [sym.imp.MSVCRT.dll__isctype]
add esp, 8
jmp 0x10016702
mov ecx, dword [sym.imp.MSVCRT.dll__pctype]
movsx eax, byte [esi]
mov edx, dword [ecx]
mov al, byte [edx + eax*2]
and eax, 2
test eax, eax
je 0x10016715
movsx eax, byte [esi]
push eax
call dword [sym.imp.MSVCRT.dll_toupper]
add esp, 4
mov byte [esi], al
cmp byte [esi], 0x2e
jne 0x1001671d
mov byte [esi], 0
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x100166d5
test ebp, ebp
je 0x10016789
mov eax, dword [esp + 0x48]
cmp ax, 9
jne 0x10016759
mov edi, str.NTAMD64
lea esi, [esp + 0x10c]
mov ecx, 8
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x1001674f
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x10016982
jmp 0x100167cd
cmp ax, 6
jne 0x10016982
mov edi, str.NTIA64
lea esi, [esp + 0x10c]
mov ecx, 7
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x1001677f
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x10016982
jmp 0x100167cd
mov edi, 0x10041e70
lea esi, [esp + 0x10c]
mov ecx, 3
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x100167a5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x100167cd
mov edi, str.NTX86
lea esi, [esp + 0x10c]
mov ecx, 6
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x100167c5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x10016982
lea edi, [esp + 0x10c]
or ecx, 0xffffffff
xor eax, eax
xor ebx, ebx
xor ebp, ebp
mov dword [esp + 0x10], 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], ebp
mov al, byte [esp + ecx + 0x10d]
lea esi, [esp + ecx + 0x10d]
test al, al
je 0x10016907
push esi
call dword [sym.imp.MSVCRT.dll_atol]
mov ebx, eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
add esp, 4
mov ebp, 1
shl ebx, 0x10
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov al, byte [esi + ecx + 1]
lea esi, [esi + ecx + 1]
test al, al
je 0x10016907
push esi
call dword [sym.imp.MSVCRT.dll_atol]
or ebx, eax
add esp, 4
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
inc ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov al, byte [esi + ecx + 1]
lea esi, [esi + ecx + 1]
test al, al
je 0x10016907
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 2
jbe 0x10016893
push 2
push 0x10041e7c
push esi
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x10016893
lea ecx, [esp + 0x18]
push ecx
push 0x10041e80
jmp 0x1001689d
lea edx, [esp + 0x18]
push edx
push 0x10041e84
push esi
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0xc
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
inc ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov al, byte [esi + ecx + 1]
lea esi, [esi + ecx + 1]
test al, al
je 0x10016907
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 2
jbe 0x100168f2
push 2
push 0x10041e88
push esi
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x100168f2
lea eax, [esp + 0x14]
push eax
push 0x10041e8c
jmp 0x100168fc
lea ecx, [esp + 0x14]
push ecx
push 0x10041e90
push esi
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0xc
inc ebp
mov eax, dword [esp + 0x18]
test eax, eax
je 0x1001691e
mov ecx, dword [esp + 0x28]
xor edx, edx
cmp eax, ecx
sete dl
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x14]
test eax, eax
je 0x10016936
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x10016982
cmp eax, dword [esp + 0x2c]
je 0x1001693e
jmp 0x10016982
mov eax, dword [esp + 0x10]
test eax, eax
je 0x10016982
cmp ebx, dword [esp + 0x30]
ja 0x10016982
mov eax, dword [esp + 0x1c]
cmp ebx, eax
ja 0x10016954
jne 0x10016982
cmp ebp, dword [esp + 0x20]
jbe 0x10016982
mov ecx, dword [esp + 0x418]
lea eax, [esp + 0x30c]
push eax
push ecx
lea edx, [esp + 0x214]
push str._s._s
push edx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebp
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x414]
push 0
lea ecx, [esp + 0x310]
inc eax
push 0x100
push ecx
push eax
push edx
mov dword [esp + 0x38], eax
call dword [sym.imp.SETUPAPI.dll_SetupGetMultiSzFieldA]
test eax, eax
jne 0x10016677
mov edx, dword [esp + 0x410]
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x210]
push 0
push ecx
push edx
call dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineA]
test eax, eax
jne 0x100169dd
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3fc
ret
lea edi, [esp + 0x20c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x418]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3fc
ret