Function at 0x40ad60
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x56ff33
mov eax, dword fs:[0]
push eax
sub esp, 0x758
mov eax, dword [0x5d4d80]
xor eax, esp
mov dword [esp + 0x750], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5d4d80]
xor eax, esp
push eax
lea eax, [esp + 0x76c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x77c]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], ebp
cmp dword [ebp + 0xc], edi
jbe 0x40adb3
call fcn.0053e0a6
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp]
cmp esi, dword [ebp + 0x10]
jbe 0x40adc3
call fcn.0053e0a6
mov eax, dword [ebp]
push edi
push ebx
push esi
push eax
lea ebx, [esp + 0x40]
mov esi, ebp
call fcn.0040b730
xor eax, eax
mov word [esp + 0xd8], ax
xor ebx, ebx
push 0x1e
mov eax, 0x5a7030
lea esi, [esp + 0xd8]
mov dword [esp + 0xf0], 7
mov dword [esp + 0xec], ebx
call fcn.0040b8c0
mov dword [esp + 0x774], ebx
mov eax, dword [esp + 0xd8]
mov esi, 8
cmp dword [esp + 0xec], esi
jae 0x40ae29
lea eax, [esp + 0xd8]
lea ecx, [esp + 0x18]
push ecx
push 0x20019
push ebx
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
je 0x40ae64
cmp dword [esp + 0xec], esi
jb 0x40ae5d
mov edx, dword [esp + 0xd8]
push edx
call fcn.00427143
add esp, 4
xor eax, eax
jmp 0x40b47e
push 0x206
lea ecx, [esp + 0x162]
xor eax, eax
push ebx
push ecx
mov word [esp + 0x168], ax
call fcn.00542b10
add esp, 0xc
push 0x4f
lea edx, [esp + 0x111]
push ebx
push edx
mov dword [esp + 0x28], 0x104
mov byte [esp + 0x118], bl
call fcn.00542b10
add esp, 0xc
lea eax, [esp + 0x40]
push eax
mov dword [esp + 0x40], 1
mov dword [esp + 0x30], 0x50
call fcn.0040b510
push ebx
push ebx
push ebx
push ebx
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x170]
push edx
mov byte [esp + 0x78c], 1
mov eax, dword [esp + 0x30]
push ebx
push eax
xor ebp, ebp
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov edi, eax
cmp edi, 0x103
je 0x40b096
inc ebp
xor ecx, ecx
lea eax, [esp + 0x15c]
mov dword [esp + 0xb4], 7
mov dword [esp + 0xb0], ebx
mov word [esp + 0xa0], cx
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40af20
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x160]
lea esi, [esp + 0xa0]
call fcn.0040b8c0
push str.DeviceUSBSER
mov ebx, 0xd
mov eax, esi
mov byte [esp + 0x778], 2
call fcn.0040b5b0
test eax, eax
jl 0x40b03b
mov dword [esp + 0x2c], 0x50
test edi, edi
jne 0x40b03b
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x110]
push eax
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x44]
push ecx
push edi
lea edx, [esp + 0x16c]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40b03b
mov dword [esp + 0xcc], eax
xor ecx, ecx
lea eax, [esp + 0x10c]
mov dword [esp + 0xd0], 7
mov word [esp + 0xbc], cx
lea edx, [eax + 2]
jmp 0x40afd0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40afd0
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x110]
lea esi, [esp + 0xbc]
call fcn.0040b8c0
mov byte [esp + 0x774], 3
mov eax, dword [esp + 0x54]
mov ecx, dword [eax + 4]
lea edi, [eax + 4]
mov edx, esi
push edx
push ecx
push eax
call fcn.0040bba0
lea ecx, [esp + 0x40]
mov esi, eax
call fcn.0040bc40
mov dword [edi], esi
mov eax, dword [esi + 4]
mov dword [eax], esi
cmp dword [esp + 0xd0], 8
jb 0x40b03b
mov edx, dword [esp + 0xbc]
push edx
call fcn.00427143
add esp, 4
mov byte [esp + 0x774], 1
cmp dword [esp + 0xb4], 8
mov dword [esp + 0x1c], 0x104
jb 0x40b065
mov eax, dword [esp + 0xa0]
push eax
call fcn.00427143
add esp, 4
mov eax, dword [esp + 0x18]
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x170]
push edx
push ebp
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov edi, eax
xor ebx, ebx
cmp edi, 0x103
jne 0x40aef5
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0xa
push ebx
push ebx
push 0x5a49e8
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov esi, eax
mov dword [esp + 0x28], esi
cmp esi, ebx
je 0x40b42a
xor eax, eax
lea edx, [esp + 0xb8]
push edx
push ebx
push esi
mov dword [esp + 0xc4], 0x1c
mov dword [esp + 0xc8], eax
mov dword [esp + 0xcc], eax
mov dword [esp + 0xd0], eax
mov dword [esp + 0xd4], eax
mov dword [esp + 0xd8], eax
mov dword [esp + 0xdc], eax
mov dword [esp + 0x30], ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x40b423
push 0x3fe
lea ecx, [esp + 0x36a]
xor eax, eax
push ebx
push ecx
mov word [esp + 0x370], ax
call fcn.00542b10
add esp, 0xc
push ebx
push 0x400
lea edx, [esp + 0x36c]
push edx
push ebx
push 0xc
lea eax, [esp + 0xcc]
push eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
test eax, eax
je 0x40b402
mov edi, 7
xor ecx, ecx
lea eax, [esp + 0x364]
mov dword [esp + 0x108], edi
mov dword [esp + 0x104], ebx
mov word [esp + 0xf4], cx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40b180
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x368]
lea esi, [esp + 0xf4]
call fcn.0040b8c0
xor edx, edx
mov dword [esp + 0xb4], edi
mov dword [esp + 0xb0], ebx
mov word [esp + 0xa0], dx
mov byte [esp + 0x774], 5
mov eax, dword [esp + 0x54]
mov esi, dword [esp + 0x40]
mov ebp, dword [eax]
mov dword [esp + 0x30], esi
mov edi, dword [esp + 0x54]
cmp esi, ebx
je 0x40b1df
cmp esi, dword [esp + 0x40]
je 0x40b1e4
call fcn.0053e0a6
cmp ebp, edi
je 0x40b3a3
cmp esi, ebx
jne 0x40b2e7
call fcn.0053e0a6
xor esi, esi
cmp ebp, dword [esi + 0x14]
jne 0x40b205
call fcn.0053e0a6
lea eax, [ebp + 8]
push eax
lea edi, [esp + 0x60]
call fcn.0040c050
add esp, 4
push eax
lea esi, [esp + 0x7c]
mov byte [esp + 0x778], 6
call fcn.0040c110
add esp, 4
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0xa4]
mov byte [esp + 0x77c], 7
call fcn.0040b810
mov esi, 8
cmp dword [esp + 0x90], esi
jb 0x40b25c
mov ecx, dword [esp + 0x7c]
push ecx
call fcn.00427143
add esp, 4
xor edx, edx
mov byte [esp + 0x774], 5
mov dword [esp + 0x90], 7
mov dword [esp + 0x8c], ebx
mov word [esp + 0x7c], dx
cmp dword [esp + 0x74], esi
jb 0x40b290
mov eax, dword [esp + 0x60]
push eax
call fcn.00427143
add esp, 4
mov eax, dword [esp + 0xa0]
cmp dword [esp + 0xb4], esi
jae 0x40b2a7
lea eax, [esp + 0xa0]
mov ebx, dword [esp + 0xb0]
push eax
lea eax, [esp + 0xf4]
call fcn.0040b5b0
cmp eax, 0xffffffff
mov eax, dword [esp + 0x30]
jne 0x40b2f2
test eax, eax
jne 0x40b2ee
call fcn.0053e0a6
xor eax, eax
cmp ebp, dword [eax + 0x14]
jne 0x40b2d9
call fcn.0053e0a6
mov ebp, dword [ebp]
mov esi, dword [esp + 0x30]
xor ebx, ebx
jmp 0x40b1d1
mov esi, dword [esi]
jmp 0x40b1fb
mov eax, dword [eax]
jmp 0x40b2cf
test eax, eax
jne 0x40b32a
call fcn.0053e0a6
xor eax, eax
cmp ebp, dword [eax + 0x14]
jne 0x40b307
call fcn.0053e0a6
lea eax, [ebp + 8]
push eax
lea esi, [esp + 0x60]
call fcn.0040b4e0
mov ebx, 8
mov byte [esp + 0x774], bl
cmp dword [eax + 0x18], ebx
jb 0x40b32e
mov eax, dword [eax + 4]
jmp 0x40b331
mov eax, dword [eax]
jmp 0x40b2fd
add eax, 4
push eax
call fcn.0053e7d2
mov edi, dword [esp + 0x24]
mov edx, dword [edi + 0xc]
add esp, 4
mov dword [esp + 0x38], eax
test edx, edx
jne 0x40b34d
xor ecx, ecx
jmp 0x40b355
mov ecx, dword [edi + 0x14]
sub ecx, edx
sar ecx, 2
mov esi, dword [edi + 0x10]
mov ebp, esi
sub ebp, edx
sar ebp, 2
cmp ebp, ecx
jae 0x40b36d
mov dword [esi], eax
add esi, 4
mov dword [edi + 0x10], esi
jmp 0x40b38e
cmp edx, esi
jbe 0x40b376
call fcn.0053e0a6
mov eax, dword [edi]
push esi
push eax
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0xa0]
push edx
mov eax, edi
call fcn.0040b680
cmp dword [esp + 0x74], ebx
jb 0x40b3a1
mov eax, dword [esp + 0x60]
push eax
call fcn.00427143
add esp, 4
xor ebx, ebx
mov esi, 8
cmp dword [esp + 0xb4], esi
jb 0x40b3c1
mov ecx, dword [esp + 0xa0]
push ecx
call fcn.00427143
add esp, 4
xor edx, edx
mov byte [esp + 0x774], 1
mov dword [esp + 0xb4], 7
mov dword [esp + 0xb0], ebx
mov word [esp + 0xa0], dx
cmp dword [esp + 0x108], esi
jb 0x40b3fe
mov eax, dword [esp + 0xf4]
push eax
call fcn.00427143
add esp, 4
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0xb8]
inc eax
push ecx
push eax
push esi
mov dword [esp + 0x30], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x40b111
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, dword [esp + 0x20]
mov esi, dword [eax + 0x10]
sub esi, dword [eax + 0xc]
lea ebx, [esp + 0x40]
sar esi, 2
call fcn.0040bb40
mov edx, dword [esp + 0x54]
push edx
call fcn.00427143
mov eax, dword [esp + 0x44]
add esp, 4
push eax
mov dword [esp + 0x58], 0
call fcn.00427143
add esp, 4
cmp dword [esp + 0xec], 8
jb 0x40b47c
mov ecx, dword [esp + 0xd8]
push ecx
call fcn.00427143
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x76c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x750]
xor ecx, esp
call fcn.0053d842
add esp, 0x764
ret 4