Function at 0x406010
Capabilities:
Get socket status

Disassembly:
push ebp
mov eax, 7
mov ebp, esp
push edi
lea edx, [ebp - 0x18]
push esi
push ebx
sub esp, 0x3c
mov edi, dword [ebp + 8]
lea esi, [esi]
lea edi, [edi]
mov byte [edx], 0
inc edx
dec eax
jns 0x406030
mov dword [ebp - 0x2c], 0
jmp 0x4060ed
mov eax, dword [edx + 0x34]
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov eax, dword [edx + 0x2c]
mov dword [esp], eax
call sub.cygwin1.dll_write
mov ebx, dword [edi]
mov eax, 1
mov ecx, dword [ebx + 0x2c]
mov edx, ecx
and ecx, 0x1f
shr edx, 5
shl eax, cl
or dword [ebp + edx*4 - 0x18], eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 1
lea edx, [ebp - 0x18]
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov eax, dword [ebx + 0x2c]
mov dword [ebp - 0x1c], 0
inc eax
mov dword [esp], eax
call sub.cygwin1.dll_select
cmp eax, 0xffffffff
je 0x406250
test eax, eax
je 0x406245
mov edx, dword [edi]
mov eax, dword [edx + 0x34]
mov dword [esp + 8], eax
mov eax, dword [edi + 4]
mov dword [esp + 4], eax
mov eax, dword [edx + 0x2c]
mov dword [esp], eax
call sub.cygwin1.dll_read
test eax, eax
mov ebx, eax
js 0x40629d
test ebx, ebx
jle 0x406245
cmp dword [ebp - 0x2c], 9
jg 0x40621c
inc dword [ebp - 0x2c]
mov edx, dword [edi]
mov esi, dword [edi + 4]
cmp dword [edx + 0x34], 0x34
jle 0x406043
mov eax, dword [edx + 0x14]
lea ebx, [esi + 0xc]
mov dword [esp], eax
call fcn.00404de0
fld qword [eax + 0x30]
mov dword [esi + 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 - 0x22]
movzx edx, word [ebp - 0x22]
or dx, 0xc00
mov word [ebp - 0x24], dx
fldcw word [ebp - 0x24]
fist dword [ebp - 0x28]
fldcw word [ebp - 0x22]
mov edx, dword [ebp - 0x28]
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 - 0x22]
movzx edx, word [ebp - 0x22]
or dx, 0xc00
mov word [ebp - 0x24], dx
fsubp st(1)
fmul qword [0x410c98]
fldcw word [ebp - 0x24]
fistp dword [ebp - 0x28]
fldcw word [ebp - 0x22]
mov edx, dword [ebp - 0x28]
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 - 0x22]
movzx eax, word [ebp - 0x22]
or ax, 0xc00
mov word [ebp - 0x24], ax
fldcw word [ebp - 0x24]
fist dword [ebp - 0x28]
fldcw word [ebp - 0x22]
mov eax, dword [ebp - 0x28]
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 - 0x22]
movzx eax, word [ebp - 0x22]
or ax, 0xc00
fsubp st(1)
mov word [ebp - 0x24], ax
fmul qword [0x410c98]
fldcw word [ebp - 0x24]
fistp dword [ebp - 0x28]
fldcw word [ebp - 0x22]
mov esi, dword [edi + 4]
mov edx, dword [edi]
mov eax, dword [ebp - 0x28]
xchg ah, al
ror eax, 0x10
xchg ah, al
mov dword [ebx + 0x24], eax
jmp 0x406043
call sub.cygwin1.dll___getreent
mov edx, dword [ebp - 0x2c]
mov dword [esp + 0xc], edx
mov edx, dword [edi]
mov edx, dword [edx + 0x2c]
mov dword [esp + 8], edx
mov edx, str.__3d__WARNING:_ack_of_last_datagram_failed_after__d_tries._n
mov dword [esp + 4], edx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.select
mov eax, 0xd7
mov dword [esp + 8], eax
mov eax, str._home_Owner_build_iperf_cygport_iperf_2.0.4_1_src_iperf_2.0.4_src_Server.cpp
mov dword [esp + 4], eax
call fcn.004095f0
mov eax, dword [edi]
mov dword [esp], eax
call fcn.00409120
mov edx, dword [edi]
mov eax, dword [edx + 0x34]
mov dword [esp + 8], eax
mov eax, dword [edi + 4]
mov dword [esp + 4], eax
mov eax, dword [edx + 0x2c]
mov dword [esp], eax
call sub.cygwin1.dll_read
test eax, eax
mov ebx, eax
jns 0x4060db
mov dword [esp], str.read
mov esi, 0xdf
mov ecx, str._home_Owner_build_iperf_cygport_iperf_2.0.4_1_src_iperf_2.0.4_src_Server.cpp
mov dword [esp + 8], esi
mov dword [esp + 4], ecx
call fcn.004095f0
jmp 0x4060db