Function at 0x10177940
Capabilities:
Check os version
Get common file path
Get file version info
Query or enumerate registry value

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x101f0f26
push eax
mov eax, dword [0x1079cf70]
mov dword fs:[0], esp
sub esp, 0x1b8
push ebx
xor ebx, ebx
cmp eax, ebx
push ebp
jne 0x10177e8c
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push edi
mov ecx, 0x24
xor eax, eax
lea edi, [esp + 0x34]
mov dword [esp + 0x30], 0x94
mov dword [0x1079cf70], 1
rep stosd dword es:[edi], eax
lea eax, [esp + 0x30]
push eax
call esi
test eax, eax
je 0x10177a4d
lea ecx, [esp + 0x38]
lea edx, [esp + 0x34]
push ecx
push edx
call fcn.10177ed0
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x44]
mov dword [0x1079cf78], eax
mov eax, dword [esp + 0x48]
add esp, 8
cmp eax, 2
mov dword [0x1079cf74], ecx
mov dword [0x1079cf7c], edx
mov dword [0x1079cf80], eax
jne 0x10177a4d
cmp ecx, 4
jb 0x10177a4d
mov ecx, 0x26
xor eax, eax
lea edi, [esp + 0xc8]
mov dword [esp + 0xc4], 0x9c
rep stosd dword es:[edi], eax
lea eax, [esp + 0xc4]
push eax
call esi
test eax, eax
je 0x10177a4d
mov cx, word [esp + 0x158]
mov dx, word [esp + 0x15a]
mov ax, word [esp + 0x15e]
mov word [0x1079d004], cx
mov cx, word [esp + 0x15c]
mov word [0x1079d006], dx
mov byte [0x1079d00a], al
mov word [0x1079d008], cx
mov byte [0x1079d00b], ah
push 0x104
push 0x1079d00c
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, 0x1079d00c
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x10177ca8
mov edi, 0x1079d00c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x5c
mov edx, ecx
mov esi, edi
mov edi, 0x1079d110
push 0x1079d110
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.10033c42
add esp, 8
cmp eax, ebx
je 0x10177aaa
mov byte [eax], bl
mov edi, 0x1079d110
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x10177ca8
mov edi, 0x1079d110
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x5c
mov eax, ecx
mov esi, edi
mov edi, 0x1079d41c
push 0x1079d41c
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.10033c42
add esp, 8
cmp eax, ebx
je 0x10177af7
mov byte [eax], bl
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], ebx
push ecx
push 0x20019
push ebx
push 0x102664d4
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x10177be8
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x10177be8
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x14]
push ebx
push ecx
push ebx
push str.ProgramFilesDir
push eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], ebx
call esi
test eax, eax
mov edi, 0x103
jne 0x10177b8b
mov eax, dword [esp + 0x10]
cmp eax, 1
je 0x10177b6d
cmp eax, 2
je 0x10177b6d
cmp eax, 6
je 0x10177b6d
cmp eax, 7
jne 0x10177b8b
cmp dword [esp + 0x18], edi
ja 0x10177b8b
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x18]
push edx
push 0x1079d214
push ebx
push ebx
push str.ProgramFilesDir
push eax
call esi
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x14]
push ebx
push edx
push ebx
push 0x102664c0
push eax
call esi
test eax, eax
jne 0x10177bdd
mov eax, dword [esp + 0x10]
cmp eax, 1
je 0x10177bbf
cmp eax, 2
je 0x10177bbf
cmp eax, 6
je 0x10177bbf
cmp eax, 7
jne 0x10177bdd
cmp dword [esp + 0x18], edi
ja 0x10177bdd
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
push 0x1079d318
push ebx
push ebx
push 0x102664c0
push edx
call esi
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, 0x1079d214
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x10177c47
mov edi, 0x1079d41c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, 0x1079d214
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.Program_Files
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x1079d214
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x1079d318
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x10177ca8
mov edi, 0x1079d214
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x1079d318
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.Common_Files
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x1079d318
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor ebp, ebp
mov dword [esp + 0x14], ebp
mov eax, dword [0x1026a7a0]
mov dword [esp + 0x1d0], ebx
mov dword [esp + 0x20], eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x1d0], 1
push ecx
push 0x20019
push ebx
push str.SYSTEMCurrentControlSetControlNlsLanguage
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x24], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x10177d51
xor edx, edx
mov esi, dword [esp + 0x10]
mov dword [esp + 0x25], edx
lea eax, [esp + 0x1c]
mov dword [esp + 0x29], edx
lea ecx, [esp + 0x24]
mov word [esp + 0x2d], dx
push eax
lea edx, [esp + 0x14]
push ecx
push edx
push ebx
mov ebp, esi
push str.InstallLanguage
push esi
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x34], 0xa
mov byte [esp + 0x3c], bl
mov dword [esp + 0x28], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebx
jne 0x10177d40
lea eax, [esp + 0x24]
lea ecx, [esp + 0x20]
push eax
call fcn.101d2c95
cmp esi, ebx
je 0x10177d51
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebp, ebp
mov dword [esp + 0x14], ebp
mov eax, dword [esp + 0x20]
cmp dword [eax - 8], ebx
jle 0x10177d72
push 0x1079d520
push 0x1028c0e0
push eax
call fcn.10033968
add esp, 0xc
jmp 0x10177e6f
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xc5]
mov byte [esp + 0xc4], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x1079d00c
lea ecx, [esp + 0xc8]
push str._suser.exe
push ecx
stosb byte es:[edi], al
call fcn.1003399c
add esp, 0xc
lea edx, [esp + 0x18]
lea eax, [esp + 0xc4]
mov dword [esp + 0x18], ebx
push edx
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeA
push eax
mov dword [esp + 0x14], eax
call fcn.101d175d
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x10177e6f
mov ecx, dword [esp + 0x10]
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push esi
and ecx, 3
lea edx, [esp + 0xc8]
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
push edx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x10177e66
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1c]
push eax
push ecx
push str.VarFileInfoTranslation
push esi
mov dword [esp + 0x2c], ebx
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x10177e66
mov edx, dword [esp + 0x1c]
xor ecx, ecx
mov ax, word [edx]
mov word [0x1079d520], ax
mov edx, dword [0x1079d520]
mov eax, 0x1028c03a
mov di, word [eax + 2]
and edi, edx
cmp di, word [eax]
je 0x10177e54
add eax, 6
inc ecx
cmp eax, 0x1028c0d6
jb 0x10177e3c
jmp 0x10177e66
lea ecx, [ecx + ecx*2]
mov dx, word [ecx*2 + 0x1028c038]
mov word [0x1079d520], dx
push esi
call fcn.101d1786
add esp, 4
lea ecx, [esp + 0x20]
mov byte [esp + 0x1d0], bl
call fcn.101d2b0c
pop edi
cmp ebp, ebx
pop esi
je 0x10177e8c
push ebp
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x1c0]
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c4
ret