Function at 0x402ce0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd8
mov eax, dword [0x47f160]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
mov ebx, edx
push 0x3a
push esi
mov dword [ebp - 0xd4], ebx
call dword [sym.imp.MSVCR100.dll_strchr]
push 0x63
mov edi, eax
lea eax, [ebp - 0xcc]
push esi
push eax
call dword [sym.imp.MSVCR100.dll_strncpy]
add esp, 0x14
test edi, edi
je 0x402d9c
mov eax, edi
sub eax, esi
cmp eax, 0x64
jl 0x402d51
push esi
push str.bad_host_name__s
push 0x1000
push ebx
call dword [sym.imp.MSVCR100.dll__snprintf]
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00459991
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0xd0]
push ecx
lea edx, [edi + 1]
push 0x46db10
push edx
mov byte [ebp + eax - 0xcc], 0
call dword [sym.imp.MSVCR100.dll_sscanf]
add esp, 0xc
test eax, eax
jne 0x402da6
push edi
push str.bad_port_number__s
push 0x1000
push ebx
call dword [sym.imp.MSVCR100.dll__snprintf]
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00459991
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0xd0], 0x15b3
mov eax, dword [ebp - 0xd0]
push eax
lea ecx, [ebp - 0xcc]
push ecx
push str._s:_d
lea edx, [ebp - 0x68]
push 0x64
push edx
call dword [sym.imp.MSVCR100.dll__snprintf]
add esp, 0x14
lea edi, [ebp - 0x68]
call fcn.00414f30
test eax, eax
je 0x402dfc
mov eax, edi
push eax
push str.already_connected_to__s
push 0x1000
push ebx
call dword [sym.imp.MSVCR100.dll__snprintf]
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00459991
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xd0]
push ecx
lea ecx, [ebp - 0xcc]
call fcn.004100b0
mov edi, eax
add esp, 4
mov dword [ebp - 0xd8], edi
test edi, edi
jns 0x402e4a
mov edx, dword [ebp - 0xd0]
push edx
push esi
push str.unable_to_connect_to__s:_d
push 0x1000
push ebx
call dword [sym.imp.MSVCR100.dll__snprintf]
add esp, 0x14
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00459991
mov esp, ebp
pop ebp
ret
test byte [0x4805a8], 1
je 0x402ed2
mov esi, dword [sym.imp.MSVCR100.dll__errno]
call esi
mov edi, dword [eax]
push 0x480590
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [sym.imp.MSVCR100.dll___iob_func]
push str.connect_device
push str.adb.cpp
push str._s::_s__:
call ebx
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0x10
call esi
mov dword [eax], edi
mov eax, dword [ebp - 0xd8]
push eax
push str.client:_connected_on_remote_on_fd__d_n
call ebx
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
call ebx
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 0x10
push 0x480590
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call esi
mov ebx, dword [ebp - 0xd4]
mov dword [eax], edi
mov edi, dword [ebp - 0xd8]
push edi
call fcn.0040ec90
add esp, 4
test eax, eax
je 0x402efe
cmp dword [eax], 0x470114
jne 0x402efe
mov edx, dword [eax + 0xc]
push 4
lea ecx, [ebp - 0xd4]
push ecx
push 1
push 6
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, dword [ebp - 0xd0]
push 0
push eax
push edi
lea ecx, [ebp - 0x68]
call fcn.00414df0
lea ecx, [ebp - 0x68]
push ecx
push str.connected_to__s
push 0x1000
push ebx
call dword [sym.imp.MSVCR100.dll__snprintf]
mov ecx, dword [ebp - 4]
add esp, 0x1c
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00459991
mov esp, ebp
pop ebp
ret