Function at 0x496160
Capabilities:
Get common file path

Disassembly:
sub esp, 0x418
mov eax, dword [0x4ca09c]
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 0x496bcf
lea eax, [esp + 0x224]
push eax
push 0x200
lea ecx, [esp + 0x2c]
push ecx
mov byte [esp + 0x333], 0
call fcn.00495d00
mov ecx, 0x200
lea eax, [esp + 0x24]
mov edi, edi
cmp byte [eax], 0
je 0x4961ef
add eax, 1
sub ecx, 1
jne 0x4961e0
jmp 0x496211
test ecx, ecx
je 0x496211
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.00495d00
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x28]
push edx
call fcn.00496010
add esp, 8
test eax, eax
jl 0x496301
push 0x5f
push 0
push 2
push 4
call fcn.004960e0
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
push edx
push eax
push esi
push edi
call fcn.00496100
add esp, 0x20
test eax, eax
jl 0x496274
test ebx, ebx
je 0x49625a
mov dword [ebx], 1
mov eax, dword [esp + 0x14]
test eax, eax
je 0x496264
mov dword [eax], ebp
mov eax, dword [esp + 0x10]
test eax, eax
je 0x49626f
mov byte [eax], 0x20
mov ebp, 1
push 0x448
push 0
push 3
push 4
call fcn.004960e0
push edx
push eax
push esi
push edi
call fcn.00496100
add esp, 0x20
test eax, eax
jl 0x4962bc
test ebx, ebx
je 0x49629e
mov dword [ebx], 2
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4962ac
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4962b7
mov byte [eax], 0x20
mov ebp, 1
push 0x44
push 0
push 4
push 4
call fcn.004960e0
push edx
push eax
push esi
push edi
call fcn.00496100
add esp, 0x20
test eax, eax
jl 0x496301
test ebx, ebx
je 0x4962e3
mov dword [ebx], 3
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4962f1
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4962fc
mov byte [eax], 0x20
mov ebp, 1
lea eax, [esp + 0x224]
push eax
push 0x200
lea ecx, [esp + 0x2c]
push ecx
call fcn.00495d00
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x496330
add eax, 1
sub ecx, 1
jne 0x496321
jmp 0x496352
test ecx, ecx
je 0x496352
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.00495d00
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x28]
push edx
call fcn.00496010
add esp, 8
test eax, eax
jl 0x4963b7
push 0x46
push 0
push 4
push 4
call fcn.004960e0
mov ecx, dword [esp + 0x28]
push edx
push eax
mov eax, dword [esp + 0x34]
push eax
push ecx
call fcn.00496100
add esp, 0x20
test eax, eax
jl 0x4963b7
test ebx, ebx
je 0x496397
mov dword [ebx], 3
mov esi, dword [esp + 0x14]
test esi, esi
je 0x4963a5
mov dword [esi], 0
mov edi, dword [esp + 0x10]
test edi, edi
je 0x4963b0
mov byte [edi], 0x61
mov ebp, 1
jmp 0x4963bf
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
lea edx, [esp + 0x224]
push edx
push 0x200
lea eax, [esp + 0x2c]
push eax
call fcn.00495d00
mov ecx, 0x200
lea eax, [esp + 0x24]
nop
cmp byte [eax], 0
je 0x4963ef
add eax, 1
sub ecx, 1
jne 0x4963e0
jmp 0x496411
test ecx, ecx
je 0x496411
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.00495d00
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00496010
add esp, 8
test eax, eax
jl 0x496517
push 0x9b
push 0
push 5
push 4
call fcn.004960e0
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
push edx
push eax
push esi
push edi
call fcn.00496100
add esp, 0x20
test eax, eax
jl 0x49647b
test ebx, ebx
je 0x49645d
mov dword [ebx], 5
mov eax, dword [esp + 0x14]
test eax, eax
je 0x49646b
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x496476
mov byte [eax], 0x20
mov ebp, 1
push 0x13e
push 0
push 6
push 4
call fcn.004960e0
push edx
push eax
push esi
push edi
call fcn.00496100
add esp, 0x20
test eax, eax
jl 0x4964c3
test ebx, ebx
je 0x4964a5
mov dword [ebx], 6
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4964b3
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4964be
mov byte [eax], 0x20
mov ebp, 1
push 0x1b4
push 0
push 6
push 4
call fcn.004960e0
push edx
push eax
push esi
push edi
call fcn.00496100
add esp, 0x20
test eax, eax
jl 0x49650f
test ebx, ebx
je 0x4964ed
mov dword [ebx], 6
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4964fb
mov dword [eax], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x496506
mov byte [eax], 0x20
mov ebp, 1
mov edi, eax
jmp 0x496513
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.00495d00
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x496546
add eax, 1
sub ecx, 1
jne 0x496537
jmp 0x496568
test ecx, ecx
je 0x496568
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.00495d00
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00496010
add esp, 8
test eax, eax
jl 0x4965c6
push 0x206
push 3
push 6
push 4
call fcn.004960e0
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
push edx
push eax
call fcn.00496100
add esp, 0x20
test eax, eax
jl 0x4965c6
test ebx, ebx
je 0x4965b0
mov dword [ebx], 6
test esi, esi
je 0x4965ba
mov dword [esi], 1
test edi, edi
je 0x4965c1
mov byte [edi], 0x61
mov ebp, 1
lea ecx, [esp + 0x224]
push ecx
push 0x200
lea edx, [esp + 0x2c]
push edx
call fcn.00495d00
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x4965f5
add eax, 1
sub ecx, 1
jne 0x4965e6
jmp 0x496617
test ecx, ecx
je 0x496617
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.00495d00
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00496010
add esp, 8
test eax, eax
jl 0x496675
push 0x2bc
push 0
push 7
push 4
call fcn.004960e0
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
push edx
push eax
call fcn.00496100
add esp, 0x20
test eax, eax
jl 0x496675
test ebx, ebx
je 0x49665f
mov dword [ebx], 7
test esi, esi
je 0x496669
mov dword [esi], 0
test edi, edi
je 0x496670
mov byte [edi], 0x20
mov ebp, 1
lea ecx, [esp + 0x224]
push ecx
push 0x200
lea edx, [esp + 0x2c]
push edx
call fcn.00495d00
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x4966a4
add eax, 1
sub ecx, 1
jne 0x496695
jmp 0x4966c6
test ecx, ecx
je 0x4966c6
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.00495d00
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00496010
add esp, 8
test eax, eax
jl 0x496724
push 0x2cc
push 0
push 7
push 4
call fcn.004960e0
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
push edx
push eax
call fcn.00496100
add esp, 0x20
test eax, eax
jl 0x496724
test ebx, ebx
je 0x49670e
mov dword [ebx], 7
test esi, esi
je 0x496718
mov dword [esi], 0
test edi, edi
je 0x49671f
mov byte [edi], 0x61
mov ebp, 1
lea ecx, [esp + 0x224]
push ecx
push 0x200
lea edx, [esp + 0x2c]
push edx
call fcn.00495d00
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x496753
add eax, 1
sub ecx, 1
jne 0x496744
jmp 0x496775
test ecx, ecx
je 0x496775
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.00495d00
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00496010
add esp, 8
test eax, eax
jl 0x496817
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov ebx, esi
shr ebx, 0x10
cmp bx, 4
jne 0x4967c2
push 0x190
push 0
push 8
push 4
call fcn.004960e0
push edx
push eax
push esi
push edi
call fcn.00496100
add esp, 0x20
test eax, eax
jge 0x4967eb
cmp bx, 5
jne 0x496817
push 0x190
push 0x8d2
push 1
push 5
call fcn.004960e0
push edx
push eax
push esi
push edi
call fcn.00496100
add esp, 0x20
test eax, eax
jl 0x496817
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4967f9
mov dword [eax], 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x496807
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x496812
mov byte [eax], 0x20
mov ebp, 1
lea edx, [esp + 0x224]
push edx
push 0x200
lea eax, [esp + 0x2c]
push eax
call fcn.00495d00
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x496846
add eax, 1
sub ecx, 1
jne 0x496837
jmp 0x496868
test ecx, ecx
je 0x496868
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.00495d00
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00496010
add esp, 8
test eax, eax
jl 0x496985
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov ebx, esi
shr ebx, 0x10
cmp bx, 4
jne 0x4968b5
push 0x371
push 1
push 8
push 4
call fcn.004960e0
push edx
push eax
push esi
push edi
call fcn.00496100
add esp, 0x20
test eax, eax
jge 0x4968de
cmp bx, 5
jne 0x49690a
push 0x371
push 0xa28
push 1
push 5
call fcn.004960e0
push edx
push eax
push esi
push edi
call fcn.00496100
add esp, 0x20
test eax, eax
jl 0x49690a
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4968ec
mov dword [eax], 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4968fa
mov dword [eax], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x496905
mov byte [eax], 0x20
mov ebp, 1
cmp bx, 4
jne 0x496930
push 0x385
push 1
push 8
push 4
call fcn.004960e0
push edx
push eax
push esi
push edi
call fcn.00496100
add esp, 0x20
test eax, eax
jge 0x496959
cmp bx, 5
jne 0x496985
push 0x385
push 0xa28
push 1
push 5
call fcn.004960e0
push edx
push eax
push esi
push edi
call fcn.00496100
add esp, 0x20
test eax, eax
jl 0x496985
mov eax, dword [esp + 0x20]
test eax, eax
je 0x496967
mov dword [eax], 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x496975
mov dword [eax], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x496980
mov byte [eax], 0x61
mov ebp, 1
lea edx, [esp + 0x224]
push edx
push 0x200
lea eax, [esp + 0x2c]
push eax
call fcn.00495d00
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x4969b4
add eax, 1
sub ecx, 1
jne 0x4969a5
jmp 0x4969d6
test ecx, ecx
je 0x4969d6
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.00495d00
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00496010
add esp, 8
test eax, eax
jl 0x496a40
push 0x375
push 1
push 3
push 6
call fcn.004960e0
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
push edx
push eax
call fcn.00496100
add esp, 0x20
test eax, eax
jl 0x496a40
mov eax, dword [esp + 0x20]
test eax, eax
je 0x496a22
mov dword [eax], 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x496a30
mov dword [eax], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x496a3b
mov byte [eax], 0x62
mov ebp, 1
lea ecx, [esp + 0x224]
push ecx
push 0x200
lea edx, [esp + 0x2c]
push edx
call fcn.00495d00
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x496a6f
add eax, 1
sub ecx, 1
jne 0x496a60
jmp 0x496a91
test ecx, ecx
je 0x496a91
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.00495d00
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00496010
add esp, 8
test eax, eax
jl 0x496b35
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov ebx, esi
shr ebx, 0x10
cmp bx, 4
jne 0x496ade
push 0x86
push 0
push 9
push 4
call fcn.004960e0
push edx
push eax
push esi
push edi
call fcn.00496100
add esp, 0x20
test eax, eax
jge 0x496b07
cmp bx, 5
jne 0x496b35
push 0x86
push 0xe5d
push 2
push 5
call fcn.004960e0
push edx
push eax
push esi
push edi
call fcn.00496100
add esp, 0x20
test eax, eax
jl 0x496b35
mov edi, dword [esp + 0x20]
test edi, edi
je 0x496b15
mov dword [edi], 8
mov esi, dword [esp + 0x14]
test esi, esi
je 0x496b23
mov dword [esi], 2
mov ebx, dword [esp + 0x10]
test ebx, ebx
je 0x496b2e
mov byte [ebx], 0x20
mov ebp, 1
jmp 0x496b41
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x10]
lea edx, [esp + 0x224]
push edx
push 0x200
lea eax, [esp + 0x2c]
push eax
call fcn.00495d00
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x496b70
add eax, 1
sub ecx, 1
jne 0x496b61
jmp 0x496b92
test ecx, ecx
je 0x496b92
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.00495d00
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00496010
add esp, 8
test eax, eax
jl 0x496bc7
test edi, edi
je 0x496bb2
mov dword [edi], 9
test esi, esi
je 0x496bbc
mov dword [esi], 0
xor eax, eax
test ebx, ebx
je 0x496bf4
mov byte [ebx], 0x20
jmp 0x496bf4
test ebp, ebp
jne 0x496bf2
mov ebx, dword [esp + 0x20]
test ebx, ebx
je 0x496bd9
mov dword [ebx], 0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x496be7
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x496bf2
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.004811b7
add esp, 0x418
ret