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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov esi, dword [ebp + 8]
mov dword [ebp - 0x1c], 0
mov eax, dword [esi + 8]
mov dword [ebp - 0x10], 0
mov edi, dword [eax + 0x24]
mov edx, dword [eax + 0x40]
test edi, edi
setne al
movzx eax, al
mov dword [ebp - 0x20], eax
test dh, 8
je 0x402e17
mov eax, dword [esi + 4]
add eax, 0xc
mov dword [ebp - 0x24], eax
mov dword [esp], 0x20
call fcn.00409750
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 8]
mov edx, dword [eax + 4]
test edx, edx
jne 0x402e3a
lea ecx, [esi + 0xc]
mov dword [ebp - 0x30], ecx
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.00406550
mov eax, dword [esi + 0xc]
mov dword [eax + 0x44], 1
mov dword [esp], 0x413004
call sub.cygwin1.dll_pthread_mutex_lock
mov eax, dword [ebp - 0x28]
add eax, 0x10
mov dword [ebp - 0x34], eax
mov eax, dword [0x413084]
test eax, eax
jne 0x402d3e
mov eax, dword [esi + 0xc]
mov edi, 0x10
xor ebx, ebx
mov dword [eax + 0x88], edi
add eax, 0x88
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0xc], ebx
add eax, 0x78
mov dword [esp + 0x10], eax
mov eax, dword [esi + 8]
mov eax, dword [eax + 0x34]
mov dword [esp + 8], eax
mov eax, dword [esi + 4]
mov dword [esp + 4], eax
mov eax, dword [esi + 8]
mov eax, dword [eax + 0x2c]
mov dword [esp], eax
call sub.cygwin1.dll_recvfrom
cmp eax, 0xffffffff
mov ebx, eax
je 0x4031ab
mov eax, dword [0x413008]
mov dword [esp + 4], eax
mov eax, dword [esi + 0xc]
add eax, 0x78
mov dword [esp], eax
call fcn.004025a0
mov edx, dword [esi + 4]
mov edi, eax
mov eax, dword [edx]
xchg ah, al
ror eax, 0x10
xchg ah, al
test eax, eax
js 0x402f56
test edi, edi
je 0x4031f1
mov ecx, dword [ebp - 0x28]
mov dword [ecx], eax
mov eax, dword [edx + 4]
xchg ah, al
ror eax, 0x10
xchg ah, al
mov dword [ecx + 0x18], eax
mov eax, dword [edx + 8]
xchg ah, al
ror eax, 0x10
xchg ah, al
mov dword [ecx + 0x1c], eax
mov eax, ebx
sar eax, 0x1f
mov dword [ecx + 8], ebx
mov dword [ecx + 0xc], eax
xor ecx, ecx
mov dword [esp + 4], ecx
mov edx, dword [ebp - 0x34]
mov dword [esp], edx
call sub.cygwin1.dll_gettimeofday
mov ecx, dword [ebp - 0x28]
mov dword [esp + 4], ecx
mov eax, dword [edi + 0x14]
mov eax, dword [eax + 0x14]
mov dword [esp], eax
call fcn.00404c10
mov eax, dword [0x413084]
test eax, eax
je 0x402c5b
mov edx, dword [esi + 0xc]
mov eax, dword [edx + 0x2c]
cmp eax, 0xffffffff
je 0x403065
mov ecx, dword [0x413084]
test ecx, ecx
jne 0x40305d
mov ecx, dword [esi + 8]
test byte [ecx + 0x42], 0x10
je 0x402e51
mov eax, dword [0x413008]
test eax, eax
jne 0x402e51
mov eax, dword [edx + 0x78]
mov dword [ecx + 0x78], eax
mov eax, dword [edx + 0x7c]
mov dword [ecx + 0x7c], eax
mov eax, dword [edx + 0x80]
mov dword [ecx + 0x80], eax
mov eax, dword [edx + 0x84]
mov dword [ecx + 0x84], eax
mov eax, dword [esi]
mov dword [ebp - 0x1c], 1
dec eax
test eax, eax
mov dword [esi], eax
je 0x403270
mov eax, dword [esi + 0xc]
add eax, 0x78
mov dword [esp + 4], eax
mov eax, dword [esi + 8]
add eax, 0x78
mov dword [esp], eax
call fcn.00407890
test eax, eax
jne 0x402e5c
mov eax, dword [esi + 0xc]
mov eax, dword [eax + 0x88]
mov dword [esp + 8], eax
mov eax, dword [esi + 0xc]
add eax, 0x78
mov dword [esp + 4], eax
mov eax, dword [esi + 8]
mov eax, dword [eax + 0x2c]
mov dword [esp], eax
call sub.cygwin1.dll_connect
mov eax, dword [esi + 8]
mov eax, dword [eax + 0x2c]
mov dword [esp], eax
call sub.cygwin1.dll_close
mov eax, dword [esi + 8]
mov dword [eax + 0x2c], 0xffffffff
mov dword [esp], esi
call fcn.00402790
jmp 0x402f2f
mov edx, dword [esi + 4]
mov dword [ebp - 0x24], edx
mov dword [esp], 0x20
call fcn.00409750
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 8]
mov edx, dword [eax + 4]
test edx, edx
je 0x402c1d
mov dword [ebp - 0x1c], 1
mov dword [esp], eax
call fcn.00407700
mov eax, dword [esi + 8]
jmp 0x402c1d
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x402dad
mov dword [esp], 0x1c
call fcn.00409750
mov edx, dword [esi + 0xc]
mov ebx, eax
mov eax, dword [edx + 0x78]
mov dword [ebx], eax
mov eax, dword [edx + 0x7c]
mov dword [ebx + 4], eax
mov eax, dword [edx + 0x80]
mov dword [ebx + 8], eax
mov eax, dword [edx + 0x84]
mov dword [ebx + 0x18], 0
mov dword [ebx + 0xc], eax
mov eax, dword [esi + 0xc]
mov dword [ebx + 0x14], eax
mov eax, dword [0x413008]
mov dword [esp + 4], eax
mov eax, dword [esi + 0xc]
add eax, 0x78
mov dword [esp], eax
call fcn.00402660
test eax, eax
mov edi, eax
je 0x403287
mov eax, dword [eax + 0x10]
mov edx, dword [esi + 0xc]
mov dword [ebx + 0x10], eax
mov eax, dword [edi + 0x10]
mov dword [edx + 0x18], eax
mov dword [esp], ebx
mov eax, 0x413008
mov dword [esp + 4], eax
call fcn.00402550
mov dword [ebp - 0x10], 0
mov eax, dword [esi + 8]
mov eax, dword [eax + 0x40]
test al, 2
jne 0x402ef2
test ah, 0x40
je 0x403252
mov eax, dword [ebp - 0x10]
test eax, eax
jne 0x4031d1
mov ebx, dword [esi + 0xc]
mov dword [esp], ebx
call fcn.004047d0
mov dword [ebx + 0x14], eax
mov eax, dword [esi + 8]
test byte [eax + 0x42], 0x10
jne 0x402f16
dec dword [esi]
mov edx, dword [ebp - 0x30]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00406550
mov eax, dword [esi + 0xc]
mov dword [eax + 0x44], 1
mov eax, dword [0x413084]
test eax, eax
jne 0x403065
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x402c5b
mov eax, dword [esi]
test eax, eax
jg 0x402c5b
jmp 0x403065
test edi, edi
je 0x40304f
mov ecx, dword [ebp - 0x28]
neg eax
mov dword [ecx], eax
mov eax, dword [edx + 4]
xchg ah, al
ror eax, 0x10
xchg ah, al
mov dword [ecx + 0x18], eax
mov eax, dword [edx + 8]
xchg ah, al
ror eax, 0x10
xchg ah, al
mov dword [ecx + 0x1c], eax
mov eax, ebx
sar eax, 0x1f
mov dword [ecx + 0xc], eax
xor eax, eax
mov dword [ecx + 8], ebx
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x34]
mov dword [esp], edx
call sub.cygwin1.dll_gettimeofday
mov ecx, dword [ebp - 0x28]
mov dword [esp + 4], ecx
mov eax, dword [edi + 0x14]
mov eax, dword [eax + 0x14]
mov dword [esp], eax
call fcn.00404c10
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sub.cygwin1.dll_gettimeofday
mov edx, dword [ebp - 0x28]
mov dword [esp + 4], edx
mov eax, dword [edi + 0x14]
mov eax, dword [eax + 0x14]
mov dword [esp], eax
call fcn.00404d20
cmp ebx, 0x34
jg 0x403084
mov eax, dword [edi + 0x14]
mov eax, dword [eax + 0x14]
mov dword [esp], eax
call fcn.00404d90
mov eax, dword [edi + 0x14]
mov dword [eax + 0x14], 0
mov eax, 0x413008
mov dword [esp + 4], eax
mov eax, dword [edi + 0x14]
add eax, 0x78
mov dword [esp], eax
call fcn.004025e0
mov edx, dword [esi + 4]
mov eax, dword [esi + 0xc]
xor ebx, ebx
mov eax, dword [eax + 0x88]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0xc], ebx
add eax, 0x78
mov dword [esp + 0x10], eax
mov eax, dword [esi + 8]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov eax, dword [esi + 8]
mov eax, dword [eax + 0x2c]
mov dword [esp], eax
call sub.cygwin1.dll_sendto
jmp 0x402c4e
cmp ebx, 0x34
jle 0x403011
mov dword [edx + 0xc], 0
jmp 0x403011
mov dword [esp], eax
call sub.cygwin1.dll_close
mov dword [esp], 0x413004
call fcn.0040d248
mov eax, dword [esi + 0xc]
mov dword [esp], eax
call fcn.004066e0
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [edi + 0x14]
mov ecx, dword [esi + 4]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x2c], ecx
mov dword [esp], eax
call fcn.00404de0
fld qword [eax + 0x30]
mov ebx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x2c]
add ebx, 0xc
mov dword [edx + 0xc], pe_nt_image_headers32
mov edx, dword [eax + 0x1c]
xchg dh, dl
ror edx, 0x10
xchg dh, dl
mov dword [ebx + 4], edx
mov edx, dword [eax + 0x18]
xchg dh, dl
ror edx, 0x10
xchg dh, dl
mov dword [ebx + 8], edx
fnstcw word [ebp - 0x12]
movzx edx, word [ebp - 0x12]
or dx, 0xc00
mov word [ebp - 0x14], dx
fldcw word [ebp - 0x14]
fist dword [ebp - 0x18]
fldcw word [ebp - 0x12]
mov edx, dword [ebp - 0x18]
mov ecx, edx
xchg ch, cl
ror ecx, 0x10
xchg ch, cl
mov dword [ebx + 0xc], ecx
push edx
fild dword [esp]
fnstcw word [ebp - 0x12]
movzx edx, word [ebp - 0x12]
or dx, 0xc00
mov word [ebp - 0x14], dx
fsubp st(1)
fmul qword [0x40f220]
fldcw word [ebp - 0x14]
fistp dword [ebp - 0x18]
fldcw word [ebp - 0x12]
mov edx, dword [ebp - 0x18]
fld qword [eax + 0x20]
xchg dh, dl
ror edx, 0x10
xchg dh, dl
mov dword [ebx + 0x10], edx
mov edx, dword [eax + 0xc]
xchg dh, dl
ror edx, 0x10
xchg dh, dl
mov dword [ebx + 0x14], edx
mov edx, dword [eax + 0x10]
xchg dh, dl
ror edx, 0x10
xchg dh, dl
mov dword [ebx + 0x18], edx
mov edx, dword [eax + 0x14]
xchg dh, dl
ror edx, 0x10
xchg dh, dl
mov dword [ebx + 0x1c], edx
fnstcw word [ebp - 0x12]
movzx eax, word [ebp - 0x12]
or ax, 0xc00
mov word [ebp - 0x14], ax
fldcw word [ebp - 0x14]
fist dword [ebp - 0x18]
fldcw word [ebp - 0x12]
mov eax, dword [ebp - 0x18]
mov edx, eax
xchg dh, dl
ror edx, 0x10
xchg dh, dl
mov dword [ebx + 0x20], edx
mov dword [esp], eax
fild dword [esp]
add esp, 4
fnstcw word [ebp - 0x12]
movzx eax, word [ebp - 0x12]
or ax, 0xc00
fsubp st(1)
mov word [ebp - 0x14], ax
fmul qword [0x40f220]
fldcw word [ebp - 0x14]
fistp dword [ebp - 0x18]
fldcw word [ebp - 0x12]
mov eax, dword [ebp - 0x18]
xchg ah, al
ror eax, 0x10
xchg ah, al
mov dword [ebx + 0x24], eax
jmp 0x402fdf
mov dword [esp], str.recvfrom
mov ebx, 0x1f0
mov ecx, str._home_Owner_build_iperf_cygport_iperf_2.0.4_1_src_iperf_2.0.4_src_Listener.cpp
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
call fcn.004095f0
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], eax
call fcn.004024a0
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x4c], 1
je 0x4032d1
mov eax, dword [esi + 0xc]
mov dword [eax + 0x20], edx
jmp 0x402efd
mov dword [esp], 0x41307c
call sub.cygwin1.dll_pthread_mutex_lock
mov eax, dword [0x413080]
mov edx, dword [esi + 0xc]
dec eax
mov dword [0x413080], eax
neg eax
mov dword [edx + 0x2c], eax
mov dword [esp], 0x41307c
call fcn.0040d248
mov eax, dword [esi + 0xc]
mov edx, 0x10
mov dword [eax + 0x9c], edx
add eax, 0x9c
mov dword [esp + 8], eax
mov eax, dword [esi + 0xc]
add eax, 0x8c
mov dword [esp + 4], eax
mov eax, dword [esi + 8]
mov eax, dword [eax + 0x2c]
mov dword [esp], eax
call sub.cygwin1.dll_getsockname
jmp 0x402d3e
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x10]
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov eax, dword [esi + 0xc]
mov dword [esp], eax
call fcn.00407250
jmp 0x402ef2
mov dword [esp], 0
call fcn.00409420
mov dword [esi], 1
jmp 0x402dad
mov eax, dword [esi + 0xc]
mov dword [eax + 0x24], 0
mov dword [esp], 0x41307c
call sub.cygwin1.dll_pthread_mutex_lock
mov eax, dword [0x413080]
dec eax
mov dword [esp + 4], eax
mov dword [0x413080], eax
mov eax, dword [esi + 0xc]
mov dword [esp], eax
call fcn.00404420
mov dword [ebx + 0x10], eax
mov edx, dword [esi + 0xc]
mov dword [edx + 0x18], eax
mov dword [esp], 0x41307c
call fcn.0040d248
jmp 0x402ec7
mov dword [esp], edx
call fcn.004091d0
jmp 0x402efd