Function at 0x10001fe0
Capabilities:
Check if process is running under wine
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, 0x104
push ebx
mov ebx, 0x208
sub esp, 0x598
mov dword [ebp - 0x588], ebx
lea ebx, [ebp - 0x450]
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._HidD_GetProductString_12
sub esp, 0xc
test al, al
jne 0x10002028
xor esi, esi
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x584]
mov ecx, str.SoftwareWineDirectInputJoysticks
mov edi, dword [sym.imp.advapi32.dll_RegOpenKeyW]
mov dword [esp + 8], eax
xor edx, edx
mov dword [esp + 4], ecx
mov dword [esp], 0x80000001
mov dword [ebp - 0x580], edx
call edi
sub esp, 0xc
test eax, eax
je 0x10002061
xor eax, eax
mov dword [ebp - 0x584], eax
mov dword [esp], 0
lea esi, [ebp - 0x248]
mov eax, 0x104
mov dword [esp + 8], eax
mov dword [esp + 4], esi
call dword [sym.imp.kernel32.dll_GetModuleFileNameW]
dec eax
sub esp, 0xc
cmp eax, 0x102
jbe 0x10002290
mov eax, dword [ebp - 0x584]
mov edx, dword [ebp - 0x580]
test eax, eax
je 0x100020f0
test edx, edx
jne 0x100020f8
mov edx, dword [sym.imp.advapi32.dll_RegQueryValueExW]
lea edi, [ebp - 0x588]
mov dword [esp + 0x14], edi
xor ecx, ecx
xor edi, edi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], eax
call edx
sub esp, 0x18
test eax, eax
je 0x10002138
xor esi, esi
mov eax, dword [ebp - 0x580]
test eax, eax
jne 0x1000225e
jmp 0x1000226a
test edx, edx
je 0x10002019
mov dword [esp], edx
mov edx, dword [sym.imp.advapi32.dll_RegQueryValueExW]
xor eax, eax
mov dword [esp + 0xc], eax
lea edi, [ebp - 0x588]
xor eax, eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], esi
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov dword [ebp - 0x58c], edx
call edx
mov edx, dword [ebp - 0x58c]
sub esp, 0x18
test eax, eax
jne 0x10002240
mov dword [esp], esi
mov eax, str.override
mov dword [esp + 4], eax
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
jne 0x100020d4
test byte [0x100074c0], 8
mov esi, 1
je 0x100020d6
mov eax, ebx
shr eax, 0x10
je 0x10002460
mov dword [esp], ebx
mov eax, 0xffffffff
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x10002480
cmp word [ebp - 0x450], 0
je 0x10002487
lea esi, [esi]
lea edi, [edi]
mov edx, eax
cmp word [ebx + edx*2 + 2], 0
lea eax, [eax + 1]
jne 0x100021a0
mov dword [ebp - 0x58c], ebx
lea esi, [ebp - 0x45a]
mov ecx, 0x224c
mov word [ebp - 0x57c], cx
lea ecx, [ebp - 0x57a]
jmp 0x10002205
cmp eax, 9
je 0x100023e8
cmp eax, 0xa
jne 0x1000238a
mov word [ecx], 0x6e5c
add ecx, 2
lea esi, [esi]
lea eax, [edx - 1]
test edx, edx
jle 0x100023f8
cmp ecx, esi
ja 0x100023f8
mov edx, eax
add dword [ebp - 0x58c], 2
mov eax, dword [ebp - 0x58c]
movzx eax, word [eax - 2]
cmp eax, 0xd
je 0x10002370
jbe 0x100021d0
cmp eax, 0x22
je 0x100023d8
cmp eax, 0x5c
lea esi, [esi]
jne 0x1000237d
mov word [ecx], 0x5c5c
add ecx, 2
jmp 0x100021f0
mov eax, dword [ebp - 0x584]
test eax, eax
jne 0x100020b0
mov eax, dword [ebp - 0x580]
xor esi, esi
test eax, eax
je 0x10002019
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
mov eax, dword [ebp - 0x584]
test eax, eax
je 0x1000201b
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov eax, esi
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x80000001
lea eax, [ebp - 0x57c]
mov dword [esp + 8], eax
mov eax, str.SoftwareWineAppDefaults
mov dword [esp + 4], eax
call edi
sub esp, 0xc
test eax, eax
jne 0x10002090
mov dword [esp], esi
mov ecx, dword [sym.imp.ucrtbase.dll_wcsrchr]
mov eax, 0x2f
mov dword [esp + 4], eax
mov dword [ebp - 0x58c], ecx
call ecx
mov ecx, dword [ebp - 0x58c]
test eax, eax
je 0x10002360
lea edx, [eax + 2]
mov dword [esp], edx
mov eax, 0x5c
mov dword [esp + 4], eax
mov dword [ebp - 0x58c], edx
call ecx
mov edx, dword [ebp - 0x58c]
test eax, eax
je 0x10002303
lea edx, [eax + 2]
mov dword [esp], edx
mov eax, str.DirectInputJoysticks
mov dword [esp + 4], eax
mov dword [ebp - 0x58c], edx
call dword [sym.imp.ucrtbase.dll_wcscat]
lea eax, [ebp - 0x580]
mov edx, dword [ebp - 0x58c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x57c]
mov dword [esp + 4], edx
mov dword [esp], eax
call edi
sub esp, 0xc
test eax, eax
je 0x10002349
xor eax, eax
mov dword [ebp - 0x580], eax
mov eax, dword [ebp - 0x57c]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x10002090
mov edx, esi
jmp 0x100022e2
mov word [ecx], 0x725c
add ecx, 2
jmp 0x100021f0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x10002478
mov byte [ecx], 0x5c
mov edi, eax
add ecx, 5
shr edi, 0xc
movzx ebx, byte [edi + str.0123456789abcdefdevice_is_overridden]
mov edi, eax
shr edi, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdefdevice_is_overridden]
mov edi, eax
shr edi, 4
and eax, 0xf
and edi, 0xf
movzx eax, byte [eax + str.0123456789abcdefdevice_is_overridden]
mov byte [ecx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdefdevice_is_overridden]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x100021f0
mov word [ecx], 0x225c
add ecx, 2
jmp 0x100021f0
mov word [ecx], 0x745c
add ecx, 2
jmp 0x100021f0
mov byte [ecx], 0x22
test eax, eax
jle 0x100024a0
mov word [ecx + 1], 0x2e2e
lea eax, [ecx + 4]
mov byte [ecx + 3], 0x2e
mov byte [eax], 0
lea eax, [ebp - 0x57c]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov esi, 0x10009ccc
mov ebx, str.Disabling_gamepad__s_based_on_registry_key._n
mov dword [esp + 8], esi
mov edi, 0x100074c0
mov esi, 1
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ebx
mov dword [esp + 4], edi
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x100020d6
mov dword [esp], str._04x
movzx ebx, bx
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf
jmp 0x10002421
mov byte [ecx], al
inc ecx
jmp 0x100021f0
mov eax, str._invalid_
jmp 0x10002421
mov byte [ebp - 0x57a], 0x22
lea ecx, [ebp - 0x57a]
mov eax, 0x224c
mov word [ebp - 0x57c], ax
lea eax, [ecx + 1]
jmp 0x10002410