Function at 0x41aac0
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x834
mov eax, dword [0x43e4a0]
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov dword [esp + 0x840], eax
mov eax, dword [edi]
call dword [eax + 0x48]
mov eax, dword [0x44421c]
test eax, eax
jne 0x41b30a
lea ebx, [ebx]
mov eax, dword [edi + 0x2408]
xor edx, edx
xor esi, esi
xor ebp, ebp
xor ebx, ebx
cmp eax, edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x42c], edx
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], edx
mov dword [esp + 0x14], ebp
jle 0x41ad9b
lea ecx, [edi + 0x244c]
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
mov ecx, dword [eax + 4]
cmp ecx, 5
jne 0x41abbc
test eax, eax
je 0x41ab42
lea esi, [eax - 4]
jmp 0x41ab44
xor esi, esi
mov edx, dword [esi]
mov ecx, esi
call dword [edx]
mov eax, dword [edi + 0x1c]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, esi
call fcn.00410b50
mov eax, dword [edi + 0x2408]
lea ecx, [eax - 1]
cmp ebx, ecx
je 0x41ab7f
mov edx, dword [edi + eax*4 + 0x2448]
mov eax, dword [esp + 0x10]
mov dword [eax], edx
dec ebx
sub eax, 4
mov dword [esp + 0x10], eax
dec dword [edi + 0x2408]
mov eax, dword [edi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [edi + 0x2408]
push ecx
push ebx
push 0x1ae
push str.CodeMs22CLMediaServer2.2_trunklibsrcDaemon.cpp
push str.Daemonlib__s_:_d__server_shutdown_connection_OK__idx:_d__connection_count:_d_._n
push edi
call fcn.0041a3e0
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x38]
add esp, 0x18
jmp 0x41ad79
cmp ecx, 6
jne 0x41ac48
test eax, eax
je 0x41abce
lea esi, [eax - 4]
jmp 0x41abd0
xor esi, esi
mov edx, dword [esi]
mov ecx, esi
call dword [edx]
mov eax, dword [edi + 0x1c]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, esi
call fcn.00410b50
mov eax, dword [edi + 0x2408]
lea ecx, [eax - 1]
cmp ebx, ecx
je 0x41ac0b
mov edx, dword [edi + eax*4 + 0x2448]
mov eax, dword [esp + 0x10]
mov dword [eax], edx
dec ebx
sub eax, 4
mov dword [esp + 0x10], eax
dec dword [edi + 0x2408]
mov eax, dword [edi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [edi + 0x2408]
push ecx
push ebx
push 0x1bd
push str.CodeMs22CLMediaServer2.2_trunklibsrcDaemon.cpp
push str.Daemonlib__s_:_d__client_shutdown_connection_OK__idx:_d__connection_count:_d_._n
push edi
call fcn.0041a3e0
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x38]
add esp, 0x18
jmp 0x41ad79
cmp ecx, 3
je 0x41ad79
cmp dword [eax], 2
jge 0x41ac76
cmp edx, 0x100
jae 0x41ac6e
mov ecx, dword [eax + 0x10]
mov dword [esp + edx*4 + 0x2c], ecx
mov edx, dword [esp + 0x28]
inc edx
mov dword [esp + 0x28], edx
mov eax, dword [eax + 0x10]
jmp 0x41ad6f
test eax, eax
je 0x41ac7f
add eax, 0xfffffffc
jmp 0x41ac81
xor eax, eax
cmp dword [eax + 8], 1
jne 0x41acee
cmp edx, 0x100
jae 0x41ac9f
mov ecx, dword [eax + 0x14]
mov dword [esp + edx*4 + 0x2c], ecx
mov edx, dword [esp + 0x28]
inc edx
mov dword [esp + 0x28], edx
mov ecx, dword [esp + 0x42c]
cmp ecx, 0x100
jae 0x41accb
mov ebp, dword [eax + 0x14]
mov dword [esp + ecx*4 + 0x430], ebp
mov ecx, dword [esp + 0x42c]
mov ebp, dword [esp + 0x14]
inc ecx
mov dword [esp + 0x42c], ecx
mov eax, dword [eax + 0x14]
cmp eax, ebp
jle 0x41acd8
mov ebp, eax
mov dword [esp + 0x14], ebp
test esi, esi
jne 0x41ad79
mov esi, 1
mov dword [esp + 0x20], esi
jmp 0x41ad79
cmp edx, 0x100
jae 0x41ad06
mov ecx, dword [eax + 0x14]
mov dword [esp + edx*4 + 0x2c], ecx
mov edx, dword [esp + 0x28]
inc edx
mov dword [esp + 0x28], edx
mov ecx, dword [eax + 0x14]
cmp ecx, ebp
jle 0x41ad13
mov ebp, ecx
mov dword [esp + 0x14], ebp
mov ecx, dword [eax + 0x24]
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x41ad2b
test esi, esi
je 0x41ad25
cmp ecx, esi
jge 0x41ad2b
mov esi, ecx
mov dword [esp + 0x20], esi
mov ecx, dword [eax + 0x44]
test ecx, ecx
jne 0x41ad3a
mov ecx, dword [eax + 0x38]
cmp ecx, dword [eax + 0x34]
jge 0x41ad79
cmp dword [eax + 8], 4
jne 0x41ad79
mov ecx, dword [esp + 0x42c]
cmp ecx, 0x100
jae 0x41ad6c
mov ebp, dword [eax + 0x14]
mov dword [esp + ecx*4 + 0x430], ebp
mov ecx, dword [esp + 0x42c]
mov ebp, dword [esp + 0x14]
inc ecx
mov dword [esp + 0x42c], ecx
mov eax, dword [eax + 0x14]
cmp eax, ebp
jle 0x41ad79
mov ebp, eax
mov dword [esp + 0x14], ebp
mov ecx, dword [esp + 0x10]
mov eax, dword [edi + 0x2408]
inc ebx
add ecx, 4
cmp ebx, eax
mov dword [esp + 0x10], ecx
jl 0x41ab27
cmp edx, 0x100
jae 0x41ada9
mov eax, dword [edi + 0x2410]
mov dword [esp + edx*4 + 0x2c], eax
inc dword [esp + 0x28]
mov eax, dword [edi + 0x2410]
cmp eax, ebp
jle 0x41adb5
mov ebp, eax
inc ebp
test esi, esi
je 0x41add0
lea ecx, [esp + 0x20]
push ecx
push 0
lea edx, [esp + 0x434]
push edx
lea eax, [esp + 0x34]
push eax
jmp 0x41ade1
push 0
push 0
lea ecx, [esp + 0x434]
push ecx
lea edx, [esp + 0x34]
push edx
push ebp
call sub.WS2_32.dll_select
mov ecx, dword [0x44421c]
test ecx, ecx
jne 0x41b30a
test eax, eax
jge 0x41ae2e
call dword [sym.imp.MSVCR71.dll__errno]
cmp dword [eax], 4
je 0x41b2fd
call dword [sym.imp.MSVCR71.dll__errno]
cmp dword [eax], 0xc
jne 0x41b2fd
push 0x4398c8
lea ecx, [esp + 0x20]
push ecx
mov dword [esp + 0x24], 0x3e7
call sub.MSVCR71.dll__CxxThrowException
mov ecx, dword [edi + 0x2410]
lea eax, [esp + 0x28]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41ae8c
mov edx, dword [edi + 0x2410]
push 0
push 0
push 0
push 0x1770
push 0x444628
push edx
call sub.WS2_32.dll_recvfrom
mov ecx, dword [edi + 0xc090]
test ecx, ecx
je 0x41b2fd
cmp dword [0x444628], 0x3e8
jl 0x41b2fd
mov edx, dword [ecx]
push 0x444628
push eax
call dword [edx]
jmp 0x41b2fd
mov eax, dword [edi + 0x2408]
test eax, eax
mov dword [esp + 0x10], 0
jle 0x41b2fd
lea eax, [edi + 0x244c]
mov dword [esp + 0x14], eax
lea esp, [esp]
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
cmp dword [eax], 1
jne 0x41b049
test eax, eax
je 0x41aec8
lea ebp, [eax - 4]
jmp 0x41aeca
xor ebp, ebp
mov eax, dword [ebp + 0x14]
lea edx, [esp + 0x28]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41b2db
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x834]
mov dword [esp + 0x1c], 0x10
mov eax, dword [ebp + 0x14]
push edx
push eax
call sub.WS2_32.dll_accept
mov ebx, eax
test ebx, ebx
jl 0x41b330
cmp dword [edi + 0x2408], 0x2710
je 0x41b027
mov ecx, dword [ebp + 0x24]
cmp ecx, dword [ebp + 0x28]
je 0x41b027
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx]
mov esi, eax
test esi, esi
je 0x41afea
mov dword [esi + 0x14], ebx
mov ecx, dword [esp + 0x830]
lea eax, [esi + 0x494]
mov dword [eax], ecx
mov edx, dword [esp + 0x834]
mov dword [eax + 4], edx
mov ecx, dword [esp + 0x838]
mov dword [eax + 8], ecx
mov edx, dword [esp + 0x83c]
push ebx
lea ecx, [esi + 0x4c]
mov dword [eax + 0xc], edx
call fcn.00423db0
mov dword [esi + 8], 4
mov dword [esi + 0xc], edi
call sub.WINMM.dll_timeGetTime
mov ecx, esi
mov dword [esi + 0x6c], eax
call fcn.00410b30
mov eax, dword [edi + 0x1c]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [edi + 0x2408]
lea ecx, [esi + 4]
mov dword [edi + edx*4 + 0x244c], ecx
mov edx, dword [edi + 0x2408]
mov eax, dword [edi + 0x1c]
inc edx
push eax
mov dword [edi + 0x2408], edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [ebp + 0x28]
mov edx, dword [ebp + 0x24]
mov eax, dword [edi + 0x2408]
push ecx
mov ecx, dword [esi + 0x14]
push edx
push eax
push ecx
push 0x24a
push str.CodeMs22CLMediaServer2.2_trunklibsrcDaemon.cpp
push str.Daemonlib__s_:_d__accept_connection__fd:_d_idx:_d_service_conn:_d__d_...._n
push edi
call fcn.0041a3e0
add esp, 0x20
jmp 0x41b2db
mov edx, dword [edi + 0x227c]
test edx, edx
mov eax, edx
jne 0x41affb
mov eax, str.Unknown_error_code___n
lea esi, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41b000
sub eax, esi
test edx, edx
jne 0x41b012
mov edx, str.Unknown_error_code___n
push 0
push eax
push edx
push ebx
call sub.WS2_32.dll_send
push ebx
call sub.WS2_32.dll_closesocket
jmp 0x41b2db
mov edx, dword [edi + 0x227c]
test edx, edx
mov eax, edx
jne 0x41b038
mov eax, str.Unknown_error_code___n
lea esi, [eax + 1]
jmp 0x41b040
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41b040
jmp 0x41b007
mov ecx, dword [eax + 4]
cmp ecx, 1
jne 0x41b0bc
test eax, eax
je 0x41b05a
lea esi, [eax - 4]
jmp 0x41b05c
xor esi, esi
mov eax, dword [esi + 0x14]
lea edx, [esp + 0x28]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x41b0a4
mov edx, dword [esi + 0x14]
lea ecx, [esp + 0x42c]
push ecx
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x41b0a4
push eax
call dword [sym.imp.MSVCR71.dll_time]
mov ecx, dword [esi + 0x20]
add esp, 4
cmp eax, ecx
jle 0x41b2db
mov ecx, esi
call fcn.00410810
jmp 0x41b2db
mov eax, dword [esi + 0x14]
push eax
lea ecx, [esi + 0x4c]
call fcn.00423db0
mov dword [esi + 8], 4
jmp 0x41b2db
cmp ecx, 3
je 0x41b2db
xor ebp, ebp
cmp eax, ebp
je 0x41b0d0
lea esi, [eax - 4]
jmp 0x41b0d2
xor esi, esi
mov edx, dword [esi + 0x14]
lea ecx, [esp + 0x28]
push ecx
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41b1cb
cmp dword [esi + 8], 2
jne 0x41b160
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x834]
mov dword [esp + 0x1c], 0x10
mov edx, dword [esi + 0x14]
push ecx
push edx
call sub.WS2_32.dll_accept
mov ebx, eax
cmp ebx, ebp
jl 0x41b098
mov eax, dword [esi + 0x14]
push eax
call sub.WS2_32.dll_closesocket
mov dword [esi + 0x14], ebx
mov edx, dword [esp + 0x830]
lea ecx, [esi + 0x494]
mov dword [ecx], edx
mov eax, dword [esp + 0x834]
mov dword [ecx + 4], eax
mov edx, dword [esp + 0x838]
mov dword [ecx + 8], edx
mov eax, dword [esp + 0x83c]
mov dword [ecx + 0xc], eax
push ebx
lea ecx, [esi + 0x4c]
call fcn.00423db0
mov dword [esi + 8], 4
jmp 0x41b2db
lea ecx, [esi + 0x4c]
mov dword [esp + 0x1c], ebp
call fcn.00423ec0
test al, al
jne 0x41b183
mov ecx, esi
call fcn.00410810
mov dword [esi + 8], 6
jmp 0x41b2db
mov ecx, dword [esi + 0x48]
cmp ecx, ebp
je 0x41b192
mov dword [esi + 0x48], ebp
mov edx, dword [ecx]
call dword [edx + 0x50]
cmp dword [esi + 0x48], ebp
jne 0x41b1b9
mov ecx, dword [esi + 0x24]
mov eax, dword [ecx]
lea edx, [esp + 0x1c]
push edx
push esi
call dword [eax + 4]
cmp eax, ebp
je 0x41b1b9
mov dword [esp + 0x1c], ebp
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x4c]
cmp dword [esi + 0x48], ebp
je 0x41b197
cmp dword [esp + 0x1c], ebp
je 0x41b201
mov ecx, esi
call fcn.00410810
jmp 0x41b2db
mov eax, dword [esi + 0x24]
cmp dword [eax + 4], ebp
je 0x41b201
call sub.WINMM.dll_timeGetTime
mov ecx, dword [esi + 0x24]
mov ebx, eax
mov eax, dword [esi + 0x6c]
mov edx, ebx
sub edx, eax
mov eax, dword [ecx + 4]
imul eax, eax, 0x3e8
cmp edx, eax
jbe 0x41b201
mov edx, dword [ecx]
push 7
push esi
call dword [edx + 8]
mov dword [esi + 0x6c], ebx
jmp 0x41b2db
mov ecx, dword [esi + 0x14]
lea eax, [esp + 0x42c]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41b2db
mov edx, dword [esi + 0x28]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esi + 0x34]
sub eax, dword [esi + 0x38]
mov dword [esp + 0x18], eax
mov ecx, dword [esi + 0x488]
xor ebp, ebp
cmp ecx, ebp
je 0x41b27f
call sub.WINMM.dll_timeGetTime
mov ebx, eax
mov eax, dword [esi + 0x1c]
cmp ebx, eax
jbe 0x41b274
mov edx, dword [esi + 0x488]
mov ecx, ebx
sub ecx, eax
mov eax, 0x10624dd3
imul edx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
imul ecx, eax
cmp dword [esp + 0x18], ecx
jle 0x41b278
mov dword [esp + 0x18], ecx
jmp 0x41b278
mov dword [esp + 0x18], ebp
mov dword [esi + 0x1c], ebx
mov eax, dword [esp + 0x18]
cmp eax, ebp
jle 0x41b2c2
mov edx, dword [esi + 0x38]
mov ecx, dword [esi + 0x30]
push ebp
push eax
add ecx, edx
mov edx, dword [esi + 0x14]
push ecx
push edx
call sub.WS2_32.dll_send
cmp eax, ebp
mov dword [esp + 0x18], eax
jle 0x41b2d1
mov edx, dword [esi + 0x38]
mov ecx, dword [esi + 0x34]
add edx, eax
mov eax, edx
cmp eax, ecx
mov dword [esi + 0x38], edx
jl 0x41b2d1
mov ecx, dword [esi + 0x44]
cmp ecx, ebp
mov byte [esi + 0x40], 0
je 0x41b2d1
mov eax, dword [ecx]
call dword [eax + 0x4c]
jmp 0x41b2ce
mov ecx, dword [esi + 0x44]
cmp ecx, ebp
je 0x41b2d1
mov edx, dword [ecx]
call dword [edx + 0x4c]
mov dword [esi + 0x44], ebp
mov eax, dword [esi + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ecx, dword [edi + 0x2408]
inc eax
add edx, 4
cmp eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
jl 0x41aeb0
mov eax, dword [0x44421c]
test eax, eax
je 0x41aaf0
mov eax, dword [edi + 0x2408]
xor ebx, ebx
test eax, eax
jle 0x41b35b
lea esi, [edi + 0x244c]
lea esp, [esp]
mov eax, dword [esi]
cmp dword [eax], 2
jl 0x41b34d
test eax, eax
je 0x41b347
lea ecx, [eax - 4]
jmp 0x41b349
push 0x4398c8
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x24], 0x3e6
call sub.MSVCR71.dll__CxxThrowException
xor ecx, ecx
mov eax, dword [ecx]
call dword [eax]
mov eax, dword [edi + 0x2408]
inc ebx
add esi, 4
cmp ebx, eax
jl 0x41b320
mov ecx, dword [esp + 0x840]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
call fcn.0042b32d
add esp, 0x834
ret