Function at 0x4afc70
Capabilities:
Get socket status

Disassembly:
sub esp, 0x33c
mov eax, dword [0x6019e4]
xor eax, esp
mov dword [esp + 0x334], eax
push ebx
push ebp
push esi
mov esi, ecx
push edi
test esi, esi
je 0x4b0294
mov dword [esi + 0x304], 0
mov dword [esi + 0x300], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi + 8], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push dword [esi + 8]
mov dword [esi + 0xc], eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov dword [esi + 0x10], eax
mov eax, dword [0x62b16c]
test eax, eax
mov dword [esp + 0x238], 0
cmove eax, esi
mov dword [esp + 0x28], 0
cmp dword [esi], 0
mov dword [0x62b16c], eax
mov dword [esp + 0x130], 0
mov dword [esi + 4], 1
jne 0x4b0012
mov ebp, dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov ebx, 0x3e8
mov eax, dword [esi + 0x2f0]
xor edi, edi
mov dword [esp + 0x238], 0
mov dword [esp + 0x28], edi
mov dword [esp + 0x130], edi
mov dword [esp + 0x14], 0x15180
mov dword [esp + 0x18], edi
mov eax, dword [eax + 0xc]
mov dword [esi + 0x318], eax
mov dword [esi + 0x314], 0x5265c00
test eax, eax
je 0x4afdf3
nop dword [eax + eax]
mov ecx, dword [esi + 0x318]
test ecx, ecx
je 0x4afdef
mov ecx, dword [ecx]
test ecx, ecx
je 0x4afdef
cmp dword [ecx], edi
je 0x4afdb6
mov eax, dword [esi + 0x314]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x138]
push eax
lea eax, [esp + 0x244]
push eax
mov eax, dword [ecx]
push ecx
call eax
mov eax, dword [esp + 0x24]
add esp, 0x14
cmp eax, dword [esi + 0x314]
jge 0x4afdb6
mov dword [esi + 0x314], eax
mov eax, dword [esi + 0x318]
test eax, eax
je 0x4afdc3
add eax, 0x14
mov eax, dword [eax + 4]
test eax, eax
jle 0x4afdd8
cmp eax, dword [esi + 0x314]
jge 0x4afdd8
mov dword [esi + 0x314], eax
mov eax, dword [esi + 0x318]
mov eax, dword [eax + 8]
mov dword [esi + 0x318], eax
test eax, eax
jne 0x4afd60
mov edi, dword [esp + 0x28]
mov eax, dword [esi + 0x314]
xor ecx, ecx
cdq
idiv ebx
mov dword [esp + 0x14], eax
imul eax, edx, 0x3e8
mov dword [esp + 0x18], eax
test edi, edi
je 0x4afe21
mov eax, dword [esi + 0x2e0]
cmp dword [esp + ecx*4 + 0x2c], eax
je 0x4afe21
inc ecx
cmp ecx, edi
jb 0x4afe16
cmp ecx, edi
jne 0x4afe38
cmp edi, 0x40
jae 0x4afe38
mov eax, dword [esi + 0x2e0]
mov dword [esp + ecx*4 + 0x2c], eax
inc dword [esp + 0x28]
push 0xffffffffffffffff
push dword [0x62b174]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esi + 0x2f4]
cmp dword [eax + 4], 0
jle 0x4aff00
nop word [eax + eax]
mov eax, dword [esi + 0x2f4]
mov edi, dword [eax + 0xc]
mov dword [esi + 0x318], edi
test edi, edi
je 0x4afe77
mov edi, dword [edi]
jmp 0x4afe79
xor edi, edi
mov ecx, dword [esi + 0x2f0]
mov edx, edi
call fcn.004b36c0
mov ecx, dword [esi + 0x318]
test ecx, ecx
je 0x4afed6
mov ebx, dword [ecx + 0xc]
mov edx, dword [ecx + 4]
test ebx, ebx
je 0x4afea0
mov eax, dword [ecx + 8]
mov dword [ebx + 8], eax
mov ebx, dword [ecx + 8]
test ebx, ebx
je 0x4afead
mov eax, dword [ecx + 0xc]
mov dword [ebx + 0xc], eax
cmp dword [edx + 0xc], ecx
jne 0x4afeb8
mov eax, dword [ecx + 8]
mov dword [edx + 0xc], eax
cmp dword [edx + 0x10], ecx
jne 0x4afeca
mov eax, dword [ecx + 8]
test eax, eax
jne 0x4afec7
mov eax, dword [ecx + 0xc]
mov dword [edx + 0x10], eax
dec dword [edx + 4]
push ecx
call fcn.0058c812
add esp, 4
test edi, edi
je 0x4afef0
mov eax, dword [edi + 8]
test eax, eax
je 0x4afee7
push edi
call eax
add esp, 4
push edi
call fcn.0058c812
add esp, 4
mov eax, dword [esi + 0x2f4]
cmp dword [eax + 4], 0
jg 0x4afe60
push 0
push 1
push dword [0x62b174]
call ebp
inc dword [esi + 0x300]
cmp dword [esp + 0x238], 0
jne 0x4aff39
cmp dword [esp + 0x130], 0
jne 0x4aff39
push 1
push dword [esi + 0x314]
call dword [sym.imp.KERNEL32.dll_SleepEx]
or ebx, 0xffffffff
jmp 0x4aff5d
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x138]
push eax
lea eax, [esp + 0x244]
push eax
push 0x40
call dword [sym.imp.WS2_32.dll_select]
mov ebx, eax
inc dword [esi + 0x304]
cmp ebx, 0xffffffff
jne 0x4aff86
mov dword [esp + 0x238], 0
mov dword [esp + 0x130], 0
mov dword [esp + 0x28], 0
mov eax, dword [esi + 0x2f0]
mov eax, dword [eax + 0xc]
mov dword [esi + 0x318], eax
test eax, eax
je 0x4b0004
nop dword [eax]
mov edi, dword [esi + 0x318]
test edi, edi
je 0x4b0004
mov edi, dword [edi]
test edi, edi
je 0x4b0004
mov eax, dword [edi + 4]
test eax, eax
je 0x4affd3
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x134]
push ecx
lea ecx, [esp + 0x240]
push ecx
push ebx
push edi
call eax
add esp, 0x14
mov eax, dword [esi + 0x318]
test eax, eax
jne 0x4affe1
xor ecx, ecx
jmp 0x4affe4
lea ecx, [eax + 0x14]
mov ecx, dword [ecx]
test ecx, ecx
je 0x4afff1
push eax
push edi
call ecx
add esp, 8
mov eax, dword [esi + 0x318]
mov eax, dword [eax + 8]
mov dword [esi + 0x318], eax
test eax, eax
jne 0x4affa0
cmp dword [esi], 0
mov ebx, 0x3e8
je 0x4afd13
cmp dword [esi + 0x308], 0
je 0x4b0027
push dword [esi + 0x310]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edi, dword [esi + 0x2ec]
test edi, edi
je 0x4b006b
mov edi, dword [edi + 0xc]
test edi, edi
je 0x4b0056
mov ebx, dword [edi]
test ebx, ebx
je 0x4b004f
push dword [ebx + 4]
mov eax, dword [ebx]
push esi
call eax
push ebx
call fcn.0058c812
add esp, 0xc
mov edi, dword [edi + 8]
test edi, edi
jne 0x4b0038
mov ecx, dword [esi + 0x2ec]
call fcn.004b3730
mov dword [esi + 0x2ec], 0
mov eax, dword [esi + 0x2f0]
mov eax, dword [eax + 0xc]
mov dword [esi + 0x318], eax
test eax, eax
je 0x4b0087
mov eax, dword [eax + 8]
mov dword [esi + 0x318], eax
cmp dword [esi + 0x318], 0
mov dword [esi], 1
je 0x4b0138
nop word [eax + eax]
mov edi, dword [esi + 0x318]
test edi, edi
je 0x4b0138
mov edi, dword [edi]
test edi, edi
je 0x4b0138
mov eax, dword [edi + 8]
test eax, eax
je 0x4b00c5
push edi
call eax
add esp, 4
push edi
call fcn.0058c812
mov ecx, dword [esi + 0x318]
add esp, 4
test ecx, ecx
je 0x4b012e
mov eax, dword [ecx + 0xc]
mov edx, dword [ecx + 4]
mov edi, dword [ecx + 8]
test eax, eax
je 0x4b00e8
mov dword [eax + 8], edi
mov ebx, dword [ecx + 8]
test ebx, ebx
je 0x4b00f5
mov eax, dword [ecx + 0xc]
mov dword [ebx + 0xc], eax
cmp dword [edx + 0xc], ecx
jne 0x4b0100
mov eax, dword [ecx + 8]
mov dword [edx + 0xc], eax
cmp dword [edx + 0x10], ecx
jne 0x4b0112
mov eax, dword [ecx + 8]
test eax, eax
jne 0x4b010f
mov eax, dword [ecx + 0xc]
mov dword [edx + 0x10], eax
dec dword [edx + 4]
push ecx
call fcn.0058c812
add esp, 4
mov dword [esi + 0x318], edi
test edi, edi
jne 0x4b00a0
jmp 0x4b0138
mov dword [esi + 0x318], 0
mov eax, dword [0x62b16c]
xor ecx, ecx
cmp eax, esi
cmove eax, ecx
mov dword [0x62b16c], eax
mov eax, dword [esi + 0x2f0]
mov edi, dword [eax + 0xc]
mov dword [esi + 0x318], edi
test edi, edi
je 0x4b017b
mov edi, dword [edi]
test edi, edi
je 0x4b017b
mov eax, dword [edi + 8]
push edi
call eax
push edi
call fcn.0058c812
add esp, 8
mov dword [esi + 0x2e4], 0
mov ecx, dword [esi + 0x2f0]
call fcn.004b3730
mov eax, dword [esi + 0x2f4]
mov eax, dword [eax + 0xc]
mov dword [esi + 0x318], eax
test eax, eax
je 0x4b01d9
nop dword [eax]
mov edi, dword [esi + 0x318]
test edi, edi
je 0x4b01d9
mov edi, dword [edi]
test edi, edi
je 0x4b01d9
mov eax, dword [edi + 8]
test eax, eax
je 0x4b01bd
push edi
call eax
add esp, 4
push edi
call fcn.0058c812
mov eax, dword [esi + 0x318]
add esp, 4
mov eax, dword [eax + 8]
mov dword [esi + 0x318], eax
test eax, eax
jne 0x4b01a0
mov ecx, dword [esi + 0x2f4]
call fcn.004b3730
mov ebx, dword [esi + 0x2f8]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x4b024c
mov edi, dword [ebx]
lea eax, [esp + 0x1c]
xorps xmm0, xmm0
mov dword [esp + 0x24], 0
movq qword [esp + 0x1c], xmm0
mov edx, 0x4b3910
push 1
push eax
mov ecx, edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
call fcn.004b41f0
add esp, 8
push dword [edi + 0xc]
call ebp
push dword [edi]
call fcn.0058c812
push edi
call fcn.0058c812
push ebx
call fcn.0058c812
add esp, 0xc
mov eax, dword [esi + 0x2e0]
cmp eax, 0xffffffff
je 0x4b0268
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x2e0], 0xffffffff
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [0x62b168]
cmp eax, 1
jne 0x4b0285
push dword [0x62b174]
call ebp
mov eax, dword [0x62b168]
dec eax
push esi
mov dword [0x62b168], eax
call fcn.0058c812
add esp, 4
mov ecx, dword [esp + 0x344]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005852a8
add esp, 0x33c
ret