Function at 0x468130
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x542d1b
mov eax, dword fs:[0]
push eax
sub esp, 0x828
mov eax, dword [0x5ab720]
xor eax, esp
mov dword [esp + 0x820], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5ab720]
xor eax, esp
push eax
lea eax, [esp + 0x83c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x84c]
mov dword [esp + 0x2c], eax
push 0x104
lea eax, [esp + 0x438]
push eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x468cfc
lea eax, [esp + 0x34]
lea ebp, [esp + 0x434]
mov ecx, eax
mov word [esp + 0x63a], 0
mov edx, 0x200
sub ebp, ecx
nop
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x4681e0
movzx ecx, word [eax + ebp]
test cx, cx
je 0x4681e0
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x4681c0
jmp 0x4681e4
test edx, edx
jne 0x4681e7
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x468205
add eax, 2
sub ecx, 1
jne 0x4681f5
jmp 0x46822a
test ecx, ecx
je 0x46822a
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.ddraw.dll
mov eax, DirectSoundEnumerateW
call fcn.00467ff0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.00468d70
test eax, eax
jl 0x46830d
mov eax, dword [esp + 0x28]
cmp eax, 0x40002
mov ecx, dword [esp + 0x24]
ja 0x468257
jb 0x46828a
cmp ecx, 0x5f
ja 0x468257
jb 0x46828a
mov esi, dword [esp + 0x2c]
test esi, esi
je 0x468265
mov dword [esi], 1
mov edx, dword [esp + 0x18]
test edx, edx
je 0x468273
mov dword [edx], 0
mov edx, dword [esp + 0x20]
test edx, edx
je 0x468280
mov word [edx], 0x20
mov dword [esp + 0x1c], 1
jmp 0x46828e
mov esi, dword [esp + 0x2c]
cmp eax, 0x40003
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
ja 0x4682a9
jb 0x4682ce
cmp ecx, 0x448
ja 0x4682a9
jb 0x4682ce
test esi, esi
je 0x4682b3
mov dword [esi], 2
test edx, edx
je 0x4682bd
mov dword [edx], 0
test edi, edi
je 0x4682c6
mov word [edi], 0x20
mov dword [esp + 0x1c], 1
cmp eax, 0x40004
ja 0x4682e6
jb 0x468311
cmp ecx, 0x44
ja 0x4682de
jb 0x468311
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
test esi, esi
je 0x4682f0
mov dword [esi], 3
test edx, edx
je 0x4682fa
mov dword [edx], 0
test edi, edi
je 0x468303
mov word [edi], 0x20
mov dword [esp + 0x1c], 1
jmp 0x468311
mov esi, dword [esp + 0x2c]
mov edx, 0x200
lea eax, [esp + 0x34]
lea ebx, [ebx]
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x468340
movzx ecx, word [eax + ebp]
test cx, cx
je 0x468340
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x468320
jmp 0x468344
test edx, edx
jne 0x468347
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x468365
add eax, 2
sub ecx, 1
jne 0x468355
jmp 0x46838a
test ecx, ecx
je 0x46838a
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.d3drg8x.dll
mov eax, DirectSoundEnumerateW
call fcn.00467ff0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.00468d70
test eax, eax
jl 0x4683e0
mov eax, dword [esp + 0x28]
cmp eax, 0x40004
ja 0x4683b3
jb 0x4683e0
mov eax, dword [esp + 0x24]
cmp eax, 0x46
ja 0x4683b3
jb 0x4683e0
test esi, esi
je 0x4683bd
mov dword [esi], 3
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4683cb
mov dword [eax], 0
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4683d8
mov word [eax], 0x61
mov dword [esp + 0x1c], 1
mov edx, 0x200
lea eax, [esp + 0x34]
lea esp, [esp]
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x468410
movzx ecx, word [eax + ebp]
test cx, cx
je 0x468410
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x4683f0
jmp 0x468414
test edx, edx
jne 0x468417
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x468435
add eax, 2
sub ecx, 1
jne 0x468425
jmp 0x46845a
test ecx, ecx
je 0x46845a
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.ddraw.dll
mov eax, DirectSoundEnumerateW
call fcn.00467ff0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.00468d70
test eax, eax
jl 0x468531
mov eax, dword [esp + 0x28]
cmp eax, 0x40005
mov ecx, dword [esp + 0x24]
ja 0x46848a
jb 0x4684b9
cmp ecx, 0x9b
ja 0x46848a
jb 0x4684b9
test esi, esi
je 0x468494
mov dword [esi], 5
mov edx, dword [esp + 0x18]
test edx, edx
je 0x4684a2
mov dword [edx], 0
mov edi, dword [esp + 0x20]
test edi, edi
je 0x4684af
mov word [edi], 0x20
mov dword [esp + 0x1c], 1
jmp 0x4684c1
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
cmp eax, 0x40006
ja 0x4684d4
jb 0x4684f9
cmp ecx, 0x13e
ja 0x4684d4
jb 0x4684f9
test esi, esi
je 0x4684de
mov dword [esi], 6
test edx, edx
je 0x4684e8
mov dword [edx], 0
test edi, edi
je 0x4684f1
mov word [edi], 0x20
mov dword [esp + 0x1c], 1
cmp eax, 0x40006
ja 0x46850c
jb 0x468531
cmp ecx, 0x1b4
ja 0x46850c
jb 0x468531
test esi, esi
je 0x468516
mov dword [esi], 6
test edx, edx
je 0x468520
mov dword [edx], 1
test edi, edi
je 0x468529
mov word [edi], 0x20
mov dword [esp + 0x1c], 1
mov edx, 0x200
lea eax, [esp + 0x34]
lea ebx, [ebx]
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x468560
movzx ecx, word [eax + ebp]
test cx, cx
je 0x468560
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x468540
jmp 0x468564
test edx, edx
jne 0x468567
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x468585
add eax, 2
sub ecx, 1
jne 0x468575
jmp 0x4685aa
test ecx, ecx
je 0x4685aa
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.dplayx.dll
mov eax, DirectSoundEnumerateW
call fcn.00467ff0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.00468d70
test eax, eax
jl 0x468602
mov eax, dword [esp + 0x28]
cmp eax, 0x40006
ja 0x4685d5
jb 0x468602
mov eax, dword [esp + 0x24]
cmp eax, 0x30206
ja 0x4685d5
jb 0x468602
test esi, esi
je 0x4685df
mov dword [esi], 6
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4685ed
mov dword [eax], 1
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4685fa
mov word [eax], 0x61
mov dword [esp + 0x1c], 1
mov edx, 0x200
lea eax, [esp + 0x34]
jmp 0x468610
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x468630
movzx ecx, word [eax + ebp]
test cx, cx
je 0x468630
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x468610
jmp 0x468634
test edx, edx
jne 0x468637
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x468655
add eax, 2
sub ecx, 1
jne 0x468645
jmp 0x46867a
test ecx, ecx
je 0x46867a
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.ddraw.dll
mov eax, DirectSoundEnumerateW
call fcn.00467ff0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.00468d70
test eax, eax
jl 0x4686d2
mov eax, dword [esp + 0x28]
cmp eax, 0x40007
ja 0x4686a5
jb 0x4686d2
mov eax, dword [esp + 0x24]
cmp eax, 0x2bc
ja 0x4686a5
jb 0x4686d2
test esi, esi
je 0x4686af
mov dword [esi], 7
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4686bd
mov dword [eax], 0
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4686ca
mov word [eax], 0x20
mov dword [esp + 0x1c], 1
mov edx, 0x200
lea eax, [esp + 0x34]
jmp 0x4686e0
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x468700
movzx ecx, word [eax + ebp]
test cx, cx
je 0x468700
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x4686e0
jmp 0x468704
test edx, edx
jne 0x468707
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x468725
add eax, 2
sub ecx, 1
jne 0x468715
jmp 0x46874a
test ecx, ecx
je 0x46874a
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.dinput.dll
mov eax, DirectSoundEnumerateW
call fcn.00467ff0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.00468d70
test eax, eax
jl 0x4687a2
mov eax, dword [esp + 0x28]
cmp eax, 0x40007
ja 0x468775
jb 0x4687a2
mov eax, dword [esp + 0x24]
cmp eax, 0x2cc
ja 0x468775
jb 0x4687a2
test esi, esi
je 0x46877f
mov dword [esi], 7
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46878d
mov dword [eax], 0
mov eax, dword [esp + 0x20]
test eax, eax
je 0x46879a
mov word [eax], 0x61
mov dword [esp + 0x1c], 1
mov edx, 0x200
lea eax, [esp + 0x34]
jmp 0x4687b0
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x4687d0
movzx ecx, word [eax + ebp]
test cx, cx
je 0x4687d0
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x4687b0
jmp 0x4687d4
test edx, edx
jne 0x4687d7
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x4687f5
add eax, 2
sub ecx, 1
jne 0x4687e5
jmp 0x46881a
test ecx, ecx
je 0x46881a
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.ddraw.dll
mov eax, DirectSoundEnumerateW
call fcn.00467ff0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.00468d70
test eax, eax
jl 0x4688a1
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
mov eax, edx
shr eax, 0x10
cmp ax, 4
jne 0x468850
cmp edx, 0x40008
ja 0x468870
jb 0x468850
cmp esi, 0x190
jae 0x468870
cmp ax, 5
jne 0x4688a1
mov eax, 0x50001
push eax
mov ecx, 0x8d20190
push ecx
push edx
push esi
call fcn.00468e30
add esp, 0x10
test eax, eax
jl 0x4688a1
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x46887e
mov dword [eax], 8
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46888c
mov dword [eax], 0
mov eax, dword [esp + 0x20]
test eax, eax
je 0x468899
mov word [eax], 0x20
mov dword [esp + 0x1c], 1
mov edx, 0x200
lea eax, [esp + 0x34]
lea ebx, [ebx]
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x4688d0
movzx ecx, word [eax + ebp]
test cx, cx
je 0x4688d0
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x4688b0
jmp 0x4688d4
test edx, edx
jne 0x4688d7
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x4688f5
add eax, 2
sub ecx, 1
jne 0x4688e5
jmp 0x46891a
test ecx, ecx
je 0x46891a
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.d3d8.dll
mov eax, DirectSoundEnumerateW
call fcn.00467ff0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.00468d70
test eax, eax
jl 0x468a10
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
mov edi, edx
shr edi, 0x10
cmp di, 4
jne 0x468954
cmp edx, 0x40008
ja 0x468974
jb 0x468954
cmp esi, 0x10371
jae 0x468974
cmp di, 5
jne 0x4689a7
mov eax, 0x50001
push eax
mov ecx, 0xa280371
push ecx
push edx
push esi
call fcn.00468e30
add esp, 0x10
test eax, eax
jl 0x4689a7
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x468982
mov dword [eax], 8
mov ebx, dword [esp + 0x18]
test ebx, ebx
je 0x468990
mov dword [ebx], 1
mov eax, dword [esp + 0x20]
test eax, eax
je 0x46899d
mov word [eax], 0x20
mov dword [esp + 0x1c], 1
jmp 0x4689ab
mov ebx, dword [esp + 0x18]
cmp di, 4
jne 0x4689c3
cmp edx, 0x40008
ja 0x4689e3
jb 0x4689c3
cmp esi, 0x10385
jae 0x4689e3
cmp di, 5
jne 0x468a10
mov eax, 0x50001
push eax
mov ecx, 0xa280385
push ecx
push edx
push esi
call fcn.00468e30
add esp, 0x10
test eax, eax
jl 0x468a10
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4689f1
mov dword [eax], 8
test ebx, ebx
je 0x4689fb
mov dword [ebx], 1
mov eax, dword [esp + 0x20]
test eax, eax
je 0x468a08
mov word [eax], 0x61
mov dword [esp + 0x1c], 1
mov edx, 0x200
lea eax, [esp + 0x34]
lea esp, [esp]
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x468a40
movzx ecx, word [eax + ebp]
test cx, cx
je 0x468a40
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x468a20
jmp 0x468a44
test edx, edx
jne 0x468a47
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x468a65
add eax, 2
sub ecx, 1
jne 0x468a55
jmp 0x468a8a
test ecx, ecx
je 0x468a8a
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.mpg2splt.ax
mov eax, DirectSoundEnumerateW
call fcn.00467ff0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.00468d70
test eax, eax
jl 0x468ae6
mov eax, dword [esp + 0x28]
cmp eax, 0x60003
ja 0x468ab5
jb 0x468ae6
mov eax, dword [esp + 0x24]
cmp eax, 0x10375
ja 0x468ab5
jb 0x468ae6
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x468ac3
mov dword [eax], 8
mov eax, dword [esp + 0x18]
test eax, eax
je 0x468ad1
mov dword [eax], 1
mov eax, dword [esp + 0x20]
test eax, eax
je 0x468ade
mov word [eax], 0x62
mov dword [esp + 0x1c], 1
mov edx, 0x200
lea eax, [esp + 0x34]
nop
lea ecx, [edx + 0x7ffffdfe]
test ecx, ecx
je 0x468b10
movzx ecx, word [eax + ebp]
test cx, cx
je 0x468b10
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x468af0
jmp 0x468b14
test edx, edx
jne 0x468b17
sub eax, 2
mov word [eax], 0
mov ecx, 0x200
lea eax, [esp + 0x34]
cmp word [eax], 0
je 0x468b35
add eax, 2
sub ecx, 1
jne 0x468b25
jmp 0x468b5a
test ecx, ecx
je 0x468b5a
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x34]
push str.dpnet.dll
mov eax, DirectSoundEnumerateW
call fcn.00467ff0
lea ebx, [esp + 0x24]
lea edi, [esp + 0x34]
call fcn.00468d70
test eax, eax
jl 0x468be1
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
mov eax, ecx
shr eax, 0x10
cmp ax, 4
jne 0x468b90
cmp ecx, 0x40009
ja 0x468bb0
jb 0x468b90
cmp esi, 0x86
jae 0x468bb0
cmp ax, 5
jne 0x468be1
mov eax, 0x50002
push eax
mov edx, 0xe5d0086
push edx
push ecx
push esi
call fcn.00468e30
add esp, 0x10
test eax, eax
jl 0x468be1
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x468bbe
mov dword [eax], 8
mov eax, dword [esp + 0x18]
test eax, eax
je 0x468bcc
mov dword [eax], 2
mov eax, dword [esp + 0x20]
test eax, eax
je 0x468bd9
mov word [eax], 0x20
mov dword [esp + 0x1c], 1
mov esi, 9
or ebp, 0xffffffff
lea esp, [esp]
call fcn.00505193
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x468d4f
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 + 0x854], 0
call fcn.00402c70
mov edi, dword [esp + 0x40]
add esp, 0x10
cmp dword [edi - 4], 1
jle 0x468c55
mov eax, dword [edi - 0xc]
push eax
lea ecx, [esp + 0x34]
call fcn.004029d0
mov edi, dword [esp + 0x30]
lea ebx, [esp + 0x24]
call fcn.00468d70
test eax, eax
jl 0x468c8f
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x468c6c
mov dword [eax], esi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x468c7a
mov dword [eax], 0
mov eax, dword [esp + 0x20]
test eax, eax
je 0x468c87
mov word [eax], 0x20
mov dword [esp + 0x1c], 1
test edi, edi
jne 0x468c97
xor eax, eax
jmp 0x468cb5
mov eax, edi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x468ca0
sub eax, edx
sar eax, 1
js 0x468d59
cmp eax, dword [edi - 8]
jg 0x468d59
mov dword [edi - 0xc], eax
mov word [edi + eax*2], 0
lea eax, [edi - 0x10]
mov dword [esp + 0x844], ebp
lea ecx, [eax + 0xc]
mov edx, ebp
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x468ce9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 1
cmp esi, 0x63
jl 0x468bf0
cmp dword [esp + 0x1c], 0
jne 0x468d25
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x468d0a
mov dword [eax], 0
mov eax, dword [esp + 0x18]
test eax, eax
je 0x468d18
mov dword [eax], 0
mov eax, dword [esp + 0x20]
test eax, eax
je 0x468d25
mov word [eax], 0x20
xor eax, eax
mov ecx, dword [esp + 0x83c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x820]
xor ecx, esp
call fcn.0052151a
add esp, 0x834
ret
push 0x80004005
call fcn.00402900
push 0x80070057
call fcn.00402900
int3