Function at 0x10004f20
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8dc
mov eax, dword [0x10017030]
xor eax, esp
mov dword [esp + 0x8d8], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
mov dword [esp + 0x34], eax
mov dword [esp + 0x44], eax
mov eax, dword [0x1001ccf8]
push ebx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x40], ecx
mov ecx, dword fs:[0x2c]
push esi
mov dword [esp + 0x1c], edx
mov edx, dword [ecx + eax*4]
mov eax, dword [edx + 4]
push edi
mov edi, dword [ebp + 0x10]
xor esi, esi
mov dword [esp + 0x44], edi
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 0x4c], edi
cmp eax, esi
jne 0x10004f8a
call fcn.10003340
xor edx, edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x298], esi
mov dword [esp + 0x194], esi
mov dword [esp + 0x90], esi
mov dword [esp + 0x2c], esi
xor cl, cl
jmp 0x10004fb0
movzx eax, cl
mov eax, dword [esp + eax*4 + 0x48]
cmp eax, esi
je 0x10004fc8
cmp dword [eax], esi
je 0x10004fc8
mov eax, dword [eax]
add edx, eax
cmp eax, 0x40
jae 0x10004ff2
inc cl
cmp cl, 3
jne 0x10004fb0
cmp edx, esi
jne 0x1000500e
push str.select:_0__total_count_n
push 1
call fcn.100034b0
add esp, 8
push 0x2726
call dword [0x10018c1c]
jmp 0x10005526
push 0x57
call dword [0x10018c1c]
push str.select:_src_fds_n___fd_count___FD_SETSIZE_n
push 1
call fcn.100034b0
add esp, 8
jmp 0x10005526
cmp edx, 0x3f
jle 0x1000502f
push str.select:_total_count___63_n
push 1
call fcn.100034b0
add esp, 8
push 0x57
call dword [0x10018c1c]
jmp 0x10005526
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x5a4]
push edx
lea eax, [esp + 0x50]
call fcn.10005990
add esp, 8
test al, al
jne 0x1000506b
push str.lock_all:_false_n
push 1
call fcn.100034b0
add esp, 8
push 0x2719
call dword [0x10018c1c]
jmp 0x100054f4
cmp edi, esi
je 0x100050ab
mov ebx, dword [edi]
cmp ebx, esi
je 0x100050ab
add edi, 4
jmp 0x10005080
mov eax, dword [edi]
cmp eax, 0x400
jae 0x10005092
mov eax, dword [eax*4 + 0x10018ca0]
jmp 0x1000509b
push eax
call fcn.10003250
add esp, 4
cmp dword [eax + 0x30], 1
je 0x100050f7
inc esi
add edi, 4
cmp esi, ebx
jne 0x10005080
xor esi, esi
mov ecx, dword [esp + 0x14]
xor edi, edi
mov dword [esp + 0xc], esi
mov dword [esp + 0x18], edi
test ecx, ecx
je 0x100051c4
mov eax, dword [ecx]
test eax, eax
je 0x100051c4
add ecx, 4
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
jmp 0x100050e0
mov eax, dword [esp + 0x10]
mov ebx, dword [eax]
cmp ebx, 0x400
jae 0x10005101
mov esi, dword [ebx*4 + 0x10018ca0]
jmp 0x1000510c
push str.scb_state::listening__scb__state_n
jmp 0x10005051
push ebx
call fcn.10003250
add esp, 4
mov esi, eax
mov eax, dword [esi + 0x30]
mov ecx, 1
cmp eax, ecx
jne 0x1000515d
cmp dword [esi + 0x70], 0
jne 0x10005140
push 0
push 0
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ecx, dword [esi + 0x20]
push 8
push eax
push ecx
mov dword [esi + 0x70], eax
call dword [0x10018bcc]
mov ecx, 1
mov edx, dword [esi + 0x70]
mov dword [esp + edi*4 + 0x3a0], edx
mov dword [esp + edi*4 + 0x4a0], esi
mov byte [esp + edi + 0x8a0], 3
add edi, ecx
jmp 0x100051b1
cmp eax, 2
jne 0x100051b1
cmp dword [esi + 0x7c], 0x10000
jne 0x1000518e
cmp byte [esi + 0x36], 0
je 0x1000518e
mov eax, dword [esi + 0x6c]
mov dword [esp + edi*4 + 0x3a0], eax
mov dword [esp + edi*4 + 0x4a0], esi
mov byte [esp + edi + 0x8a0], 0
add edi, ecx
jmp 0x100051b1
mov edx, dword [esp + 0x90]
mov eax, dword [esp + 0x10]
mov dword [esp + edx*4 + 0x94], ebx
add dword [esp + 0x90], ecx
add dword [esp + 0xc], ecx
mov dword [eax], 0xffffffff
add dword [esp + 0x10], 4
sub dword [esp + 0x14], ecx
jne 0x100050e0
mov dword [esp + 0x18], edi
mov ecx, dword [esp + 0x44]
test ecx, ecx
je 0x100052bd
mov eax, dword [ecx]
test eax, eax
je 0x100052bd
add ecx, 4
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
mov ebx, dword [ecx]
cmp ebx, 0x400
jae 0x100051f8
mov esi, dword [ebx*4 + 0x10018ca0]
jmp 0x10005203
push ebx
call fcn.10003250
add esp, 4
mov esi, eax
mov eax, dword [esi + 0x30]
cmp eax, 3
jne 0x1000524b
cmp dword [esi + 0x70], 0
jne 0x1000522f
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ecx, dword [esi + 0x20]
push 0x10
push eax
push ecx
mov dword [esi + 0x70], eax
call dword [0x10018bcc]
mov edx, dword [esi + 0x70]
mov dword [esp + edi*4 + 0x3a0], edx
mov dword [esp + edi*4 + 0x4a0], esi
mov byte [esp + edi + 0x8a0], 2
inc edi
jmp 0x100052a3
cmp eax, 2
jne 0x100052a3
cmp dword [esi + 0x84], 0
je 0x1000527b
cmp byte [esi + 0x37], 0
je 0x1000527b
mov eax, dword [esi + 0x70]
mov dword [esp + edi*4 + 0x3a0], eax
mov dword [esp + edi*4 + 0x4a0], esi
mov byte [esp + edi + 0x8a0], 1
inc edi
jmp 0x100052a3
mov ecx, dword [esp + 0x194]
mov edx, dword [esp + 0x10]
mov eax, 1
mov dword [esp + ecx*4 + 0x198], ebx
add dword [esp + 0x194], eax
add dword [esp + 0xc], eax
mov dword [edx], 0xffffffff
mov ecx, dword [esp + 0x10]
add ecx, 4
sub dword [esp + 0x14], 1
mov dword [esp + 0x10], ecx
jne 0x100051e5
mov dword [esp + 0x18], edi
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x10005422
mov eax, dword [ecx]
test eax, eax
je 0x10005422
add ecx, 4
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
mov ebx, ecx
mov edi, dword [ebx]
cmp edi, 0x400
jae 0x100052f3
mov esi, dword [edi*4 + 0x10018ca0]
jmp 0x1000536b
push 0x10018c84
mov dword [esp + 0x2c], edi
xor esi, esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [esp + 0x30]
push eax
lea ebx, [esp + 0x2c]
call fcn.100036c0
mov eax, dword [0x1001cca0]
mov ebx, dword [0x1001ccb8]
test eax, eax
je 0x10005329
mov ecx, dword [esp + 0x30]
cmp eax, ecx
je 0x10005332
call fcn.100069af
mov ecx, dword [esp + 0x30]
cmp ebx, dword [esp + 0x34]
jne 0x1000535c
test ecx, ecx
jne 0x100053e0
call fcn.100069af
xor eax, eax
mov ecx, dword [esp + 0x34]
cmp ecx, dword [eax + 0x18]
jne 0x10005355
call fcn.100069af
mov edx, dword [esp + 0x34]
mov esi, dword [edx + 0x10]
push 0x10018c84
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebx, dword [esp + 0x10]
mov eax, dword [esi + 0x30]
cmp eax, 3
jne 0x100053e7
cmp dword [esi + 0x70], 0
jne 0x10005397
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push 0x10
push eax
mov dword [esi + 0x70], eax
mov eax, dword [esi + 0x20]
push eax
call dword [0x10018bcc]
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x3a0]
lea ecx, [esp + ecx*4 + 0x3a0]
mov edx, eax
cmp edx, ecx
je 0x100053bd
mov edx, dword [esi + 0x70]
cmp dword [eax], edx
je 0x100053bd
add eax, 4
cmp eax, ecx
jne 0x100053b2
cmp ecx, eax
jne 0x10005410
mov eax, dword [esi + 0x70]
mov dword [ecx], eax
mov eax, dword [esp + 0x18]
mov dword [esp + eax*4 + 0x4a0], esi
mov byte [esp + eax + 0x8a0], 2
inc eax
mov dword [esp + 0x18], eax
jmp 0x10005410
mov eax, dword [ecx]
jmp 0x10005347
cmp eax, 4
jne 0x10005410
mov ecx, dword [esp + 0x298]
mov eax, 1
mov dword [esp + ecx*4 + 0x29c], edi
add dword [esp + 0x298], eax
add dword [esp + 0xc], eax
mov dword [ebx], 0xffffffff
add ebx, 4
sub dword [esp + 0x14], 1
mov dword [esp + 0x10], ebx
jne 0x100052e0
cmp dword [esp + 0x18], 0
jne 0x10005440
cmp dword [esp + 0xc], 0
jne 0x100054f4
cmp dword [esp + 0x20], 0
jne 0x1000544b
or ebx, 0xffffffff
jmp 0x10005470
cmp dword [esp + 0xc], 0
je 0x10005434
xor ebx, ebx
jmp 0x10005470
mov esi, dword [esp + 0x20]
mov ecx, dword [esi + 4]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
mov edx, dword [esi]
imul edx, edx, 0x3e8
add ebx, edx
lea ecx, [ecx]
test ebx, ebx
je 0x1000557c
mov edi, dword [esp + 0x24]
lea esi, [edi + 8]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov al, byte [edi + 0x2c]
push esi
mov byte [esp + 0x23], al
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp byte [esp + 0x1f], 0
jne 0x100054e1
mov eax, dword [esp + 0x18]
push ebx
mov ecx, edi
mov edx, dword [ecx + 0x30]
push 0
lea ecx, [esp + 0x3a8]
mov dword [esp + eax*4 + 0x3a8], edx
push ecx
inc eax
push eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov edi, eax
push esi
mov dword [esp + 0x14], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esp + 0x24]
mov bl, byte [edx + 0x2c]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test bl, bl
je 0x10005599
push 0x3e3
call dword [0x10018c1c]
mov dword [esp + 0xc], 0xffffffff
mov ebx, dword [esp + 0x2c]
xor edi, edi
test ebx, ebx
je 0x10005526
mov eax, dword [esp + edi*4 + 0x5a0]
test eax, eax
je 0x10005521
lea esi, [eax + 0x10]
mov byte [eax + 0x41], 0
mov edx, esi
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
je 0x10005521
call fcn.100012a0
inc edi
cmp edi, ebx
jne 0x100054fe
lea edi, [esp + 0x48]
lea esi, [esp + 0x94]
mov ebx, 3
mov eax, dword [edi]
test eax, eax
je 0x10005553
mov ecx, dword [esi - 4]
mov dword [eax], ecx
add ecx, ecx
add ecx, ecx
push ecx
add eax, 4
push esi
push eax
call fcn.10008760
add esp, 0xc
add esi, 0x104
add edi, 4
sub ebx, 1
jne 0x10005536
mov ecx, dword [esp + 0x8e4]
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.100067b8
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [esp + 0x18]
push 0
push 0
lea eax, [esp + 0x3a8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov edi, eax
mov dword [esp + 0x10], eax
cmp edi, 0x102
je 0x100054f4
lea eax, [esp + edi + 0x8a0]
mov dword [esp + 0x28], eax
mov al, byte [eax]
test al, al
jne 0x1000573c
mov esi, dword [esp + edi*4 + 0x4a0]
mov edx, dword [esi + 0x1c]
mov eax, dword [esp + 0x90]
push 0
lea ecx, [esp + 0x18]
mov dword [esp + eax*4 + 0x98], edx
push ecx
mov dword [esp + 0x1c], 0
mov edx, dword [esi + 0x20]
lea ebx, [esi + 0x44]
mov eax, 1
add dword [esp + 0x98], eax
add dword [esp + 0x14], eax
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x10005615
call dword [0x10018b64]
mov byte [esi + 0x36], 0
mov dword [esi + 0x38], eax
jmp 0x100056d0
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x10005625
mov byte [esi + 0x36], al
jmp 0x100056d0
sub dword [esi + 0x7c], eax
mov eax, dword [esi + 0x78]
add eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x7c]
and eax, 0xffff
mov dword [esi + 0x78], eax
test ecx, ecx
jne 0x10005646
mov byte [esi + 0x36], cl
jmp 0x100056d0
lea edi, [eax + esi + 0x88]
mov dword [esp + 0x34], edi
lea edi, [eax + ecx]
mov edx, 1
mov dword [esp + 0x30], ecx
cmp edi, 0x10000
jbe 0x10005685
mov edx, 0x10000
sub edx, eax
sub ecx, edx
lea eax, [esi + 0x88]
mov dword [esp + 0x30], edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], ecx
mov edx, 2
mov ecx, dword [esi + 0x6c]
xor eax, eax
mov dword [ebx], eax
mov dword [ebx + 4], eax
push eax
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], eax
push ebx
mov dword [ebx + 0x10], eax
lea eax, [esi + 0x74]
push eax
push 0
push edx
mov edx, dword [esi + 0x20]
mov dword [esi + 0x54], ecx
lea ecx, [esp + 0x44]
push ecx
push edx
call dword [0x10018c7c]
cmp eax, 0xffffffff
jne 0x100056cc
call dword [0x10018b64]
cmp eax, 0x3e5
je 0x100056cc
mov byte [esi + 0x36], 0
mov dword [esi + 0x38], eax
mov edi, dword [esp + 0x10]
cmp dword [esp + 0x18], 1
je 0x100054f4
mov esi, dword [esp + 0x18]
dec esi
mov dword [esp + 0x18], esi
sub esi, edi
lea ebx, [esi*4]
push ebx
lea edx, [esp + edi*4 + 0x3a8]
push edx
lea eax, [esp + edi*4 + 0x3a8]
push eax
call fcn.10007200
add esp, 0xc
push ebx
lea ecx, [esp + edi*4 + 0x4a8]
push ecx
lea edx, [esp + edi*4 + 0x4a8]
push edx
call fcn.10007200
mov ecx, dword [esp + 0x34]
add esp, 0xc
push esi
lea eax, [esp + edi + 0x8a5]
push eax
push ecx
call fcn.10007200
add esp, 0xc
xor ebx, ebx
jmp 0x10005470
cmp al, 1
jne 0x10005856
mov esi, dword [esp + edi*4 + 0x4a0]
mov eax, dword [esi + 0x1c]
mov ecx, dword [esp + 0x194]
mov dword [esp + ecx*4 + 0x198], eax
push 0
mov eax, 1
add dword [esp + 0x198], eax
add dword [esp + 0x10], eax
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0x28], 0
mov eax, dword [esi + 0x20]
lea ebx, [esi + 0x58]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x1000579f
call dword [0x10018b64]
mov byte [esi + 0x37], 0
mov dword [esi + 0x3c], eax
jmp 0x100056d0
mov ecx, dword [esp + 0x20]
sub dword [esi + 0x84], ecx
mov eax, dword [esi + 0x84]
je 0x1000584d
mov edx, dword [esi + 0x80]
lea edi, [edx + esi + 0x10088]
mov dword [esp + 0x58], edi
lea edi, [edx + eax]
mov ecx, 1
mov dword [esp + 0x54], eax
cmp edi, 0x10000
jbe 0x100057fa
mov ecx, 0x10000
sub ecx, edx
sub eax, ecx
lea edx, [esi + 0x10088]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x60], edx
mov dword [esp + 0x5c], eax
mov ecx, 2
mov edx, dword [esi + 0x20]
push 0
push ebx
xor eax, eax
push 0
mov dword [ebx], eax
mov dword [ebx + 4], eax
push 0
mov dword [ebx + 8], eax
push ecx
mov dword [ebx + 0xc], eax
lea ecx, [esp + 0x68]
mov dword [ebx + 0x10], eax
mov eax, dword [esi + 0x70]
push ecx
push edx
mov dword [esi + 0x68], eax
call dword [0x10018b1c]
cmp eax, 0xffffffff
jne 0x100056cc
call dword [0x10018b64]
cmp eax, 0x3e5
je 0x100056cc
mov byte [esi + 0x37], 0
mov dword [esi + 0x3c], eax
jmp 0x100056cc
mov byte [esi + 0x37], 0
jmp 0x100056d0
cmp al, 2
jne 0x1000593b
mov esi, dword [esp + edi*4 + 0x4a0]
mov ecx, dword [esi + 0x20]
lea eax, [esp + 0x64]
push eax
push 0
push ecx
call dword [0x10018b88]
test byte [esp + 0x64], 0x10
je 0x100056d0
cmp dword [esp + 0x78], 0
je 0x100058e4
mov ecx, dword [esp + 0x40]
mov dword [esi + 0x30], 4
test ecx, ecx
je 0x100056d0
mov edx, dword [ecx]
xor eax, eax
test edx, edx
je 0x100056d0
mov esi, dword [esi + 0x1c]
add ecx, 4
lea ecx, [ecx]
cmp esi, dword [ecx]
je 0x100058c1
inc eax
add ecx, 4
cmp eax, edx
jne 0x100058b0
jmp 0x100056d0
mov edx, dword [esp + 0x298]
mov eax, 1
mov dword [esp + edx*4 + 0x29c], esi
add dword [esp + 0x298], eax
add dword [esp + 0xc], eax
jmp 0x100056d0
call fcn.10004600
mov ecx, dword [esp + 0x44]
test ecx, ecx
je 0x100056d0
mov edx, dword [ecx]
xor eax, eax
test edx, edx
je 0x100056d0
mov esi, dword [esi + 0x1c]
add ecx, 4
cmp esi, dword [ecx]
je 0x10005918
inc eax
add ecx, 4
cmp eax, edx
jne 0x10005907
jmp 0x100056d0
mov eax, dword [esp + 0x194]
mov dword [esp + eax*4 + 0x198], esi
mov eax, 1
add dword [esp + 0x194], eax
add dword [esp + 0xc], eax
jmp 0x100056d0
cmp al, 3
jne 0x100056d0
mov esi, dword [esp + edi*4 + 0x4a0]
mov edx, dword [esi + 0x20]
lea ecx, [esp + 0x64]
push ecx
push 0
push edx
call dword [0x10018b88]
test byte [esp + 0x64], 8
je 0x100056d0
mov eax, dword [esi + 0x1c]
mov ecx, dword [esp + 0x90]
mov dword [esp + ecx*4 + 0x94], eax
mov eax, 1
add dword [esp + 0x90], eax
add dword [esp + 0xc], eax
jmp 0x100056d0