Function at 0x4308c0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
push ebx
sub esp, 0x5c
mov dword [ebp - 0x3c], eax
mov eax, 0x56fe18
mov dword [ebp - 0x40], ecx
call dbg._fh_alloc
test eax, eax
mov ebx, eax
je 0x430f68
mov eax, dword [0x5a416c]
test eax, eax
je 0x430b43
mov eax, 2
mov dword [ebp - 0x28], 0
mov word [ebp - 0x28], ax
movzx eax, word [ebp - 0x3c]
mov dword [ebp - 0x24], 0
mov dword [addr.sin_family], 0
mov dword [addr.sin_addr], 0
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x26], ax
mov eax, dword [ebp - 0x40]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_htonl]
sub esp, 4
mov dword [ebp - 0x24], eax
mov eax, esi
call dbg.GetSocketProtocolFromSocketType
mov dword [esp + 4], esi
mov dword [esp], 2
mov dword [esp + 8], eax
call dword [sym.imp.WS2_32.dll_socket]
sub esp, 0xc
cmp eax, 0xffffffff
mov edi, eax
je 0x430c19
mov dword [ebx + 0xc], eax
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 1
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xfffffffb
mov dword [esp + 4], 0xffff
mov dword [esp], edi
call dword [sym.imp.WS2_32.dll_setsockopt]
sub esp, 0x14
cmp eax, 0xffffffff
je 0x430cb5
lea eax, [ebp - 0x28]
mov dword [esp + 8], 0x10
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.WS2_32.dll_bind]
sub esp, 0xc
cmp eax, 0xffffffff
je 0x430de0
cmp esi, 1
je 0x430b50
mov eax, dword [ebx + 4]
mov edx, 0xffffffff
test eax, eax
je 0x430a05
cmp ebx, 0x5a4180
jb 0x430a05
cmp ebx, 0x5bc180
jae 0x430a05
mov edx, ebx
sub edx, 0x5a4180
sar edx, 4
imul edx, edx, 0xaaaaaaab
add edx, 0x800
cmp esi, 1
mov eax, 0x56eeca
mov ecx, str.udp:
mov edi, 0x56eece
cmove ecx, eax
mov eax, 0x56eecb
cmp dword [ebp - 0x40], 0x7f000001
mov dword [esp + 0xc], edx
mov dword [esp + 0x14], ecx
cmovne eax, edi
mov edi, dword [ebp - 0x3c]
add ebx, 0x10
mov dword [esp + 0x10], eax
mov dword [esp + 8], str._d__s_server:_s_d_
mov dword [esp + 4], 0x20
mov dword [esp + 0x18], edi
mov dword [esp], ebx
mov dword [ebp - 0x40], edx
call dbg.snprintf
mov edx, dword [ebp - 0x40]
test byte [0x5a4058], 0x80
jne 0x430a70
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x40], edx
call dbg.android::base::GetMinimumLogSeverity()
mov edx, dword [ebp - 0x40]
cmp eax, 1
jg 0x430a66
mov edi, dword [sym.imp.msvcrt.dll__errno]
lea ebx, [ebp - 0x30]
mov dword [ebp - 0x44], edx
call edi
sub esi, 1
mov edx, dword [ebp - 0x44]
mov esi, dword [ebp - 0x3c]
mov ecx, 0x56eec1
mov eax, dword [eax]
mov dword [esp + 0x10], edx
mov dword [esp + 8], esi
mov dword [esp + 4], str.port__d_type__s___fd__d
mov dword [ebp - 0x40], eax
mov eax, 0x56eebd
cmove eax, ecx
lea ecx, [ebp - 0x2c]
mov dword [esp + 0xc], eax
mov dword [esp], ecx
call dbg.android::base::StringPrintf(char const*, ::)
mov ecx, ebx
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0x32f
mov dword [esp], str.system_core_adb_sysdeps_win32.cpp
call dbg.android::base::LogMessage::LogMessage(char const*, unsigned int, android::base::LogId, android::base::LogSeverity, char const*, int)
mov ecx, ebx
sub esp, 0x18
call dbg.android::base::LogMessage::stream()
mov ecx, dword [ebp - 0x2c]
mov esi, dword [ecx - 0xc]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 8], esi
call dbg.std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)
mov ecx, ebx
call dbg.android::base::LogMessage::~LogMessage()
mov esi, dword [ebp - 0x2c]
mov dword [esp], ebx
lea ecx, [esi - 0xc]
call dbg.std::string::_Rep::_M_dispose(std::allocator<char> const&)
push eax
call edi
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x44]
mov dword [eax], ecx
jmp 0x430a66
call sym._init_winsock____clone_.part.130_
jmp 0x4308f2
mov dword [esp + 4], 0x7fffffff
mov dword [esp], edi
call dword [sym.imp.WS2_32.dll_listen]
sub esp, 8
cmp eax, 0xffffffff
jne 0x4309d2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea esi, [ebp - 0x30]
mov dword [esp], esi
mov dword [esp + 4], eax
mov dword [ebp - 0x40], eax
call dbg.android::base::SystemErrorCodeToString(int)
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], str.cannot_listen_on_socket:__s
mov dword [esp + 8], eax
lea eax, [ebp - 0x2c]
mov dword [esp], eax
call dbg.android::base::StringPrintf(char const*, ::)
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x2c]
mov dword [esp], eax
call dbg.std::string::swap(std::string&)
push eax
mov eax, dword [ebp - 0x2c]
lea ecx, [eax - 0xc]
lea eax, [ebp - 0x35]
mov dword [esp], eax
call dbg.std::string::_Rep::_M_dispose(std::allocator<char> const&)
push eax
mov eax, dword [ebp - 0x30]
lea ecx, [eax - 0xc]
lea eax, [ebp - 0x2c]
mov dword [esp], eax
call dbg.std::string::_Rep::_M_dispose(std::allocator<char> const&)
test byte [0x5a4058], 0x80
push eax
je 0x430f9e
call dbg.android::base::GetMinimumLogSeverity()
mov edi, dword [sym.imp.msvcrt.dll__errno]
sub eax, 1
jle 0x430ff9
mov eax, dword [ebp - 0x40]
call dbg._socket_set_errno
nop
lea esi, [esi]
call edi
mov esi, dword [eax]
mov eax, ebx
call dbg._fh_close
call edi
mov edx, 0xffffffff
mov dword [eax], esi
jmp 0x430a66
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x30]
mov dword [esp], eax
mov dword [esp + 4], esi
mov dword [ebp - 0x40], eax
call dbg.android::base::SystemErrorCodeToString(int)
lea eax, [ebp - 0x2c]
mov edi, eax
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], str.cannot_create_socket:__s
mov dword [esp], edi
mov dword [esp + 8], eax
call dbg.android::base::StringPrintf(char const*, ::)
mov ecx, dword [ebp + 8]
mov dword [esp], edi
call dbg.std::string::swap(std::string&)
mov eax, dword [ebp - 0x2c]
lea ecx, [eax - 0xc]
sub esp, 4
cmp ecx, 0x566310
jne 0x431148
mov eax, dword [ebp - 0x30]
lea ecx, [eax - 0xc]
cmp ecx, 0x566310
jne 0x431127
test byte [0x5a4058], 0x80
je 0x430cad
call dbg.android::base::GetMinimumLogSeverity()
mov edi, dword [sym.imp.msvcrt.dll__errno]
cmp eax, 1
jle 0x430fa9
mov eax, esi
call dbg._socket_set_errno
jmp 0x430c00
mov edi, dword [sym.imp.msvcrt.dll__errno]
jmp 0x430ca1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x30]
mov dword [esp], eax
mov dword [esp + 4], esi
mov dword [ebp - 0x40], eax
call dbg.android::base::SystemErrorCodeToString(int)
lea eax, [ebp - 0x2c]
mov edi, eax
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], str.cannot_set_socket_option_SO_EXCLUSIVEADDRUSE:__s
mov dword [esp], edi
mov dword [esp + 8], eax
call dbg.android::base::StringPrintf(char const*, ::)
mov ecx, dword [ebp + 8]
mov dword [esp], edi
call dbg.std::string::swap(std::string&)
mov eax, dword [ebp - 0x2c]
lea ecx, [eax - 0xc]
sub esp, 4
cmp ecx, 0x566310
jne 0x4310c4
mov eax, dword [ebp - 0x30]
lea ecx, [eax - 0xc]
cmp ecx, 0x566310
jne 0x4310a3
test byte [0x5a4058], 0x80
je 0x430cad
call dbg.android::base::GetMinimumLogSeverity()
mov edi, dword [sym.imp.msvcrt.dll__errno]
cmp eax, 1
jg 0x430ca1
call edi
mov edx, dword [eax]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x3c], edx
mov eax, dword [eax]
mov dword [esp + 4], 0x56ef9a
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call dbg.android::base::StringPrintf(char const*, ::)
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0x311
mov ecx, dword [ebp - 0x40]
mov dword [esp], str.system_core_adb_sysdeps_win32.cpp
call dbg.android::base::LogMessage::LogMessage(char const*, unsigned int, android::base::LogId, android::base::LogSeverity, char const*, int)
mov ecx, dword [ebp - 0x40]
sub esp, 0x18
call dbg.android::base::LogMessage::stream()
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx - 0xc]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 8], edx
call dbg.std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)
mov ecx, dword [ebp - 0x40]
call dbg.android::base::LogMessage::~LogMessage()
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x2c]
mov dword [esp], eax
sub ecx, 0xc
call dbg.std::string::_Rep::_M_dispose(std::allocator<char> const&)
push eax
call edi
mov edx, dword [ebp - 0x3c]
mov dword [eax], edx
jmp 0x430ca1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea ecx, [ebp - 0x30]
mov dword [esp], ecx
mov dword [ebp - 0x40], ecx
mov dword [esp + 4], eax
mov dword [ebp - 0x48], eax
call dbg.android::base::SystemErrorCodeToString(int)
movzx eax, word [ebp - 0x26]
mov edi, dword [ebp - 0x30]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x4c], ax
mov eax, dword [ebp - 0x24]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x44], ecx
sub esp, 4
mov dword [esp + 0x10], edi
movzx edi, word [ebp - 0x4c]
mov dword [esp + 8], eax
mov dword [esp], ecx
mov dword [esp + 4], str.cannot_bind_to__s:_u:__s
mov dword [esp + 0xc], edi
mov edi, ecx
call dbg.android::base::StringPrintf(char const*, ::)
mov ecx, dword [ebp + 8]
mov dword [esp], edi
call dbg.std::string::swap(std::string&)
mov eax, dword [ebp - 0x2c]
lea ecx, [eax - 0xc]
sub esp, 4
cmp ecx, 0x566310
jne 0x431106
mov eax, dword [ebp - 0x30]
lea ecx, [eax - 0xc]
cmp ecx, 0x566310
jne 0x4310e5
test byte [0x5a4058], 0x80
jne 0x430e97
mov edi, dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [ebp - 0x48]
call dbg._socket_set_errno
jmp 0x430c00
call dbg.android::base::GetMinimumLogSeverity()
mov edi, dword [sym.imp.msvcrt.dll__errno]
cmp eax, 1
jg 0x430e8a
call edi
sub esi, 1
mov ecx, 0x56eec1
mov edx, dword [eax]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4c], edx
mov eax, dword [eax]
mov dword [esp + 4], str.could_not_bind_to__s:_d:__s
mov edx, eax
mov eax, 0x56eebd
cmove eax, ecx
mov ecx, dword [ebp - 0x3c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
mov dword [esp], eax
call dbg.android::base::StringPrintf(char const*, ::)
mov esi, dword [ebp - 0x40]
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov ecx, esi
mov dword [esp + 8], 0
mov dword [esp + 4], 0x31c
mov dword [esp], str.system_core_adb_sysdeps_win32.cpp
call dbg.android::base::LogMessage::LogMessage(char const*, unsigned int, android::base::LogId, android::base::LogSeverity, char const*, int)
mov ecx, esi
mov dword [ebp - 0x40], esi
sub esp, 0x18
call dbg.android::base::LogMessage::stream()
mov ecx, dword [ebp - 0x2c]
mov esi, dword [ecx - 0xc]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 8], esi
call dbg.std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)
mov esi, dword [ebp - 0x40]
mov ecx, esi
call dbg.android::base::LogMessage::~LogMessage()
mov eax, dword [ebp - 0x2c]
mov dword [esp], esi
lea ecx, [eax - 0xc]
call dbg.std::string::_Rep::_M_dispose(std::allocator<char> const&)
push ecx
call edi
mov edx, dword [ebp - 0x4c]
mov dword [eax], edx
jmp 0x430e8a
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call dbg.adb_strerror(int)
mov dword [esp], eax
mov ebx, eax
call sym._strlen
mov ecx, dword [ebp + 8]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dbg.std::string::assign(char const*, unsigned int)
mov edx, 0xffffffff
sub esp, 8
jmp 0x430a66
mov edi, dword [sym.imp.msvcrt.dll__errno]
jmp 0x430bf3
call edi
mov edx, dword [eax]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x3c], edx
mov eax, dword [eax]
mov dword [esp + 4], 0x56ef9a
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call dbg.android::base::StringPrintf(char const*, ::)
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0x303
jmp 0x430d88
call edi
mov edx, dword [eax]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x44], edx
mov eax, dword [eax]
mov dword [esp + 8], 0x56eec1
mov dword [esp + 4], str.could_not_listen_on__s:_d:__s
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x2c]
mov dword [esp], eax
call dbg.android::base::StringPrintf(char const*, ::)
mov ecx, esi
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0x326
mov dword [esp], str.system_core_adb_sysdeps_win32.cpp
call dbg.android::base::LogMessage::LogMessage(char const*, unsigned int, android::base::LogId, android::base::LogSeverity, char const*, int)
mov ecx, esi
sub esp, 0x18
call dbg.android::base::LogMessage::stream()
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx - 0xc]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 8], edx
call dbg.std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)
mov ecx, esi
call dbg.android::base::LogMessage::~LogMessage()
mov eax, dword [ebp - 0x2c]
mov dword [esp], esi
lea ecx, [eax - 0xc]
call dbg.std::string::_Rep::_M_dispose(std::allocator<char> const&)
push edx
call edi
mov edx, dword [ebp - 0x44]
mov dword [eax], edx
jmp 0x430bf3
or edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x430d20
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call dbg.std::string::_Rep::_M_destroy(std::allocator<char> const&)
push ecx
jmp 0x430d20
or edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x430d0e
lea eax, [ebp - 0x35]
mov dword [esp], eax
call dbg.std::string::_Rep::_M_destroy(std::allocator<char> const&)
push edi
jmp 0x430d0e
or edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x430e7b
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call dbg.std::string::_Rep::_M_destroy(std::allocator<char> const&)
push eax
jmp 0x430e7b
or edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x430e69
lea eax, [ebp - 0x35]
mov dword [esp], eax
call dbg.std::string::_Rep::_M_destroy(std::allocator<char> const&)
push edx
jmp 0x430e69
or edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x430c84
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call dbg.std::string::_Rep::_M_destroy(std::allocator<char> const&)
push eax
jmp 0x430c84
or edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x430c72
lea eax, [ebp - 0x34]
mov dword [esp], eax
call dbg.std::string::_Rep::_M_destroy(std::allocator<char> const&)
push eax
jmp 0x430c72