Function at 0x4af630
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x7183e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3c
lea ecx, [esp + 0x30]
call fcn.005b3190
lea ecx, [esp + 0x28]
mov dword [esp + 0x44], 0
call fcn.005b3190
lea ecx, [esp + 0x20]
mov byte [esp + 0x44], 1
call fcn.005b3190
lea ecx, [esp + 0x18]
mov byte [esp + 0x44], 2
call fcn.005b3190
lea ecx, [esp + 8]
mov byte [esp + 0x44], 3
call fcn.005b3190
lea ecx, [esp]
mov byte [esp + 0x44], 4
call fcn.005b3190
lea ecx, [esp + 0x10]
mov byte [esp + 0x44], 5
call fcn.005b3190
mov edx, dword [ebp + 0xc]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
push edx
mov byte [esp + 0x50], 6
call fcn.004af410
mov edx, dword [ebp + 8]
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x40]
push ecx
push edx
call fcn.004af410
lea eax, [esi - 1]
add esp, 0x18
cmp eax, 0x1a
ja case.default.0x4af6e8
jmp dword [eax*4 + 0x4afc9c]
push str.EVENT_TIMED_EVENT
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_ENTERED_TRIGGER
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_LEFT_TRIGGER
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_REMOVE_FROM_AREA
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_APPLY_EFFECT
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_CLOSE_OBJECT
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_OPEN_OBJECT
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_SPELL_IMPACT
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_PLAY_ANIMATION
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_SIGNAL_EVENT
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_DESTROY_OBJECT
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_UNLOCK_OBJECT
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_LOCK_OBJECT
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_REMOVE_EFFECT
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_ON_MELEE_ATTACKED
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_DECREMENT_STACKSIZE
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_SPAWN_BODY_BAG
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_FORCED_ACTION
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_ITEM_ON_HIT_SPELL_IMPACT
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_BROADCAST_AOO
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_BROADCAST_SAFE_PROJECTILE
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_FEEDBACK_MESSAGE
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_ABILITY_EFFECT_APPLIED
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_SUMMON_CREATURE
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_ACQUIRE_ITEM
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_AREA_TRANSITION
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push str.EVENT_CONTROLLER_RUMBLE
lea ecx, [esp + 0xc]
call fcn.005e5140
jmp 0x4af8ee
push esi
lea eax, [esp + 0xc]
push str.Event__d_
push eax
call fcn.005e5680
add esp, 0xc
cmp esi, 0xa
jne 0x4afbd0
mov ecx, dword [ebp + 0x10]
mov cx, word [ecx]
movzx eax, cx
cmp eax, 0x26
ja case.0x4af909.3
jmp dword [eax*4 + 0x4afd08]
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_HEARTBEAT
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_PERCEPTION
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_SPELLCASTAT
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_DAMAGED
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_DISTURBED
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_DIALOGUE
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_SPAWN_IN
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_RESTED
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_DEATH
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_USER_DEFINED_EVENT
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_OBJECT_ENTER
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_OBJECT_EXIT
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_PLAYER_ENTER
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_PLAYER_EXIT
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_MODULE_START
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_MODULE_LOAD
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_ACTIVATE_ITEM
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_ACQUIRE_ITEM
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_LOSE_ITEM
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_ENCOUNTER_EXHAUSTED
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_OPEN
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_CLOSE
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_DISARM
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_USED
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_MINE_TRIGGERED
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_INVENTORY_DISTURBED
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_LOCKED
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_UNLOCKED
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_CLICKED
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_PATH_BLOCKED
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_PLAYER_DYING
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_RESPAWN_BUTTON_PRESSED
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_FAIL_TO_OPEN
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_PLAYER_REST
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_DESTROYPLAYERCREATURE
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_PLAYER_LEVEL_UP
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
push str.CSWSSCRIPTEVENT_EVENTTYPE_ON_EQUIP_ITEM
lea ecx, [esp + 4]
call fcn.005e5140
jmp 0x4afbd0
movzx edx, cx
push edx
lea eax, [esp + 4]
push str.EventType__d_
push eax
call fcn.005e5680
add esp, 0xc
lea ecx, [esp]
call fcn.005e5670
push eax
lea ecx, [esp + 0xc]
call fcn.005e5670
push eax
lea ecx, [esp + 0x28]
call fcn.005e5670
push eax
lea ecx, [esp + 0x24]
call fcn.005e5670
push eax
lea ecx, [esp + 0x40]
call fcn.005e5670
push eax
lea ecx, [esp + 0x3c]
call fcn.005e5670
push eax
lea ecx, [esp + 0x28]
push str.DRF_Event_Added:__s__s___s__s___s__s_n
push ecx
call fcn.005e5680
add esp, 0x20
lea ecx, [esp + 0x10]
call fcn.005e5670
lea ecx, [esp + 0x10]
mov byte [esp + 0x44], 5
call fcn.005e5c20
lea ecx, [esp]
mov byte [esp + 0x44], 4
call fcn.005e5c20
lea ecx, [esp + 8]
mov byte [esp + 0x44], 3
call fcn.005e5c20
lea ecx, [esp + 0x18]
mov byte [esp + 0x44], 2
call fcn.005e5c20
lea ecx, [esp + 0x20]
mov byte [esp + 0x44], 1
call fcn.005e5c20
lea ecx, [esp + 0x28]
mov byte [esp + 0x44], 0
call fcn.005e5c20
lea ecx, [esp + 0x30]
mov dword [esp + 0x44], 0xffffffff
call fcn.005e5c20
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret