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

Disassembly:
sub esp, 0x28
push esi
mov esi, dword [esp + 0x30]
mov eax, dword [esi]
mov dword [esp + 4], eax
mov eax, dword [esi + 0x14c]
test eax, eax
je 0x406263
push eax
push 0
call fcn.0041ccb0
add esp, 8
cmp dword [esi + 0x98], 0
je 0x40629b
push 0x4591e0
push str._s:_reentrant_invocation.__Only_one_event_base_loop_can_run_on_each_event_base_at_once.
call fcn.0041bd40
mov eax, dword [esi + 0x14c]
add esp, 8
test eax, eax
je 0x406293
push eax
push 0
call fcn.0041ccc0
add esp, 8
or eax, 0xffffffff
pop esi
add esp, 0x28
ret
cmp dword [esi + 0x60], 0
push edi
mov dword [esi + 0x98], 1
mov dword [esi + 0xe4], 0
je 0x4062c5
cmp dword [esi + 0x64], 0
je 0x4062c5
push esi
call fcn.0041c230
add esp, 4
push ebx
push ebp
call fcn.0041cc40
mov dword [esi + 0x148], eax
mov dword [esi + 0x8c], 0
mov dword [esi + 0x88], 0
nop word [eax + eax]
mov ebx, dword [esp + 0x40]
cmp dword [esi + 0x88], 0
mov dword [esi + 0x90], 0
mov dword [esi + 0x9c], 0
jne 0x4066db
cmp dword [esi + 0x8c], 0
jne 0x4066db
cmp dword [esi + 0x80], 0
lea ebp, [esp + 0x18]
jne 0x40647b
test bl, 2
jne 0x40647b
cmp dword [esi + 0xdc], 0
je 0x406474
mov eax, dword [esi + 0xd8]
mov edi, dword [eax]
test edi, edi
je 0x406474
lea eax, [esp + 0x28]
push eax
push esi
call fcn.0040c770
add esp, 8
cmp eax, 0xffffffff
je 0x4063a5
mov eax, dword [edi + 0x38]
mov edx, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
cmp eax, edx
jne 0x406382
xor ecx, ecx
cmp dword [edi + 0x3c], ebx
jmp 0x406386
xor ecx, ecx
cmp eax, edx
setle cl
test ecx, ecx
je 0x406415
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov ebx, dword [esp + 0x40]
test ebx, 4
jne 0x4063c6
cmp dword [esi + 0x70], 0
jg 0x4063c6
cmp dword [esi + 0x78], 0
jg 0x4063c6
cmp dword [esi + 0x80], 0
je 0x40677a
cmp dword [esi + 0x14c], 0
je 0x4063ee
call fcn.0041cc60
test eax, eax
je 0x4063ee
push dword [esi + 0x14c]
call fcn.0041cd40
add esp, 4
test eax, eax
je 0x40679f
mov edx, dword [esi + 0xa8]
test edx, edx
je 0x406507
nop dword [eax]
mov ecx, dword [edx]
mov eax, dword [edx + 4]
test ecx, ecx
je 0x406490
mov dword [ecx + 4], eax
jmp 0x406496
sub eax, edx
mov dword [esp + 0x18], eax
mov ecx, dword [edi + 0x3c]
sub ecx, ebx
mov ebx, ecx
mov dword [esp + 0x1c], ebx
jns 0x406437
dec eax
lea ebx, [ecx + 0xf4240]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ebx
test ecx, ecx
lea edx, [ecx + 0xf4240]
cmovns edx, ecx
test eax, eax
js 0x406736
test edx, edx
js 0x406847
cmp dword [0x46a798], 0
je 0x4063a1
push ebx
push eax
push edi
push str.timeout_next:_event:__p__in__d_seconds___d_useconds
call fcn.0041be80
add esp, 0x10
jmp 0x4063a1
xor ebp, ebp
jmp 0x4063a5
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
jmp 0x4063a5
mov dword [esi + 0xac], eax
mov ecx, dword [edx + 4]
mov eax, dword [edx]
mov dword [ecx], eax
mov ax, word [edx + 8]
movzx ecx, byte [edx + 0xa]
and ax, 0xffdf
or ax, 8
mov word [edx + 8], ax
cmp ecx, dword [esi + 0xa4]
jge 0x4067e3
mov dword [edx], 0
mov eax, dword [esi + 0xa0]
mov eax, dword [eax + ecx*8 + 4]
mov dword [edx + 4], eax
mov eax, dword [esi + 0xa0]
mov eax, dword [eax + ecx*8 + 4]
mov dword [eax], edx
movzx ecx, byte [edx + 0xa]
mov eax, dword [esi + 0xa0]
mov dword [eax + ecx*8 + 4], edx
xor eax, eax
cmp byte [edx + 0xb], 3
sete al
add dword [esi + 0x9c], eax
mov edx, dword [esi + 0xa8]
test edx, edx
jne 0x406400
mov eax, dword [esp + 0x10]
lea edi, [esi + 0xe4]
mov dword [edi], 0
push ebp
push esi
mov eax, dword [eax + 0x10]
call eax
add esp, 8
cmp eax, 0xffffffff
je 0x406824
test byte [esi + 0x160], 8
mov dword [edi], 0
jne 0x406543
push edi
push esi
call fcn.0040c770
add esp, 8
cmp dword [esi + 0xdc], 0
je 0x4065c9
lea eax, [esp + 0x30]
push eax
push esi
call fcn.0040c770
add esp, 8
nop word [eax + eax]
cmp dword [esi + 0xdc], 0
je 0x4065c3
mov eax, dword [esi + 0xd8]
mov edi, dword [eax]
test edi, edi
je 0x4065c3
mov eax, dword [edi + 0x38]
xor ecx, ecx
mov edx, dword [esp + 0x30]
cmp eax, edx
jne 0x406589
mov eax, dword [edi + 0x3c]
cmp eax, dword [esp + 0x34]
setg cl
test ecx, ecx
jne 0x4065c3
push ecx
push edi
call fcn.00409250
add esp, 8
cmp dword [0x46a798], 0
je 0x4065b4
push dword [edi + 0xc]
push edi
push str.timeout_process:_event:__p__call__p
call fcn.0041be80
add esp, 0xc
push 1
push 1
push edi
call fcn.00409730
add esp, 0xc
jmp 0x406560
lea edi, [esi + 0xe4]
cmp dword [esi + 0x80], 0
je 0x40672b
mov ecx, dword [esi + 0x16c]
xor ebx, ebx
mov eax, dword [esi + 0x170]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x14], eax
cmp dword [esi + 0x164], ebx
jl 0x406656
test byte [esi + 0x160], 8
mov dword [edi], ebx
jne 0x406609
push edi
push esi
call fcn.0040c770
add esp, 8
lea eax, [esp + 0x20]
push eax
push esi
call fcn.0040c770
mov ecx, dword [esi + 0x168]
add esp, 8
mov edx, dword [esi + 0x164]
add ecx, dword [esp + 0x24]
add edx, dword [esp + 0x20]
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], ecx
cmp ecx, 0xf4240
jl 0x40664c
lea eax, [edx + 1]
mov dword [esp + 0x20], eax
lea eax, [ecx - 0xf4240]
mov dword [esp + 0x24], eax
mov ecx, dword [esp + 0x3c]
lea ebp, [esp + 0x20]
jmp 0x406658
xor ebp, ebp
xor edi, edi
cmp dword [esi + 0xa4], ebx
jle 0x4066ad
mov eax, dword [esi + 0xa0]
cmp dword [eax + edi*8], 0
lea edx, [eax + edi*8]
je 0x4066a0
cmp edi, dword [esp + 0x14]
mov eax, accept
mov dword [esi + 0x94], edi
cmovl ecx, eax
xor eax, eax
cmp edi, dword [esp + 0x14]
cmovge eax, ebp
push eax
push ecx
push edx
push esi
call fcn.0040d3f0
add esp, 0x10
mov ebx, eax
test eax, eax
js 0x4066ad
jg 0x4066ad
mov ecx, dword [esp + 0x3c]
inc edi
cmp edi, dword [esi + 0xa4]
jl 0x406662
test byte [esp + 0x40], 1
mov dword [esi + 0x94], 0xffffffff
je 0x4062f0
test ebx, ebx
mov ebx, dword [esp + 0x40]
je 0x4062f4
cmp dword [esi + 0x80], 0
jne 0x4062f0
cmp dword [0x46a798], 0
je 0x4066f6
push str.event_base_loop
push str._s:_asked_to_terminate_loop.
call fcn.0041be80
add esp, 8
xor ebx, ebx
mov ecx, dword [esi + 0x14c]
mov dword [esi + 0xe4], 0
mov dword [esi + 0x98], 0
test ecx, ecx
je 0x406721
push ecx
push 0
call fcn.0041ccc0
add esp, 8
pop ebp
mov eax, ebx
pop ebx
pop edi
pop esi
add esp, 0x28
ret
test bl, 2
je 0x4062f4
jmp 0x4066db
push 0x45a624
push 0x45a634
push 0xc2c
push 0x45a644
push 0x45a64c
push 0xdeaddead
call fcn.0041bd20
add esp, 0x18
push 0x45a670
push str.tv__tv_sec___0
push 0xc2c
push 0x45a690
push 0x45a698
jmp 0x406886
cmp dword [0x46a798], 0
je 0x406795
push 0x459248
push str._s:_no_events_registered.
call fcn.0041be80
add esp, 8
mov ebx, 1
jmp 0x4066f8
push 0x45b3c0
push 0x45b3e8
push 0xd3f
push 0x45b41c
push 0x45b424
push 0xdeaddead
call fcn.0041bd20
add esp, 0x18
push 0x45b448
push str.evthread_is_debug_lock_held___base___th_base_lock_
push 0xd3f
push 0x45b4a4
push 0x45b4ac
jmp 0x406886
push 0x45b4d0
push 0x45b4f8
push 0xd44
push 0x45b520
push 0x45b528
push 0xdeaddead
call fcn.0041bd20
add esp, 0x18
push str.event_queue_make_later_events_active
push str.evcb__evcb_pri___base__nactivequeues
push 0xd44
push 0x45b59c
push 0x45b5a4
jmp 0x406886
cmp dword [0x46a798], 0
je 0x40683f
push 0x459274
push str._s:_dispatch_returned_unsuccessfully.
call fcn.0041be80
add esp, 8
or ebx, 0xffffffff
jmp 0x4066f8
push 0x45a6bc
push 0x45a6cc
push 0xc2d
push 0x45a6e0
push 0x45a6e8
push 0xdeaddead
call fcn.0041bd20
add esp, 0x18
push str.timeout_next
push str.tv__tv_usec___0
push 0xc2d
push 0x45a730
push 0x45a738
push 2
call fcn.00434b42
add esp, 4
push eax
call fcn.004046e0
add esp, 0x18
call fcn.00435eff
int3