Function at 0x47f170
Capabilities:
Get socket status

Disassembly:
sub esp, 0x31c
mov eax, dword [0x522298]
xor eax, esp
mov dword [esp + 0x318], eax
push ebx
mov ebx, dword [esp + 0x324]
mov dword [esp + 8], ebx
test ebx, ebx
je 0x47f381
push ebp
mov ebp, dword [esp + 0x32c]
xor edx, edx
push esi
push edi
xor edi, edi
mov dword [esp + 0x120], edx
xor esi, esi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x224], esi
test ebp, ebp
je 0x47f294
mov dword [esp + 0x10], ebp
mov eax, dword [ebx + 4]
test eax, 0x300
je 0x47f208
xor ecx, ecx
test edi, edi
je 0x47f1eb
mov eax, dword [ebx]
mov eax, dword [eax]
nop word [eax + eax]
cmp dword [esp + ecx*4 + 0x20], eax
je 0x47f1eb
inc ecx
cmp ecx, edi
jb 0x47f1e0
cmp ecx, edi
jne 0x47f205
cmp edi, 0x40
jae 0x47f205
mov eax, dword [ebx]
mov eax, dword [eax]
mov dword [esp + ecx*4 + 0x20], eax
mov edi, dword [esp + 0x1c]
inc edi
mov dword [esp + 0x1c], edi
mov eax, dword [ebx + 4]
test al, 0x10
je 0x47f247
xor ecx, ecx
test edx, edx
je 0x47f224
mov eax, dword [ebx]
mov eax, dword [eax]
cmp dword [esp + ecx*4 + 0x124], eax
je 0x47f224
inc ecx
cmp ecx, edx
jb 0x47f216
cmp ecx, edx
jne 0x47f247
cmp edx, 0x40
jae 0x47f247
mov eax, dword [ebx]
mov eax, dword [eax]
mov dword [esp + ecx*4 + 0x124], eax
mov edx, dword [esp + 0x120]
inc edx
mov dword [esp + 0x120], edx
xor eax, eax
test esi, esi
je 0x47f25f
mov ecx, dword [ebx]
mov ecx, dword [ecx]
cmp dword [esp + eax*4 + 0x228], ecx
je 0x47f25f
inc eax
cmp eax, esi
jb 0x47f251
cmp eax, esi
jne 0x47f282
cmp esi, 0x40
jae 0x47f282
mov ecx, dword [ebx]
mov ecx, dword [ecx]
mov dword [esp + eax*4 + 0x228], ecx
mov esi, dword [esp + 0x224]
inc esi
mov dword [esp + 0x224], esi
add ebx, 0xc
sub dword [esp + 0x10], 1
jne 0x47f1c6
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x338]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x14], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [esp + 0x18], eax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x228]
push eax
lea eax, [esp + 0x128]
push eax
lea eax, [esp + 0x28]
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
mov edi, eax
cmp edi, 0xffffffff
jne 0x47f2fe
call fcn.004c3d2b
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi], eax
or eax, edi
jmp 0x47f368
test ebp, ebp
je 0x47f366
xor esi, esi
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esi + ebx]
push dword [eax]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47f321
mov dword [esi + ebx + 8], 0x300
jmp 0x47f35e
lea eax, [esp + 0x120]
push eax
mov eax, dword [esi + ebx]
push dword [eax]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47f341
mov dword [esi + ebx + 8], 0x10
jmp 0x47f35e
lea eax, [esp + 0x224]
push eax
mov eax, dword [esi + ebx]
push dword [eax]
call sub.WS2_32.dll___WSAFDIsSet
neg eax
sbb eax, eax
and eax, 2
mov dword [esi + ebx + 8], eax
add esi, 0xc
sub ebp, 1
jne 0x47f304
mov eax, edi
mov ecx, dword [esp + 0x328]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004b3f14
add esp, 0x31c
ret
push 0x4f9080
push str.mongoc_socket_poll
push 0x12a
push str.C:Usersprocr_vcpkg_buildtreesmongo_c_driver_src1.24.3_56c7a21808.clean_srclibmongoc_srcmongocmongoc_socket.c
push str._s:_d__s__:_precondition_failed:__s_n
push 2
call fcn.004b9cc5
add esp, 4
push eax
call fcn.00443a60
add esp, 0x18
call fcn.004c3b6b
int3