Function at 0x1004ed00
Capabilities:
Check os version
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xfc
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push edi
xor eax, eax
mov ecx, 0x27
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x1c], 0x9c
call esi
mov ebx, eax
test ebx, ebx
jne 0x1004ed51
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x1c], 0x94
call esi
test eax, eax
jne 0x1004ed51
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x28]
sub eax, 0
je 0x1004ef86
dec eax
je 0x1004ef25
dec eax
jne 0x1004efcd
mov edx, dword [esp + 0x1c]
cmp edx, 4
ja 0x1004ed94
mov edi, 0x10096f80
dec edi
jmp 0x1004ed80
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1004ed80
mov ecx, 7
mov esi, str.Microsoft___Windows___NT
rep movsd dword es:[edi], dword [esi]
cmp edx, 5
jne 0x1004edb6
mov edi, 0x10096f80
dec edi
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1004eda0
mov ecx, 7
mov esi, str.Microsoft___Windows___2000
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
test ebx, ebx
je 0x1004ee1d
mov al, byte [esp + 0xb2]
cmp al, 1
jne 0x1004edff
mov edi, 0x10096f80
dec edi
jmp 0x1004edd0
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1004edd0
mov edx, dword [str.Professional]
mov eax, dword [0x10084f78]
mov ecx, dword [0x10084f7c]
mov dword [edi], edx
mov edx, dword [0x10084f80]
mov dword [edi + 4], eax
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
jmp 0x1004eef3
cmp al, 3
jne 0x1004eef3
mov edi, 0x10096f80
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1004ee10
jmp 0x1004eed8
lea eax, [esp + 0x10]
push eax
push 1
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0xbc]
push edx
push 0
push 0
push str.ProductType
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea edx, [esp + 0xb8]
push edx
push str.WINNT
call esi
test eax, eax
jne 0x1004eeb5
mov edi, 0x10096f80
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1004ee81
mov eax, dword [str.Workstation]
mov ecx, dword [0x10084f24]
mov edx, dword [0x10084f28]
mov dword [edi], eax
mov ax, word [0x10084f2c]
mov dword [edi + 4], ecx
mov cl, byte [0x10084f2e]
mov dword [edi + 8], edx
mov word [edi + 0xc], ax
mov byte [edi + 0xe], cl
lea edx, [esp + 0xb8]
push edx
push str.SERVERNT
call esi
test eax, eax
jne 0x1004eef3
mov edi, 0x10096f80
dec edi
mov edi, edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1004eed0
mov eax, dword [str.Server]
mov ecx, dword [0x10084f0c]
mov dx, word [0x10084f10]
mov dword [edi], eax
mov dword [edi + 4], ecx
mov word [edi + 8], dx
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
and eax, 0xffff
push eax
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x30]
push ecx
push edx
push eax
push str.version____d._d____s____Build____d__n
call fcn.1006b9ad
add esp, 0x14
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x1c]
cmp eax, 4
ja 0x1004ef60
jne 0x1004ef38
mov eax, dword [esp + 0x20]
test eax, eax
ja 0x1004ef60
mov edi, 0x10096f80
dec edi
mov edi, edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1004ef40
mov ecx, 7
mov esi, str.Microsoft___Windows___95
rep movsd dword es:[edi], dword [esi]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, 0x10096f80
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1004ef66
mov ecx, 7
mov esi, str.Microsoft___Windows___98
rep movsd dword es:[edi], dword [esi]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, 0x10096f80
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1004ef90
mov ecx, dword [str.Microsoft___Win32s]
mov edx, dword [0x10084e94]
mov eax, dword [0x10084e98]
mov dword [edi], ecx
mov ecx, dword [0x10084e9c]
mov dword [edi + 4], edx
mov edx, dword [0x10084ea0]
mov dword [edi + 8], eax
mov ax, word [0x10084ea4]
mov dword [edi + 0xc], ecx
mov dword [edi + 0x10], edx
mov word [edi + 0x14], ax
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret