Function at 0x100020b0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10051cd9
mov eax, dword fs:[0]
push eax
sub esp, 0x60
push esi
push edi
mov eax, dword [0x10072f40]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x1c], edi
lea eax, [edi + 0x210]
mov dword [ebp - 0x14], 0
push 2
push eax
mov dword [edi], vtable.CBTLEDevice.0
mov dword [ebp - 0x18], eax
call sub.MSVCP140.dll__Mtx_init_in_situ
mov dword [ebp - 4], 1
mov dword [edi + 0x2b8], 0
mov byte [ebp - 4], 2
mov dword [edi + 0x2bc], 0
mov byte [ebp - 4], 3
mov dword [edi + 0x2d0], 0
mov byte [ebp - 4], 4
lea eax, [edi + 4]
mov esi, dword [ebp + 8]
push esi
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
xor eax, eax
add esp, 0x14
mov word [edi + 0x20c], ax
movups xmm0, xmmword [0x10062b94]
movups xmmword [edi + 0x2d4], xmm0
call fcn.10004540
mov ecx, eax
test ecx, ecx
je 0x1000291f
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp + 8], eax
mov byte [ebp - 4], 6
lea eax, [ebp + 8]
push esi
push 0x1005d68c
push eax
call fcn.10004100
mov esi, dword [ebp + 8]
add esp, 0xc
mov edx, dword [esi - 0xc]
mov dword [ebp - 0x10], edx
test edx, edx
js 0x10002915
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x100021bb
push edx
lea ecx, [ebp + 8]
call fcn.10004980
mov esi, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
lea eax, [edx + 1]
push eax
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsupr_s]
mov eax, dword [ebp - 0x10]
add esp, 8
cmp eax, dword [esi - 8]
jg 0x10002915
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp dword [esi - 0xc], ecx
jl 0x10002268
push str._PID
push esi
call sub.VCRUNTIME140.dll_wcsstr
add esp, 8
test eax, eax
je 0x10002268
sub eax, esi
sar eax, 1
js 0x10002268
push 4
add eax, 5
lea ecx, [ebp + 8]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.10004720
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x10]
cmp dword [eax - 4], 1
jle 0x1000222c
push dword [eax - 0xc]
lea ecx, [ebp - 0x10]
call fcn.10004050
mov eax, dword [ebp - 0x10]
lea ecx, [eax + 8]
mov dword [ebp - 0x18], ecx
lea ecx, [ebp - 0x18]
push 0x10
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstoul]
add esp, 0xc
mov word [edi + 0x20c], ax
mov byte [ebp - 4], 6
or eax, 0xffffffff
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10002268
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword fs:[0x2c]
mov ecx, dword [0x10075b18]
mov dword [edi + 0x2b4], 0
mov dword [edi + 0x240], 0
mov dword [edi + 0x248], 0
mov ecx, dword [eax + ecx*4]
mov dword [edi + 0x2c0], 0
mov dword [edi + 0x2c4], 0
mov dword [edi + 0x2c8], 0
mov dword [edi + 0x244], 1
mov eax, dword [0x10074290]
cmp eax, dword [ecx + 4]
jg 0x10002929
mov eax, dword [0x1007428c]
test eax, eax
jne 0x1000238a
mov byte [ebp - 4], 0xa
push 4
call fcn.1005021f
add esp, 4
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 0xb
test eax, eax
je 0x10002308
push str.BluetoothApis.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ecx, dword [ebp - 0x10]
mov dword [ecx], eax
mov eax, ecx
jmp 0x1000230a
xor eax, eax
mov byte [ebp - 4], 0xa
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 0xc
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], 1
mov byte [ebp - 4], 0xa
mov ecx, dword [0x1007428c]
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], ecx
mov dword [0x1007428c], eax
test ecx, ecx
je 0x10002364
mov eax, dword [ecx]
test eax, eax
je 0x10002359
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 0x18]
mov dword [ecx], 0
push 4
push ecx
call fcn.1005024f
add esp, 8
mov eax, 1
mov dword [ebp - 0x14], eax
and eax, 0xfffffffe
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 6
mov eax, dword [0x1007428c]
test eax, eax
jne 0x1000238a
mov dword [edi + 0x240], eax
jmp 0x100028dd
mov eax, dword [eax]
mov dword [edi + 0x240], eax
test eax, eax
je 0x100028dd
xorps xmm0, xmm0
mov dword [ebp - 0x3c], 0
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x40], 0
push 0x20
movups xmmword [ebp - 0x50], xmm0
mov dword [ebp - 0x3c], 0xf
call fcn.10006000
movups xmm0, xmmword [str.BluetoothGATTRegisterEvent]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x40], 0x1a
mov dword [ebp - 0x3c], 0x1f
movups xmmword [eax], xmm0
movq xmm0, qword [0x1005d714]
movq qword [eax + 0x10], xmm0
mov cx, word [0x1005d71c]
mov word [eax + 0x18], cx
mov byte [eax + 0x1a], 0
mov byte [ebp - 4], 0xd
mov ecx, dword [edi + 0x240]
mov byte [ebp - 4], 0xe
mov dword [ebp - 0x10], 0
test ecx, ecx
je 0x10002426
cmp dword [ebp - 0x3c], 0x10
lea eax, [ebp - 0x50]
cmovae eax, dword [ebp - 0x50]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x50]
call fcn.10002c20
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x6c]
xorps xmm0, xmm0
mov dword [ebp - 0x58], 0
push 0x20
mov dword [edi + 0x2e4], eax
movups xmmword [ebp - 0x6c], xmm0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0xf
call fcn.10006000
movups xmm0, xmmword [str.BluetoothGATTUnregisterEvent]
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x5c], 0x1c
mov dword [ebp - 0x58], 0x1f
movups xmmword [eax], xmm0
movq xmm0, qword [0x1005d730]
movq qword [eax + 0x10], xmm0
mov ecx, dword [0x1005d738]
mov dword [eax + 0x18], ecx
mov byte [eax + 0x1c], 0
mov byte [ebp - 4], 0xf
mov ecx, dword [edi + 0x240]
mov byte [ebp - 4], 0x10
mov dword [ebp - 0x10], 0
test ecx, ecx
je 0x100024c5
cmp dword [ebp - 0x58], 0x10
lea eax, [ebp - 0x6c]
cmovae eax, dword [ebp - 0x6c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x6c]
call fcn.10002c20
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x34]
xorps xmm0, xmm0
mov dword [ebp - 0x20], 0
push 0x20
mov dword [edi + 0x2e8], eax
movups xmmword [ebp - 0x34], xmm0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0xf
call fcn.10006000
movups xmm0, xmmword [str.BluetoothGATTGetServices]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x24], 0x18
mov dword [ebp - 0x20], 0x1f
movups xmmword [eax], xmm0
movq xmm0, qword [0x1005d750]
movq qword [eax + 0x10], xmm0
mov byte [eax + 0x18], 0
mov byte [ebp - 4], 0x11
mov ecx, dword [edi + 0x240]
mov byte [ebp - 4], 0x12
mov dword [ebp - 0x10], 0
test ecx, ecx
je 0x1000255b
cmp dword [ebp - 0x20], 0x10
lea eax, [ebp - 0x34]
cmovae eax, dword [ebp - 0x34]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x34]
call fcn.10002c20
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x50]
xorps xmm0, xmm0
mov dword [ebp - 0x3c], 0
push 0x20
mov dword [edi + 0x2ec], eax
movups xmmword [ebp - 0x50], xmm0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0xf
call fcn.10006000
movups xmm0, xmmword [str.BluetoothGATTGetCharacteristics]
mov edx, eax
mov dword [ebp - 0x40], 0x1f
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x3c], 0x1f
movups xmmword [edx], xmm0
movq xmm0, qword [0x1005d76c]
movq qword [edx + 0x10], xmm0
mov ecx, dword [0x1005d774]
mov dword [edx + 0x18], ecx
mov ax, word [0x1005d778]
mov word [edx + 0x1c], ax
mov al, byte [0x1005d77a]
mov byte [edx + 0x1e], al
mov byte [edx + 0x1f], 0
mov byte [ebp - 4], 0x13
mov ecx, dword [edi + 0x240]
mov byte [ebp - 4], 0x14
mov dword [ebp - 0x10], 0
test ecx, ecx
je 0x1000260e
cmp dword [ebp - 0x3c], 0x10
lea eax, [ebp - 0x50]
cmovae eax, dword [ebp - 0x50]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x50]
call fcn.10002c20
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x34]
xorps xmm0, xmm0
mov dword [ebp - 0x20], 0
push 0x30
mov dword [edi + 0x2f0], eax
movups xmmword [ebp - 0x34], xmm0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0xf
call fcn.10006000
movups xmm0, xmmword [str.BluetoothGATTSetCharacteristicValue]
mov edx, eax
mov dword [ebp - 0x24], 0x23
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x20], 0x2f
movups xmmword [edx], xmm0
movups xmm0, xmmword [0x1005d78c]
movups xmmword [edx + 0x10], xmm0
mov cx, word [0x1005d79c]
mov word [edx + 0x20], cx
mov al, byte [0x1005d79e]
mov byte [edx + 0x22], al
mov byte [edx + 0x23], 0
mov byte [ebp - 4], 0x15
mov ecx, dword [edi + 0x240]
mov byte [ebp - 4], 0x16
mov dword [ebp - 0x10], 0
test ecx, ecx
je 0x100026b7
cmp dword [ebp - 0x20], 0x10
lea eax, [ebp - 0x34]
cmovae eax, dword [ebp - 0x34]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x34]
call fcn.10002c20
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x6c]
xorps xmm0, xmm0
mov dword [ebp - 0x58], 0
push 0x20
mov dword [edi + 0x2f4], eax
movups xmmword [ebp - 0x6c], xmm0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0xf
call fcn.10006000
movups xmm0, xmmword [str.BluetoothGATTGetDescriptors]
mov edx, eax
mov dword [ebp - 0x5c], 0x1b
mov dword [ebp - 0x6c], edx
mov dword [ebp - 0x58], 0x1f
movups xmmword [edx], xmm0
movq xmm0, qword [0x1005d7b0]
movq qword [edx + 0x10], xmm0
mov cx, word [0x1005d7b8]
mov word [edx + 0x18], cx
mov al, byte [0x1005d7ba]
mov byte [edx + 0x1a], al
mov byte [edx + 0x1b], 0
mov byte [ebp - 4], 0x17
mov ecx, dword [edi + 0x240]
mov byte [ebp - 4], 0x18
mov dword [ebp - 0x10], 0
test ecx, ecx
je 0x10002762
cmp dword [ebp - 0x58], 0x10
lea eax, [ebp - 0x6c]
cmovae eax, dword [ebp - 0x6c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x6c]
call fcn.10002c20
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x50]
xorps xmm0, xmm0
mov dword [ebp - 0x3c], 0
push 0x20
mov dword [edi + 0x2f8], eax
movups xmmword [ebp - 0x50], xmm0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0xf
call fcn.10006000
movups xmm0, xmmword [str.BluetoothGATTGetDescriptorValue]
mov edx, eax
mov dword [ebp - 0x40], 0x1f
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x3c], 0x1f
movups xmmword [edx], xmm0
movq xmm0, qword [0x1005d7cc]
movq qword [edx + 0x10], xmm0
mov ecx, dword [0x1005d7d4]
mov dword [edx + 0x18], ecx
mov ax, word [0x1005d7d8]
mov word [edx + 0x1c], ax
mov al, byte [0x1005d7da]
mov byte [edx + 0x1e], al
mov byte [edx + 0x1f], 0
mov byte [ebp - 4], 0x19
mov ecx, dword [edi + 0x240]
mov byte [ebp - 4], 0x1a
mov dword [ebp - 0x10], 0
test ecx, ecx
je 0x10002815
cmp dword [ebp - 0x3c], 0x10
lea eax, [ebp - 0x50]
cmovae eax, dword [ebp - 0x50]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x50]
call fcn.10002c20
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x34]
xorps xmm0, xmm0
mov dword [ebp - 0x20], 0
push 0x20
mov dword [edi + 0x2fc], eax
movups xmmword [ebp - 0x34], xmm0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0xf
call fcn.10006000
movups xmm0, xmmword [str.BluetoothGATTSetDescriptorValue]
mov edx, eax
mov dword [ebp - 0x24], 0x1f
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x20], 0x1f
movups xmmword [edx], xmm0
movq xmm0, qword [0x1005d7ec]
movq qword [edx + 0x10], xmm0
mov ecx, dword [0x1005d7f4]
mov dword [edx + 0x18], ecx
mov ax, word [0x1005d7f8]
mov word [edx + 0x1c], ax
mov al, byte [0x1005d7fa]
mov byte [edx + 0x1e], al
mov byte [edx + 0x1f], 0
mov byte [ebp - 4], 0x1b
mov ecx, dword [edi + 0x240]
mov byte [ebp - 4], 0x1c
mov dword [ebp - 0x10], 0
test ecx, ecx
je 0x100028c8
cmp dword [ebp - 0x20], 0x10
lea eax, [ebp - 0x34]
cmovae eax, dword [ebp - 0x34]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x34]
call fcn.10002c20
mov eax, dword [ebp - 0x10]
mov dword [edi + 0x300], eax
mov byte [ebp - 4], 4
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x100028f9
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
push 0x80070057
call fcn.10003510
push 0x80004005
call fcn.10003510
push 0x10074290
call fcn.100506b8
add esp, 4
cmp dword [0x10074290], 0xffffffff
jne 0x100022ce
mov byte [ebp - 4], 9
push 0x1005ca20
call fcn.10050570
mov byte [ebp - 4], 6
push 0x10074290
call fcn.1005066e
add esp, 8
jmp 0x100022ce