Function at 0x4a4190
Capabilities:
Get common file path

Disassembly:
sub esp, 0x418
mov eax, dword [0x5265f0]
xor eax, esp
mov dword [esp + 0x414], eax
mov eax, dword [esp + 0x420]
mov ecx, dword [esp + 0x424]
push ebx
mov ebx, dword [esp + 0x420]
push ebp
push esi
push edi
push 0x104
lea edx, [esp + 0x228]
push edx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ecx
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4a4d0e
lea eax, [esp + 0x224]
push eax
push 0x200
lea ecx, [esp + 0x2c]
push ecx
mov byte [esp + 0x333], 0
call fcn.004a3c10
mov ecx, 0x200
lea eax, [esp + 0x24]
mov edi, edi
cmp byte [eax], 0
je 0x4a421f
add eax, 1
sub ecx, 1
jne 0x4a4210
jmp 0x4a4241
test ecx, ecx
je 0x4a4241
mov eax, 0x200
sub eax, ecx
push str.ddraw.dll
mov edx, 0x200
sub edx, eax
push edx
lea eax, [esp + eax + 0x2c]
push eax
call fcn.004a3c10
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x28]
push edx
call fcn.004a4040
add esp, 8
test eax, eax
jl 0x4a4331
push 0x5f
push 0
push 2
push 4
call fcn.004a4110
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
push edx
push eax
push esi
push edi
call fcn.004a4130
add esp, 0x20
test eax, eax
jl 0x4a42a4
test ebx, ebx
je 0x4a428a
mov dword [ebx], 1
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4a4294
mov dword [eax], ebp
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4a429f
mov byte [eax], 0x20
mov ebp, 1
push 0x448
push 0
push 3
push 4
call fcn.004a4110
push edx
push eax
push esi
push edi
call fcn.004a4130
add esp, 0x20
test eax, eax
jl 0x4a42ec
test ebx, ebx
je 0x4a42ce
mov dword [ebx], 2
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4a42dc
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4a42e7
mov byte [eax], 0x20
mov ebp, 1
push 0x44
push 0
push 4
push 4
call fcn.004a4110
push edx
push eax
push esi
push edi
call fcn.004a4130
add esp, 0x20
test eax, eax
jl 0x4a4331
test ebx, ebx
je 0x4a4313
mov dword [ebx], 3
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4a4321
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4a432c
mov byte [eax], 0x20
mov ebp, 1
lea eax, [esp + 0x224]
push eax
push 0x200
lea ecx, [esp + 0x2c]
push ecx
call fcn.004a3c10
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x4a4360
add eax, 1
sub ecx, 1
jne 0x4a4351
jmp 0x4a4382
test ecx, ecx
je 0x4a4382
mov eax, 0x200
sub eax, ecx
push str.d3drg8x.dll
mov edx, 0x200
sub edx, eax
push edx
lea eax, [esp + eax + 0x2c]
push eax
call fcn.004a3c10
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x28]
push edx
call fcn.004a4040
add esp, 8
test eax, eax
jl 0x4a43e7
push 0x46
push 0
push 4
push 4
call fcn.004a4110
mov ecx, dword [esp + 0x28]
push edx
push eax
mov eax, dword [esp + 0x34]
push eax
push ecx
call fcn.004a4130
add esp, 0x20
test eax, eax
jl 0x4a43e7
test ebx, ebx
je 0x4a43c7
mov dword [ebx], 3
mov esi, dword [esp + 0x14]
test esi, esi
je 0x4a43d5
mov dword [esi], 0
mov edi, dword [esp + 0x10]
test edi, edi
je 0x4a43e0
mov byte [edi], 0x61
mov ebp, 1
jmp 0x4a43ef
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
lea edx, [esp + 0x224]
push edx
push 0x200
lea eax, [esp + 0x2c]
push eax
call fcn.004a3c10
mov ecx, 0x200
lea eax, [esp + 0x24]
nop
cmp byte [eax], 0
je 0x4a441f
add eax, 1
sub ecx, 1
jne 0x4a4410
jmp 0x4a4441
test ecx, ecx
je 0x4a4441
mov eax, 0x200
sub eax, ecx
push str.ddraw.dll
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.004a3c10
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.004a4040
add esp, 8
test eax, eax
jl 0x4a4547
push 0x9b
push 0
push 5
push 4
call fcn.004a4110
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
push edx
push eax
push esi
push edi
call fcn.004a4130
add esp, 0x20
test eax, eax
jl 0x4a44ab
test ebx, ebx
je 0x4a448d
mov dword [ebx], 5
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4a449b
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4a44a6
mov byte [eax], 0x20
mov ebp, 1
push 0x13e
push 0
push 6
push 4
call fcn.004a4110
push edx
push eax
push esi
push edi
call fcn.004a4130
add esp, 0x20
test eax, eax
jl 0x4a44f3
test ebx, ebx
je 0x4a44d5
mov dword [ebx], 6
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4a44e3
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4a44ee
mov byte [eax], 0x20
mov ebp, 1
push 0x1b4
push 0
push 6
push 4
call fcn.004a4110
push edx
push eax
push esi
push edi
call fcn.004a4130
add esp, 0x20
test eax, eax
jl 0x4a453f
test ebx, ebx
je 0x4a451d
mov dword [ebx], 6
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4a452b
mov dword [eax], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4a4536
mov byte [eax], 0x20
mov ebp, 1
mov edi, eax
jmp 0x4a4543
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
lea edx, [esp + 0x224]
push edx
push 0x200
lea eax, [esp + 0x2c]
push eax
call fcn.004a3c10
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x4a4576
add eax, 1
sub ecx, 1
jne 0x4a4567
jmp 0x4a4598
test ecx, ecx
je 0x4a4598
mov eax, 0x200
sub eax, ecx
push str.dplayx.dll
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.004a3c10
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.004a4040
add esp, 8
test eax, eax
jl 0x4a45f6
push 0x206
push 3
push 6
push 4
call fcn.004a4110
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
push edx
push eax
call fcn.004a4130
add esp, 0x20
test eax, eax
jl 0x4a45f6
test ebx, ebx
je 0x4a45e0
mov dword [ebx], 6
test esi, esi
je 0x4a45ea
mov dword [esi], 1
test edi, edi
je 0x4a45f1
mov byte [edi], 0x61
mov ebp, 1
lea ecx, [esp + 0x224]
push ecx
push 0x200
lea edx, [esp + 0x2c]
push edx
call fcn.004a3c10
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x4a4625
add eax, 1
sub ecx, 1
jne 0x4a4616
jmp 0x4a4647
test ecx, ecx
je 0x4a4647
mov eax, 0x200
sub eax, ecx
push str.ddraw.dll
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.004a3c10
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.004a4040
add esp, 8
test eax, eax
jl 0x4a46a5
push 0x2bc
push 0
push 7
push 4
call fcn.004a4110
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
push edx
push eax
call fcn.004a4130
add esp, 0x20
test eax, eax
jl 0x4a46a5
test ebx, ebx
je 0x4a468f
mov dword [ebx], 7
test esi, esi
je 0x4a4699
mov dword [esi], 0
test edi, edi
je 0x4a46a0
mov byte [edi], 0x20
mov ebp, 1
lea ecx, [esp + 0x224]
push ecx
push 0x200
lea edx, [esp + 0x2c]
push edx
call fcn.004a3c10
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x4a46d4
add eax, 1
sub ecx, 1
jne 0x4a46c5
jmp 0x4a46f6
test ecx, ecx
je 0x4a46f6
mov eax, 0x200
sub eax, ecx
push str.dinput.dll
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.004a3c10
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.004a4040
add esp, 8
test eax, eax
jl 0x4a4754
push 0x2cc
push 0
push 7
push 4
call fcn.004a4110
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
push edx
push eax
call fcn.004a4130
add esp, 0x20
test eax, eax
jl 0x4a4754
test ebx, ebx
je 0x4a473e
mov dword [ebx], 7
test esi, esi
je 0x4a4748
mov dword [esi], 0
test edi, edi
je 0x4a474f
mov byte [edi], 0x61
mov ebp, 1
lea ecx, [esp + 0x224]
push ecx
push 0x200
lea edx, [esp + 0x2c]
push edx
call fcn.004a3c10
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x4a4783
add eax, 1
sub ecx, 1
jne 0x4a4774
jmp 0x4a47a5
test ecx, ecx
je 0x4a47a5
mov eax, 0x200
sub eax, ecx
push str.ddraw.dll
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.004a3c10
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.004a4040
add esp, 8
test eax, eax
jl 0x4a4847
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov ebx, esi
shr ebx, 0x10
cmp bx, 4
jne 0x4a47f2
push 0x190
push 0
push 8
push 4
call fcn.004a4110
push edx
push eax
push esi
push edi
call fcn.004a4130
add esp, 0x20
test eax, eax
jge 0x4a481b
cmp bx, 5
jne 0x4a4847
push 0x190
push 0x8d2
push 1
push 5
call fcn.004a4110
push edx
push eax
push esi
push edi
call fcn.004a4130
add esp, 0x20
test eax, eax
jl 0x4a4847
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4a4829
mov dword [eax], 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4a4837
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4a4842
mov byte [eax], 0x20
mov ebp, 1
lea edx, [esp + 0x224]
push edx
push 0x200
lea eax, [esp + 0x2c]
push eax
call fcn.004a3c10
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x4a4876
add eax, 1
sub ecx, 1
jne 0x4a4867
jmp 0x4a4898
test ecx, ecx
je 0x4a4898
mov eax, 0x200
sub eax, ecx
push str.d3d8.dll
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.004a3c10
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.004a4040
add esp, 8
test eax, eax
jl 0x4a49b5
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov ebx, esi
shr ebx, 0x10
cmp bx, 4
jne 0x4a48e5
push 0x371
push 1
push 8
push 4
call fcn.004a4110
push edx
push eax
push esi
push edi
call fcn.004a4130
add esp, 0x20
test eax, eax
jge 0x4a490e
cmp bx, 5
jne 0x4a493a
push 0x371
push 0xa28
push 1
push 5
call fcn.004a4110
push edx
push eax
push esi
push edi
call fcn.004a4130
add esp, 0x20
test eax, eax
jl 0x4a493a
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4a491c
mov dword [eax], 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4a492a
mov dword [eax], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4a4935
mov byte [eax], 0x20
mov ebp, 1
cmp bx, 4
jne 0x4a4960
push 0x385
push 1
push 8
push 4
call fcn.004a4110
push edx
push eax
push esi
push edi
call fcn.004a4130
add esp, 0x20
test eax, eax
jge 0x4a4989
cmp bx, 5
jne 0x4a49b5
push 0x385
push 0xa28
push 1
push 5
call fcn.004a4110
push edx
push eax
push esi
push edi
call fcn.004a4130
add esp, 0x20
test eax, eax
jl 0x4a49b5
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4a4997
mov dword [eax], 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4a49a5
mov dword [eax], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4a49b0
mov byte [eax], 0x61
mov ebp, 1
lea edx, [esp + 0x224]
push edx
push 0x200
lea eax, [esp + 0x2c]
push eax
call fcn.004a3c10
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x4a49e4
add eax, 1
sub ecx, 1
jne 0x4a49d5
jmp 0x4a4a06
test ecx, ecx
je 0x4a4a06
mov eax, 0x200
sub eax, ecx
push str.mpg2splt.ax
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.004a3c10
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.004a4040
add esp, 8
test eax, eax
jl 0x4a4a70
push 0x375
push 1
push 3
push 6
call fcn.004a4110
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
push edx
push eax
call fcn.004a4130
add esp, 0x20
test eax, eax
jl 0x4a4a70
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4a4a52
mov dword [eax], 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4a4a60
mov dword [eax], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4a4a6b
mov byte [eax], 0x62
mov ebp, 1
lea ecx, [esp + 0x224]
push ecx
push 0x200
lea edx, [esp + 0x2c]
push edx
call fcn.004a3c10
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x4a4a9f
add eax, 1
sub ecx, 1
jne 0x4a4a90
jmp 0x4a4ac1
test ecx, ecx
je 0x4a4ac1
mov eax, 0x200
sub eax, ecx
push str.dpnet.dll
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.004a3c10
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.004a4040
add esp, 8
test eax, eax
jl 0x4a4b65
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov ebx, esi
shr ebx, 0x10
cmp bx, 4
jne 0x4a4b0e
push 0x86
push 0
push 9
push 4
call fcn.004a4110
push edx
push eax
push esi
push edi
call fcn.004a4130
add esp, 0x20
test eax, eax
jge 0x4a4b37
cmp bx, 5
jne 0x4a4b65
push 0x86
push 0xe5d
push 2
push 5
call fcn.004a4110
push edx
push eax
push esi
push edi
call fcn.004a4130
add esp, 0x20
test eax, eax
jl 0x4a4b65
mov edi, dword [esp + 0x20]
test edi, edi
je 0x4a4b45
mov dword [edi], 8
mov esi, dword [esp + 0x14]
test esi, esi
je 0x4a4b53
mov dword [esi], 2
mov ebx, dword [esp + 0x10]
test ebx, ebx
je 0x4a4b5e
mov byte [ebx], 0x20
mov ebp, 1
jmp 0x4a4b71
mov ebx, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x20]
lea edx, [esp + 0x224]
push edx
push 0x200
lea eax, [esp + 0x2c]
push eax
call fcn.004a3c10
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x4a4ba0
add eax, 1
sub ecx, 1
jne 0x4a4b91
jmp 0x4a4bc2
test ecx, ecx
je 0x4a4bc2
mov eax, 0x200
sub eax, ecx
push str.d3d9.dll
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.004a3c10
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.004a4040
add esp, 8
test eax, eax
jl 0x4a4bf8
test edi, edi
je 0x4a4be2
mov dword [edi], 9
test esi, esi
je 0x4a4bec
mov dword [esi], 0
test ebx, ebx
je 0x4a4bf3
mov byte [ebx], 0x20
mov ebp, 1
lea edx, [esp + 0x224]
push edx
push 0x200
lea eax, [esp + 0x2c]
push eax
call fcn.004a3c10
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x4a4c27
add eax, 1
sub ecx, 1
jne 0x4a4c18
jmp 0x4a4c49
test ecx, ecx
je 0x4a4c49
mov eax, 0x200
sub eax, ecx
push str.d3d10.dll
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.004a3c10
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.004a4040
add esp, 8
test eax, eax
jl 0x4a4c7f
test edi, edi
je 0x4a4c69
mov dword [edi], 0xa
test esi, esi
je 0x4a4c73
mov dword [esi], 0
test ebx, ebx
je 0x4a4c7a
mov byte [ebx], 0x20
mov ebp, 1
lea edx, [esp + 0x224]
push edx
push 0x200
lea eax, [esp + 0x2c]
push eax
call fcn.004a3c10
mov ecx, 0x200
lea eax, [esp + 0x24]
nop
cmp byte [eax], 0
je 0x4a4caf
add eax, 1
sub ecx, 1
jne 0x4a4ca0
jmp 0x4a4cd1
test ecx, ecx
je 0x4a4cd1
mov eax, 0x200
sub eax, ecx
push str.d3d11.dll
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.004a3c10
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.004a4040
add esp, 8
test eax, eax
jl 0x4a4d06
test edi, edi
je 0x4a4cf1
mov dword [edi], 0xb
test esi, esi
je 0x4a4cfb
mov dword [esi], 0
xor eax, eax
test ebx, ebx
je 0x4a4d33
mov byte [ebx], 0x20
jmp 0x4a4d33
test ebp, ebp
jne 0x4a4d31
mov ebx, dword [esp + 0x20]
test ebx, ebx
je 0x4a4d18
mov dword [ebx], 0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4a4d26
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4a4d31
mov byte [eax], 0x20
xor eax, eax
mov ecx, dword [esp + 0x424]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004c2fd1
add esp, 0x418
ret