Function at 0x4100a0
Capabilities:
Get file version info
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x4363b2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1d0
mov eax, dword [0x4540d0]
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x24], esi
mov dword [esp + 0x30], eax
mov ecx, dword [esp + 0x1f0]
xor ebp, ebp
mov dword [esp + 0x1e8], ebp
mov dword [esp + 0x38], ebp
mov eax, dword [ecx + 8]
cmp eax, ebp
jle 0x410532
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0x1f0]
mov eax, dword [edx + 4]
lea edx, [esp + 0x34]
lea ecx, [eax + ebp*4]
push ecx
push str.Enum_
push edx
call fcn.0042bb13
mov ecx, dword [esp + 0x34]
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [esp + 0x28]
mov byte [esp + 0x1e8], 1
push eax
push 1
push 0
push ecx
push reloc.WSOCK32.dll_bind
call edi
test eax, eax
jne 0x41050c
lea edx, [esp + 0x10]
lea eax, [esp + 0xe0]
push edx
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x20]
push eax
push ecx
push 0
mov esi, 0x100
push str.Class
push edx
mov dword [esp + 0x28], esi
call ebx
test eax, eax
jne 0x4104fd
lea eax, [esp + 0xe0]
lea ecx, [esp + 0x30]
push eax
call fcn.0042b993
mov ecx, dword [esp + 0x30]
push str.DISPLAY
push ecx
call fcn.00416a17
add esp, 8
test eax, eax
jne 0x4104fd
mov edx, dword [0x4540d0]
mov dword [esp + 0x2c], edx
mov ebp, dword [esp + 0x24]
mov byte [esp + 0x1e8], 2
mov dword [esp + 0x10], esi
mov edx, dword [ebp + 0x2f0]
inc edx
mov eax, edx
mov dword [ebp + 0x2f0], edx
lea ecx, [eax + eax*8]
lea edx, [eax + ecx*4]
lea eax, [esp + 0x10]
lea ecx, [esp + 0xe0]
push eax
mov eax, dword [esp + 0x2c]
lea ebp, [ebp + edx*4 - 0x88]
lea edx, [esp + 0x20]
push ecx
push edx
push 0
push str.DeviceDesc
push eax
call ebx
test eax, eax
jne 0x410201
lea ecx, [esp + 0xe0]
push ecx
lea ecx, [ebp + 0x70]
call fcn.0042b993
lea edx, [esp + 0x10]
lea eax, [esp + 0xe0]
push edx
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x20]
push eax
push ecx
push 0
push 0x4531c8
push edx
mov dword [esp + 0x28], esi
call ebx
test eax, eax
jne 0x410239
lea eax, [esp + 0xe0]
lea ecx, [ebp + 0x78]
push eax
call fcn.0042b993
lea ecx, [esp + 0x10]
lea edx, [esp + 0xe0]
push ecx
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 0x20]
push edx
push eax
push 0
push str.Driver
push ecx
mov dword [esp + 0x28], esi
call ebx
test eax, eax
jne 0x4104e8
mov edx, dword [0x4540d0]
mov dword [esp + 0x20], edx
lea eax, [esp + 0xe0]
lea ecx, [esp + 0x2c]
push eax
push str.SystemCurrentControlSetServicesClass_s
push ecx
mov byte [esp + 0x1f4], 3
call fcn.00426a41
add esp, 0xc
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x20]
push edx
call fcn.0042b943
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x18]
push eax
push 1
push 0
push ecx
push reloc.WSOCK32.dll_bind
mov dword [esp + 0x24], esi
call edi
test eax, eax
jne 0x410337
lea edx, [esp + 0x10]
lea eax, [esp + 0xe0]
push edx
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x20]
push eax
push ecx
push 0
push 0x453498
push edx
mov dword [esp + 0x28], esi
call ebx
test eax, eax
jne 0x4102f4
lea eax, [esp + 0xe0]
lea ecx, [ebp + 0x6c]
push eax
call fcn.0042b993
lea ecx, [esp + 0x10]
lea edx, [esp + 0xe0]
push ecx
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x20]
push edx
push eax
push 0
push str.ProviderName
push ecx
mov dword [esp + 0x28], esi
call ebx
test eax, eax
jne 0x41032c
lea edx, [esp + 0xe0]
lea ecx, [ebp + 0x68]
push edx
call fcn.0042b993
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x2c]
push str.DEFAULT
lea edx, [esp + 0x44]
push ecx
push edx
call fcn.0042ba9f
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x1ec], 4
call fcn.0042b943
lea ecx, [esp + 0x40]
mov byte [esp + 0x1e8], 3
call fcn.0042b856
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x18]
push eax
push 1
push 0
push ecx
push reloc.WSOCK32.dll_bind
mov dword [esp + 0x24], esi
call edi
test eax, eax
jne 0x410444
lea edx, [esp + 0x10]
lea eax, [esp + 0xe0]
push edx
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x20]
push eax
push ecx
push 0
push 0x453478
push edx
mov dword [esp + 0x28], esi
call ebx
test eax, eax
jne 0x4103c7
lea eax, [esp + 0xe0]
lea ecx, [ebp + 0x74]
push eax
call fcn.0042b993
lea ecx, [esp + 0x10]
lea edx, [esp + 0xe0]
push ecx
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x20]
push edx
push eax
push 0
push str.RefreshRate
push ecx
mov dword [esp + 0x28], esi
call ebx
test eax, eax
jne 0x410439
lea edx, [esp + 0xe0]
push edx
call fcn.004169b3
add esp, 4
cmp eax, 0xffffffff
jne 0x41040b
push str.Optimal_refresh_rate
jmp 0x41042e
lea eax, [esp + 0xe0]
push eax
call fcn.004169b3
add esp, 4
test eax, eax
jne 0x410426
push str.Adapter_Default
jmp 0x41042e
lea ecx, [esp + 0xe0]
push ecx
lea ecx, [ebp + 0x8c]
call fcn.0042b993
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 0x74]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x4104d7
lea ecx, [esp + 0x48]
push ecx
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov edi, eax
test edi, edi
je 0x4104d7
push 1
push edi
call fcn.00417b5f
mov esi, eax
add esp, 8
test esi, esi
je 0x4104d7
mov eax, dword [ebp + 0x74]
push esi
push edi
push 0
push eax
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x4104ce
lea edx, [esp + 0x44]
lea eax, [esp + 0x3c]
push edx
push eax
push 0x451f10
push esi
call sub.VERSION.dll_VerQueryValueA
mov ecx, dword [esp + 0x3c]
add ebp, 0x6c
mov eax, dword [ecx + 0x14]
mov ecx, dword [ecx + 0x10]
mov edx, eax
and edx, 0xffff
shr eax, 0x10
push edx
push eax
mov eax, ecx
and eax, 0xffff
shr ecx, 0x10
push eax
push ecx
push str._d._02d._02d._04d
push ebp
call fcn.00426a41
add esp, 0x18
push esi
call fcn.0041613a
add esp, 4
lea ecx, [esp + 0x20]
mov byte [esp + 0x1e8], 2
call fcn.0042b856
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1e8], 1
call fcn.0042b856
mov ebp, dword [esp + 0x38]
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esp + 0x24]
lea ecx, [esp + 0x34]
mov byte [esp + 0x1e8], 0
call fcn.0042b856
mov edx, dword [esp + 0x1f0]
inc ebp
mov dword [esp + 0x38], ebp
cmp ebp, dword [edx + 8]
jl 0x4100f3
mov ebp, dword [sym.imp.USER32.dll_EnumDisplaySettingsA]
lea eax, [esp + 0x4c]
push eax
push 0xffffffffffffffff
push 0
call ebp
mov ecx, dword [esp + 0xb4]
mov edx, dword [esp + 0xbc]
mov eax, dword [esp + 0xb8]
mov dword [esi + 4], ecx
push edx
push eax
lea ecx, [esi + 8]
push str._dx_d
push ecx
call fcn.00426a41
mov edx, dword [0x4540d0]
add esp, 0x10
mov dword [esp + 0x14], edx
mov eax, dword [esi + 0x2f0]
xor ebx, ebx
test eax, eax
mov byte [esp + 0x1e8], 5
jne 0x410596
mov dword [esi + 0x2f0], 1
lea eax, [esp + 0x4c]
push eax
push 0
push 0
call ebp
test eax, eax
je 0x41068f
mov eax, dword [esi + 0x2f0]
xor edi, edi
test eax, eax
jle 0x41067c
add esi, 0x3c
mov ecx, dword [esp + 0xbc]
mov edx, dword [esp + 0xb8]
push ecx
push edx
lea eax, [esp + 0x1c]
push str._dx_d
push eax
call fcn.00426a41
mov eax, dword [esp + 0xc8]
mov ecx, dword [esp + 0xc4]
imul eax, dword [esp + 0xcc]
imul eax, ecx
mov edx, dword [esi + 0x60]
add esp, 0x10
shr eax, 3
cmp eax, edx
jbe 0x410604
mov dword [esi + 0x60], eax
lea eax, [ecx - 4]
cmp eax, 0x1c
ja case.0x410614.9
xor ecx, ecx
mov cl, byte [eax + 0x410738]
jmp dword [ecx*4 + 0x410720]
mov eax, dword [esi - 0x28]
lea edx, [esp + 0x14]
push edx
push eax
lea ecx, [esi - 0x30]
jmp 0x41065e
mov eax, dword [esi - 0x14]
lea ecx, [esp + 0x14]
push ecx
push eax
lea ecx, [esi - 0x1c]
jmp 0x41065e
mov eax, dword [esi]
lea edx, [esp + 0x14]
push edx
push eax
lea ecx, [esi - 8]
jmp 0x41065e
mov eax, dword [esi + 0x14]
lea ecx, [esp + 0x14]
push ecx
push eax
lea ecx, [esi + 0xc]
jmp 0x41065e
mov eax, dword [esi + 0x28]
lea edx, [esp + 0x14]
push edx
push eax
lea ecx, [esi + 0x20]
call fcn.0042701f
mov eax, dword [esp + 0x24]
inc edi
add esi, 0x94
cmp edi, dword [eax + 0x2f0]
jl 0x4105bc
mov esi, eax
lea ecx, [esp + 0x4c]
inc ebx
push ecx
push ebx
push 0
call ebp
test eax, eax
jne 0x4105a9
push str.DDraw.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [0x4846e0], eax
je 0x4106d5
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.DirectDrawCreate
push eax
call esi
mov edx, dword [0x4846e0]
push str.DirectDrawEnumerateA
push edx
mov dword [0x4846e4], eax
call esi
mov ecx, dword [esp + 0x24]
push ecx
push 0x410760
call eax
mov eax, dword [0x4846e0]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [esp + 0x14]
mov byte [esp + 0x1e8], 0
call fcn.0042b856
lea ecx, [esp + 0x30]
mov dword [esp + 0x1e8], 0xffffffff
call fcn.0042b856
mov ecx, dword [esp + 0x1e0]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x1dc
ret 4