Function at 0x406dd0
Capabilities:
Get system information on windows
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x283c
call fcn.00408940
mov eax, dword [0x40c024]
xor eax, esp
mov dword [esp + 0x2838], eax
push ebx
push esi
push edi
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], 0
push eax
mov edi, ecx
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ax, word [esp + 0x1c]
cmp ax, 9
je 0x406e24
cmp ax, 6
mov eax, 0x20019
jne 0x406e29
mov eax, 0x20119
lea ecx, [esp + 0x10]
push ecx
push eax
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstallB2FE1952_0186_46C3_BAEC_A80AA35AC5B8_Display.Driver
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x406e8d
cdq
push edx
push eax
push str.RegOpenKeyExW_failed__result:_lld
lea eax, [esp + 0x4c]
push 0x2800
push eax
call fcn.00404670
add esp, 0x14
lea eax, [esp + 0x40]
mov edx, 0x20c
mov ecx, str.nv::GetNvidiaDriverVersion
push eax
call fcn.00407570
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2838]
xor ecx, esp
call fcn.00407bd1
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [esp + 0x14]
push eax
push 0
lea eax, [esp + 0x20]
push eax
push 0
push str.DisplayVersion
push dword [esp + 0x24]
call esi
mov ebx, eax
test ebx, ebx
je 0x406f06
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
cdq
push edx
push eax
push str.RegQueryValueExW_failed__result:_lld
lea eax, [esp + 0x4c]
push 0x2800
push eax
call fcn.00404670
add esp, 0x14
lea eax, [esp + 0x40]
mov edx, 0x213
mov ecx, str.nv::GetNvidiaDriverVersion
push eax
call fcn.00407570
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2838]
xor ecx, esp
call fcn.00407bd1
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x18]
cmp eax, 1
je 0x406f5c
push eax
push str.RegQueryValueExW_value_is_not_a_string_dwType:_d
lea eax, [esp + 0x48]
push 0x2800
push eax
call fcn.00404670
lea eax, [esp + 0x50]
mov edx, 0x218
push eax
mov ecx, str.nv::GetNvidiaDriverVersion
call fcn.00407570
add esp, 0x14
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2838]
xor ecx, esp
call fcn.00407bd1
mov esp, ebp
pop ebp
ret
push dword [esp + 0x14]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov ebx, eax
lea eax, [esp + 0x14]
mov dword [esp + 0xc], ebx
push eax
push ebx
push 0
push 0
push str.DisplayVersion
push dword [esp + 0x24]
call esi
test eax, eax
je 0x406fda
cdq
push edx
push eax
push str.RegQueryValueExW_failed__result:_lld
lea eax, [esp + 0x4c]
push 0x2800
push eax
call fcn.00404670
add esp, 0x14
lea eax, [esp + 0x40]
mov edx, 0x221
mov ecx, str.nv::GetNvidiaDriverVersion
push eax
call fcn.00407570
add esp, 4
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2838]
xor ecx, esp
call fcn.00407bd1
mov esp, ebp
pop ebp
ret
mov ecx, ebx
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406fe0
mov eax, dword [edi + 0x14]
sub ecx, edx
sar ecx, 1
cmp ecx, eax
ja 0x40701f
mov ebx, edi
cmp eax, 8
jb 0x406fff
mov ebx, dword [edi]
lea esi, [ecx + ecx]
mov dword [edi + 0x10], ecx
push esi
push dword [esp + 0x10]
push ebx
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
xor eax, eax
mov word [esi + ebx], ax
mov ebx, dword [esp + 0xc]
jmp 0x407031
push ebx
mov byte [esp + 0x10], 0
push dword [esp + 0x10]
push ecx
mov ecx, edi
call fcn.004070e0
mov edx, edi
lea ecx, [esp + 0x1c]
call fcn.00407210
cmp dword [eax + 0x14], 0x10
jb 0x407044
mov eax, dword [eax]
push eax
push str.GetNvidiaDriverVersion__version:_s
lea eax, [esp + 0x48]
push 0x2800
push eax
call fcn.00404670
mov ecx, dword [esp + 0x40]
add esp, 0x10
cmp ecx, 0x10
jb 0x407094
mov edx, dword [esp + 0x1c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40708a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40708a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00407c0f
add esp, 8
lea eax, [esp + 0x40]
mov edx, 0x227
push eax
mov ecx, str.nv::GetNvidiaDriverVersion
call fcn.00407570
add esp, 4
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x2844]
mov al, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00407bd1
mov esp, ebp
pop ebp
ret