Function at 0x40fe40
Capabilities:
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa3c
mov eax, dword [0x47b014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
lea eax, [ebp - 0xa34]
mov dword [ebp - 0xa38], ecx
push eax
push 1
push 0
push str.SoftwareToshibaBluetoothStackV1.0
push closesocket
xor bl, bl
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x410199
lea eax, [ebp - 0xa30]
mov dword [ebp - 0xa30], 0x410
push eax
lea eax, [ebp - 0xa2c]
push eax
push 0
push 0
push str.InstallPath
push dword [ebp - 0xa34]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x41018d
push edi
lea eax, [ebp - 0x414]
mov ecx, 0x208
lea edi, [ebp - 0xa2c]
mov edx, eax
sub edi, edx
nop word [eax + eax]
movzx edx, word [edi + eax]
test dx, dx
je 0x40fee5
mov word [eax], dx
dec ecx
add eax, 2
cmp ecx, 1
ja 0x40fed0
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x414]
mov dx, word [ebp - 0x414]
mov ecx, 0x208
push esi
test dx, dx
je 0x40ff19
test ecx, ecx
je 0x40ff41
add eax, 2
dec ecx
cmp word [eax], 0
jne 0x40ff02
test ecx, ecx
je 0x40ff41
cmp ecx, 1
jbe 0x40ff35
mov esi, 0x4664b4
sub esi, eax
movzx edx, word [esi + eax]
test dx, dx
je 0x40ff35
mov word [eax], dx
dec ecx
add eax, 2
cmp ecx, 1
ja 0x40ff20
xor ecx, ecx
mov word [eax], cx
mov dx, word [ebp - 0x414]
lea eax, [ebp - 0x414]
mov ecx, 0x208
test dx, dx
je 0x40ff68
test ecx, ecx
je 0x40ff8a
add eax, 2
dec ecx
cmp word [eax], 0
jne 0x40ff51
test ecx, ecx
je 0x40ff8a
cmp ecx, 1
jbe 0x40ff85
mov esi, str.TosBtUtl.dat
sub esi, eax
nop
movzx edx, word [esi + eax]
test dx, dx
je 0x40ff85
mov word [eax], dx
dec ecx
add eax, 2
cmp ecx, 1
ja 0x40ff70
xor ecx, ecx
mov word [eax], cx
mov esi, dword [ebp - 0xa38]
lea eax, [ebp - 0x414]
push eax
push 0x104
push esi
push str.1.01.00
push str.ServiceCenter
push str.BluetoothBuildVersion
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ffb7
sub ecx, edx
sar ecx, 1
je 0x41018b
lea eax, [ebp - 0x414]
mov ecx, 0x208
movzx edx, word [edi + eax]
test dx, dx
je 0x40ffec
mov word [eax], dx
dec ecx
add eax, 2
cmp ecx, 1
ja 0x40ffd7
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x414]
mov dx, word [ebp - 0x414]
mov ecx, 0x208
test dx, dx
je 0x41001f
test ecx, ecx
je 0x410047
add eax, 2
dec ecx
cmp word [eax], 0
jne 0x410008
test ecx, ecx
je 0x410047
cmp ecx, 1
jbe 0x41003b
mov esi, 0x4664b4
sub esi, eax
movzx edx, word [esi + eax]
test dx, dx
je 0x41003b
mov word [eax], dx
dec ecx
add eax, 2
cmp ecx, 1
ja 0x410026
xor ecx, ecx
mov word [eax], cx
mov dx, word [ebp - 0x414]
lea eax, [ebp - 0x414]
mov ecx, 0x208
test dx, dx
je 0x41006e
test ecx, ecx
je 0x41008f
add eax, 2
dec ecx
cmp word [eax], 0
jne 0x410057
test ecx, ecx
je 0x41008f
cmp ecx, 1
jbe 0x41008a
mov esi, str.TosBtUtl.ini
sub esi, eax
movzx edx, word [esi + eax]
test dx, dx
je 0x41008a
mov word [eax], dx
dec ecx
add eax, 2
cmp ecx, 1
ja 0x410075
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x61c]
push eax
push 0x470dc4
push str.Subversion
push str.General
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea ecx, [ebp - 0x61c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4100c0
sub ecx, edx
sar ecx, 1
je 0x41017a
mov edx, dword [ebp - 0xa38]
mov eax, edx
test edx, edx
je 0x41017a
cmp word [edx], 0
mov ecx, 0x104
je 0x410107
test ecx, ecx
je 0x410130
add eax, 2
dec ecx
cmp word [eax], 0
jne 0x4100f0
test ecx, ecx
je 0x410130
cmp ecx, 1
jbe 0x41012b
mov esi, 0x4713dc
sub esi, eax
nop
movzx edx, word [esi + eax]
test dx, dx
je 0x410125
mov word [eax], dx
dec ecx
add eax, 2
cmp ecx, 1
ja 0x410110
mov edx, dword [ebp - 0xa38]
xor ecx, ecx
mov word [eax], cx
cmp word [edx], 0
mov ecx, 0x104
mov eax, edx
je 0x410157
nop dword [eax]
test ecx, ecx
je 0x41017a
add eax, 2
dec ecx
cmp word [eax], 0
jne 0x410140
test ecx, ecx
je 0x41017a
cmp ecx, 1
jbe 0x410175
lea esi, [ebp - 0x61c]
sub esi, eax
nop
movzx edx, word [esi + eax]
test dx, dx
je 0x410175
mov word [eax], dx
dec ecx
add eax, 2
cmp ecx, 1
ja 0x410160
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0xa38]
xor ecx, ecx
mov bl, 1
mov word [eax + 0x206], cx
pop esi
pop edi
push dword [ebp - 0xa34]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
mov al, bl
xor ecx, ebp
pop ebx
call fcn.00422009
mov esp, ebp
pop ebp
ret