Function at 0x407e90
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x168
mov eax, dword [0x42fc60]
mov dword [ebp - 0x124], eax
mov dword [ebp - 0x14c], ecx
cmp dword [ebp + 8], 0xffffffff
jne 0x407eb8
or eax, 0xffffffff
jmp 0x4080d0
mov dword [ebp - 0x118], 0
mov dword [ebp - 0x11c], 0
jmp 0x407edd
mov eax, dword [ebp - 0x11c]
add eax, 1
mov dword [ebp - 0x11c], eax
mov ecx, dword [ebp - 0x11c]
cmp ecx, dword [ebp - 0x118]
jae 0x407f01
mov edx, dword [ebp - 0x11c]
mov eax, dword [ebp + edx*4 - 0x114]
cmp eax, dword [ebp + 8]
jne 0x407eff
jmp 0x407f01
jmp 0x407ece
mov ecx, dword [ebp - 0x11c]
cmp ecx, dword [ebp - 0x118]
jne 0x407f37
cmp dword [ebp - 0x118], 0x40
jae 0x407f37
mov edx, dword [ebp - 0x11c]
mov eax, dword [ebp + 8]
mov dword [ebp + edx*4 - 0x114], eax
mov ecx, dword [ebp - 0x118]
add ecx, 1
mov dword [ebp - 0x118], ecx
xor edx, edx
jne 0x407ec2
movzx eax, word [ebp + 0x10]
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
lea ecx, [ebp - 0xc]
push ecx
push 0
push 0
lea edx, [ebp - 0x118]
push edx
push 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x407fde
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x150], eax
cmp dword [ebp - 0x150], 0
je 0x407f86
cmp dword [ebp - 0x150], 1
je 0x407faf
jmp 0x407fd6
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x13c], esp
push str.Set_DVR_transmit_listen_socket_timeout_error
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov dword [ebp - 0x154], eax
mov ecx, dword [ebp - 0x14c]
call fcn.00407ae0
jmp 0x407fd6
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x140], esp
push str.Set_Client_transmit_listen_socket_timeout_error
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov dword [ebp - 0x158], eax
mov ecx, dword [ebp - 0x14c]
call fcn.00407ae0
or eax, 0xffffffff
jmp 0x4080d0
cmp dword [ebp - 4], 0
jle 0x408092
mov dword [ebp - 0x138], 0x10
lea ecx, [ebp - 0x138]
push ecx
lea edx, [ebp - 0x134]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.WS2_32.dll_accept]
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0xffffffff
jne 0x408088
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x15c], ecx
cmp dword [ebp - 0x15c], 0
je 0x408036
cmp dword [ebp - 0x15c], 1
je 0x40805f
jmp 0x408086
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x144], esp
push str.DVRListen_listen_accept_INVALID_SOCKET
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov dword [ebp - 0x160], eax
mov ecx, dword [ebp - 0x14c]
call fcn.00407ae0
jmp 0x408086
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x148], esp
push str.Client_listen_accept_INVALID_SOCKET
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov dword [ebp - 0x164], eax
mov ecx, dword [ebp - 0x14c]
call fcn.00407ae0
jmp 0x408090
mov eax, dword [ebp - 0x120]
jmp 0x4080d0
jmp 0x4080cd
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x168], edx
cmp dword [ebp - 0x168], 0
je 0x4080af
cmp dword [ebp - 0x168], 1
je 0x4080bf
jmp 0x4080cd
push str.DVR_transmit_listen_socket_wait_timeout._r_n
call dword [sym.imp.MSVCR71.dll_printf]
add esp, 4
jmp 0x4080cd
push str.Client_transmit_listen_socket_wait_timeout._r_n
call dword [sym.imp.MSVCR71.dll_printf]
add esp, 4
or eax, 0xffffffff
mov ecx, dword [ebp - 0x124]
call fcn.00423fdd
mov esp, ebp
pop ebp
ret 0xc