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

Disassembly:
push 0xffffffffffffffff
push 0x867ba6
mov eax, dword fs:[0]
push eax
sub esp, 0x7c
mov eax, dword [0x8ce6f4]
xor eax, esp
mov dword [esp + 0x78], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x8ce6f4]
xor eax, esp
push eax
lea eax, [esp + 0x90]
mov dword fs:[0], eax
mov esi, ecx
mov ebp, 2
xor ebx, ebx
cmp dword [esi + 0x2e8], ebp
jne 0x518bed
mov eax, dword [esi + 0x2bc]
cmp eax, 1
jne 0x518b6c
mov eax, dword [esi + 0x12c]
push ebx
push ebx
push 1
lea edx, [esp + 0x38]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x38]
call eax
mov eax, dword [esi + 0x118]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x24]
push eax
call edx
xor ecx, ecx
mov dword [esp + 0x1c], ecx
mov eax, dword [esi + 0x114]
mov dword [esp + 0x98], ebx
cmp eax, ebx
je 0x518b53
mov ecx, dword [eax]
lea edx, [esp + 0x1c]
push edx
push eax
mov eax, dword [ecx + 0x14]
call eax
test eax, eax
js 0x518b4f
mov dword [esp + 0x14], ebx
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
push ebx
lea edx, [esp + 0x18]
push edx
push 1
push eax
mov eax, dword [ecx + 0xc]
mov byte [esp + 0xa8], 1
call eax
test eax, eax
jne 0x518b38
mov edi, edi
mov eax, dword [esp + 0x14]
xor edx, edx
mov dword [esp + 0x18], edx
cmp eax, ebx
je 0x518a27
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push 0x40c054
push eax
mov eax, dword [ecx]
call eax
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
xor ecx, ecx
mov byte [esp + 0x98], 2
mov dword [esp + 0x20], ecx
cmp eax, ebx
je 0x518a56
mov ecx, dword [eax]
lea edx, [esp + 0x20]
push edx
push 0x407b80
push eax
mov eax, dword [ecx]
call eax
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
mov byte [esp + 0x98], 3
cmp edx, ebx
je 0x518a66
cmp ecx, ebx
jne 0x518ac8
mov byte [esp + 0x98], 2
cmp ecx, ebx
je 0x518a82
mov edx, dword [ecx]
mov eax, dword [edx + 8]
push ecx
call eax
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov byte [esp + 0x98], 1
cmp edx, ebx
je 0x518a9a
mov ecx, dword [edx]
push edx
mov edx, dword [ecx + 8]
call edx
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x518aaa
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x14], ebx
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
push ebx
lea edx, [esp + 0x18]
push edx
push 1
push eax
mov eax, dword [ecx + 0xc]
call eax
test eax, eax
je 0x518a00
jmp 0x518b38
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x28]
mov dword [esp + 0x28], ebx
mov edx, dword [ecx]
push eax
push ecx
mov ecx, dword [edx + 0x10]
call ecx
test eax, eax
js 0x518b08
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x518b08
cmp word [eax], bx
je 0x518b08
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
push ebx
push eax
mov eax, dword [edx + 0xc]
push ecx
call eax
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [esp + 0x20]
mov byte [esp + 0x98], 2
cmp eax, ebx
je 0x518b20
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov eax, dword [esp + 0x18]
mov byte [esp + 0x98], 1
cmp eax, ebx
je 0x518b38
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x14]
mov byte [esp + 0x98], bl
cmp eax, ebx
je 0x518b4f
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x98], 0xffffffff
cmp ecx, ebx
je 0x518bbc
mov eax, dword [ecx]
push ecx
mov ecx, dword [eax + 8]
call ecx
jmp 0x518bbc
cmp eax, ebp
jne 0x518ba9
mov eax, dword [esi + 0x140]
mov edx, dword [eax]
push 1
push 1
push eax
mov eax, dword [edx + 0x90]
call eax
mov eax, dword [esi + 0x118]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x24]
push eax
call edx
mov eax, dword [esi + 0x140]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x90]
push ebx
push 1
push eax
call edx
jmp 0x518bbc
cmp eax, 3
jne 0x518bbc
mov eax, dword [esi + 0x118]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x24]
push eax
call edx
fld1
fstp qword [esi + 0x318]
cmp dword [esi + 0x274], ebx
je 0x518be7
mov eax, dword [esi + 0x128]
mov edx, dword [esi + 0x288]
mov dword [esi + 0x274], ebx
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x1c]
call eax
mov byte [esi + 0x28c], bl
mov eax, dword [esi + 0x20]
mov dword [esi + 0x268], ebx
cmp eax, ebx
je 0x518cb0
mov edi, dword [sym.imp.USER32.dll_KillTimer]
push ebp
push eax
call edi
mov ecx, dword [esi + 0x20]
push 1
push ecx
call edi
mov edx, dword [esi + 0x20]
push 5
push edx
call edi
push ebx
mov ecx, esi
call fcn.00511690
cmp dword [esi + 0x2e8], ebp
jne 0x518cb0
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esi + 0x460]
call fcn.00554ab0
mov eax, dword [esi + 0x12c]
mov edx, dword [eax]
mov edx, dword [edx + 0x1c]
lea ecx, [esp + 0x34]
push ecx
push eax
call edx
cmp dword [esi + 0x2bc], 3
je 0x518c9a
mov eax, dword [esi + 0xca8]
push eax
call dword [sym.imp.USER32.dll_IsWindowVisible]
cmp eax, ebx
setne dl
movzx eax, dl
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x34]
push eax
push ecx
push edx
lea ecx, [esi + 0x460]
call fcn.00554af0
push edx
push eax
lea ecx, [esi + 0x97c]
call fcn.00557b00
call fcn.007c9a2f
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x10a8]
push eax
mov ecx, esi
call fcn.004f01f0
call fcn.007cff5d
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x518cca
push 0x80004005
call fcn.004a8210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x24], edi
push 0x3750
mov dword [esp + 0x9c], 4
call fcn.007cfe78
cmp eax, ebx
je 0x518d06
push 0x3750
push eax
lea ecx, [esp + 0x2c]
call fcn.004a8d10
mov edi, dword [esp + 0x24]
push 0xbb8
push edi
lea ecx, [esi + 0x3fd0]
mov dword [esp + 0xa0], 5
call fcn.004e9d10
lea eax, [edi - 0x10]
mov dword [esp + 0x98], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x518d49
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 2
lea ecx, [esi + 0x3fd0]
call fcn.004e9fd0
push 2
push 0x403a48
push 0x50000002
push esi
call fcn.004ecfc0
add esp, 0x10
cmp byte [esi + 0x28c], bl
je 0x518d86
push 0x405080
push 0x50000009
push esi
call fcn.004ecfc0
add esp, 0xc
push DirectSoundEnumerateW
call dword [sym.imp.KERNEL32.dll_SetThreadExecutionState]
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.0080262b
add esp, 0x88
ret