Function at 0x4178f0
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
mov eax, dword [0x4ff004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
xor esi, esi
mov dword [ebp - 0x11c], edx
xor edx, edx
mov dword [ebp - 0x128], ecx
mov dword [ebp - 0x124], edi
mov dword [ebp - 0x118], eax
mov dword [ebp - 0x140], 1
mov dword [ebp - 0x13c], esi
mov dword [ebp - 0x110], edx
test edi, edi
je 0x417955
mov esi, dword [edi]
mov edx, 1
mov dword [ebp - 0x10c], esi
mov dword [ebp - 0x110], edx
xor ebx, ebx
cmp dword [ebp - 0x11c], ebx
jle 0x417a01
mov edi, dword [ecx + ebx*4]
cmp dword [edi + 0x15c], 3
je 0x417996
push 0x52d
push str.ytcp
push str.ASSERT_FAILED:_s:_d_n
push 0x52d
push str.ytcp
call fcn.00409950
mov edx, dword [ebp - 0x110]
add esp, 0x14
mov ecx, dword [edi + 0x170]
cmp ecx, 0xffffffff
je 0x417a51
xor eax, eax
test edx, edx
je 0x4179be
nop dword [eax + eax]
cmp dword [ebp + eax*4 - 0x10c], ecx
je 0x4179be
inc eax
cmp eax, edx
jb 0x4179b0
cmp eax, edx
jne 0x4179db
cmp edx, 0x40
jae 0x4179db
mov dword [ebp + eax*4 - 0x10c], ecx
mov edx, dword [ebp - 0x110]
inc edx
mov dword [ebp - 0x110], edx
mov eax, dword [edi + 0x170]
cmp eax, esi
mov ecx, dword [ebp - 0x128]
cmovbe eax, esi
inc ebx
mov esi, eax
cmp ebx, dword [ebp - 0x11c]
jl 0x417963
mov edi, dword [ebp - 0x124]
test esi, esi
je 0x41802a
lea eax, [ebp - 0x140]
push eax
push 0
push 0
lea eax, [ebp - 0x110]
push eax
lea eax, [esi + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jns 0x417ab8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x118]
test ecx, ecx
jne 0x417a93
lea eax, [ecx - 8]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x118]
test eax, eax
je 0x417a7d
push 0x52f
push str.ytcp
push str.Invalid_argument
push str._s___s:_d_
push 0x100
push eax
call fcn.0041c830
add esp, 0x18
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
push ecx
push eax
mov edx, 0x542
mov ecx, str.ytcp
call fcn.00415bd0
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
je 0x41802a
test edi, edi
je 0x417b2d
lea eax, [ebp - 0x110]
push eax
push dword [edi]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x417b2d
push 0
push 1
lea eax, [ebp - 0x111]
mov byte [ebp - 0x111], 0
push eax
push dword [edi]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jns 0x417b1e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x118]
test ecx, ecx
jne 0x417b08
lea eax, [ecx - 8]
jmp 0x417b25
push ecx
push eax
mov edx, 0x11e
mov ecx, str.ytcp
call fcn.00415bd0
add esp, 8
jmp 0x417b25
movzx eax, byte [ebp - 0x111]
test eax, eax
js 0x41802c
xor eax, eax
mov dword [ebp - 0x124], eax
cmp dword [ebp - 0x11c], eax
jle 0x41802a
mov ecx, dword [ebp - 0x128]
mov esi, dword [ecx + eax*4]
lea eax, [ebp - 0x110]
push eax
push dword [esi + 0x170]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x418011
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esi + 0x24]
mov ecx, dword [esi + 0x28]
lea eax, [edi - 0x100]
cmp ecx, eax
jl 0x417bb0
add edi, edi
push edi
call fcn.00449be3
add esp, 4
mov ebx, eax
push dword [esi + 0x28]
push dword [esi + 0x20]
push ebx
call fcn.00444290
add esp, 0xc
push dword [esi + 0x20]
call fcn.004460f9
mov ecx, dword [esi + 0x28]
add esp, 4
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], edi
jmp 0x417bb3
mov ebx, dword [esi + 0x20]
push 0
sub edi, ecx
lea eax, [ecx + ebx]
push edi
push eax
push dword [esi + 0x170]
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
test edi, edi
jne 0x417c01
mov ebx, dword [ebp - 0x118]
test ebx, ebx
je 0x417bfa
push 0x2d1
push str.ytcp
push str.No_more_data
push str._s___s:_d_
push 0x100
push ebx
call fcn.0041c830
add esp, 0x18
mov edi, 0xfffffff7
jmp 0x417c3f
jns 0x417c3f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x417c14
xor edi, edi
jmp 0x417c3f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [ebp - 0x118]
test ebx, ebx
jne 0x417c29
lea edi, [ebx - 8]
jmp 0x417c3f
push ebx
push eax
mov edx, 0x2dc
mov ecx, str.ytcp
call fcn.00415bd0
add esp, 8
mov edi, eax
call fcn.00408c40
mov dword [esi + 0x148], eax
mov dword [esi + 0x14c], edx
test edi, edi
jns 0x417d08
push 0x560
lea eax, [esi + 0x38]
mov dword [esi + 0x2c], 0
push str.ytcp
push 0
mov edx, eax
mov dword [ebp - 0x120], eax
mov ecx, edi
call fcn.00409540
and dword [esi + 0x158], 0xfffffffe
add esp, 0xc
mov edi, dword [esi + 0x160]
mov ebx, eax
mov dword [esi + 0x34], ebx
test edi, edi
je 0x417cde
mov eax, dword [esi + 0x28]
mov edx, dword [esi + 0x20]
sub eax, dword [esi + 0x2c]
add edx, dword [esi + 0x2c]
mov ecx, dword [esi + 0x164]
cmp ebx, 0xfffffff7
jne 0x417cb6
push 0x466c20
push 0
jmp 0x417cbd
push dword [ebp - 0x120]
push ebx
push eax
push edx
push ecx
mov ecx, edi
call dword [0x460280]
call edi
add esp, 0x14
mov dword [esi + 0x160], 0
and dword [esi + 0x158], 0xfffffffd
mov eax, dword [esi + 0x170]
cmp eax, 0xffffffff
je 0x417cfa
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x170], 0xffffffff
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x418008
jle 0x418008
mov edx, dword [esi + 0x28]
add edx, edi
cmp dword [esi + 0x2c], 0
mov dword [esi + 0x28], edx
jge 0x417ff5
cmp edx, 8
jne 0x417d84
mov eax, dword [esi + 0x20]
cmp dword [eax], 0xa0d4b30
jne 0x417d84
cmp dword [eax + 4], 0xa0d0a0d
jne 0x417d84
mov dword [esi + 0x2c], 0
mov byte [eax], 0x4f
lea eax, [esi + 0x38]
test eax, eax
je 0x417d6c
push 0x56c
push str.ytcp
push str.No_more_data
push str._s___s:_d_
push 0x100
push eax
call fcn.0041c830
add esp, 0x18
mov edx, 1
mov dword [esi + 0x34], 0xfffffff7
mov ecx, esi
call fcn.00417840
jmp 0x417ff5
cmp edx, 4
jl 0x417d98
mov eax, dword [esi + 0x20]
cmp dword [eax], 0xa0d4b4f
je 0x417fee
cmp edx, 0xc
jl 0x417ff5
mov edi, dword [esi + 0x20]
cmp dword [edi], 0x50545448
jne 0x417fee
cmp dword [edi + 4], 0x312e312f
jne 0x417fee
cmp dword [edi + 8], 0x31303420
jne 0x417fee
mov eax, dword [esi]
mov dword [ebp - 0x12c], 0
mov dword [ebp - 0x134], 0
mov dword [ebp - 0x130], 0
cmp dword [eax + 8], 0
mov dword [ebp - 0x138], 0
mov dword [ebp - 0x120], 0
je 0x417fa5
mov ecx, dword [esi + 0x30]
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
cmp ecx, 3
jg 0x417fa5
lea eax, [ebp - 0x120]
mov ecx, edi
push eax
lea eax, [ebp - 0x138]
push eax
lea eax, [ebp - 0x130]
push eax
lea eax, [ebp - 0x134]
push eax
lea eax, [ebp - 0x12c]
push eax
call fcn.00412110
add esp, 0x14
test eax, eax
js 0x417ff5
mov eax, dword [ebp - 0x12c]
mov ecx, str.Digest
nop word [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x417e80
test dl, dl
je 0x417e7c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x417e80
add eax, 2
add ecx, 2
test dl, dl
jne 0x417e60
xor eax, eax
jmp 0x417e85
sbb eax, eax
or eax, 1
test eax, eax
jne 0x417f90
mov eax, dword [ebp - 0x130]
mov ecx, str.auth
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x417eb8
test dl, dl
je 0x417eb4
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x417eb8
add eax, 2
add ecx, 2
test dl, dl
jne 0x417e98
xor eax, eax
jmp 0x417ebd
sbb eax, eax
or eax, 1
test eax, eax
jne 0x417f90
push dword [esi + 0x170]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esi]
mov dword [esi + 0x170], 0xffffffff
push dword [eax + 0x6ec]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esi]
mov edx, dword [ebp - 0x134]
add ecx, 0x728
call fcn.00415b70
mov ecx, dword [esi]
mov edx, dword [ebp - 0x138]
add ecx, 0x72c
call fcn.00415b70
mov ecx, dword [esi]
mov edx, dword [ebp - 0x120]
add ecx, 0x730
call fcn.00415b70
mov ecx, dword [esi]
mov edx, ecx
mov edi, dword [ecx + 8]
test edi, edi
je 0x417f4d
mov eax, dword [ecx + 0xc]
test eax, eax
je 0x417f4d
push dword [ecx + 0x728]
add ecx, 0x734
mov edx, edi
push eax
call fcn.00411d30
mov edx, dword [esi]
add esp, 8
mov dword [edx + 0x744], 0
mov eax, dword [esi]
push dword [eax + 0x6ec]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [esi + 0x154]
lea edx, [esi + 0x38]
mov ecx, esi
push dword [esi + 0x150]
call fcn.00417010
add esp, 8
mov dword [esi + 0x34], eax
test eax, eax
jns 0x417ff5
xor edx, edx
mov ecx, esi
call fcn.00417840
jmp 0x417ff5
lea eax, [esi + 0x38]
mov dword [esi + 0x2c], 0
test eax, eax
je 0x417fdc
push 0x598
jmp 0x417fbf
lea eax, [esi + 0x38]
mov dword [esi + 0x2c], 0
mov dword [esi + 0x28], 0
test eax, eax
je 0x417fdc
push 0x57d
push str.ytcp
push str.Unauthorized_access
push str._s___s:_d_
push 0x100
push eax
call fcn.0041c830
add esp, 0x18
xor edx, edx
mov dword [esi + 0x34], 0xfffffff4
mov ecx, esi
call fcn.00417840
jmp 0x417ff5
mov dword [esi + 0x2c], 0
cmp dword [esi + 0x34], 0
jne 0x418008
lea edx, [esi + 0x38]
mov ecx, esi
call fcn.00416f10
mov dword [esi + 0x34], eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x124]
inc eax
mov dword [ebp - 0x124], eax
cmp eax, dword [ebp - 0x11c]
jl 0x417b41
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004423fe
mov esp, ebp
pop ebp
ret