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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x220
mov eax, dword [0x100a60a4]
xor eax, ebp
mov dword [ebp - 4], eax
sub edx, 0
je 0x1004a5cf
sub edx, 1
jne 0x1004a607
push esi
push ecx
mov ecx, dword [0x100a6064]
call fcn.1000bf40
test eax, eax
js 0x1004a39e
mov eax, dword [0x100a6064]
mov dword [0x100a608c], eax
lea eax, [ebp - 0x218]
push eax
mov byte [0x100a6060], 1
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov esi, dword [ebp - 0x218]
mov eax, esi
mov edx, dword [ebp - 0x214]
mov ecx, edx
shld ecx, eax, 1
mov dword [0x100a6068], esi
add eax, eax
mov dword [0x100a606c], edx
add esi, eax
adc edx, ecx
shld edx, esi, 1
add esi, esi
mov dword [0x100a607c], edx
mov dword [0x100a6078], esi
call fcn.1004a620
lea eax, [ebp - 0x210]
mov dword [0x100a8f2c], 0
push eax
push 0x10004090
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x1004a433
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x21c], 4
push eax
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x220]
push eax
push 0
push 0x1000ae64
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x1004a427
cmp dword [ebp - 0x220], 4
jne 0x1004a427
cmp dword [ebp - 0x214], eax
je 0x1004a427
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [0x100a70c0], 0
jmp 0x1004a454
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x100a70c0]
test eax, eax
jns 0x1004a44b
push 3
call dword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
mov dword [0x100a70c0], eax
test eax, eax
je 0x1004a454
or dword [0x100a8f2c], 1
push 0x98
lea eax, [ebp - 0x9c]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0xa0], 0x9c
lea eax, [ebp - 0xa0]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x1004a4bd
cmp dword [ebp - 0x90], 2
jne 0x1004a4bd
cmp dword [ebp - 0x9c], 5
jne 0x1004a4c7
cmp dword [ebp - 0x98], 0
jne 0x1004a4c7
cmp word [ebp - 0xc], 0
mov dword [0x100a70bc], 0
je 0x1004a4c7
mov dword [0x100a92f4], 1
jmp 0x1004a4c7
mov dword [0x100a70bc], 0
push 0x104
lea eax, [ebp - 0x108]
push 0
push eax
call sub.msvcrt.dll_memset
push 0x104
lea eax, [ebp - 0x20c]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0x18
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x104
lea ecx, [ebp - 0x108]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x108]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1004a514
sub ecx, edx
lea eax, [ecx - 1]
test eax, eax
js 0x1004a533
cmp byte [ebp + eax - 0x108], 0x5c
je 0x1004a533
sub eax, 1
jns 0x1004a524
lea ecx, [ebp - 0x20c]
mov edx, 0x104
mov esi, ecx
sub eax, esi
lea esi, [ebp - 0x107]
add esi, eax
lea ebx, [ebx]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x1004a56b
mov al, byte [esi + ecx]
test al, al
je 0x1004a56b
mov byte [ecx], al
inc ecx
sub edx, 1
jne 0x1004a550
jmp 0x1004a56f
test edx, edx
jne 0x1004a570
dec ecx
lea eax, [ebp - 0x210]
mov byte [ecx], 0
push eax
push 0x1000ae70
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
pop esi
test eax, eax
jne 0x1004a607
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1004a598
sub ecx, edx
lea eax, [ecx + 1]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push 0
push 0x1000aea4
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1004a607
mov ecx, dword [0x100a6064]
mov eax, dword [ecx + 0x1c]
mov edx, dword [ecx + 0x18]
push eax
push edx
mov dword [ecx], 0
mov dword [ecx + 0x18], 0
mov dword [ecx + 0x1c], 0
call dword [sym.imp.ADVAPI32.dll_EventUnregister]
mov eax, dword [0x100a92f8]
test eax, eax
je 0x1004a607
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 4]
mov eax, 1
xor ecx, ebp
call fcn.1009ebb0
mov esp, ebp
pop ebp
ret 4