Function at 0x418980
Capabilities:
Get common file path

Disassembly:
sub esp, 0x820
mov eax, dword [0x56fcac]
xor eax, esp
mov dword [esp + 0x81c], eax
mov eax, dword [esp + 0x824]
push ebx
push ebp
push esi
push edi
mov esi, ecx
push 0x104
lea ecx, [esp + 0x42c]
mov edi, edx
push ecx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x28], edi
mov dword [esp + 0x1c], eax
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x41914b
lea edx, [esp + 0x428]
push edx
lea eax, [esp + 0x2c]
push 0x200
push eax
mov word [esp + 0x63a], bp
call fcn.004f1498
add esp, 0xc
push str.ddraw.dll
lea ecx, [esp + 0x2c]
push 0x200
push ecx
call fcn.004f141e
add esp, 0xc
lea ebx, [esp + 0x18]
lea edx, [esp + 0x28]
call fcn.00419190
test eax, eax
jl 0x418ac1
mov eax, dword [esp + 0x1c]
cmp eax, 0x40002
mov ecx, dword [esp + 0x18]
ja 0x418a32
jb 0x418a56
cmp ecx, 0x5f
ja 0x418a32
jb 0x418a56
test esi, esi
je 0x418a3c
mov dword [esi], 1
test edi, edi
je 0x418a42
mov dword [edi], ebp
mov edx, dword [esp + 0x14]
test edx, edx
je 0x418a4f
mov word [edx], 0x20
mov ebp, 1
jmp 0x418a5a
mov edx, dword [esp + 0x14]
cmp eax, 0x40003
ja 0x418a6d
jb 0x418a8f
cmp ecx, 0x448
ja 0x418a6d
jb 0x418a8f
test esi, esi
je 0x418a77
mov dword [esi], 2
test edi, edi
je 0x418a81
mov dword [edi], 0
test edx, edx
je 0x418a8a
mov word [edx], 0x20
mov ebp, 1
cmp eax, 0x40004
ja 0x418a9f
jb 0x418ac1
cmp ecx, 0x44
ja 0x418a9f
jb 0x418ac1
test esi, esi
je 0x418aa9
mov dword [esi], 3
test edi, edi
je 0x418ab3
mov dword [edi], 0
test edx, edx
je 0x418abc
mov word [edx], 0x20
mov ebp, 1
lea edx, [esp + 0x428]
push edx
lea eax, [esp + 0x2c]
push 0x200
push eax
call fcn.004f1498
add esp, 0xc
push str.d3drg8x.dll
lea ecx, [esp + 0x2c]
push 0x200
push ecx
call fcn.004f141e
add esp, 0xc
lea ebx, [esp + 0x18]
lea edx, [esp + 0x28]
call fcn.00419190
test eax, eax
jl 0x418b41
mov eax, dword [esp + 0x1c]
cmp eax, 0x40004
ja 0x418b1b
jb 0x418b41
mov eax, dword [esp + 0x18]
cmp eax, 0x46
ja 0x418b1b
jb 0x418b41
test esi, esi
je 0x418b25
mov dword [esi], 3
test edi, edi
je 0x418b2f
mov dword [edi], 0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x418b3c
mov word [eax], 0x61
mov ebp, 1
lea edx, [esp + 0x428]
push edx
lea eax, [esp + 0x2c]
push 0x200
push eax
call fcn.004f1498
add esp, 0xc
push str.ddraw.dll
lea ecx, [esp + 0x2c]
push 0x200
push ecx
call fcn.004f141e
add esp, 0xc
lea ebx, [esp + 0x18]
lea edx, [esp + 0x28]
call fcn.00419190
test eax, eax
jl 0x418c38
mov eax, dword [esp + 0x1c]
cmp eax, 0x40005
mov ecx, dword [esp + 0x18]
ja 0x418ba2
jb 0x418bca
cmp ecx, 0x9b
ja 0x418ba2
jb 0x418bca
test esi, esi
je 0x418bac
mov dword [esi], 5
test edi, edi
je 0x418bb6
mov dword [edi], 0
mov edx, dword [esp + 0x14]
test edx, edx
je 0x418bc3
mov word [edx], 0x20
mov ebp, 1
jmp 0x418bce
mov edx, dword [esp + 0x14]
cmp eax, 0x40006
ja 0x418be1
jb 0x418c03
cmp ecx, 0x13e
ja 0x418be1
jb 0x418c03
test esi, esi
je 0x418beb
mov dword [esi], 6
test edi, edi
je 0x418bf5
mov dword [edi], 0
test edx, edx
je 0x418bfe
mov word [edx], 0x20
mov ebp, 1
cmp eax, 0x40006
ja 0x418c16
jb 0x418c38
cmp ecx, 0x1b4
ja 0x418c16
jb 0x418c38
test esi, esi
je 0x418c20
mov dword [esi], 6
test edi, edi
je 0x418c2a
mov dword [edi], 1
test edx, edx
je 0x418c33
mov word [edx], 0x20
mov ebp, 1
lea edx, [esp + 0x428]
push edx
lea eax, [esp + 0x2c]
push 0x200
push eax
call fcn.004f1498
add esp, 0xc
push str.dplayx.dll
lea ecx, [esp + 0x2c]
push 0x200
push ecx
call fcn.004f141e
add esp, 0xc
lea ebx, [esp + 0x18]
lea edx, [esp + 0x28]
call fcn.00419190
test eax, eax
jl 0x418cba
mov eax, dword [esp + 0x1c]
cmp eax, 0x40006
ja 0x418c94
jb 0x418cba
mov eax, dword [esp + 0x18]
cmp eax, 0x30206
ja 0x418c94
jb 0x418cba
test esi, esi
je 0x418c9e
mov dword [esi], 6
test edi, edi
je 0x418ca8
mov dword [edi], 1
mov eax, dword [esp + 0x14]
test eax, eax
je 0x418cb5
mov word [eax], 0x61
mov ebp, 1
lea edx, [esp + 0x428]
push edx
lea eax, [esp + 0x2c]
push 0x200
push eax
call fcn.004f1498
add esp, 0xc
push str.ddraw.dll
lea ecx, [esp + 0x2c]
push 0x200
push ecx
call fcn.004f141e
add esp, 0xc
lea ebx, [esp + 0x18]
lea edx, [esp + 0x28]
call fcn.00419190
test eax, eax
jl 0x418d3c
mov eax, dword [esp + 0x1c]
cmp eax, 0x40007
ja 0x418d16
jb 0x418d3c
mov eax, dword [esp + 0x18]
cmp eax, 0x2bc
ja 0x418d16
jb 0x418d3c
test esi, esi
je 0x418d20
mov dword [esi], 7
test edi, edi
je 0x418d2a
mov dword [edi], 0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x418d37
mov word [eax], 0x20
mov ebp, 1
lea edx, [esp + 0x428]
push edx
lea eax, [esp + 0x2c]
push 0x200
push eax
call fcn.004f1498
add esp, 0xc
push str.dinput.dll
lea ecx, [esp + 0x2c]
push 0x200
push ecx
call fcn.004f141e
add esp, 0xc
lea ebx, [esp + 0x18]
lea edx, [esp + 0x28]
call fcn.00419190
test eax, eax
jl 0x418dbe
mov eax, dword [esp + 0x1c]
cmp eax, 0x40007
ja 0x418d98
jb 0x418dbe
mov eax, dword [esp + 0x18]
cmp eax, 0x2cc
ja 0x418d98
jb 0x418dbe
test esi, esi
je 0x418da2
mov dword [esi], 7
test edi, edi
je 0x418dac
mov dword [edi], 0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x418db9
mov word [eax], 0x61
mov ebp, 1
lea edx, [esp + 0x428]
push edx
lea eax, [esp + 0x2c]
push 0x200
push eax
call fcn.004f1498
add esp, 0xc
push str.ddraw.dll
lea ecx, [esp + 0x2c]
push 0x200
push ecx
call fcn.004f141e
add esp, 0xc
lea ebx, [esp + 0x18]
lea edx, [esp + 0x28]
call fcn.00419190
test eax, eax
jl 0x418e75
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov esi, edx
shr esi, 0x10
cmp si, 4
jne 0x418e2a
mov eax, 0x40008
push eax
mov ecx, 0x190
push ecx
push edx
push edi
call fcn.00419300
test eax, eax
jge 0x418e47
cmp si, 5
jne 0x418e75
mov eax, 0x50001
push eax
mov ecx, 0x8d20190
push ecx
push edx
push edi
call fcn.00419300
test eax, eax
jl 0x418e75
mov eax, dword [esp + 0x24]
test eax, eax
je 0x418e55
mov dword [eax], 8
mov eax, dword [esp + 0x20]
test eax, eax
je 0x418e63
mov dword [eax], 0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x418e70
mov word [eax], 0x20
mov ebp, 1
lea edx, [esp + 0x428]
push edx
lea eax, [esp + 0x2c]
push 0x200
push eax
call fcn.004f1498
add esp, 0xc
push str.d3d8.dll
lea ecx, [esp + 0x2c]
push 0x200
push ecx
call fcn.004f141e
add esp, 0xc
lea ebx, [esp + 0x18]
lea edx, [esp + 0x28]
call fcn.00419190
test eax, eax
jl 0x418f9e
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
mov edi, edx
shr edi, 0x10
cmp di, 4
jne 0x418ee5
mov eax, 0x40008
push eax
mov ecx, 0x10371
push ecx
push edx
push esi
call fcn.00419300
test eax, eax
jge 0x418f02
cmp di, 5
jne 0x418f32
mov eax, 0x50001
push eax
mov ecx, 0xa280371
push ecx
push edx
push esi
call fcn.00419300
test eax, eax
jl 0x418f32
mov eax, dword [esp + 0x24]
test eax, eax
je 0x418f10
mov dword [eax], 8
mov ebx, dword [esp + 0x20]
test ebx, ebx
je 0x418f1e
mov dword [ebx], 1
mov eax, dword [esp + 0x14]
test eax, eax
je 0x418f2b
mov word [eax], 0x20
mov ebp, 1
jmp 0x418f36
mov ebx, dword [esp + 0x20]
cmp di, 4
jne 0x418f53
mov eax, 0x40008
push eax
mov ecx, 0x10385
push ecx
push edx
push esi
call fcn.00419300
test eax, eax
jge 0x418f74
cmp di, 5
jne 0x418f9e
mov eax, 0x50001
push eax
mov ecx, 0xa280385
push ecx
push edx
push esi
call fcn.00419300
test eax, eax
jl 0x418f9e
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x418f82
mov dword [eax], 8
test ebx, ebx
je 0x418f8c
mov dword [ebx], 1
mov eax, dword [esp + 0x14]
test eax, eax
je 0x418f99
mov word [eax], 0x61
mov ebp, 1
lea edx, [esp + 0x428]
push edx
lea eax, [esp + 0x2c]
push 0x200
push eax
call fcn.004f1498
add esp, 0xc
push str.mpg2splt.ax
lea ecx, [esp + 0x2c]
push 0x200
push ecx
call fcn.004f141e
add esp, 0xc
lea ebx, [esp + 0x18]
lea edx, [esp + 0x28]
call fcn.00419190
test eax, eax
jl 0x419028
mov eax, dword [esp + 0x1c]
cmp eax, 0x60003
ja 0x418ffa
jb 0x419028
mov eax, dword [esp + 0x18]
cmp eax, 0x10375
ja 0x418ffa
jb 0x419028
mov eax, dword [esp + 0x24]
test eax, eax
je 0x419008
mov dword [eax], 8
mov eax, dword [esp + 0x20]
test eax, eax
je 0x419016
mov dword [eax], 1
mov eax, dword [esp + 0x14]
test eax, eax
je 0x419023
mov word [eax], 0x62
mov ebp, 1
lea edx, [esp + 0x428]
push edx
lea eax, [esp + 0x2c]
push 0x200
push eax
call fcn.004f1498
add esp, 0xc
push str.dpnet.dll
lea ecx, [esp + 0x2c]
push 0x200
push ecx
call fcn.004f141e
add esp, 0xc
lea ebx, [esp + 0x18]
lea edx, [esp + 0x28]
call fcn.00419190
test eax, eax
jl 0x4190df
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov edx, esi
shr edx, 0x10
cmp dx, 4
jne 0x419094
mov eax, 0x40009
push eax
mov ecx, 0x86
push ecx
push esi
push edi
call fcn.00419300
test eax, eax
jge 0x4190b1
cmp dx, 5
jne 0x4190df
mov eax, 0x50002
push eax
mov ecx, 0xe5d0086
push ecx
push esi
push edi
call fcn.00419300
test eax, eax
jl 0x4190df
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4190bf
mov dword [eax], 8
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4190cd
mov dword [eax], 2
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4190da
mov word [eax], 0x20
mov ebp, 1
lea edx, [esp + 0x428]
push edx
lea eax, [esp + 0x2c]
push 0x200
push eax
call fcn.004f1498
add esp, 0xc
push str.d3d9.dll
lea ecx, [esp + 0x2c]
push 0x200
push ecx
call fcn.004f141e
add esp, 0xc
lea ebx, [esp + 0x18]
lea edx, [esp + 0x28]
call fcn.00419190
test eax, eax
jl 0x41913f
mov eax, dword [esp + 0x24]
test eax, eax
je 0x41912f
mov dword [eax], 9
mov eax, dword [esp + 0x20]
test eax, eax
je 0x41915f
mov dword [eax], 0
jmp 0x41915f
test ebp, ebp
jne 0x41916c
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
test esi, esi
je 0x419155
mov dword [esi], 0
test edi, edi
je 0x41915f
mov dword [edi], 0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x41916c
mov word [eax], 0x20
mov ecx, dword [esp + 0x82c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.004ead41
add esp, 0x820
ret 4