Function at 0x46e8ef
Capabilities:
Get common file path
Get system information on windows
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x46c]
sub esp, 0x4ec
mov eax, dword [0x4f4de0]
xor eax, ebp
mov dword [ebp + 0x468], eax
mov eax, dword [ebp + 0x474]
and dword [ebp - 0x40], 0
push ebx
mov ebx, dword [ebp + 0x47c]
push esi
push edi
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 0x478]
mov esi, 0x118
push esi
mov dword [ebp - 0x58], eax
lea eax, [ebp + 0xe4]
push 0
push eax
call fcn.00497680
push esi
lea eax, [ebp - 0x38]
push 0
lea edi, [esi + 4]
push eax
mov dword [ebp + 0xe0], edi
call fcn.00497680
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
add esp, 0x18
push str.RtlGetVersion
push str.ntdll.dll
mov dword [ebp - 0x3c], edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x46e9ef
lea ecx, [ebp - 0x3c]
push ecx
call eax
mov eax, dword [ebp - 0x38]
mov dword [ebp + 0xe4], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp + 0xe8], eax
mov al, byte [ebp + 0xde]
mov byte [ebp + 0x1fa], al
mov ax, word [ebp + 0xd8]
mov word [ebp + 0x1f4], ax
mov ax, word [ebp + 0xda]
mov word [ebp + 0x1f6], ax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp + 0xf4]
push 0x80
push eax
call fcn.00499978
mov eax, dword [ebp - 0x2c]
mov dword [ebp + 0xf0], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp + 0xec], eax
mov ax, word [ebp + 0xdc]
add esp, 0xc
mov word [ebp + 0x1f8], ax
jmp 0x46e9fc
lea eax, [ebp + 0xe0]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
and dword [ebp - 0x80], 0
push 8
pop ecx
push str.GetNativeSystemInfo
xor eax, eax
lea edi, [ebp - 0x7c]
push 0x4d6874
rep stosd dword es:[edi], eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
cmp eax, edi
je 0x46ea2b
lea ecx, [ebp - 0x80]
push ecx
call eax
jmp 0x46ea35
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov esi, dword [ebp + 0xe4]
movzx eax, word [ebp + 0x1f4]
imul esi, esi, 0xa
add esi, dword [ebp + 0xe8]
mov dword [ebx], eax
xor eax, eax
push 0x206
mov word [ebp + 0x1fc], ax
lea eax, [ebp + 0x1fe]
push edi
push eax
call fcn.00497680
add esp, 0xc
lea eax, [ebp + 0x1fc]
push eax
push edi
push edi
push 0x25
push edi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jl 0x46eb83
push str._ntoskrnl.exe
lea eax, [ebp + 0x1fc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
je 0x46eb83
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp + 0x1fc]
push eax
call fcn.0046df9a
pop ecx
pop ecx
test eax, eax
je 0x46eb83
mov eax, dword [ebp - 0x44]
movzx ecx, word [ebp - 0x44]
shr eax, 0x10
mov edx, eax
imul edx, edx, 0xa
add edx, ecx
cmp esi, edx
jge 0x46eb83
mov dword [ebp + 0xe8], ecx
push 0x4fc0d8
lea ecx, [ebp - 0x54]
mov dword [ebp + 0xe4], eax
mov dword [ebx], edi
call fcn.00418850
push str.Service_Pack
lea ecx, [ebp - 0x44]
call fcn.00404050
xor eax, eax
push 0x62
mov word [ebp + 0x404], ax
lea eax, [ebp + 0x406]
push edi
push eax
call fcn.00497680
add esp, 0xc
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp + 0x404]
push eax
lea eax, [ebp - 0x5c]
push eax
push 0x4c8bec
push 0x4c8b90
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x5c], 1
mov dword [ebp - 0x50], 0x64
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
mov edi, dword [ebp - 0x54]
mov esi, dword [ebp - 0x44]
test eax, eax
jne 0x46eb71
push dword [esi - 0xc]
push esi
push edi
call fcn.004998d2
add esp, 0xc
test eax, eax
jne 0x46eb71
mov eax, dword [esi - 0xc]
lea eax, [edi + eax*2]
push eax
call fcn.004997dd
pop ecx
mov dword [ebx], eax
lea ecx, [esi - 0x10]
call fcn.00404d30
lea ecx, [edi - 0x10]
call fcn.00404d30
xor edi, edi
mov ecx, dword [ebp + 0xe4]
mov eax, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x58]
push 5
mov dword [eax], ecx
mov eax, dword [ebp + 0xe8]
pop esi
mov dword [edx], eax
cmp ecx, esi
jne 0x46ebf0
cmp eax, edi
jne 0x46ebb0
mov dword [ebp - 0x40], 1
jmp 0x46eca4
cmp eax, 1
jne 0x46ebc1
mov dword [ebp - 0x40], 2
jmp 0x46eca4
push 2
pop ecx
cmp eax, ecx
jne 0x46eca4
cmp byte [ebp + 0x1fa], 1
jne 0x46ebe4
cmp word [ebp - 0x80], 9
jne 0x46ebe4
mov dword [ebp - 0x40], ecx
jmp 0x46eca4
mov dword [ebp - 0x40], 4
jmp 0x46eca4
push 6
pop edx
cmp ecx, edx
jne 0x46ec8d
cmp eax, edi
jne 0x46ec23
push 3
pop eax
cmp byte [ebp + 0x1fa], al
je 0x46eca1
cmp byte [ebp + 0x1fa], 2
je 0x46eca1
mov dword [ebp - 0x40], eax
jmp 0x46eca4
cmp eax, 1
jne 0x46ec48
cmp byte [ebp + 0x1fa], 3
je 0x46ec3f
cmp byte [ebp + 0x1fa], 2
je 0x46ec3f
mov dword [ebp - 0x40], esi
jmp 0x46eca4
mov dword [ebp - 0x40], 7
jmp 0x46eca4
cmp eax, 2
jne 0x46ec5f
cmp byte [ebp + 0x1fa], 1
jne 0x46eca4
mov dword [ebp - 0x40], 8
jmp 0x46eca4
cmp eax, 3
jne 0x46ec76
cmp byte [ebp + 0x1fa], 1
jne 0x46eca4
mov dword [ebp - 0x40], 9
jmp 0x46eca4
cmp eax, 4
jne 0x46eca4
cmp byte [ebp + 0x1fa], 1
jne 0x46eca4
mov dword [ebp - 0x40], 0xa
jmp 0x46eca4
push 0xa
pop edx
cmp ecx, edx
jne 0x46eca4
cmp eax, edi
jne 0x46eca4
cmp byte [ebp + 0x1fa], 1
jne 0x46eca4
mov dword [ebp - 0x40], edx
test byte [ebp + 0x1f8], 0x40
je 0x46ecb0
mov dword [ebp - 0x40], edi
mov ecx, dword [ebp + 0x468]
mov eax, dword [ebp - 0x40]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00497941
add ebp, 0x46c
leave
ret