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

Disassembly:
sub esp, 0x10
push ebp
push esi
mov esi, dword [esp + 0x1c]
xor ebp, ebp
push edi
mov dword [esp + 0x20], ebp
mov dword [esp + 0xc], ebp
mov edi, dword [esi + 0x20]
cmp dword [edi + 0x14c], ebp
je 0x408c9e
call fcn.0041cc60
test eax, eax
je 0x408c9e
push dword [edi + 0x14c]
call fcn.0041cd40
add esp, 4
test eax, eax
je 0x409198
cmp dword [0x46a720], ebp
je 0x408d31
mov eax, dword [0x46a734]
test eax, eax
je 0x408cbe
push eax
push 0
call fcn.0041ccb0
add esp, 8
mov ecx, dword [0x45800c]
test ecx, ecx
je 0x408cf5
mov eax, esi
xor edx, edx
shr eax, 6
div dword [0x458010]
mov eax, dword [ecx + edx*4]
lea ecx, [ecx + edx*4]
test eax, eax
je 0x408cf5
nop
cmp dword [eax + 4], esi
je 0x408cef
mov ecx, eax
mov eax, dword [eax]
test eax, eax
jne 0x408ce0
jmp 0x408cf1
mov eax, dword [ecx]
test eax, eax
jne 0x408d1d
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 0x459cf0
push 0x459d10
push 0xdeaddead
call fcn.0041bd20
add esp, 0x20
mov eax, dword [0x46a734]
test eax, eax
je 0x408d31
push eax
push 0
call fcn.0041ccc0
add esp, 8
push ebx
mov ebx, dword [esp + 0x28]
cmp dword [0x46a798], ebp
je 0x408d9c
push dword [esi + 0xc]
movzx ecx, word [esi + 0x34]
test ebx, ebx
mov edx, 0x459d60
mov eax, str.EV_TIMEOUT
cmove eax, edx
test cl, 0x80
push eax
mov edx, 0x459d70
mov eax, str.EV_CLOSED
cmove eax, edx
test cl, 4
push eax
mov edx, 0x459d80
mov eax, str.EV_WRITE
cmove eax, edx
test cl, 2
push eax
mov ecx, 0x459d90
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.0041be80
add esp, 0x24
movzx ecx, word [esi + 8]
mov eax, ecx
and eax, 0xffffff00
test ax, ax
jne 0x4091ef
test cl, 0x40
jne 0x40918d
test ebx, ebx
je 0x408de2
test cl, 1
jne 0x408de2
mov eax, dword [edi + 0xdc]
inc eax
push eax
lea eax, [edi + 0xd8]
push eax
call fcn.00408710
add esp, 8
cmp eax, 0xffffffff
je 0x40918d
cmp dword [edi + 0x158], esi
jne 0x408e1e
test byte [esi + 0x34], 8
je 0x408e1e
call fcn.0041cc40
cmp dword [edi + 0x148], eax
je 0x408e1e
inc dword [edi + 0x154]
mov eax, dword [edi + 0x150]
test eax, eax
je 0x408e1e
push 0
push dword [edi + 0x14c]
push eax
call fcn.0041cd20
add esp, 0xc
movzx eax, word [esi + 0x34]
test al, 0x8e
je 0x408f32
test byte [esi + 8], 0x2a
jne 0x408f32
test al, 0x86
je 0x408e4a
push esi
push dword [esi + 0x1c]
push edi
call fcn.0041e200
mov ebp, eax
mov dword [esp + 0x30], ebp
jmp 0x408e5e
test al, 8
je 0x408e6a
push esi
push dword [esi + 0x1c]
push edi
call fcn.0041e830
mov ebp, eax
mov dword [esp + 0x30], eax
add esp, 0xc
cmp ebp, 0xffffffff
je 0x408f16
cmp dword [edi + 0x14c], 0
je 0x408ed2
call fcn.0041cc60
test eax, eax
je 0x408ed2
push dword [edi + 0x14c]
call fcn.0041cd40
add esp, 4
test eax, eax
jne 0x408ed2
push 0x45ad90
push 0x45adac
push 0xcf0
push 0x45ade0
push 0x45ade8
push 0xdeaddead
call fcn.0041bd20
add esp, 0x18
push 0x45ae0c
push 0x45ae28
push 0xcf0
push 0x45ae5c
push 0x45ae64
jmp 0x40922e
movzx ecx, word [esi + 8]
test cl, 2
je 0x408ef8
mov eax, dword [esi + 0x1c]
cdq
push edx
push eax
push esi
push str.event_queue_insert_inserted
push str._s:__p_fd__I64d__already_inserted
push 1
call fcn.0041bd20
add esp, 0x18
jmp 0x408f16
mov eax, dword [edi + 0x7c]
sar ecx, 4
not ecx
and ecx, 1
add ecx, dword [edi + 0x78]
cmp eax, ecx
mov dword [edi + 0x78], ecx
cmovle eax, ecx
mov dword [edi + 0x7c], eax
or word [esi + 8], 2
cmp ebp, 1
jne 0x408f29
mov dword [esp + 0x10], ebp
mov dword [esp + 0x24], 0
jmp 0x408f32
cmp ebp, 0xffffffff
je 0x4090e0
test ebx, ebx
je 0x4090b6
mov ebp, dword [esp + 0x2c]
test ebp, ebp
jne 0x408f53
cmp byte [esi + 0xb], 2
jne 0x408f53
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 0x408f6b
push esi
push edi
call fcn.0040b6c0
movzx ecx, word [esi + 8]
add esp, 8
test cl, 8
je 0x408f99
test byte [esi + 0x36], 1
je 0x408f99
test byte [esi + 0x34], 8
je 0x408f8f
cmp word [esi + 0x2c], 0
je 0x408f8f
mov eax, dword [esi + 0x30]
test eax, eax
je 0x408f8f
xor ecx, ecx
mov word [eax], cx
push esi
push edi
call fcn.0040b4e0
add esp, 8
lea eax, [esp + 0x18]
push eax
push edi
call fcn.0040c770
push edi
push ebx
call fcn.0040d290
add esp, 0x10
mov dword [esp + 0x14], eax
test ebp, ebp
je 0x408fc3
mov ecx, dword [ebx]
mov dword [esi + 0x38], ecx
mov ecx, dword [ebx + 4]
mov dword [esi + 0x3c], ecx
jmp 0x409029
test eax, eax
je 0x409001
mov edx, dword [ebx + 4]
mov eax, dword [esp + 0x18]
and edx, 0xfffff
add eax, dword [ebx]
add edx, dword [esp + 0x1c]
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], edx
cmp edx, 0xf4240
jl 0x408ff5
inc eax
add edx, 0xfff0bdc0
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], edx
mov eax, dword [ebx + 4]
and eax, 0xfff00000
or eax, edx
jmp 0x409026
mov eax, dword [ebx]
add eax, dword [esp + 0x18]
mov dword [esi + 0x38], eax
mov ecx, dword [ebx + 4]
add ecx, dword [esp + 0x1c]
mov dword [esi + 0x3c], ecx
cmp ecx, 0xf4240
jl 0x409029
inc eax
mov dword [esi + 0x38], eax
lea eax, [ecx - 0xf4240]
mov dword [esi + 0x3c], eax
cmp dword [0x46a798], 0
je 0x409048
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.0041be80
add esp, 0x14
push esi
push edi
call fcn.0040b120
add esp, 8
cmp dword [esp + 0x14], 0
je 0x409080
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 0x4090b6
push esi
lea ecx, [esp + 0x1c]
push ecx
push eax
call fcn.0040d300
add esp, 0xc
jmp 0x4090b6
cmp dword [esi + 0x14], 0
je 0x4090bd
cmp dword [edi + 0xdc], 0
je 0x4090b6
mov eax, dword [edi + 0xd8]
mov eax, dword [eax]
test eax, eax
je 0x4090b6
mov edx, dword [eax + 0x38]
xor ecx, ecx
mov ebx, dword [esp + 0x18]
cmp edx, ebx
jne 0x4090af
mov eax, dword [eax + 0x3c]
cmp eax, dword [esp + 0x1c]
setl cl
test ecx, ecx
jne 0x4090bd
cmp dword [esp + 0x10], 0
je 0x4090dc
cmp dword [edi + 0x98], 0
je 0x4090dc
call fcn.0041cc40
cmp dword [edi + 0x148], eax
je 0x4090dc
push edi
call fcn.0040c070
add esp, 4
mov ebp, dword [esp + 0x24]
cmp dword [0x46a720], 0
je 0x409179
mov eax, dword [0x46a734]
test eax, eax
je 0x409101
push eax
push 0
call fcn.0041ccb0
add esp, 8
mov ecx, dword [0x45800c]
test ecx, ecx
je 0x40913d
mov eax, esi
xor edx, edx
shr eax, 6
div dword [0x458010]
mov eax, dword [ecx + edx*4]
lea ecx, [ecx + edx*4]
test eax, eax
je 0x40913d
cmp dword [eax + 4], esi
je 0x409131
mov ecx, eax
mov eax, dword [eax]
test eax, eax
jne 0x409122
jmp 0x409133
mov eax, dword [ecx]
test eax, eax
je 0x40913d
or dword [eax + 8], 1
jmp 0x409165
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 str.event_add_nolock_
push str._s:_noting_an_add_on_a_non_setup_event__p__events:_0x_x__fd:__I64d__flags:_0x_x_
push 0xdeaddead
call fcn.0041bd20
add esp, 0x20
mov eax, dword [0x46a734]
test eax, eax
je 0x409179
push eax
push 0
call fcn.0041ccc0
add esp, 8
pop ebx
pop edi
pop esi
mov eax, ebp
mov dword [0x46a730], 1
pop ebp
add esp, 0x10
ret
pop ebx
pop edi
pop esi
or eax, 0xffffffff
pop ebp
add esp, 0x10
ret
push 0x459c08
push 0x459c1c
push 0x9fa
push 0x459c50
push 0x459c58
push 0xdeaddead
call fcn.0041bd20
add esp, 0x18
push 0x459c7c
push 0x459c90
push 0x9fa
push 0x459cc4
push 0x459ccc
push 2
call fcn.00434b42
add esp, 4
push eax
call fcn.004046e0
add esp, 0x18
call fcn.00435eff
push 0x459dc8
push 0x459ddc
push 0xa07
push 0x459dfc
push 0x459e04
push 0xdeaddead
call fcn.0041bd20
add esp, 0x18
push 0x459e28
push 0x459e3c
push 0xa07
push 0x459e5c
push 0x459e64
push 2
call fcn.00434b42
add esp, 4
push eax
call fcn.004046e0
add esp, 0x18
call fcn.00435eff
int3