Function at 0x408eb0
Capabilities:
Connect socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x4b5b1b
mov eax, dword fs:[0]
push eax
sub esp, 0x220
mov eax, dword [0x4de8bc]
xor eax, esp
mov dword [esp + 0x21c], eax
push ebp
push esi
push edi
mov eax, dword [0x4de8bc]
xor eax, esp
push eax
lea eax, [esp + 0x230]
mov dword fs:[0], eax
mov eax, dword [esp + 0x244]
mov ebp, dword [esp + 0x240]
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x18]
push ecx
push eax
call fcn.00408d10
add esp, 8
lea edx, [esp + 0x9c]
push edx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x408f70
push 3
push 1
push 0x20
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x408f77
push str.Fail_to_create_BT_socket
lea ecx, [esp + 0x24]
call fcn.00406160
push esi
push 0
lea eax, [esp + 0x28]
push eax
mov ecx, ebp
mov dword [esp + 0x244], 0
call fcn.004054b0
cmp dword [esp + 0x38], 0x10
jb 0x408f70
mov ecx, dword [esp + 0x24]
push ecx
call fcn.0042e631
add esp, 4
xor eax, eax
jmp 0x40919f
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea edx, [esp + 0x14]
push edx
push connect
push 3
push esi
mov dword [esp + 0x24], 1
call edi
push 4
lea eax, [esp + 0x14]
push eax
push 2
push 3
push esi
call edi
mov ecx, dword [esp + 0x18]
mov eax, dword [0x4ba060]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x5e], ecx
mov ecx, dword [0x4ba064]
mov dword [esp + 0x6a], ecx
push 0x1e
lea ecx, [esp + 0x60]
mov dword [esp + 0x66], edx
mov edx, dword [0x4ba068]
mov dword [esp + 0x6a], eax
mov eax, dword [0x4ba06c]
push ecx
push esi
mov word [esp + 0x68], 0x20
mov dword [esp + 0x7a], edx
mov dword [esp + 0x7e], eax
mov dword [esp + 0x82], 0
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x409092
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x2742
jne 0x40902e
push str.Fail_to_connect__50_._Bluetooth_adapter_not_detected.
push ebp
call fcn.00405d70
add esp, 8
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x40919f
cmp eax, 0x274c
jne 0x409050
cmp dword [0x4e9b58], 0x10
mov eax, dword [0x4e9b44]
jae 0x409048
mov eax, 0x4e9b44
push eax
push str.Fail_to_connect_to__s__60_._Bluetooth_not_detected_on_your_phone.
jmp 0x40907b
cmp eax, 0x2741
jne 0x409073
push str.Fail_to_connect_to_your_phone__49_._Please_make_sure_Bluetooth_mode_is_activated.
push ebp
call fcn.00405d70
add esp, 8
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x40919f
call edi
push eax
push str.Fail_to_connect_to_Bluetooth_device__err_d.
push ebp
call fcn.00405d70
add esp, 0xc
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x40919f
xor eax, eax
xor edx, edx
cmp byte [esp + 0x248], al
push eax
mov dword [esp + 0x40], eax
setne dl
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
push 0x20
lea eax, [esp + 0x44]
push eax
push esi
mov word [esp + 0x4c], 0xa
mov word [esp + 0x4e], 0x1a3
mov dword [esp + 0x50], edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0x20
je 0x4090f4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Bluetooth_fail_to_send_handshake__err_d.
jmp 0x40907b
push 4
lea ecx, [esp + 0x14]
push ecx
push 0x1006
push 0xffff
push esi
mov dword [esp + 0x24], 0x7530
call edi
push 0
push 0x20
lea edx, [esp + 0x84]
push edx
push esi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0x20
je 0x409139
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Bluetooth_fail_to_recv_handshake_err_d.
jmp 0x40907b
cmp byte [esp + 0x248], 0
je 0x40914c
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x40919a
push 4
lea eax, [esp + 0x14]
push eax
push 0x1006
push 0xffff
push esi
mov dword [esp + 0x24], 0
call edi
mov ecx, dword [esp + 0x14]
push 0x10
mov dword [ecx], esi
call fcn.0042ed23
add esp, 4
test eax, eax
je 0x40918f
mov dword [eax + 8], 0
mov byte [eax + 0xc], 1
mov dword [eax], vtable.BtReadThread.0
jmp 0x409191
xor eax, eax
push 1
mov ecx, eax
call fcn.00402f90
mov eax, 1
mov ecx, dword [esp + 0x230]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x21c]
xor ecx, esp
call fcn.0042e636
add esp, 0x22c
ret 0xc