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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xcc
mov eax, dword [0x1053d10]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x90
xor esi, esi
lea eax, [ebp - 0x94]
mov edi, ecx
push esi
push eax
mov dword [ebp - 0xc4], edi
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x98]
push eax
mov dword [ebp - 0xc0], esi
mov dword [ebp - 0xb4], esi
mov dword [ebp - 0xbc], esi
mov dword [ebp - 0xa4], esi
mov dword [ebp - 0xb0], esi
mov dword [ebp - 0xac], esi
mov dword [ebp - 0xa8], esi
mov dword [ebp - 0xa0], esi
mov dword [ebp - 0x9c], esi
mov dword [ebp - 0xb8], esi
mov dword [ebp - 0x98], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x94], 4
ja 0x1042958
lea eax, [ebp - 0xa8]
push eax
push 0x20019
push esi
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinlogon
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1042991
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0xa0]
push eax
push esi
push esi
push esi
mov edi, str.CachePrimaryDomain
push edi
push dword [ebp - 0xa8]
call ebx
test eax, eax
jne 0x1042991
mov eax, dword [ebp - 0xa0]
cmp eax, esi
jbe 0x1042991
lea eax, [eax + eax + 2]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, esi
mov dword [ebp - 0xb4], eax
je 0x1042d9f
lea eax, [ebp - 0xa0]
push eax
push dword [ebp - 0xb4]
push esi
push esi
push edi
push dword [ebp - 0xa8]
call ebx
test eax, eax
jne 0x1042991
mov eax, dword [ebp - 0xb4]
cmp word [eax], si
je 0x1042991
jmp 0x104298b
mov eax, dword [edi + 0x24]
cmp eax, esi
jne 0x1042966
xor eax, eax
jmp 0x1042dfc
lea ecx, [ebp - 0xcc]
push ecx
push SysReAllocStringLen
push esi
push esi
push esi
push esi
mov dword [ebp - 0xcc], esi
call eax
test eax, eax
jne 0x1042991
mov eax, dword [ebp - 0xcc]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0xa4], eax
mov eax, dword [ebp - 0xc4]
mov eax, dword [eax + 0x20]
cmp eax, esi
je 0x1042a4d
lea ecx, [ebp - 0xc8]
push ecx
push 0x64
push esi
mov dword [ebp - 0xc8], esi
call eax
test eax, eax
jne 0x1042a4d
mov eax, dword [ebp - 0xc8]
cmp eax, esi
je 0x1042a4d
mov ebx, dword [eax + 8]
cmp ebx, esi
je 0x10429e6
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x10429d6
sub eax, edx
sar eax, 1
jmp 0x10429e8
xor eax, eax
cmp eax, esi
je 0x1042a38
lea edi, [eax + 1]
push 2
mov eax, edi
pop ecx
mul ecx
cmp edx, esi
ja 0x1042d9f
jb 0x1042a09
cmp eax, 0xffffffff
ja 0x1042d9f
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, esi
mov dword [ebp - 0xbc], eax
je 0x1042d9f
push ebx
push edi
push eax
call fcn.01018462
test eax, eax
jl 0x1042a38
mov eax, dword [ebp - 0xbc]
mov dword [ebp - 0xa4], eax
mov eax, dword [ebp - 0xc4]
mov eax, dword [eax + 0x18]
cmp eax, esi
je 0x1042a4d
push dword [ebp - 0xc8]
call eax
mov eax, dword [ebp - 0xb4]
cmp eax, esi
je 0x1042a9f
cmp word [eax], si
je 0x1042a9f
mov ecx, dword [ebp - 0xbc]
cmp ecx, esi
je 0x1042a9f
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1042a8c
cmp dx, si
je 0x1042a88
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1042a8c
add eax, 4
add ecx, 4
cmp dx, si
jne 0x1042a66
xor eax, eax
jmp 0x1042a91
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, esi
jne 0x1042a9f
mov dword [ebp - 0xb8], 1
mov ebx, dword [ebp - 0xa4]
cmp ebx, esi
je 0x1042ac4
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x1042aae
sub eax, edx
sar eax, 1
mov dword [ebp - 0xa0], eax
jmp 0x1042aca
mov dword [ebp - 0xa0], esi
cmp dword [ebp - 0xa0], esi
jbe 0x1042d9f
cmp dword [ebp - 0xb8], esi
je 0x1042c45
cmp dword [ebp - 0xa8], esi
je 0x1042c45
cmp dword [ebp - 0x94], 4
jae 0x1042b91
lea eax, [ebp - 0x9c]
push eax
push esi
push esi
push esi
push str.CacheTrustedDomains
push dword [ebp - 0xa8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1042d9f
mov eax, dword [ebp - 0xa0]
mov ecx, dword [ebp - 0x9c]
add ecx, eax
lea eax, [ecx + ecx + 4]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, esi
mov dword [ebp - 0xb0], eax
je 0x1042d9f
mov eax, dword [ebp - 0xa0]
mov ecx, dword [ebp - 0x9c]
push ebx
lea eax, [ecx + eax + 2]
push eax
push dword [ebp - 0xb0]
call fcn.01018462
test eax, eax
jl 0x1042d9f
mov ecx, dword [ebp - 0xb0]
mov eax, ecx
lea edi, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, si
jne 0x1042b77
sub eax, edi
sar eax, 1
lea eax, [ecx + eax*2 + 2]
mov word [eax], si
jmp 0x1042d9f
jne 0x1042c45
lea eax, [ebp - 0x9c]
push eax
push esi
push esi
push esi
mov edi, str.DCache
push edi
push dword [ebp - 0xa8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1042d9f
mov eax, dword [ebp - 0xa0]
mov ecx, dword [ebp - 0x9c]
add ecx, eax
lea eax, [ecx + ecx + 4]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, esi
mov dword [ebp - 0xb0], eax
je 0x1042d9f
mov eax, dword [ebp - 0xa0]
mov ecx, dword [ebp - 0x9c]
push ebx
lea eax, [ecx + eax + 2]
push eax
push dword [ebp - 0xb0]
call fcn.01018462
test eax, eax
jl 0x1042d9f
mov ecx, dword [ebp - 0xb0]
mov eax, ecx
lea ebx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, si
jne 0x1042c14
sub eax, ebx
sar eax, 1
lea eax, [ecx + eax*2 + 2]
lea ecx, [ebp - 0x9c]
push ecx
push eax
push esi
push esi
push edi
mov word [eax], si
push dword [ebp - 0xa8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
jmp 0x1042d9f
cmp dword [ebp - 0x94], 5
jb 0x1042d9f
mov eax, dword [ebp - 0xc4]
mov eax, dword [eax + 0x28]
cmp eax, esi
je 0x1042d9f
mov ecx, dword [ebp - 0xc4]
cmp dword [ecx + 0x18], esi
je 0x1042d9f
lea ecx, [ebp - 0xb8]
push ecx
lea ecx, [ebp - 0xc0]
push ecx
push 2
push esi
mov dword [ebp - 0x9c], esi
call eax
test eax, eax
jne 0x1042cc8
mov ebx, dword [ebp - 0xb8]
cmp ebx, esi
jbe 0x1042cc8
mov ecx, dword [ebp - 0xc0]
mov eax, dword [ecx]
lea edi, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, si
jne 0x1042ca4
mov edx, dword [ebp - 0x9c]
sub eax, edi
sar eax, 1
lea eax, [edx + eax + 1]
add ecx, 0x2c
dec ebx
mov dword [ebp - 0x9c], eax
jne 0x1042c9f
mov eax, dword [ebp - 0xa0]
mov ecx, dword [ebp - 0x9c]
add ecx, eax
lea eax, [ecx + ecx + 4]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, esi
mov dword [ebp - 0xb0], eax
je 0x1042d9f
mov ecx, dword [ebp - 0x9c]
push esi
lea eax, [ebp - 0xa4]
push eax
lea eax, [ebp - 0xac]
push eax
push dword [ebp - 0xa4]
mov eax, dword [ebp - 0xa0]
lea eax, [ecx + eax + 2]
push eax
push dword [ebp - 0xb0]
call fcn.01042382
test eax, eax
jl 0x1042d9f
add dword [ebp - 0xac], 2
mov eax, dword [ebp - 0xac]
dec dword [ebp - 0xa4]
mov word [eax], si
cmp dword [ebp - 0x9c], esi
je 0x1042d9f
xor edi, edi
cmp dword [ebp - 0xb8], esi
jbe 0x1042d9f
xor ebx, ebx
push esi
lea eax, [ebp - 0xa4]
push eax
lea eax, [ebp - 0xac]
push eax
mov eax, dword [ebp - 0xc0]
push dword [ebx + eax]
push dword [ebp - 0xa4]
push dword [ebp - 0xac]
call fcn.01042382
test eax, eax
jl 0x1042d9f
add dword [ebp - 0xac], 2
dec dword [ebp - 0xa4]
mov eax, dword [ebp - 0xac]
inc edi
mov word [eax], si
add ebx, 0x2c
cmp edi, dword [ebp - 0xb8]
jb 0x1042d50
cmp dword [ebp - 0xa8], esi
je 0x1042db3
push dword [ebp - 0xa8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0xb4], esi
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
je 0x1042dc9
push dword [ebp - 0xb4]
call edi
cmp dword [ebp - 0xbc], esi
je 0x1042dd9
push dword [ebp - 0xbc]
call edi
cmp dword [ebp - 0xc0], esi
je 0x1042df6
mov eax, dword [ebp - 0xc4]
mov eax, dword [eax + 0x18]
cmp eax, esi
je 0x1042df6
push dword [ebp - 0xc0]
call eax
mov eax, dword [ebp - 0xb0]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01035675
leave
ret