Function at 0x4035b0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4185c8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x170
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], esp
xor edi, edi
push 0x423f20
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x34], 4
call fcn.00413688
push 0x423f20
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], edi
call fcn.00413688
push 0x423f20
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.00413688
mov ecx, dword [0x4193d4]
mov eax, dword [0x4193d0]
mov edx, dword [0x4193d8]
mov dword [ebp - 0x54], ecx
push 0x12
mov dword [ebp - 0x58], eax
mov eax, dword [0x4193dc]
push edi
lea ecx, [ebp - 0x58]
push edi
push ecx
mov byte [ebp - 4], 3
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x4c], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [ebp - 0x2c], ebx
jne 0x403671
push str.MyReadDeviceID::SetupDiGetClassDevs
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esi + 4]
push eax
push edx
call fcn.004018e0
add esp, 0xc
jmp 0x403a20
xor eax, eax
mov dword [ebp - 0x78], 0x1c
mov dword [ebp - 0x30], eax
cmp eax, 0x100
jae 0x403a76
lea ecx, [ebp - 0x78]
lea edx, [ebp - 0x58]
push ecx
push eax
push edx
push 0
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x4039f7
mov edi, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
lea eax, [ebp - 0x24]
push 0
push eax
push 0
lea ecx, [ebp - 0x78]
push 0
push ecx
push ebx
call edi
test eax, eax
jne 0x4036d6
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x7a
je 0x4036d6
push str.MyReadDeviceID::MyReadDeviceID_SetupDiGetDeviceInterfaceDetail
call esi
jmp 0x403a09
mov ecx, dword [ebp - 0x24]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
lea edx, [ebp - 0x24]
push 0
push edx
mov dword [esi], 5
mov eax, dword [ebp - 0x24]
push eax
lea ecx, [ebp - 0x78]
push esi
push ecx
push ebx
mov dword [ebp - 0x3c], esi
call edi
test eax, eax
jne 0x403731
push str.MyReadDeviceID::MyReadDeviceID_SetupDiGetDeviceInterfaceDetail
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x20]
push eax
mov eax, dword [edx + 4]
push eax
call fcn.004018e0
add esp, 0xc
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x403a20
push 0x423f20
lea ecx, [ebp - 0x14]
call fcn.00413757
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x17c]
lea edx, [esi + 4]
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x17c]
push ecx
push 0x16000c
push ecx
mov ecx, esp
mov dword [ebp - 0x38], esp
push edx
call fcn.00413688
mov ecx, dword [ebp - 0x20]
call fcn.00403ac0
test eax, eax
jne 0x4039e4
lea eax, [ebp - 0x17c]
lea ecx, [ebp - 0x14]
push eax
call fcn.00413757
lea ecx, [ebp - 0x14]
call fcn.0041391a
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx - 8]
test eax, eax
jle 0x4039e4
push 0x410
call fcn.00413379
mov edx, dword [ebp - 0x20]
mov ebx, eax
mov ecx, 0x104
xor eax, eax
mov edi, ebx
add esp, 4
rep stosd dword es:[edi], eax
mov eax, dword [edx + 0x10]
lea ecx, [edx + 8]
push ebx
push eax
mov dword [ebp - 0x38], ebx
call fcn.00412ffa
push 0
push str.MFG:
lea ecx, [ebp - 0x14]
call fcn.0041286e
mov esi, eax
lea ecx, [ebp - 0x14]
lea eax, [esi + 1]
push eax
push 0x3b
call fcn.004138ed
sub eax, esi
add esi, 4
sub eax, 4
lea ecx, [ebp - 0x44]
push eax
push esi
push ecx
lea ecx, [ebp - 0x14]
call fcn.004126d6
mov edi, dword [eax]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x44]
call fcn.0041361a
push 0
push str.MDL:
lea ecx, [ebp - 0x14]
call fcn.0041286e
mov esi, eax
lea ecx, [ebp - 0x14]
lea eax, [esi + 1]
push eax
push 0x3b
call fcn.004138ed
sub eax, esi
add esi, 4
sub eax, 4
lea ecx, [ebp - 0x48]
push eax
push esi
push ecx
lea ecx, [ebp - 0x14]
call fcn.004126d6
mov edi, dword [eax]
or ecx, 0xffffffff
xor eax, eax
add ebx, 0x104
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x48]
call fcn.0041361a
push 0x423f20
lea ecx, [ebp - 0x18]
call fcn.00413757
push ebx
mov ebx, dword [ebp - 0x38]
push ebx
lea eax, [ebp - 0x18]
push str._s_s
push eax
call fcn.00412be6
add esp, 0x10
lea ecx, [ebp - 0x18]
call fcn.0041391a
push 0x5f
push 0x20
lea ecx, [ebp - 0x18]
call fcn.00412676
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx - 8]
cmp eax, 0x12
jle 0x403907
lea ecx, [ebp - 0x40]
push 0x12
push ecx
lea ecx, [ebp - 0x18]
call fcn.004127e8
mov edi, dword [eax]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebx + 0x208]
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]
lea ecx, [ebp - 0x40]
call fcn.0041361a
jmp 0x403918
push eax
push ecx
lea ecx, [ebx + 0x208]
push ecx
call fcn.00407e5f
add esp, 0xc
mov eax, dword [ebp - 0x2c]
push 0x20019
lea edx, [ebp - 0x78]
push 0
push edx
push eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x34], 4
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDeviceInterfaceRegKey]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40395d
push str.MyReadDeviceID::MyReadDeviceID_SetupDiOpenDeviceInterfaceRegKey
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x20]
push eax
mov edx, dword [ecx + 4]
push edx
call fcn.004018e0
add esp, 0xc
lea eax, [ebp - 0x34]
lea ecx, [ebp - 0x28]
push eax
lea edx, [ebp - 0x5c]
push ecx
push edx
push 0
push str.Port_Number
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4039a5
push str.MyReadDeviceID::MyReadDeviceID_RegQueryValueEx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 4]
push ecx
call fcn.004018e0
mov eax, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x2c]
add esp, 0xc
inc eax
mov dword [ebp - 0x30], eax
jmp 0x40367d
push 0x423f20
lea ecx, [ebp - 0x1c]
call fcn.00413757
mov edx, dword [ebp - 0x28]
lea eax, [ebp - 0x1c]
push edx
push str.USB_03d
push eax
call fcn.00412be6
mov eax, dword [ebp - 0x1c]
add esp, 0xc
add ebx, 0x30c
mov ecx, dword [eax - 8]
push ecx
push eax
push ebx
call fcn.00407e5f
mov esi, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x2c]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x30]
inc eax
mov dword [ebp - 0x30], eax
jmp 0x40367d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x103
je 0x403a76
push str.MyReadDeviceID::SetupDiEnumDeviceInterfaces
mov edx, dword [ebp - 0x20]
push eax
mov eax, dword [edx + 4]
push eax
call fcn.004018e0
add esp, 0xc
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.0041361a
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0
call fcn.0041361a
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call fcn.0041361a
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 1
call fcn.0041361a
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0
call fcn.0041361a
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call fcn.0041361a
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret