Function at 0x409870
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Receive data
Receive data on socket

Disassembly:
push ebp
push edi
mov edi, ecx
push esi
push ebx
sub esp, 0xbc
mov ebx, dword [esp + 0xd0]
mov eax, dword [ebx + 0x2c]
mov dword [ebx + 0x60], 0xffffffff
mov dword [esp + 0x28], eax
mov edx, eax
lea eax, [ebx + 0xd0]
mov dword [esp + 0x20], eax
lea eax, [ebx + 0x150]
mov dword [esp + 0x24], eax
mov eax, dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x68]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov eax, dword [edi + 0x20]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_recvfrom]
sub esp, 0x18
mov esi, eax
test eax, eax
jle 0x4099a8
mov eax, dword [esp + 0x28]
mov edx, dword [edi + 0x10]
mov eax, dword [eax]
test byte [edx + 0x7c], 2
mov dword [esp], eax
je 0x409940
mov ecx, dword [esp + 0x2c]
call ecx
sub esp, 4
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call ecx
sub esp, 4
test eax, eax
jns 0x40994d
mov edx, dword [0x4786e0]
test edx, edx
je 0x409999
mov eax, dword [ebx + 0x60]
add esp, 0xbc
pop ebx
pop esi
pop edi
pop ebp
ret 4
call dword [sym.imp.WS2_32.dll_ntohl]
sub esp, 4
test eax, eax
js 0x40991e
mov eax, dword [0x4786e0]
test eax, eax
jne 0x409928
lea ebp, [esp + 0x30]
mov dword [esp], 0
mov dword [esp + 4], ebp
call sym._clock_gettime
mov ecx, dword [esp + 0x34]
mov eax, 0x10624dd3
imul ecx
sar ecx, 0x1f
mov eax, dword [esp + 0x30]
mov dword [ebx + 0x370], eax
sar edx, 6
sub edx, ecx
mov dword [ebx + 0x374], edx
mov dword [esp], ebx
call sym.Iperf_push_host_thread_Settings_
test al, al
jne 0x4099f0
mov edx, dword [ebx + 0x2c]
jmp 0x4098b0
cmp eax, 0xffffffff
jne 0x409928
mov dword [esp + 8], 0x2b2
mov dword [esp + 4], str.Listener.cpp
mov dword [esp], str.recvfrom
call sym._warn_errno
mov eax, dword [edi + 0x10]
mov dword [esp], eax
call sym._thread_stop
mov eax, dword [ebx + 0x60]
add esp, 0xbc
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov eax, dword [edi + 0x20]
mov dword [ebx + 0x60], eax
mov dword [edi + 0x20], 0xffffffff
test byte [ebx + 0x79], 0x40
jne 0x409a68
mov eax, dword [ebx + 0x150]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x60]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_connect]
sub esp, 0xc
cmp eax, 0xffffffff
je 0x409ace
mov dword [ebx + 0x1d8], pe_nt_image_headers32
lea eax, [ebx + 0x1d8]
mov dword [esp + 8], eax
lea eax, [ebx + 0x158]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x60]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_getsockname]
sub esp, 0xc
mov dword [esp], ebx
call sym._SockAddr_Ifrname
jmp 0x409aa5
mov dword [ebx + 0x260], pe_nt_image_headers32
lea eax, [ebx + 0x260]
mov dword [esp + 8], eax
mov dword [esp + 4], ebp
mov eax, dword [ebx + 0x60]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_getsockname]
lea eax, [ebx + 0x1e0]
sub esp, 0xc
mov dword [esp + 4], eax
mov dword [esp], ebp
call sym._SockAddr_Hostare_Equal
test eax, eax
je 0x409ab0
mov dword [ebx + 0x444], esi
jmp 0x409928
mov dword [esp + 8], 0x2dc
mov dword [esp + 4], str.Listener.cpp
mov dword [esp], str.mcast_join_and_packet_group_addr
call sym._warn
jmp 0x409aa5
mov dword [esp + 8], 0x2cb
mov dword [esp + 4], str.Listener.cpp
mov dword [esp], str.connect_UDP
call sym._warn_errno
mov eax, dword [edi + 0x10]
mov dword [esp], eax
call sym._thread_stop
jmp 0x409a2d