Function at 0x40bfa0
Capabilities:
Create thread
Get socket status
Initialize winsock library
Receive data
Receive data on socket
Set socket configuration

Disassembly:
sub esp, 0x388
mov eax, dword [0x4b3774]
xor eax, esp
mov dword [esp + 0x384], eax
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x200]
push eax
push 0x202
mov edi, ecx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x40bfff
call sub.Comn.dll_GetObjectLogPXE
mov edi, eax
mov esi, dword [edi]
push 0x2a
add esi, 0xc
call fcn.0040bcc0
mov ecx, dword [esi]
add esp, 4
push eax
push str._s:__HFS_WSAStartup_Fail
push edi
call ecx
add esp, 0xc
mov eax, 0xfa4
jmp 0x40c8ca
push 0xa
push 0
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test eax, eax
mov dword [edi + 4], eax
jne 0x40c042
call sub.Comn.dll_GetObjectLogPXE
mov edi, eax
mov esi, dword [edi]
push 0x30
add esi, 0xc
call fcn.0040bcc0
mov edx, dword [esi]
add esp, 4
push eax
push str._s:__HFS_Create_iocp_error
push edi
call edx
add esp, 0xc
mov eax, 0xfa4
jmp 0x40c8ca
lea eax, [esp + 0x2c]
push eax
push 0
push edi
push 0x40cfc0
push 0
push 0
call dword [sym.imp.MSVCR80.dll__beginthreadex]
add esp, 0x18
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x40c09c
call sub.Comn.dll_GetObjectLogPXE
mov ebx, eax
mov esi, dword [ebx]
push 0x38
add esi, 0xc
call fcn.0040bcc0
mov ecx, dword [esi]
add esp, 4
push eax
push str._s:__HFS_Create_watch_thread_fail
push ebx
call ecx
mov edx, dword [edi + 4]
add esp, 0xc
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xfa6
jmp 0x40c8ca
call sub.Comn.dll_GetObjectLogPXE
mov ebx, eax
mov eax, dword [esp + 0x2c]
mov esi, dword [ebx]
push eax
push 0x3d
add esi, 0xc
call fcn.0040bcc0
mov ecx, dword [esi]
add esp, 4
push eax
push str._s_WatchIp_Thread_Id:_d:__HFS_Create_watch_thread_fail
push ebx
call ecx
xor ebp, ebp
add esp, 0x10
cmp dword [esp + 0x39c], ebp
jle 0x40c111
push 0
push 0
push edi
push 0x40c8f0
push 0
push 0
call dword [sym.imp.MSVCR80.dll__beginthreadex]
add esp, 0x18
test eax, eax
mov dword [esp + 0x14], eax
je 0x40c155
add dword [edi + 0x450], 1
lea esi, [edi + 0x454]
lea ebx, [esp + 0x14]
call fcn.0040dba0
add ebp, 1
cmp ebp, dword [esp + 0x39c]
jl 0x40c0d0
mov ebp, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov dword [esp + 0x18], 0
nop
mov esi, dword [esp + 0x1c]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x40c752
cmp byte [edi + 0x410], 0
jne 0x40c2ae
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40c743
call sub.Comn.dll_GetObjectLogPXE
mov ebx, eax
mov esi, dword [ebx]
push 0x48
add esi, 0xc
call fcn.0040bcc0
mov edx, dword [esi]
add esp, 4
push eax
push str._s:__HFS_Create_work_thread_fail
push ebx
call edx
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
add esp, 0xc
mov byte [edi + 0x44c], 1
xor esi, esi
mov edi, edi
mov ecx, dword [edi + 0x458]
test ecx, ecx
je 0x40c1cd
mov eax, dword [edi + 0x45c]
sub eax, ecx
sar eax, 2
cmp esi, eax
jae 0x40c1cd
push 0x81c
push 0x40
call ebx
test eax, eax
je 0x40c1c8
push eax
push 0
mov dword [eax + 0x14], 3
mov eax, dword [edi + 4]
push 0
push eax
call ebp
add esi, 1
jmp 0x40c190
push 0x4c
lea ecx, [esp + 0xa0]
push 0
push ecx
mov dword [esp + 0xa4], 0
call sub.MSVCR80.dll_memset
mov eax, dword [edi + 0x458]
add esp, 0xc
test eax, eax
jne 0x40c1fa
xor ebx, ebx
jmp 0x40c205
mov ebx, dword [edi + 0x45c]
sub ebx, eax
sar ebx, 2
mov ebp, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
xor esi, esi
test ebx, ebx
jbe 0x40c243
mov ecx, dword [edi + 0x458]
test ecx, ecx
je 0x40c22a
mov eax, dword [edi + 0x45c]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x40c22c
call ebp
mov edx, dword [edi + 0x458]
mov eax, dword [edx + esi*4]
mov dword [esp + esi*4 + 0x98], eax
add esi, 1
cmp esi, ebx
jb 0x40c211
push 0xffffffffffffffff
push 1
lea ecx, [esp + 0xa0]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
test ebx, ebx
jbe 0x40c294
mov ecx, dword [edi + 0x458]
test ecx, ecx
je 0x40c27b
mov eax, dword [edi + 0x45c]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x40c281
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov edx, dword [edi + 0x458]
mov eax, dword [edx + esi*4]
push eax
call ebp
add esi, 1
cmp esi, ebx
jb 0x40c262
mov esi, dword [esp + 0x1c]
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call ebp
mov eax, 0xfa6
jmp 0x40c8ca
lea esi, [edi + 0x434]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [edi + 0x410], 0
jne 0x40c2d0
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x40c743
xor edx, edx
mov dword [esp + 0x40], 0xa
mov dword [esp + 0x44], 0
mov dword [esp + 0xe8], edx
xor esi, esi
jmp 0x40c2f0
mov ecx, dword [edi + 0x428]
test ecx, ecx
je 0x40c3a8
mov eax, dword [edi + 0x42c]
sub eax, ecx
sar eax, 2
cmp esi, eax
jae 0x40c3a8
xor ebx, ebx
test edx, edx
jbe 0x40c35b
jmp 0x40c320
mov ecx, dword [edi + 0x428]
test ecx, ecx
je 0x40c339
mov eax, dword [edi + 0x42c]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x40c342
call ebp
mov edx, dword [esp + 0xe8]
mov ecx, dword [edi + 0x428]
mov eax, dword [esp + ebx*4 + 0xec]
cmp eax, dword [ecx + esi*4]
je 0x40c35b
add ebx, 1
cmp ebx, edx
jb 0x40c320
cmp ebx, edx
jne 0x40c3a0
cmp edx, 0x40
jae 0x40c3a0
mov ecx, dword [edi + 0x428]
test ecx, ecx
je 0x40c37d
mov eax, dword [edi + 0x42c]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x40c37f
call ebp
mov ecx, dword [edi + 0x428]
mov edx, dword [ecx + esi*4]
mov dword [esp + ebx*4 + 0xec], edx
mov edx, dword [esp + 0xe8]
add edx, 1
mov dword [esp + 0xe8], edx
add esi, 1
jmp 0x40c2f0
lea eax, [esp + 0x40]
push eax
push 0
push 0
lea ecx, [esp + 0xf4]
push ecx
push 0
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x40c40a
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [edi + 0x434]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call sub.Comn.dll_GetObjectLogPXE
mov ebx, eax
mov esi, dword [ebx]
push 0x89
add esi, 0xc
call fcn.0040bcc0
mov edx, dword [esi]
add esp, 4
push eax
push str._s:__HFS_select_socket_error
push ebx
call edx
add esp, 0xc
jmp 0x40c743
xor ebp, ebp
test eax, eax
mov dword [esp + 0x14], ebp
jle 0x40c730
jmp 0x40c420
mov ecx, dword [edi + 0x428]
test ecx, ecx
je 0x40c730
mov eax, dword [edi + 0x42c]
sub eax, ecx
sar eax, 2
cmp ebp, eax
jae 0x40c730
test ecx, ecx
je 0x40c454
mov eax, dword [edi + 0x42c]
sub eax, ecx
sar eax, 2
cmp ebp, eax
jb 0x40c45a
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [edi + 0x428]
lea esi, [ebp*4]
mov edx, dword [eax + esi]
add eax, esi
lea ecx, [esp + 0xe8]
push ecx
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40c724
mov ecx, dword [edi + 0x428]
test ecx, ecx
mov dword [esp + 0x30], 0x10
je 0x40c4a3
mov eax, dword [edi + 0x42c]
sub eax, ecx
sar eax, 2
cmp ebp, eax
jb 0x40c4a9
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [edi + 0x428]
lea ecx, [esp + 0x30]
push ecx
add eax, esi
mov eax, dword [eax]
lea edx, [esp + 0x1f4]
push edx
push eax
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40c50e
lea eax, [edi + 0x434]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call sub.Comn.dll_GetObjectLogPXE
mov ebx, eax
mov esi, dword [ebx]
push 0x98
add esi, 0xc
call fcn.0040bcc0
mov ecx, dword [esi]
add esp, 4
push eax
push str._s:__HFS_accept_socket_error
push ebx
call ecx
add esp, 0xc
add ebp, 1
mov dword [esp + 0x14], ebp
jmp 0x40c420
push 4
lea edx, [esp + 0x24]
push edx
push 0x1001
push 0xffff
mov ebx, 0xea60
push esi
mov dword [esp + 0x34], ebx
mov dword [esp + 0x3c], 4
call dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x24]
push ecx
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_getsockopt]
cmp dword [esp + 0x20], ebx
je 0x40c592
call sub.Comn.dll_GetObjectLogPXE
mov ebp, eax
mov ebx, dword [ebp]
push 0xa2
add ebx, 0xc
call fcn.0040bcc0
mov edx, dword [ebx]
add esp, 4
push eax
push str._s:__HFS_set_socket_buff_error
push ebp
call edx
add esp, 0xc
push str.set_socket_buff_ok_n
call dword [sym.imp.MSVCR80.dll_printf]
mov ebp, dword [esp + 0x18]
add esp, 4
push 0x81c
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
jne 0x40c5ec
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [edi + 0x434]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call sub.Comn.dll_GetObjectLogPXE
mov ebx, eax
mov esi, dword [ebx]
push 0xac
add esi, 0xc
call fcn.0040bcc0
add esp, 4
push eax
mov eax, dword [esi]
push str._s:__HFS_alloc_memory_fail
push ebx
call eax
add esp, 0xc
add ebp, 1
mov dword [esp + 0x14], ebp
jmp 0x40c420
push 0x81c
push 0
push ebx
call sub.MSVCR80.dll_memset
add esp, 0xc
xor eax, eax
mov dword [ebx + 0x14], 1
mov dword [ebx + 0x18], esi
mov edx, dword [edi + 4]
push eax
push eax
push edx
lea ecx, [ebx + 0x1c]
push esi
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x48], 0x800
mov dword [esp + 0x34], eax
mov dword [esp + 0x44], eax
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test eax, eax
mov dword [edi + 4], eax
jne 0x40c68f
push str.add_file_fail_n
call dword [sym.imp.MSVCR80.dll_printf]
add esp, 4
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
call sub.Comn.dll_GetObjectLogPXE
mov ebx, eax
mov esi, dword [ebx]
push 0xbd
add esi, 0xc
call fcn.0040bcc0
add esp, 4
push eax
mov eax, dword [esi]
push str._s:__HFS_add_file_into_iocp_fail
push ebx
call eax
add esp, 0xc
lea eax, [edi + 0x434]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
add ebp, 1
mov dword [esp + 0x14], ebp
jmp 0x40c420
push ebx
push esi
mov eax, edi
call fcn.0040d740
push 0
push ebx
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x30]
push edx
push 1
lea eax, [esp + 0x4c]
push eax
push esi
call dword [sym.imp.WS2_32.dll_WSARecv]
test eax, eax
jne 0x40c6d6
mov ecx, dword [esp + 0x24]
push ecx
push str.recv_:_d_n
call dword [sym.imp.MSVCR80.dll_printf]
add esp, 8
add ebp, 1
mov dword [esp + 0x14], ebp
jmp 0x40c420
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
jne 0x40c6fd
push str.pending_n
call dword [sym.imp.MSVCR80.dll_printf]
add esp, 4
add ebp, 1
mov dword [esp + 0x14], ebp
jmp 0x40c420
call sub.Comn.dll_GetObjectLogPXE
mov ebx, eax
mov esi, dword [ebx]
push 0xd2
add esi, 0xc
call fcn.0040bcc0
mov edx, dword [esi]
add esp, 4
push eax
push str._s:__HFS_revc_error
push ebx
call edx
add esp, 0xc
add ebp, 1
mov dword [esp + 0x14], ebp
jmp 0x40c420
lea eax, [edi + 0x434]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebp, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp byte [edi + 0x44c], 0
je 0x40c120
jmp 0x40c75e
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
mov eax, dword [edi + 0x458]
test eax, eax
jne 0x40c76c
xor ebx, ebx
jmp 0x40c777
mov ebx, dword [edi + 0x45c]
sub ebx, eax
sar ebx, 2
test ebx, ebx
jbe 0x40c7c4
mov esi, dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
mov ebp, ebx
push 0x81c
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
je 0x40c7aa
push eax
push 0
mov dword [eax + 0x14], 3
mov ecx, dword [edi + 4]
push 0
push ecx
call esi
test eax, eax
jne 0x40c7bf
call sub.Comn.dll_GetObjectLogPXE
mov edx, dword [eax]
push str._s:__HFS_post_quit_message_fail:_d
push eax
mov eax, dword [edx + 0xc]
call eax
add esp, 8
sub ebp, 1
jne 0x40c783
push 0x4c
lea ecx, [esp + 0x50]
push 0
push ecx
mov dword [esp + 0x54], 0
call sub.MSVCR80.dll_memset
add esp, 0xc
xor esi, esi
test ebx, ebx
jbe 0x40c816
mov ecx, dword [edi + 0x458]
test ecx, ecx
je 0x40c7fc
mov eax, dword [edi + 0x45c]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x40c802
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov edx, dword [edi + 0x458]
mov eax, dword [edx + esi*4]
mov dword [esp + esi*4 + 0x48], eax
add esi, 1
cmp esi, ebx
jb 0x40c7e3
push 0xffffffffffffffff
push 1
lea ecx, [esp + 0x50]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
test ebx, ebx
jbe 0x40c840
mov edx, dword [esp + esi*4 + 0x48]
push edx
call ebp
add esi, 1
cmp esi, ebx
jb 0x40c832
mov esi, dword [esp + 0x1c]
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call ebp
call sub.Comn.dll_GetObjectLogPXE
mov ebx, eax
mov eax, dword [edi + 0x46c]
mov esi, dword [ebx]
push eax
push 0xf2
add esi, 0xc
call fcn.0040bcc0
add esp, 4
push eax
mov eax, dword [esi]
push str._s:__HFS_client_count:_d
push ebx
call eax
add esp, 0x10
mov eax, edi
call fcn.0040d8a0
call dword [sym.imp.WS2_32.dll_WSACleanup]
cmp byte [edi + 0x44c], 0
jne 0x40c8c8
cmp dword [esp + 0x18], 0
je 0x40c8c8
call sub.Comn.dll_GetObjectLogPXE
mov edi, eax
mov esi, dword [edi]
push 0xfe
add esi, 0xc
call fcn.0040bcc0
mov ecx, dword [esi]
add esp, 4
push eax
push str._s:__HFS_watch_ip_thread_exit_with_error
push edi
call ecx
mov eax, dword [esp + 0x24]
add esp, 0xc
jmp 0x40c8ca
xor eax, eax
mov ecx, dword [esp + 0x394]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0042c614
add esp, 0x388
ret 4