Function at 0x401690
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43cd17
mov eax, dword fs:[0]
push eax
sub esp, 0x114
mov eax, dword [0x449d40]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
xor edi, edi
push 0x7e
lea ecx, [ebp - 0xce]
xor eax, eax
push edi
mov dword [ebp - 0xf0], edi
push ecx
mov dword [ebp - 0xf4], ebx
mov word [ebp - 0xd0], ax
call fcn.00429d10
push 0x3f
lea edx, [ebp - 0x4f]
push edi
push edx
mov byte [ebp - 0x50], 0
call fcn.00429d10
push 0x18
mov dword [ebp - 0xe4], edi
call fcn.004284dd
add esp, 0x1c
cmp eax, edi
je 0x401c03
mov dword [ebp - 0xe8], eax
mov dword [eax], eax
mov eax, dword [ebp - 0xe8]
mov dword [eax + 4], eax
mov eax, dword [ebp - 0xe8]
mov dword [eax + 8], eax
mov eax, dword [ebp - 0xe8]
mov byte [eax + 0x14], 1
mov ecx, dword [ebp - 0xe8]
mov byte [ecx + 0x15], 1
lea edx, [ebp - 0x104]
push edx
push 0x20019
push edi
push str.HARDWAREDEVICEMAPSERIALCOMM
mov esi, 1
push 0x80000002
mov dword [ebp - 4], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, edi
je 0x4017d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Open_registry_failed:__u
call fcn.0040fe60
add esp, 8
push ebx
mov ecx, 0x441cb8
call fcn.004033b0
mov dword [ebp - 0xf0], esi
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0xe8]
mov ecx, dword [eax]
push eax
push ecx
lea edi, [ebp - 0x108]
lea esi, [ebp - 0xec]
call fcn.00403fa0
mov eax, dword [ebp - 0xe8]
push eax
call fcn.00427a0a
mov eax, ebx
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00427a15
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x100], edi
mov esi, 0x40
lea ecx, [ebp - 0xf8]
push ecx
lea edx, [ebp - 0x50]
push edx
lea eax, [ebp - 0x10c]
push eax
mov eax, dword [ebp - 0x100]
push edi
lea ecx, [ebp - 0xfc]
push ecx
mov ecx, dword [ebp - 0x104]
lea edx, [ebp - 0xd0]
push edx
push eax
push ecx
mov dword [ebp - 0xfc], esi
mov dword [ebp - 0xf8], esi
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
cmp eax, edi
jne 0x4019d4
mov ecx, dword [ebp - 0xfc]
cmp ecx, esi
jbe 0x40183f
mov ecx, esi
mov dword [ebp - 0xfc], ecx
mov eax, dword [ebp - 0xf8]
cmp eax, esi
jbe 0x401851
mov eax, esi
mov dword [ebp - 0xf8], eax
xor edx, edx
mov byte [ebp + eax - 0x51], dl
mov eax, dword [0x449084]
mov word [ebp + ecx*2 - 0xd2], dx
mov edx, dword [eax + 0xc]
mov ecx, 0x449084
lea edi, [ebp - 0xd0]
call edx
add eax, 0x10
mov dword [ebp - 0xdc], eax
mov eax, edi
mov byte [ebp - 4], 3
test eax, 0xffff0000
jne 0x4018a6
movzx edi, di
call fcn.004011d0
test eax, eax
je 0x4018d4
push eax
mov eax, edi
lea edi, [ebp - 0xdc]
call fcn.004044b0
jmp 0x4018d4
lea eax, [ebp - 0xd0]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4018b0
sub eax, edx
lea ecx, [ebp - 0xd0]
sar eax, 1
push ecx
lea edx, [ebp - 0xdc]
push edx
mov ebx, eax
call fcn.00403dc0
mov byte [ebp - 4], 4
mov edx, dword [0x449084]
lea eax, [ebp - 0xd8]
mov dword [ebp - 0xd4], eax
mov eax, dword [edx + 0xc]
mov ecx, 0x449084
lea edi, [ebp - 0x50]
call eax
add eax, 0x10
mov dword [ebp - 0xd8], eax
mov ecx, edi
mov byte [ebp - 4], 5
test ecx, 0xffff0000
jne 0x40192a
movzx edi, di
call fcn.004011d0
test eax, eax
je 0x401951
push eax
mov eax, edi
lea edi, [ebp - 0xd8]
call fcn.004044b0
jmp 0x401951
lea eax, [ebp - 0x50]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401930
sub eax, edx
lea edx, [ebp - 0x50]
sar eax, 1
push edx
lea ecx, [ebp - 0xd8]
push ecx
mov ebx, eax
call fcn.00403dc0
lea ecx, [ebp - 0xdc]
lea edx, [ebp - 0xec]
mov byte [ebp - 4], 6
call fcn.00405d40
push eax
lea edx, [ebp - 0xec]
push edx
lea ebx, [ebp - 0x120]
call fcn.00405250
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0xd8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40199f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0xdc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4019c1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [ebp - 0xf4]
inc dword [ebp - 0x100]
xor edi, edi
jmp 0x4017e4
cmp eax, 0xea
je 0x4019c7
cmp eax, 0x103
je 0x4019f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_during_read_registry:__u_r_n
call fcn.0040fe60
add esp, 8
mov ecx, dword [ebp - 0x104]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0xe8]
mov esi, dword [eax]
cmp esi, eax
je 0x401ad3
mov eax, dword [esi + 0xc]
cmp dword [eax - 0xc], 0
jl 0x401a5e
push str.Device_ss
push eax
call fcn.00428382
add esp, 8
test eax, eax
je 0x401a5e
sub eax, dword [esi + 0xc]
sar eax, 1
jne 0x401a5e
mov eax, dword [esi + 0xc]
cmp dword [eax - 0xc], 0
jl 0x401a5e
push 0x441d50
push eax
call fcn.00428382
add esp, 8
test eax, eax
je 0x401a5e
sub eax, dword [esi + 0xc]
sar eax, 1
cmp eax, 0xc
je 0x401b2b
mov eax, dword [esi + 0xc]
cmp dword [eax - 0xc], 0
jl 0x401a84
push str.Device_ssceserd
push eax
call fcn.00428382
add esp, 8
test eax, eax
je 0x401a84
sub eax, dword [esi + 0xc]
sar eax, 1
je 0x401b2b
cmp byte [esi + 0x15], 0
jne 0x401ac7
mov eax, dword [esi + 8]
cmp byte [eax + 0x15], 0
jne 0x401aac
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x15], 0
jne 0x401ac7
lea ecx, [ecx]
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x15], 0
je 0x401aa0
jmp 0x401ac7
mov eax, dword [esi + 4]
cmp byte [eax + 0x15], 0
jne 0x401ac5
cmp esi, dword [eax + 8]
jne 0x401ac5
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x15], 0
je 0x401ab5
mov esi, eax
cmp esi, dword [ebp - 0xe8]
jne 0x401a13
push str._For_Your_Phone_n_____________n
call fcn.0040fe60
mov edx, dword [0x449084]
mov eax, dword [edx + 0xc]
add esp, 4
mov ecx, 0x449084
call eax
add eax, 0x10
mov dword [ebx], eax
mov ecx, 0x441cb8
mov byte [ebp - 4], 8
test ecx, 0xffff0000
jne 0x401bca
mov edx, ecx
movzx edi, dx
call fcn.004011d0
test eax, eax
je 0x401bdd
push eax
mov eax, edi
mov edi, ebx
call fcn.004044b0
jmp 0x401bdd
mov esi, dword [esi + 0x10]
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
cmp dword [esi - 4], 0
lea ecx, [esi - 4]
jl 0x401b54
cmp eax, dword [esi - 0x10]
jne 0x401b54
lea edi, [esi - 0x10]
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x401b8d
mov ecx, dword [esi - 0xc]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
jne 0x401b6d
call fcn.004045b0
mov eax, dword [esi - 0xc]
mov dword [edi + 4], eax
mov eax, dword [esi - 0xc]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.00428417
add esp, 0x10
add edi, 0x10
mov dword [ebx], edi
mov dword [ebp - 0xf0], 1
mov dword [ebp - 4], 7
mov eax, dword [ebp - 0xe8]
mov ecx, dword [eax]
push eax
push ecx
lea edi, [ebp - 0xd4]
lea esi, [ebp - 0xec]
call fcn.00403fa0
mov ecx, dword [ebp - 0xe8]
push ecx
jmp 0x4017b3
push 0x441cb8
push ebx
xor ebx, ebx
call fcn.00403dc0
mov ebx, dword [ebp - 0xf4]
mov dword [ebp - 0xf0], 1
mov dword [ebp - 4], 9
mov eax, dword [ebp - 0xe8]
mov ecx, dword [eax]
push eax
push ecx
lea edi, [ebp - 0xd4]
jmp 0x4017a1
lea ecx, [ebp - 0x108]
push ecx
lea ecx, [ebp - 0x118]
mov dword [ebp - 0x108], edi
call fcn.00427b26
push 0x446a84
lea edx, [ebp - 0x118]
push edx
mov dword [ebp - method.std::bad_alloc.virtual_0], vtable.std::bad_alloc.0
call fcn.00429c7c
int3