Function at 0x4070a0
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x588
push ebx
push ebp
push esi
mov dword [esp + 0x60], ecx
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x391]
mov byte [esp + 0x390], 0
mov esi, str.MOSCHIPCOMPOUND_SERIAL_INTERFACE
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 8
lea edi, [esp + 0x68]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [0x430e9c]
mov eax, dword [0x430e98]
mov edx, dword [0x430ea0]
mov dword [esp + 0x2c], ecx
push 8
mov dword [esp + 0x2c], eax
mov eax, dword [0x430ea4]
push 0xffffffffffffffff
lea ecx, [esp + 0x30]
push 0
push ecx
mov dword [esp + 0x40], edx
movsw word es:[edi], word [esi]
mov dword [esp + 0x44], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov esi, eax
cmp esi, 0xffffffff
je 0x407240
lea edx, [esp + 0x48]
xor ebx, ebx
push edx
push ebx
push esi
mov dword [esp + 0x54], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x407239
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x8c]
push eax
push 0x200
push ecx
push 0
lea edx, [esp + 0x58]
push 1
push edx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
mov ebp, eax
test ebp, ebp
je 0x407239
lea eax, [esp + 0x8c]
push eax
call fcn.0041066d
lea ecx, [esp + 0x6c]
push ecx
call fcn.0041066d
lea edi, [esp + 0x70]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x94]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x70]
push ecx
push edx
push eax
call fcn.00410430
add esp, 0x14
test eax, eax
jne 0x407217
xor ecx, ecx
mov eax, 2
mov dword [esp + 0x14], ecx
lea edx, [esp + 0x14]
mov dword [esp + 0x18], ecx
push 0x14
mov dword [esp + 0x20], ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x24], eax
lea eax, [esp + 0x4c]
push edx
push eax
mov dword [esp + 0x30], ecx
push esi
mov dword [esp + 0x24], 8
mov dword [esp + 0x28], 0x12
mov dword [esp + 0x34], ecx
call dword [sym.imp.SETUPAPI.dll_SetupDiSetClassInstallParamsA]
test eax, eax
jne 0x4071fb
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x48]
push ecx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiChangeState]
lea edx, [esp + 0x48]
mov ebp, eax
push edx
push esi
push 5
call dword [sym.imp.SETUPAPI.dll_SetupDiCallClassInstaller]
inc ebx
test ebp, ebp
je 0x407239
lea eax, [esp + 0x48]
mov dword [esp + 0x48], 0x1c
push eax
push ebx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x40713c
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov edx, dword [0x430e9c]
mov eax, dword [0x430ea0]
mov ecx, 9
mov esi, str.MOSCHIPCOMPOUND_PARALLEL_INTERFACE
lea edi, [esp + 0x68]
mov dword [esp + 0x2c], edx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [0x430e98]
push 8
mov dword [esp + 0x2c], ecx
mov ecx, dword [0x430ea4]
push 0xffffffffffffffff
lea edx, [esp + 0x30]
push 0
push edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4073b6
lea eax, [esp + 0x48]
xor ebx, ebx
push eax
push ebx
push esi
mov dword [esp + 0x54], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x4073af
lea ecx, [esp + 0x3c]
lea edx, [esp + 0x8c]
push ecx
push 0x200
push edx
push 0
lea eax, [esp + 0x58]
push 1
push eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
mov ebp, eax
test ebp, ebp
je 0x4073af
lea ecx, [esp + 0x8c]
push ecx
call fcn.0041066d
lea edx, [esp + 0x6c]
push edx
call fcn.0041066d
lea edi, [esp + 0x70]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x94]
push ecx
lea ecx, [esp + 0x74]
push eax
push ecx
call fcn.00410430
add esp, 0x14
test eax, eax
jne 0x40738d
xor edx, edx
mov eax, 2
mov dword [esp + 0x14], edx
push 0x14
mov dword [esp + 0x1c], edx
lea ecx, [esp + 0x4c]
mov dword [esp + 0x20], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x24], eax
lea eax, [esp + 0x18]
mov dword [esp + 0x28], edx
push eax
push ecx
push esi
mov dword [esp + 0x24], 8
mov dword [esp + 0x28], 0x12
mov dword [esp + 0x34], edx
call dword [sym.imp.SETUPAPI.dll_SetupDiSetClassInstallParamsA]
test eax, eax
jne 0x407371
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0x48]
push edx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiChangeState]
mov ebp, eax
lea eax, [esp + 0x48]
push eax
push esi
push 5
call dword [sym.imp.SETUPAPI.dll_SetupDiCallClassInstaller]
inc ebx
test ebp, ebp
je 0x4073af
lea ecx, [esp + 0x48]
mov dword [esp + 0x48], 0x1c
push ecx
push ebx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x4072b2
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x495]
mov byte [esp + 0x494], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x28d]
mov byte [esp + 0x28c], 0
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x64]
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ecx + 4]
test eax, eax
je 0x407404
mov esi, str.SystemCurrentControlSetControlClass36FC9E60_C465_11CF_8056_444553540000
push esi
call fcn.00405dc0
jmp 0x407408
mov esi, dword [esp + 0x3c]
lea edx, [esp + 0x40]
push edx
push 0x20019
push 0
push esi
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x407583
mov ecx, dword [esp + 0x40]
mov ebp, 0x104
lea eax, [esp + 0x28c]
push ebp
push eax
push 0
push ecx
mov dword [esp + 0x48], 1
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x407576
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 0x40]
lea edx, [esp + 0x44]
push edx
push 0xf003f
lea eax, [esp + 0x294]
push 0
push eax
push ecx
mov dword [esp + 0x58], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40754e
lea edx, [esp + 0x10]
lea eax, [esp + 0x8c]
push edx
mov edx, dword [esp + 0x48]
lea ecx, [esp + 0x40]
push eax
push ecx
push 0
push str.InfSection
push edx
mov dword [esp + 0x28], ebp
call ebx
test eax, eax
jne 0x40754e
mov eax, dword [esp + 0x10]
mov esi, 4
cmp eax, esi
jbe 0x40754e
mov ecx, dword [esp + 0x64]
lea eax, [esp + 0x8c]
push eax
call fcn.00405d90
push 0xb
lea ecx, [esp + 0x90]
push str.mosusbcomp
push ecx
mov dword [esp + 0x1c], ebp
call fcn.00410430
add esp, 0xc
test eax, eax
jne 0x40754e
lea edx, [esp + 0x10]
lea eax, [esp + 0x494]
push edx
mov edx, dword [esp + 0x48]
lea ecx, [esp + 0x40]
push eax
push ecx
push 0
push str.MatchingDeviceId
push edx
mov dword [esp + 0x28], ebp
call ebx
test eax, eax
jne 0x40754e
cmp dword [esp + 0x10], esi
jbe 0x40754e
lea edi, [esp + 0x494]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x390]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x40]
mov eax, ecx
inc ecx
mov dword [esp + 0x38], ecx
lea ecx, [esp + 0x28c]
push ebp
push ecx
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
je 0x407459
mov eax, dword [esp + 0x40]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4075cc
cmp eax, 2
je 0x4075cc
push 0
lea ecx, [esp + 0x3c]
push 0
push ecx
push 0x400
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov eax, dword [0x43acf0]
test eax, eax
je 0x4075c1
mov edx, dword [esp + 0x38]
push 0x40
push str.Registry_Error
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, 5
mov esi, str.USBVID_9710PID_7720
lea edi, [esp + 0x48]
mov edx, dword [0x430e9c]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [0x430e98]
mov eax, dword [0x430ea0]
mov dword [esp + 0x28], ecx
mov ecx, dword [0x430ea4]
movsw word es:[edi], word [esi]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x28], 0x36fc9e60
mov word [esp + 0x2c], 0xc465
mov word [esp + 0x2e], 0x11cf
mov byte [esp + 0x30], 0x80
mov byte [esp + 0x31], 0x56
mov byte [esp + 0x32], 0x44
mov byte [esp + 0x33], 0x45
mov byte [esp + 0x34], 0x53
mov byte [esp + 0x35], 0x54
mov byte [esp + 0x36], 0
mov byte [esp + 0x37], 0
mov esi, 0x43ac28
lea eax, [esp + 0x390]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x407677
test cl, cl
je 0x407673
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x407677
add eax, 2
add esi, 2
test cl, cl
jne 0x40764f
xor eax, eax
jmp 0x40767c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40768d
lea edi, [esp + 0x390]
lea edx, [esp + 0x48]
jmp 0x407696
lea edx, [esp + 0x48]
mov edi, str.USBVID_9710PID_7720
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 8
mov eax, ecx
mov esi, edi
mov edi, edx
push 0xffffffffffffffff
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4077f2
lea edx, [esp + 0x68]
xor ebx, ebx
push edx
push ebx
push esi
mov dword [esp + 0x74], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x4077eb
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x8c]
push eax
push 0x200
push ecx
push 0
lea edx, [esp + 0x78]
push 1
push edx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
mov ebp, eax
test ebp, ebp
je 0x4077eb
lea eax, [esp + 0x8c]
push eax
call fcn.0041066d
lea ecx, [esp + 0x4c]
push ecx
call fcn.0041066d
lea edi, [esp + 0x50]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x94]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x50]
push ecx
push edx
push eax
call fcn.00410430
add esp, 0x14
test eax, eax
jne 0x4077c9
xor ecx, ecx
mov eax, 2
mov dword [esp + 0x14], ecx
lea edx, [esp + 0x14]
mov dword [esp + 0x18], ecx
push 0x14
mov dword [esp + 0x20], ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x24], eax
lea eax, [esp + 0x6c]
push edx
push eax
mov dword [esp + 0x30], ecx
push esi
mov dword [esp + 0x24], 8
mov dword [esp + 0x28], 0x12
mov dword [esp + 0x34], ecx
call dword [sym.imp.SETUPAPI.dll_SetupDiSetClassInstallParamsA]
test eax, eax
jne 0x4077ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x68]
push ecx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiChangeState]
lea edx, [esp + 0x68]
mov ebp, eax
push edx
push esi
push 5
call dword [sym.imp.SETUPAPI.dll_SetupDiCallClassInstaller]
inc ebx
test ebp, ebp
je 0x4077eb
lea eax, [esp + 0x68]
mov dword [esp + 0x68], 0x1c
push eax
push ebx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x4076ee
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x588
ret