Function at 0x1004a790
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 [0x100a70b4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
sub edx, 0
je 0x1004aa57
sub edx, 1
jne 0x1004aa8d
push ecx
mov ecx, dword [0x100a706c]
call fcn.1000bf40
add esp, 4
test eax, eax
js 0x1004a821
mov eax, dword [0x100a706c]
mov dword [0x100a7094], eax
lea eax, [ebp - 0x218]
push eax
mov byte [0x100a7068], 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 [0x100a7070], esi
add eax, eax
mov dword [0x100a7074], edx
add esi, eax
adc edx, ecx
shld edx, esi, 1
add esi, esi
mov dword [0x100a7084], edx
mov dword [0x100a7080], esi
call fcn.1004aab0
lea eax, [ebp - 0x210]
mov dword [0x100a9eec], 0
push eax
push 0x100040c0
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x1004a8b6
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 0x1000ade4
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x1004a8aa
cmp dword [ebp - 0x220], 4
jne 0x1004a8aa
cmp dword [ebp - 0x214], eax
je 0x1004a8aa
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [0x100a80d0], 0
jmp 0x1004a8d7
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x100a80d0]
test eax, eax
jns 0x1004a8ce
push 3
call dword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
mov dword [0x100a80d0], eax
test eax, eax
je 0x1004a8d7
or dword [0x100a9eec], 1
push 0x9c
lea eax, [ebp - 0xa0]
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 0x1004a940
cmp dword [ebp - 0x90], 2
jne 0x1004a940
cmp dword [ebp - 0x9c], 5
jne 0x1004a94a
cmp dword [ebp - 0x98], 0
jne 0x1004a94a
cmp word [ebp - 0xc], 0
mov dword [0x100a80cc], 0
je 0x1004a94a
mov dword [0x100aa2b4], 1
jmp 0x1004a94a
mov dword [0x100a80cc], 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 0x1004a997
sub ecx, edx
lea eax, [ecx - 1]
test eax, eax
js 0x1004a9bf
jmp 0x1004a9b0
cmp byte [ebp + eax - 0x108], 0x5c
je 0x1004a9bf
sub eax, 1
jns 0x1004a9b0
lea ecx, [ebp - 0x20c]
mov edx, 0x104
mov esi, ecx
sub eax, esi
lea esi, [ebp - 0x107]
add esi, eax
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x1004a9f1
mov al, byte [esi + ecx]
test al, al
je 0x1004a9f1
mov byte [ecx], al
inc ecx
sub edx, 1
jne 0x1004a9d6
jmp 0x1004a9f5
test edx, edx
jne 0x1004a9f6
dec ecx
lea eax, [ebp - 0x210]
mov byte [ecx], 0
push eax
push 0x1000adf0
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x1004aa8d
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1004aa20
sub ecx, edx
lea eax, [ecx + 1]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push 0
push 0x1000ae24
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1004aa8d
mov esi, dword [0x100a706c]
push dword [esi + 0x1c]
push dword [esi + 0x18]
call dword [sym.imp.ADVAPI32.dll_EventUnregister]
mov eax, dword [0x100aa2b8]
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi], 0
test eax, eax
je 0x1004aa8d
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 4]
mov eax, 1
xor ecx, ebp
pop esi
call fcn.1009fbf0
mov esp, ebp
pop ebp
ret 4