Function at 0x408ba0
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 0x4bb4ab
mov eax, dword fs:[0]
push eax
sub esp, 0x220
mov eax, dword [0x4e5a68]
xor eax, esp
mov dword [esp + 0x21c], eax
push ebp
push esi
push edi
mov eax, dword [0x4e5a68]
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.00408a00
add esp, 8
lea edx, [esp + 0x9c]
push edx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x408c60
push 3
push 1
push 0x20
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x408c67
push str.Fail_to_create_BT_socket
lea ecx, [esp + 0x24]
call fcn.00405e70
push esi
push 0
lea eax, [esp + 0x28]
push eax
mov ecx, ebp
mov dword [esp + 0x244], 0
call fcn.00405120
cmp dword [esp + 0x38], 0x10
jb 0x408c60
mov ecx, dword [esp + 0x24]
push ecx
call fcn.00431ad1
add esp, 4
xor eax, eax
jmp 0x408e8f
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 [0x4bfff8]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x5e], ecx
mov ecx, dword [0x4bfffc]
mov dword [esp + 0x6a], ecx
push 0x1e
lea ecx, [esp + 0x60]
mov dword [esp + 0x66], edx
mov edx, dword [0x4c0000]
mov dword [esp + 0x6a], eax
mov eax, dword [0x4c0004]
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 0x408d82
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x2742
jne 0x408d1e
push str.Fail_to_connect__50_._Bluetooth_adapter_not_detected.
push ebp
call fcn.00405ab0
add esp, 8
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x408e8f
cmp eax, 0x274c
jne 0x408d40
cmp dword [0x4f0c74], 0x10
mov eax, dword [0x4f0c60]
jae 0x408d38
mov eax, 0x4f0c60
push eax
push str.Fail_to_connect_to__s__60_._Bluetooth_not_detected_on_your_phone.
jmp 0x408d6b
cmp eax, 0x2741
jne 0x408d63
push str.Fail_to_connect_to_your_phone__49_._Please_make_sure_Bluetooth_mode_is_activated.
push ebp
call fcn.00405ab0
add esp, 8
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x408e8f
call edi
push eax
push str.Fail_to_connect_to_Bluetooth_device__err_d.
push ebp
call fcn.00405ab0
add esp, 0xc
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x408e8f
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], 0x1a1
mov dword [esp + 0x50], edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0x20
je 0x408de4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Bluetooth_fail_to_send_handshake__err_d.
jmp 0x408d6b
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 0x408e29
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Bluetooth_fail_to_recv_handshake_err_d.
jmp 0x408d6b
cmp byte [esp + 0x248], 0
je 0x408e3c
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x408e8a
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.004321b4
add esp, 4
test eax, eax
je 0x408e7f
mov dword [eax + 8], 0
mov byte [eax + 0xc], 1
mov dword [eax], vtable.BtReadThread.0
jmp 0x408e81
xor eax, eax
push 1
mov ecx, eax
call fcn.00402dd0
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.0043236c
add esp, 0x22c
ret 0xc