Function at 0x401ef9
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
push ebx
push 0x104
lea eax, [ebp - 0x410]
xor ebx, ebx
push eax
mov dword [ebp - 0xc], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x40274a
and byte [ebp - 0x30d], bl
push esi
push edi
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00414f70
lea eax, [ebp - 0x210]
push str.ddraw.dll
push eax
call fcn.00414f80
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040276b
add esp, 0x14
test eax, eax
push 4
pop esi
jl 0x40204d
push ebx
mov cx, 0x5f
mov ax, 2
mov dx, si
call fcn.00402806
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040281f
add esp, 0x14
test eax, eax
jl 0x401fb9
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x401f9d
mov dword [eax], 1
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x401fa6
mov dword [edi], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x401fb0
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
jmp 0x401fbc
mov edi, dword [ebp + 0xc]
push ebx
mov cx, 0x448
mov ax, 3
mov dx, si
call fcn.00402806
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040281f
add esp, 0x14
test eax, eax
jl 0x402005
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x401fee
mov dword [eax], 2
cmp edi, ebx
je 0x401ff4
mov dword [edi], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x401ffe
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
push ebx
mov cx, 0x44
mov ax, si
mov dx, si
call fcn.00402806
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040281f
add esp, 0x14
test eax, eax
jl 0x40204d
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402036
mov dword [eax], 3
cmp edi, ebx
je 0x40203c
mov dword [edi], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x402046
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00414f70
lea eax, [ebp - 0x210]
push str.d3drg8x.dll
push eax
call fcn.00414f80
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040276b
add esp, 0x14
test eax, eax
jl 0x4020d2
push ebx
mov cx, 0x46
mov ax, si
mov dx, si
call fcn.00402806
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040281f
add esp, 0x14
test eax, eax
jl 0x4020d2
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4020b8
mov dword [eax], 3
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x4020c1
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x4020cb
mov byte [eax], 0x61
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00414f70
lea eax, [ebp - 0x210]
push str.ddraw.dll
push eax
call fcn.00414f80
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040276b
add esp, 0x14
test eax, eax
push 5
pop edi
push 6
pop esi
jl 0x4021f4
push ebx
mov cx, 0x9b
mov ax, di
mov dx, 4
call fcn.00402806
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040281f
add esp, 0x14
test eax, eax
jl 0x40215e
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402144
mov dword [eax], edi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x40214d
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x402157
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
push ebx
mov cx, 0x13e
mov ax, si
mov dx, 4
call fcn.00402806
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040281f
add esp, 0x14
test eax, eax
jl 0x4021a8
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x40218c
mov dword [eax], esi
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x402195
mov dword [edi], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x40219f
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
jmp 0x4021ab
mov edi, dword [ebp + 0xc]
push ebx
mov cx, 0x1b4
mov ax, si
mov dx, 4
call fcn.00402806
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040281f
add esp, 0x14
test eax, eax
jl 0x4021f4
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4021d9
mov dword [eax], esi
cmp edi, ebx
je 0x4021e3
mov dword [edi], 1
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x4021ed
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00414f70
lea eax, [ebp - 0x210]
push str.dplayx.dll
push eax
call fcn.00414f80
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040276b
add esp, 0x14
test eax, eax
jl 0x40227b
push 3
mov cx, 0x206
mov ax, si
mov dx, 4
call fcn.00402806
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040281f
add esp, 0x14
test eax, eax
jl 0x40227b
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x40225d
mov dword [eax], esi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x40226a
mov dword [eax], 1
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x402274
mov byte [eax], 0x61
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00414f70
lea eax, [ebp - 0x210]
push str.ddraw.dll
push eax
call fcn.00414f80
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040276b
add esp, 0x14
test eax, eax
push 7
pop esi
jl 0x402300
push ebx
mov cx, 0x2bc
mov ax, si
mov dx, 4
call fcn.00402806
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040281f
add esp, 0x14
test eax, eax
jl 0x402300
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4022e6
mov dword [eax], esi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x4022ef
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x4022f9
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00414f70
lea eax, [ebp - 0x210]
push str.dinput.dll
push eax
call fcn.00414f80
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040276b
add esp, 0x14
test eax, eax
jl 0x402382
push ebx
mov cx, 0x2cc
mov ax, si
mov dx, 4
call fcn.00402806
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040281f
add esp, 0x14
test eax, eax
jl 0x402382
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402368
mov dword [eax], esi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x402371
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x40237b
mov byte [eax], 0x61
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00414f70
lea eax, [ebp - 0x210]
push str.ddraw.dll
push eax
call fcn.00414f80
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040276b
add esp, 0x14
test eax, eax
push 8
pop edi
jl 0x402445
mov esi, dword [ebp - 4]
shr esi, 0x10
cmp si, 4
jne 0x4023f3
push ebx
mov cx, 0x190
mov ax, di
mov dx, si
call fcn.00402806
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040281f
add esp, 0x14
test eax, eax
jge 0x402422
cmp si, 5
jne 0x402445
push 0x8d2
mov cx, 0x190
mov ax, 1
mov dx, si
call fcn.00402806
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040281f
add esp, 0x14
test eax, eax
jl 0x402445
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x40242b
mov dword [eax], edi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x402434
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x40243e
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00414f70
lea eax, [ebp - 0x210]
push str.d3d8.dll
push eax
call fcn.00414f80
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040276b
add esp, 0x14
test eax, eax
jl 0x402591
mov edi, dword [ebp - 4]
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x10], edi
shr dword [ebp - 0x10], 0x10
cmp word [ebp - 0x10], 4
mov esi, 0xa28
jne 0x4024bf
push 1
mov cx, 0x371
mov ax, 8
mov dx, 4
call fcn.00402806
push edx
push eax
push edi
push ebx
call fcn.0040281f
add esp, 0x14
test eax, eax
jge 0x4024e8
cmp word [ebp - 0x10], 5
jne 0x402513
push esi
mov cx, 0x371
mov ax, 1
mov dx, 5
call fcn.00402806
push edx
push eax
push edi
push ebx
call fcn.0040281f
add esp, 0x14
test eax, eax
jl 0x402513
mov eax, dword [ebp + 8]
test eax, eax
je 0x4024f5
mov dword [eax], 8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x402502
mov dword [eax], 1
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40250c
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
cmp word [ebp - 0x10], 4
jne 0x40253d
push 1
mov cx, 0x385
mov ax, 8
mov dx, 4
call fcn.00402806
push edx
push eax
push edi
push ebx
call fcn.0040281f
add esp, 0x14
test eax, eax
jge 0x402566
cmp word [ebp - 0x10], 5
jne 0x402591
push esi
mov cx, 0x385
mov ax, 1
mov dx, 5
call fcn.00402806
push edx
push eax
push edi
push ebx
call fcn.0040281f
add esp, 0x14
test eax, eax
jl 0x402591
mov eax, dword [ebp + 8]
test eax, eax
je 0x402573
mov dword [eax], 8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x402580
mov dword [eax], 1
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40258a
mov byte [eax], 0x61
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00414f70
lea eax, [ebp - 0x210]
push str.mpg2splt.ax
push eax
call fcn.00414f80
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040276b
add esp, 0x14
test eax, eax
jl 0x402617
xor esi, esi
inc esi
push esi
mov cx, 0x375
mov ax, 3
mov dx, 6
call fcn.00402806
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040281f
add esp, 0x14
test eax, eax
jl 0x402617
mov eax, dword [ebp + 8]
test eax, eax
je 0x402601
mov dword [eax], 8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40260a
mov dword [eax], esi
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x402614
mov byte [eax], 0x62
mov dword [ebp - 0xc], esi
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00414f70
lea eax, [ebp - 0x210]
push str.dpnet.dll
push eax
call fcn.00414f80
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040276b
add esp, 0x14
test eax, eax
push 9
pop ebx
jl 0x4026e2
mov esi, dword [ebp - 4]
push 4
shr esi, 0x10
pop edx
cmp si, dx
jne 0x402688
push 0
mov cx, 0x86
mov ax, bx
call fcn.00402806
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040281f
add esp, 0x14
test eax, eax
jge 0x4026b7
cmp si, 5
jne 0x4026e2
push 0xe5d
mov cx, 0x86
mov ax, 2
mov dx, si
call fcn.00402806
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040281f
add esp, 0x14
test eax, eax
jl 0x4026e2
mov eax, dword [ebp + 8]
test eax, eax
je 0x4026c4
mov dword [eax], 8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4026d1
mov dword [eax], 2
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4026db
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00414f70
lea eax, [ebp - 0x210]
push str.d3d9.dll
push eax
call fcn.00414f80
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040276b
add esp, 0x14
test eax, eax
pop edi
pop esi
jl 0x402742
mov eax, dword [ebp + 8]
test eax, eax
je 0x402727
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x402731
and dword [eax], 0
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40273b
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], 0
jne 0x402766
xor ebx, ebx
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402753
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x40275c
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x402766
mov byte [eax], 0x20
xor eax, eax
pop ebx
leave
ret