Function at 0x41fb90
Capabilities:
Get socket status

Disassembly:
sub esp, 0x13c
mov eax, dword [0x53de10]
xor eax, esp
mov dword [esp + 0x134], eax
mov eax, dword [esp + 0x140]
push ebx
push ebp
mov ebp, dword [esp + 0x14c]
mov ebx, ecx
movsx ecx, byte [ebp + 0x16d]
shl ecx, 6
push esi
mov dword [esp + 0x14], eax
lea esi, [ecx + eax + 0x24]
movsx eax, byte [ebp + 0x166]
cmp eax, 0x12
push edi
mov dword [esp + 0x14], ebx
ja case.0x41fbe1.1
movzx edx, byte [eax + 0x41ffc8]
jmp dword [edx*4 + 0x41ffbc]
mov eax, dword [ebp + 0x154]
test eax, eax
je 0x41fc4e
test byte [ebx + 6], 2
je case.0x41fbe1.1
push eax
mov eax, dword [ebp + 0x150]
add eax, dword [ebp + 0x118]
mov edi, ebp
push eax
call fcn.004258e0
add esp, 8
test eax, eax
jl 0x41fc25
xor eax, eax
mov edi, ebp
call fcn.00426a20
test eax, eax
je 0x41ffb2
push 0
push ebp
call fcn.00420ae0
add esp, 8
mov eax, 1
mov ecx, dword [esp + 0x144]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004b883d
add esp, 0x13c
ret
mov ax, word [ebx + 4]
and ax, word [ebx + 6]
test al, 9
je 0x41fe38
mov ecx, dword [ebp + 0x160]
test ecx, 0x1000
je 0x41fc81
test al, 2
je 0x41fc81
and ecx, 0xffffefff
mov dword [ebp + 0x160], ecx
jmp 0x41fe38
mov al, byte [ebp + 0x167]
test al, al
je 0x41fcf8
cmp al, 1
je 0x41fcf8
cmp al, 2
je 0x41fcf8
mov ecx, dword [esi + 0x30]
mov ebx, 0x1000
mov eax, ebp
call fcn.00426890
cmp eax, 0xfffffffe
je 0x41fe34
cmp eax, 0xffffffff
je 0x41fc25
test eax, eax
je 0x41fc25
cmp byte [ebp + 0x167], 0xa
je 0x41fe34
mov ecx, dword [esi + 0x30]
push ecx
mov edi, ebp
call fcn.00426db0
add esp, 4
test eax, eax
jl 0x41fc30
mov edx, dword [esp + 0x14]
test byte [edx + 6], 2
je case.0x41fbe1.1
or dword [ebp + 0x160], ebx
jmp case.0x41fbe1.1
cmp dword [ebp], 0
jne 0x41fd11
push 0
push ebp
call fcn.00424220
add esp, 8
test eax, eax
jne 0x41fe38
mov edi, dword [ebp]
mov eax, dword [edi + 0xc70]
cmp eax, dword [edi + 0xc74]
jne 0x41fd62
lea ecx, [edi + 0x46e]
mov ebx, 0x800
mov eax, ebp
call fcn.00426890
test eax, eax
mov dword [edi + 0xc74], eax
mov dword [edi + 0xc70], 0
je 0x41fc25
cmp eax, 0xfffffffe
je 0x41fe26
cmp eax, 0xffffffff
je 0x41fc25
mov ebx, dword [esp + 0x14]
mov ecx, dword [edi + 0xc70]
mov eax, dword [edi + 0xc74]
cmp ecx, eax
je 0x41fd76
test eax, eax
jne 0x41fd93
push eax
push ecx
push str.lws_server_socket_service
push str._s:_assert:_rxpos__d__rxlen__d_n
mov esi, 1
call fcn.004214d0
mov ebx, dword [esp + 0x24]
add esp, 0x10
cmp byte [ebp + 0x167], 0xa
je 0x41fe38
mov ecx, dword [edi + 0xc70]
mov eax, dword [edi + 0xc74]
sub eax, ecx
lea ecx, [ecx + edi + 0x46e]
push ecx
mov edi, ebp
call fcn.00426db0
add esp, 4
test eax, eax
jl 0x41fc30
mov ecx, dword [ebp]
test ecx, ecx
je case.0x41fbe1.1
cmp dword [ecx + 0xc74], 0
je 0x41fde2
add dword [ecx + 0xc70], eax
mov eax, dword [ebp]
mov edx, dword [eax + 0xc70]
cmp edx, dword [eax + 0xc74]
jne case.0x41fbe1.1
mov al, byte [ebp + 0x166]
test al, al
je case.0x41fbe1.1
cmp al, 2
je case.0x41fbe1.1
cmp al, 7
je case.0x41fbe1.1
push 1
mov eax, ebp
call fcn.00424370
add esp, 4
jmp case.0x41fbe1.1
xor eax, eax
mov dword [edi + 0xc70], eax
mov dword [edi + 0xc74], eax
mov ebx, dword [esp + 0x14]
test byte [ebx + 6], 2
je case.0x41fbe1.1
push 0
push 2
mov eax, ebp
call fcn.00420700
add esp, 8
test eax, eax
je 0x41fe70
push str.lws_server_socket_service
push str._s_a_n
mov esi, 4
call fcn.004214d0
add esp, 8
jmp 0x41fc25
test byte [ebp + 0x160], 1
je case.0x41fbe1.1
cmp byte [ebp + 0x167], 1
je 0x41feb6
mov eax, dword [ebp + 0x110]
mov ecx, dword [ebp + 0xfc]
mov ecx, dword [ecx + 4]
push 0
push 0
push eax
push 0x10
push ebp
call ecx
add esp, 0x14
test eax, eax
jne 0x41fc12
mov eax, ebp
call fcn.00421120
jmp 0x41fc10
mov eax, ebp
call fcn.00425ef0
test eax, eax
jl 0x41fc25
jle case.0x41fbe1.1
mov eax, ebp
call fcn.0041f980
test eax, eax
jne 0x41fc25
jmp case.0x41fbe1.1
mov al, 9
test byte [ebx + 6], al
je 0x41ffb2
test byte [ebx + 4], al
je 0x41ffb2
mov ecx, dword [ebx]
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x138]
push eax
push ecx
mov dword [esp + 0x28], 0x10
call dword [sym.imp.WS2_32.dll_accept]
mov ebx, dword [ebp + 0xec]
mov edi, eax
call fcn.00422160
mov edx, dword [ebp + 0xec]
mov eax, dword [edx + 0x118]
mov ecx, dword [eax + 4]
xor ebx, ebx
push ebx
push edi
push ebx
push 0x11
push ebp
call ecx
add esp, 0x14
test eax, eax
push edi
jne 0x41ffac
mov eax, dword [ebp + 0xec]
call fcn.0041fa20
add esp, 4
test eax, eax
je 0x41fc30
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 0x218]
sub eax, 1
cmp dword [esi + 0x38], eax
jae 0x41ffb2
mov ecx, dword [ebp + 0x140]
mov edx, dword [esi]
lea eax, [edx + ecx*8]
mov eax, dword [eax]
lea ecx, [esp + 0x20]
push ecx
push ebx
push ebx
lea edx, [esp + 0x34]
mov dword [esp + 0x38], eax
push edx
add eax, 1
push eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], 1
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x41ffb2
mov ebx, dword [esp + 0x14]
jmp case.0x41fbe1.18
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x41fc35