Function at 0x10046226
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x350
mov eax, dword [0x100b5350]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x18]
push ebx
xor ebx, ebx
push esi
xorps xmm0, xmm0
push edi
movlpd qword [ebp - 0x340], xmm0
mov dword [ebp - 0x338], ebx
mov dword [ebp - 0x31c], ebx
mov dword [ebp - 0x318], ecx
cmp ecx, ebx
jl 0x10046282
mov edx, accept
jg 0x10046276
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x314], eax
cmp eax, edx
jb 0x1004628b
mov ecx, ebx
mov eax, edx
mov dword [ebp - 0x318], ecx
jmp 0x10046285
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x314], eax
cmp dword [ebp + 8], 0xffffffff
jne 0x100462a9
cmp dword [ebp + 0xc], 0xffffffff
jne 0x100462a9
cmp dword [ebp + 0x10], 0xffffffff
jne 0x100462a9
push eax
call fcn.100465b0
pop ecx
jmp 0x100465a1
cmp ecx, ebx
jl 0x100462d2
jg 0x100462b3
cmp eax, ebx
jbe 0x100462d2
mov dword [ebp - 0x31c], eax
lea eax, [ebp - 0x350]
push eax
call fcn.1003dd2b
mov esi, eax
lea edi, [ebp - 0x340]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop ecx
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp + 8]
mov eax, ebx
or edx, 0xffffffff
mov ecx, ebx
xor edi, edi
mov dword [ebp - 0x108], eax
mov dword [ebp - 0x20c], ecx
cmp esi, 0xffffffff
je 0x1004630f
lea ecx, [edi + 1]
lea eax, [edi + 1]
mov dword [ebp - 0x208], esi
mov dword [ebp - 0x20c], ecx
mov dword [ebp - 0x104], esi
mov dword [ebp - 0x108], eax
mov edx, esi
mov edi, dword [ebp + 0xc]
cmp edi, 0xffffffff
je 0x1004637e
mov esi, ebx
test ecx, ecx
je 0x1004632b
cmp dword [ebp + esi*4 - 0x208], edi
je 0x1004632b
inc esi
cmp esi, ecx
jb 0x1004631d
cmp esi, ecx
jne 0x10046348
cmp ecx, 0x40
jae 0x10046348
mov dword [ebp + esi*4 - 0x208], edi
mov ecx, dword [ebp - 0x20c]
inc ecx
mov dword [ebp - 0x20c], ecx
mov esi, ebx
test eax, eax
je 0x1004635c
cmp dword [ebp + esi*4 - 0x104], edi
je 0x1004635c
inc esi
cmp esi, eax
jb 0x1004634e
cmp esi, eax
jne 0x10046379
cmp eax, 0x40
jae 0x10046379
mov dword [ebp + esi*4 - 0x104], edi
mov eax, dword [ebp - 0x108]
inc eax
mov dword [ebp - 0x108], eax
cmp edi, edx
cmova edx, edi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x310], ebx
cmp esi, 0xffffffff
je 0x100463cb
mov dword [ebp - 0x30c], esi
mov dword [ebp - 0x310], 1
mov edi, ebx
test eax, eax
je 0x100463b0
cmp dword [ebp + edi*4 - 0x104], esi
je 0x100463b0
inc edi
cmp edi, eax
jb 0x100463a2
cmp edi, eax
jne 0x100463c6
cmp eax, 0x40
jae 0x100463c6
mov dword [ebp + edi*4 - 0x104], esi
inc dword [ebp - 0x108]
cmp esi, edx
cmova edx, esi
mov edi, dword [ebp - 0x318]
mov esi, dword [ebp - 0x314]
cmp edi, ebx
jg 0x100463e9
jl 0x100463e1
cmp esi, ebx
jae 0x100463e9
mov dword [ebp - 0x320], ebx
jmp 0x100463f5
lea eax, [ebp - 0x328]
mov dword [ebp - 0x320], eax
lea eax, [edx + 1]
mov dword [ebp - 0x32c], eax
cmp edi, ebx
jl 0x10046433
jg 0x10046408
cmp esi, ebx
jbe 0x10046433
mov eax, dword [ebp - 0x31c]
cdq
mov dword [ebp - 0x330], 0x3e8
idiv dword [ebp - 0x330]
imul edx, edx, 0x3e8
mov dword [ebp - 0x328], eax
mov dword [ebp - 0x324], edx
jmp 0x10046445
mov eax, esi
or eax, edi
jne 0x10046445
mov dword [ebp - 0x328], ebx
mov dword [ebp - 0x324], ebx
push dword [ebp - 0x320]
xor edx, edx
cmp dword [ebp - 0x310], edx
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x310]
cmove eax, edx
push eax
test ecx, ecx
lea eax, [ebp - 0x20c]
cmove eax, edx
push eax
push dword [ebp - 0x32c]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x100464f9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x1004649a
cmp dword [0x100b7400], ebx
jne 0x100464fd
cmp eax, 0x2714
jne 0x100464fd
cmp edi, ebx
jl 0x100464ec
jg 0x100464a4
cmp esi, ebx
jbe 0x100464ec
lea eax, [ebp - 0x350]
push eax
call fcn.1003dd2b
sub esp, 0xc
mov edi, esp
lea esi, [ebp - 0x340]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
sub esp, 0x10
mov esi, eax
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.1003dcef
mov esi, dword [ebp - 0x314]
mov ecx, esi
sub ecx, eax
add esp, 0x20
mov dword [ebp - 0x31c], ecx
test ecx, ecx
jle 0x100464f7
mov edi, dword [ebp - 0x318]
mov ecx, dword [ebp - 0x20c]
jmp 0x100463fe
mov eax, ebx
test eax, eax
jns 0x10046505
or eax, 0xffffffff
jmp 0x100465a1
jne 0x1004650e
xor eax, eax
jmp 0x100465a1
mov esi, dword [ebp + 8]
cmp esi, 0xffffffff
je 0x1004653f
lea eax, [ebp - 0x20c]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
push 1
test eax, eax
pop eax
cmovne ebx, eax
lea eax, [ebp - 0x108]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1004653f
or ebx, 4
mov edi, dword [ebp + 0xc]
cmp edi, 0xffffffff
je 0x1004656f
lea eax, [ebp - 0x20c]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1004655b
or ebx, 8
lea eax, [ebp - 0x108]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1004656f
or ebx, 4
mov esi, dword [ebp + 0x10]
cmp esi, 0xffffffff
je 0x1004659f
lea eax, [ebp - 0x310]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1004658b
or ebx, 2
lea eax, [ebp - 0x108]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1004659f
or ebx, 4
mov eax, ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100704e7
leave
ret