Function at 0x40a450
Capabilities:
Get socket status
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4420db
mov eax, dword fs:[0]
push eax
sub esp, 0x140
mov eax, dword [0x4530c4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x118], ecx
lea ecx, [ebp - 0x124]
call fcn.00406450
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x118]
mov ecx, dword [eax + 0x64]
mov dword [ebp - 0x140], ecx
mov edx, dword [ebp - 0x118]
mov eax, dword [edx + 0x64]
push eax
lea ecx, [ebp - 0x124]
call fcn.0040ae30
mov dword [ebp - 0x130], eax
mov dword [ebp - 0x114], 0
mov dword [ebp - 0x128], 0
jmp 0x40a4e2
mov ecx, dword [ebp - 0x128]
add ecx, 1
mov dword [ebp - 0x128], ecx
mov edx, dword [ebp - 0x128]
cmp edx, dword [ebp - 0x114]
jae 0x40a511
mov ecx, dword [ebp - 0x118]
add ecx, 8
call fcn.00408430
mov ecx, dword [ebp - 0x128]
cmp dword [ebp + ecx*4 - 0x110], eax
jne 0x40a50f
jmp 0x40a511
jmp 0x40a4d3
mov edx, dword [ebp - 0x128]
cmp edx, dword [ebp - 0x114]
jne 0x40a552
cmp dword [ebp - 0x114], 0x40
jae 0x40a552
mov ecx, dword [ebp - 0x118]
add ecx, 8
call fcn.00408430
mov ecx, dword [ebp - 0x128]
mov dword [ebp + ecx*4 - 0x110], eax
mov edx, dword [ebp - 0x114]
add edx, 1
mov dword [ebp - 0x114], edx
xor eax, eax
jne 0x40a4c7
mov dword [ebp - 0x12c], 0
jmp 0x40a575
mov ecx, dword [ebp - 0x12c]
add ecx, 1
mov dword [ebp - 0x12c], ecx
mov edx, dword [ebp - 0x12c]
cmp edx, dword [ebp - 0x114]
jae 0x40a5a4
mov ecx, dword [ebp - 0x118]
add ecx, 0x28
call fcn.00408430
mov ecx, dword [ebp - 0x12c]
cmp dword [ebp + ecx*4 - 0x110], eax
jne 0x40a5a2
jmp 0x40a5a4
jmp 0x40a566
mov edx, dword [ebp - 0x12c]
cmp edx, dword [ebp - 0x114]
jne 0x40a5e5
cmp dword [ebp - 0x114], 0x40
jae 0x40a5e5
mov ecx, dword [ebp - 0x118]
add ecx, 0x28
call fcn.00408430
mov ecx, dword [ebp - 0x12c]
mov dword [ebp + ecx*4 - 0x110], eax
mov edx, dword [ebp - 0x114]
add edx, 1
mov dword [ebp - 0x114], edx
xor eax, eax
jne 0x40a55a
push 0
push 0
push 0
lea ecx, [ebp - 0x114]
push ecx
push 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jge 0x40a62a
mov byte [ebp - 0x119], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x124]
call fcn.004077e0
mov al, byte [ebp - 0x119]
jmp 0x40a8c9
lea edx, [ebp - 0x114]
push edx
mov ecx, dword [ebp - 0x118]
add ecx, 8
call fcn.0040a9d0
movzx eax, al
test eax, eax
je 0x40a78a
push 0
mov ecx, dword [ebp - 0x140]
push ecx
mov edx, dword [ebp - 0x130]
push edx
mov ecx, dword [ebp - 0x118]
add ecx, 8
call fcn.0040c2d0
mov dword [ebp - 0x138], eax
cmp dword [ebp - 0x138], 0
jge 0x40a69b
mov byte [ebp - 0x11a], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x124]
call fcn.004077e0
mov al, byte [ebp - 0x11a]
jmp 0x40a8c9
cmp dword [ebp - 0x138], 0
jne 0x40a6c8
mov byte [ebp - 0x11b], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x124]
call fcn.004077e0
mov al, byte [ebp - 0x11b]
jmp 0x40a8c9
push 0
mov eax, dword [ebp - 0x138]
push eax
mov ecx, dword [ebp - 0x130]
push ecx
mov ecx, dword [ebp - 0x118]
add ecx, 0x28
call fcn.0040c660
mov dword [ebp - 0x13c], eax
cmp dword [ebp - 0x13c], 0
jle 0x40a70a
mov edx, dword [ebp - 0x13c]
push edx
mov ecx, dword [ebp - 0x118]
add ecx, 0x74
call fcn.00408b80
mov eax, dword [ebp - 0x118]
movzx ecx, byte [eax + 0x5c]
test ecx, ecx
je 0x40a78a
lea edx, [ebp - 0x148]
push edx
mov ecx, dword [ebp - 0x118]
call fcn.00410300
mov dword [ebp - 0x144], eax
mov ecx, dword [ebp - 0x144]
call fcn.004083c0
push eax
push str.___s__
call fcn.00410de0
add esp, 8
lea ecx, [ebp - 0x148]
call fcn.004077e0
push 1
call fcn.0042ce51
add esp, 4
push eax
mov eax, dword [ebp - 0x138]
push eax
push 1
mov ecx, dword [ebp - 0x130]
push ecx
call fcn.0042fb29
add esp, 0x10
push 1
call fcn.0042ce51
add esp, 4
push eax
call fcn.0042f898
add esp, 4
lea edx, [ebp - 0x114]
push edx
mov ecx, dword [ebp - 0x118]
add ecx, 0x28
call fcn.0040a9d0
movzx eax, al
test eax, eax
je 0x40a8a5
push 0
mov ecx, dword [ebp - 0x140]
push ecx
mov edx, dword [ebp - 0x130]
push edx
mov ecx, dword [ebp - 0x118]
add ecx, 0x28
call fcn.0040c2d0
mov dword [ebp - 0x134], eax
cmp dword [ebp - 0x134], 0
jge 0x40a7fb
mov byte [ebp - 0x11c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x124]
call fcn.004077e0
mov al, byte [ebp - 0x11c]
jmp 0x40a8c9
cmp dword [ebp - 0x134], 0
jne 0x40a828
mov byte [ebp - 0x11d], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x124]
call fcn.004077e0
mov al, byte [ebp - 0x11d]
jmp 0x40a8c9
mov eax, dword [ebp - 0x134]
push eax
mov ecx, dword [ebp - 0x118]
add ecx, 0x78
call fcn.00408b80
push 0
mov ecx, dword [ebp - 0x134]
push ecx
mov edx, dword [ebp - 0x130]
push edx
mov ecx, dword [ebp - 0x118]
add ecx, 8
call fcn.0040c660
mov dword [ebp - 0x14c], eax
mov eax, dword [ebp - 0x118]
movzx ecx, byte [eax + 0x5c]
test ecx, ecx
je 0x40a8a5
push 1
call fcn.0042ce51
add esp, 4
push eax
mov edx, dword [ebp - 0x134]
push edx
push 1
mov eax, dword [ebp - 0x130]
push eax
call fcn.0042fb29
add esp, 0x10
push 1
call fcn.0042ce51
add esp, 4
push eax
call fcn.0042f898
add esp, 4
jmp 0x40a4bd
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00428dc6
mov esp, ebp
pop ebp
ret