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

Disassembly:
sub esp, 0x1c
push ebp
push esi
mov esi, dword [esp + 0x28]
xor ebp, ebp
push edi
mov dword [esp + 0x2c], ebp
mov edi, dword [esi + 0x20]
cmp dword [edi + 0x14c], ebp
je 0x4ef9ca
call fcn.004feb40
test eax, eax
je 0x4ef9ca
push dword [edi + 0x14c]
call fcn.004fec20
add esp, 4
test eax, eax
je 0x4efe10
push ebx
push esi
call fcn.004f3660
mov ebx, dword [esp + 0x38]
add esp, 4
cmp dword [0x644d4c], ebp
je 0x4efa3e
push dword [esi + 0xc]
movzx ecx, word [esi + 0x34]
test ebx, ebx
mov edx, 0x62952c
mov eax, str.EV_TIMEOUT
cmove eax, edx
test cl, 0x80
push eax
mov edx, 0x62953c
mov eax, str.EV_CLOSED
cmove eax, edx
test cl, 4
push eax
mov edx, 0x62954c
mov eax, str.EV_WRITE
cmove eax, edx
test cl, 2
push eax
mov ecx, 0x62955c
mov eax, str.EV_READ
cmove eax, ecx
push eax
mov eax, dword [esi + 0x1c]
cdq
push edx
push eax
push esi
push str.event_add:_event:__p__fd__I64d____s_s_s_scall__p
call fcn.004fdd90
add esp, 0x24
movzx ecx, word [esi + 8]
mov eax, ecx
and eax, 0xffffff00
test ax, ax
jne 0x4efe67
test cl, 0x40
jne 0x4efe05
test ebx, ebx
je 0x4efa84
test cl, 1
jne 0x4efa84
mov eax, dword [edi + 0xdc]
inc eax
push eax
lea eax, [edi + 0xd8]
push eax
call fcn.004ef460
add esp, 8
cmp eax, 0xffffffff
je 0x4efe05
cmp dword [edi + 0x158], esi
jne 0x4efac0
test byte [esi + 0x34], 8
je 0x4efac0
call fcn.004feb20
cmp dword [edi + 0x148], eax
je 0x4efac0
inc dword [edi + 0x154]
mov eax, dword [edi + 0x150]
test eax, eax
je 0x4efac0
push 0
push dword [edi + 0x14c]
push eax
call fcn.004fec00
add esp, 0xc
movzx eax, word [esi + 0x34]
test al, 0x8e
je 0x4efbc2
test byte [esi + 8], 0x2a
jne 0x4efbc2
test al, 0x86
je 0x4efae6
push esi
push dword [esi + 0x1c]
push edi
call fcn.00500090
jmp 0x4efaf4
test al, 8
je 0x4efb02
push esi
push dword [esi + 0x1c]
push edi
call fcn.005006c0
mov ebp, eax
add esp, 0xc
cmp ebp, 0xffffffff
je 0x4efbac
cmp dword [edi + 0x14c], 0
je 0x4efb6a
call fcn.004feb40
test eax, eax
je 0x4efb6a
push dword [edi + 0x14c]
call fcn.004fec20
add esp, 4
test eax, eax
jne 0x4efb6a
push 0x62a1c8
push 0x62a1d0
push 0xd26
push 0x62a204
push 0x62a20c
push 0xdeaddead
call fcn.004fdc30
add esp, 0x18
push 0x62a230
push 0x62a238
push 0xd26
push 0x62a26c
push 0x62a274
jmp 0x4efea6
movzx eax, word [esi + 8]
test al, 2
je 0x4efb8f
mov eax, dword [esi + 0x1c]
cdq
push edx
push eax
push esi
push 0x62a298
push str._s:__p_fd__I64d__already_inserted
push 1
call fcn.004fdc30
add esp, 0x18
jmp 0x4efbac
shr eax, 4
not eax
and eax, 1
add dword [edi + 0x78], eax
mov eax, dword [edi + 0x7c]
cmp eax, dword [edi + 0x78]
cmovle eax, dword [edi + 0x78]
mov dword [edi + 0x7c], eax
or word [esi + 8], 2
cmp ebp, 1
jne 0x4efbb9
mov dword [esp + 0x30], ebp
xor ebp, ebp
jmp 0x4efbc2
cmp ebp, 0xffffffff
je 0x4efd70
test ebx, ebx
je 0x4efd4a
cmp byte [esi + 0xb], 2
jne 0x4efbe2
cmp dword [esp + 0x38], 0
jne 0x4efbe2
mov eax, dword [ebx]
mov dword [esi + 0x2c], eax
mov eax, dword [ebx + 4]
mov dword [esi + 0x30], eax
movzx eax, word [esi + 8]
mov ecx, eax
test al, 1
je 0x4efbfa
push esi
push edi
call fcn.004f2260
movzx ecx, word [esi + 8]
add esp, 8
test cl, 8
je 0x4efc28
test byte [esi + 0x36], 1
je 0x4efc28
test byte [esi + 0x34], 8
je 0x4efc1e
cmp word [esi + 0x2c], 0
je 0x4efc1e
mov eax, dword [esi + 0x30]
test eax, eax
je 0x4efc1e
xor ecx, ecx
mov word [eax], cx
push esi
push edi
call fcn.004f2080
add esp, 8
lea eax, [esp + 0x18]
push eax
push edi
call fcn.004f37a0
push edi
push ebx
call fcn.004f42f0
add esp, 0x10
mov dword [esp + 0x14], eax
cmp dword [esp + 0x38], 0
je 0x4efc55
mov ecx, dword [ebx]
mov dword [esi + 0x38], ecx
mov ecx, dword [ebx + 4]
mov dword [esi + 0x3c], ecx
jmp 0x4efcbf
test eax, eax
je 0x4efc95
mov edx, dword [ebx + 4]
mov ecx, dword [esp + 0x1c]
and edx, 0xfffff
mov eax, dword [esp + 0x18]
add ecx, edx
add eax, dword [ebx]
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], ecx
cmp ecx, 0xf4240
jl 0x4efc89
inc eax
add ecx, 0xfff0bdc0
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], ecx
mov eax, dword [ebx + 4]
and eax, 0xfff00000
or eax, ecx
jmp 0x4efcbc
mov edx, dword [ebx]
add edx, dword [esp + 0x18]
mov dword [esi + 0x38], edx
mov ecx, dword [ebx + 4]
add ecx, dword [esp + 0x1c]
mov dword [esi + 0x3c], ecx
cmp ecx, 0xf4240
jl 0x4efcbf
lea eax, [edx + 1]
mov dword [esi + 0x38], eax
lea eax, [ecx - 0xf4240]
mov dword [esi + 0x3c], eax
cmp dword [0x644d4c], 0
je 0x4efcde
push dword [esi + 0xc]
push dword [ebx + 4]
push dword [ebx]
push esi
push str.event_add:_event__p__timeout_in__d_seconds__d_useconds__call__p
call fcn.004fdd90
add esp, 0x14
push esi
push edi
call fcn.004f1d20
add esp, 8
cmp dword [esp + 0x14], 0
je 0x4efd16
mov eax, dword [esi + 0x3c]
sar eax, 0x14
movzx ecx, al
mov eax, dword [edi + 0xb0]
mov eax, dword [eax + ecx*4]
cmp esi, dword [eax]
jne 0x4efd4a
push esi
lea ecx, [esp + 0x1c]
push ecx
push eax
call fcn.004f4360
add esp, 0xc
jmp 0x4efd4a
cmp dword [esi + 0x14], 0
je 0x4efd51
lea eax, [edi + 0xd8]
push eax
call fcn.004ef440
add esp, 4
test eax, eax
je 0x4efd4a
mov edx, dword [eax + 0x38]
xor ecx, ecx
mov ebx, dword [esp + 0x18]
cmp edx, ebx
jne 0x4efd43
mov eax, dword [eax + 0x3c]
cmp eax, dword [esp + 0x1c]
setl cl
test ecx, ecx
jne 0x4efd51
cmp dword [esp + 0x30], 0
je 0x4efd70
cmp dword [edi + 0x98], 0
je 0x4efd70
call fcn.004feb20
cmp dword [edi + 0x148], eax
je 0x4efd70
push edi
call fcn.004f2c60
add esp, 4
cmp dword [0x644ce4], 0
je 0x4efdf1
mov edi, dword [0x644cf8]
mov dword [esp + 0x24], esi
test edi, edi
je 0x4efd98
push edi
push 0
call fcn.004feb90
mov edi, dword [0x644cf8]
add esp, 8
lea eax, [esp + 0x20]
push eax
push 0x628034
call fcn.004f31f0
add esp, 8
test eax, eax
je 0x4efdb4
or dword [eax + 8], 1
jmp 0x4efde2
movsx eax, word [esi + 8]
push eax
mov eax, dword [esi + 0x1c]
cdq
push edx
push eax
movsx eax, word [esi + 0x34]
push eax
push esi
push 0x6280d4
push str._s:_noting_an_add_on_a_non_setup_event__p__events:_0x_x__fd:__I64d__flags:_0x_x_
push 0xdeaddead
call fcn.004fdc30
mov edi, dword [0x644cf8]
add esp, 0x20
test edi, edi
je 0x4efdf1
push edi
push 0
call fcn.004feba0
add esp, 8
pop ebx
pop edi
pop esi
mov eax, ebp
mov dword [0x644cf4], 1
pop ebp
add esp, 0x1c
ret
pop ebx
pop edi
pop esi
or eax, 0xffffffff
pop ebp
add esp, 0x1c
ret
push 0x629450
push 0x629458
push 0xa2f
push 0x62948c
push 0x629494
push 0xdeaddead
call fcn.004fdc30
add esp, 0x18
push 0x6294b8
push 0x6294c0
push 0xa2f
push 0x6294f4
push 0x6294fc
push 2
call fcn.00559d7d
add esp, 4
push eax
call fcn.004212e0
add esp, 0x18
call fcn.0055d4ee
push 0x629594
push 0x62959c
push 0xa3c
push 0x6295bc
push 0x6295c4
push 0xdeaddead
call fcn.004fdc30
add esp, 0x18
push 0x6295e8
push 0x6295f0
push 0xa3c
push 0x629610
push 0x629618
push 2
call fcn.00559d7d
add esp, 4
push eax
call fcn.004212e0
add esp, 0x18
call fcn.0055d4ee
int3