Function at 0x46b510
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4efdab
mov eax, dword fs:[0]
push eax
sub esp, 0x830
mov eax, dword [0x536ed4]
xor eax, esp
mov dword [esp + 0x828], eax
push ebx
push esi
push edi
mov eax, dword [0x536ed4]
xor eax, esp
push eax
lea eax, [esp + 0x840]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x1c], eax
push 0x104
lea eax, [esp + 0x438]
push eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x46c0c3
lea eax, [esp + 0x34]
lea esi, [esp + 0x434]
mov ecx, eax
mov word [esp + 0x63a], 0
mov edx, 0x200
sub esi, ecx
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x46b5c0
movzx ecx, word [esi + eax]
test cx, cx
je 0x46b5c0
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x46b5a0
jmp 0x46b5c4
test edx, edx
jne 0x46b5c7
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x46b5e5
add eax, 2
sub ecx, 1
jne 0x46b5d5
jmp 0x46b60a
test ecx, ecx
je 0x46b60a
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.ddraw.dll
mov eax, DirectSoundCreate
call fcn.0046b3e0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.0046c130
test eax, eax
jl 0x46b6e3
mov eax, dword [esp + 0x28]
cmp eax, 0x40002
mov ecx, dword [esp + 0x24]
ja 0x46b637
jb 0x46b66a
cmp ecx, 0x5f
ja 0x46b637
jb 0x46b66a
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x46b645
mov dword [ebx], 1
mov edx, dword [esp + 0x20]
test edx, edx
je 0x46b653
mov dword [edx], 0
mov edi, dword [esp + 0x18]
test edi, edi
je 0x46b660
mov word [edi], 0x20
mov dword [esp + 0x14], 1
jmp 0x46b676
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
cmp eax, 0x40003
ja 0x46b689
jb 0x46b6ae
cmp ecx, 0x448
ja 0x46b689
jb 0x46b6ae
test ebx, ebx
je 0x46b693
mov dword [ebx], 2
test edx, edx
je 0x46b69d
mov dword [edx], 0
test edi, edi
je 0x46b6a6
mov word [edi], 0x20
mov dword [esp + 0x14], 1
cmp eax, 0x40004
ja 0x46b6be
jb 0x46b6e3
cmp ecx, 0x44
ja 0x46b6be
jb 0x46b6e3
test ebx, ebx
je 0x46b6c8
mov dword [ebx], 3
test edx, edx
je 0x46b6d2
mov dword [edx], 0
test edi, edi
je 0x46b6db
mov word [edi], 0x20
mov dword [esp + 0x14], 1
mov edx, 0x200
lea eax, [esp + 0x34]
lea esp, [esp]
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x46b710
movzx ecx, word [esi + eax]
test cx, cx
je 0x46b710
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x46b6f0
jmp 0x46b714
test edx, edx
jne 0x46b717
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x46b735
add eax, 2
sub ecx, 1
jne 0x46b725
jmp 0x46b75a
test ecx, ecx
je 0x46b75a
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.d3drg8x.dll
mov eax, DirectSoundCreate
call fcn.0046b3e0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.0046c130
test eax, eax
jl 0x46b7b4
mov eax, dword [esp + 0x28]
cmp eax, 0x40004
ja 0x46b783
jb 0x46b7b4
mov eax, dword [esp + 0x24]
cmp eax, 0x46
ja 0x46b783
jb 0x46b7b4
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46b791
mov dword [eax], 3
mov eax, dword [esp + 0x20]
test eax, eax
je 0x46b79f
mov dword [eax], 0
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46b7ac
mov word [eax], 0x61
mov dword [esp + 0x14], 1
mov edx, 0x200
lea eax, [esp + 0x34]
lea ecx, [ecx]
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x46b7e0
movzx ecx, word [esi + eax]
test cx, cx
je 0x46b7e0
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x46b7c0
jmp 0x46b7e4
test edx, edx
jne 0x46b7e7
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x46b805
add eax, 2
sub ecx, 1
jne 0x46b7f5
jmp 0x46b82a
test ecx, ecx
je 0x46b82a
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.ddraw.dll
mov eax, DirectSoundCreate
call fcn.0046b3e0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.0046c130
test eax, eax
jl 0x46b909
mov eax, dword [esp + 0x28]
cmp eax, 0x40005
mov ecx, dword [esp + 0x24]
ja 0x46b85a
jb 0x46b88d
cmp ecx, 0x9b
ja 0x46b85a
jb 0x46b88d
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x46b868
mov dword [ebx], 5
mov edx, dword [esp + 0x20]
test edx, edx
je 0x46b876
mov dword [edx], 0
mov edi, dword [esp + 0x18]
test edi, edi
je 0x46b883
mov word [edi], 0x20
mov dword [esp + 0x14], 1
jmp 0x46b899
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
cmp eax, 0x40006
ja 0x46b8ac
jb 0x46b8d1
cmp ecx, 0x13e
ja 0x46b8ac
jb 0x46b8d1
test ebx, ebx
je 0x46b8b6
mov dword [ebx], 6
test edx, edx
je 0x46b8c0
mov dword [edx], 0
test edi, edi
je 0x46b8c9
mov word [edi], 0x20
mov dword [esp + 0x14], 1
cmp eax, 0x40006
ja 0x46b8e4
jb 0x46b909
cmp ecx, 0x1b4
ja 0x46b8e4
jb 0x46b909
test ebx, ebx
je 0x46b8ee
mov dword [ebx], 6
test edx, edx
je 0x46b8f8
mov dword [edx], 1
test edi, edi
je 0x46b901
mov word [edi], 0x20
mov dword [esp + 0x14], 1
mov edx, 0x200
lea eax, [esp + 0x34]
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x46b932
movzx ecx, word [esi + eax]
test cx, cx
je 0x46b932
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x46b912
jmp 0x46b936
test edx, edx
jne 0x46b939
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x46b957
add eax, 2
sub ecx, 1
jne 0x46b947
jmp 0x46b97c
test ecx, ecx
je 0x46b97c
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.dplayx.dll
mov eax, DirectSoundCreate
call fcn.0046b3e0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.0046c130
test eax, eax
jl 0x46b9d8
mov eax, dword [esp + 0x28]
cmp eax, 0x40006
ja 0x46b9a7
jb 0x46b9d8
mov eax, dword [esp + 0x24]
cmp eax, 0x30206
ja 0x46b9a7
jb 0x46b9d8
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46b9b5
mov dword [eax], 6
mov eax, dword [esp + 0x20]
test eax, eax
je 0x46b9c3
mov dword [eax], 1
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46b9d0
mov word [eax], 0x61
mov dword [esp + 0x14], 1
mov edx, 0x200
lea eax, [esp + 0x34]
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x46ba01
movzx ecx, word [esi + eax]
test cx, cx
je 0x46ba01
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x46b9e1
jmp 0x46ba05
test edx, edx
jne 0x46ba08
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x46ba26
add eax, 2
sub ecx, 1
jne 0x46ba16
jmp 0x46ba4b
test ecx, ecx
je 0x46ba4b
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.ddraw.dll
mov eax, DirectSoundCreate
call fcn.0046b3e0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.0046c130
test eax, eax
jl 0x46baa7
mov eax, dword [esp + 0x28]
cmp eax, 0x40007
ja 0x46ba76
jb 0x46baa7
mov eax, dword [esp + 0x24]
cmp eax, 0x2bc
ja 0x46ba76
jb 0x46baa7
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46ba84
mov dword [eax], 7
mov eax, dword [esp + 0x20]
test eax, eax
je 0x46ba92
mov dword [eax], 0
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46ba9f
mov word [eax], 0x20
mov dword [esp + 0x14], 1
mov edx, 0x200
lea eax, [esp + 0x34]
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x46bad0
movzx ecx, word [esi + eax]
test cx, cx
je 0x46bad0
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x46bab0
jmp 0x46bad4
test edx, edx
jne 0x46bad7
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x46baf5
add eax, 2
sub ecx, 1
jne 0x46bae5
jmp 0x46bb1a
test ecx, ecx
je 0x46bb1a
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.dinput.dll
mov eax, DirectSoundCreate
call fcn.0046b3e0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.0046c130
test eax, eax
jl 0x46bb76
mov eax, dword [esp + 0x28]
cmp eax, 0x40007
ja 0x46bb45
jb 0x46bb76
mov eax, dword [esp + 0x24]
cmp eax, 0x2cc
ja 0x46bb45
jb 0x46bb76
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46bb53
mov dword [eax], 7
mov eax, dword [esp + 0x20]
test eax, eax
je 0x46bb61
mov dword [eax], 0
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46bb6e
mov word [eax], 0x61
mov dword [esp + 0x14], 1
mov edx, 0x200
lea eax, [esp + 0x34]
nop
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x46bba0
movzx ecx, word [esi + eax]
test cx, cx
je 0x46bba0
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x46bb80
jmp 0x46bba4
test edx, edx
jne 0x46bba7
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x46bbc5
add eax, 2
sub ecx, 1
jne 0x46bbb5
jmp 0x46bbea
test ecx, ecx
je 0x46bbea
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.ddraw.dll
mov eax, DirectSoundCreate
call fcn.0046b3e0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.0046c130
test eax, eax
jl 0x46bc75
mov edx, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
mov eax, edx
shr eax, 0x10
cmp ax, 4
jne 0x46bc24
cmp edx, 0x40008
ja 0x46bc44
jb 0x46bc24
cmp edi, 0x190
jae 0x46bc44
cmp ax, 5
jne 0x46bc75
mov eax, 0x50001
push eax
mov ecx, 0x8d20190
push ecx
push edx
push edi
call fcn.0046c1f0
add esp, 0x10
test eax, eax
jl 0x46bc75
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46bc52
mov dword [eax], 8
mov eax, dword [esp + 0x20]
test eax, eax
je 0x46bc60
mov dword [eax], 0
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46bc6d
mov word [eax], 0x20
mov dword [esp + 0x14], 1
mov edx, 0x200
lea eax, [esp + 0x34]
mov edi, edi
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x46bca0
movzx ecx, word [esi + eax]
test cx, cx
je 0x46bca0
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x46bc80
jmp 0x46bca4
test edx, edx
jne 0x46bca7
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x46bcc5
add eax, 2
sub ecx, 1
jne 0x46bcb5
jmp 0x46bcea
test ecx, ecx
je 0x46bcea
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.d3d8.dll
mov eax, DirectSoundCreate
call fcn.0046b3e0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.0046c130
test eax, eax
jl 0x46bdde
mov edx, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
mov ebx, edx
shr ebx, 0x10
cmp bx, 4
jne 0x46bd24
cmp edx, 0x40008
ja 0x46bd44
jb 0x46bd24
cmp edi, 0x10371
jae 0x46bd44
cmp bx, 5
jne 0x46bd75
mov eax, 0x50001
push eax
mov ecx, 0xa280371
push ecx
push edx
push edi
call fcn.0046c1f0
add esp, 0x10
test eax, eax
jl 0x46bd75
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46bd52
mov dword [eax], 8
mov eax, dword [esp + 0x20]
test eax, eax
je 0x46bd60
mov dword [eax], 1
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46bd6d
mov word [eax], 0x20
mov dword [esp + 0x14], 1
cmp bx, 4
jne 0x46bd8d
cmp edx, 0x40008
ja 0x46bdad
jb 0x46bd8d
cmp edi, 0x10385
jae 0x46bdad
cmp bx, 5
jne 0x46bdde
mov eax, 0x50001
push eax
mov ecx, 0xa280385
push ecx
push edx
push edi
call fcn.0046c1f0
add esp, 0x10
test eax, eax
jl 0x46bdde
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46bdbb
mov dword [eax], 8
mov eax, dword [esp + 0x20]
test eax, eax
je 0x46bdc9
mov dword [eax], 1
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46bdd6
mov word [eax], 0x61
mov dword [esp + 0x14], 1
mov edx, 0x200
lea eax, [esp + 0x34]
jmp 0x46bdf0
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x46be10
movzx ecx, word [esi + eax]
test cx, cx
je 0x46be10
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x46bdf0
jmp 0x46be14
test edx, edx
jne 0x46be17
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x46be35
add eax, 2
sub ecx, 1
jne 0x46be25
jmp 0x46be5a
test ecx, ecx
je 0x46be5a
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.mpg2splt.ax
mov eax, DirectSoundCreate
call fcn.0046b3e0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.0046c130
test eax, eax
jl 0x46beb6
mov eax, dword [esp + 0x28]
cmp eax, 0x60003
ja 0x46be85
jb 0x46beb6
mov eax, dword [esp + 0x24]
cmp eax, 0x10375
ja 0x46be85
jb 0x46beb6
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46be93
mov dword [eax], 8
mov eax, dword [esp + 0x20]
test eax, eax
je 0x46bea1
mov dword [eax], 1
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46beae
mov word [eax], 0x62
mov dword [esp + 0x14], 1
mov edx, 0x200
lea eax, [esp + 0x34]
nop
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x46bee0
movzx ecx, word [esi + eax]
test cx, cx
je 0x46bee0
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x46bec0
jmp 0x46bee4
test edx, edx
jne 0x46bee7
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x46bf05
add eax, 2
sub ecx, 1
jne 0x46bef5
jmp 0x46bf2a
test ecx, ecx
je 0x46bf2a
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.dpnet.dll
mov eax, DirectSoundCreate
call fcn.0046b3e0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.0046c130
test eax, eax
jl 0x46bfb1
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
mov eax, ecx
shr eax, 0x10
cmp ax, 4
jne 0x46bf60
cmp ecx, 0x40009
ja 0x46bf80
jb 0x46bf60
cmp edi, 0x86
jae 0x46bf80
cmp ax, 5
jne 0x46bfb1
mov eax, 0x50002
push eax
mov edx, 0xe5d0086
push edx
push ecx
push edi
call fcn.0046c1f0
add esp, 0x10
test eax, eax
jl 0x46bfb1
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46bf8e
mov dword [eax], 8
mov eax, dword [esp + 0x20]
test eax, eax
je 0x46bf9c
mov dword [eax], 2
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46bfa9
mov word [eax], 0x20
mov dword [esp + 0x14], 1
mov esi, 9
call fcn.004bb047
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x46c112
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x30], eax
push esi
lea ecx, [esp + 0x438]
push ecx
lea edx, [esp + 0x38]
push str._sd3d_d.dll
push edx
mov dword [esp + 0x858], 0
call fcn.00401af0
mov edi, dword [esp + 0x40]
add esp, 0x10
cmp dword [edi - 4], 1
jle 0x46c01b
mov eax, dword [edi - 0xc]
push eax
lea ecx, [esp + 0x34]
call fcn.00401a30
mov edi, dword [esp + 0x30]
lea ebx, [esp + 0x24]
call fcn.0046c130
test eax, eax
jl 0x46c055
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46c032
mov dword [eax], esi
mov eax, dword [esp + 0x20]
test eax, eax
je 0x46c040
mov dword [eax], 0
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46c04d
mov word [eax], 0x20
mov dword [esp + 0x14], 1
test edi, edi
jne 0x46c05d
xor eax, eax
jmp 0x46c077
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x46c062
sub eax, edx
sar eax, 1
js 0x46c11c
cmp eax, dword [edi - 8]
jg 0x46c11c
mov dword [edi - 0xc], eax
mov word [edi + eax*2], 0
lea eax, [edi - 0x10]
mov dword [esp + 0x848], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46c0b0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 1
cmp esi, 0x63
jl 0x46bfb6
cmp dword [esp + 0x14], 0
jne 0x46c0ec
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46c0d1
mov dword [eax], 0
mov eax, dword [esp + 0x20]
test eax, eax
je 0x46c0df
mov dword [eax], 0
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46c0ec
mov word [eax], 0x20
xor eax, eax
mov ecx, dword [esp + 0x840]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x828]
xor ecx, esp
call fcn.004cf0b8
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00401730
push 0x80070057
call fcn.00401730
int3