Function at 0x401efe
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 0x40274f
and byte [ebp - 0x30d], bl
push esi
push edi
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00415fd0
lea eax, [ebp - 0x210]
push str.ddraw.dll
push eax
call fcn.00415fe0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402770
add esp, 0x14
test eax, eax
push 4
pop esi
jl 0x402052
push ebx
mov cx, 0x5f
mov ax, 2
mov dx, si
call fcn.0040280b
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00402824
add esp, 0x14
test eax, eax
jl 0x401fbe
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x401fa2
mov dword [eax], 1
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x401fab
mov dword [edi], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x401fb5
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
jmp 0x401fc1
mov edi, dword [ebp + 0xc]
push ebx
mov cx, 0x448
mov ax, 3
mov dx, si
call fcn.0040280b
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00402824
add esp, 0x14
test eax, eax
jl 0x40200a
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x401ff3
mov dword [eax], 2
cmp edi, ebx
je 0x401ff9
mov dword [edi], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x402003
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
push ebx
mov cx, 0x44
mov ax, si
mov dx, si
call fcn.0040280b
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00402824
add esp, 0x14
test eax, eax
jl 0x402052
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x40203b
mov dword [eax], 3
cmp edi, ebx
je 0x402041
mov dword [edi], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x40204b
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00415fd0
lea eax, [ebp - 0x210]
push str.d3drg8x.dll
push eax
call fcn.00415fe0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402770
add esp, 0x14
test eax, eax
jl 0x4020d7
push ebx
mov cx, 0x46
mov ax, si
mov dx, si
call fcn.0040280b
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00402824
add esp, 0x14
test eax, eax
jl 0x4020d7
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4020bd
mov dword [eax], 3
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x4020c6
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x4020d0
mov byte [eax], 0x61
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00415fd0
lea eax, [ebp - 0x210]
push str.ddraw.dll
push eax
call fcn.00415fe0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402770
add esp, 0x14
test eax, eax
push 5
pop edi
push 6
pop esi
jl 0x4021f9
push ebx
mov cx, 0x9b
mov ax, di
mov dx, 4
call fcn.0040280b
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00402824
add esp, 0x14
test eax, eax
jl 0x402163
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402149
mov dword [eax], edi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x402152
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x40215c
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
push ebx
mov cx, 0x13e
mov ax, si
mov dx, 4
call fcn.0040280b
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00402824
add esp, 0x14
test eax, eax
jl 0x4021ad
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402191
mov dword [eax], esi
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x40219a
mov dword [edi], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x4021a4
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
jmp 0x4021b0
mov edi, dword [ebp + 0xc]
push ebx
mov cx, 0x1b4
mov ax, si
mov dx, 4
call fcn.0040280b
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00402824
add esp, 0x14
test eax, eax
jl 0x4021f9
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4021de
mov dword [eax], esi
cmp edi, ebx
je 0x4021e8
mov dword [edi], 1
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x4021f2
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00415fd0
lea eax, [ebp - 0x210]
push str.dplayx.dll
push eax
call fcn.00415fe0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402770
add esp, 0x14
test eax, eax
jl 0x402280
push 3
mov cx, 0x206
mov ax, si
mov dx, 4
call fcn.0040280b
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00402824
add esp, 0x14
test eax, eax
jl 0x402280
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402262
mov dword [eax], esi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x40226f
mov dword [eax], 1
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x402279
mov byte [eax], 0x61
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00415fd0
lea eax, [ebp - 0x210]
push str.ddraw.dll
push eax
call fcn.00415fe0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402770
add esp, 0x14
test eax, eax
push 7
pop esi
jl 0x402305
push ebx
mov cx, 0x2bc
mov ax, si
mov dx, 4
call fcn.0040280b
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00402824
add esp, 0x14
test eax, eax
jl 0x402305
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4022eb
mov dword [eax], esi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x4022f4
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x4022fe
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00415fd0
lea eax, [ebp - 0x210]
push str.dinput.dll
push eax
call fcn.00415fe0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402770
add esp, 0x14
test eax, eax
jl 0x402387
push ebx
mov cx, 0x2cc
mov ax, si
mov dx, 4
call fcn.0040280b
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00402824
add esp, 0x14
test eax, eax
jl 0x402387
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x40236d
mov dword [eax], esi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x402376
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x402380
mov byte [eax], 0x61
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00415fd0
lea eax, [ebp - 0x210]
push str.ddraw.dll
push eax
call fcn.00415fe0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402770
add esp, 0x14
test eax, eax
push 8
pop edi
jl 0x40244a
mov esi, dword [ebp - 4]
shr esi, 0x10
cmp si, 4
jne 0x4023f8
push ebx
mov cx, 0x190
mov ax, di
mov dx, si
call fcn.0040280b
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00402824
add esp, 0x14
test eax, eax
jge 0x402427
cmp si, 5
jne 0x40244a
push 0x8d2
mov cx, 0x190
mov ax, 1
mov dx, si
call fcn.0040280b
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00402824
add esp, 0x14
test eax, eax
jl 0x40244a
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402430
mov dword [eax], edi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x402439
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x402443
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00415fd0
lea eax, [ebp - 0x210]
push str.d3d8.dll
push eax
call fcn.00415fe0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402770
add esp, 0x14
test eax, eax
jl 0x402596
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 0x4024c4
push 1
mov cx, 0x371
mov ax, 8
mov dx, 4
call fcn.0040280b
push edx
push eax
push edi
push ebx
call fcn.00402824
add esp, 0x14
test eax, eax
jge 0x4024ed
cmp word [ebp - 0x10], 5
jne 0x402518
push esi
mov cx, 0x371
mov ax, 1
mov dx, 5
call fcn.0040280b
push edx
push eax
push edi
push ebx
call fcn.00402824
add esp, 0x14
test eax, eax
jl 0x402518
mov eax, dword [ebp + 8]
test eax, eax
je 0x4024fa
mov dword [eax], 8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x402507
mov dword [eax], 1
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x402511
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
cmp word [ebp - 0x10], 4
jne 0x402542
push 1
mov cx, 0x385
mov ax, 8
mov dx, 4
call fcn.0040280b
push edx
push eax
push edi
push ebx
call fcn.00402824
add esp, 0x14
test eax, eax
jge 0x40256b
cmp word [ebp - 0x10], 5
jne 0x402596
push esi
mov cx, 0x385
mov ax, 1
mov dx, 5
call fcn.0040280b
push edx
push eax
push edi
push ebx
call fcn.00402824
add esp, 0x14
test eax, eax
jl 0x402596
mov eax, dword [ebp + 8]
test eax, eax
je 0x402578
mov dword [eax], 8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x402585
mov dword [eax], 1
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40258f
mov byte [eax], 0x61
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00415fd0
lea eax, [ebp - 0x210]
push str.mpg2splt.ax
push eax
call fcn.00415fe0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402770
add esp, 0x14
test eax, eax
jl 0x40261c
xor esi, esi
inc esi
push esi
mov cx, 0x375
mov ax, 3
mov dx, 6
call fcn.0040280b
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00402824
add esp, 0x14
test eax, eax
jl 0x40261c
mov eax, dword [ebp + 8]
test eax, eax
je 0x402606
mov dword [eax], 8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40260f
mov dword [eax], esi
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x402619
mov byte [eax], 0x62
mov dword [ebp - 0xc], esi
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00415fd0
lea eax, [ebp - 0x210]
push str.dpnet.dll
push eax
call fcn.00415fe0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402770
add esp, 0x14
test eax, eax
push 9
pop ebx
jl 0x4026e7
mov esi, dword [ebp - 4]
push 4
shr esi, 0x10
pop edx
cmp si, dx
jne 0x40268d
push 0
mov cx, 0x86
mov ax, bx
call fcn.0040280b
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00402824
add esp, 0x14
test eax, eax
jge 0x4026bc
cmp si, 5
jne 0x4026e7
push 0xe5d
mov cx, 0x86
mov ax, 2
mov dx, si
call fcn.0040280b
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00402824
add esp, 0x14
test eax, eax
jl 0x4026e7
mov eax, dword [ebp + 8]
test eax, eax
je 0x4026c9
mov dword [eax], 8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4026d6
mov dword [eax], 2
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4026e0
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00415fd0
lea eax, [ebp - 0x210]
push str.d3d9.dll
push eax
call fcn.00415fe0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402770
add esp, 0x14
test eax, eax
pop edi
pop esi
jl 0x402747
mov eax, dword [ebp + 8]
test eax, eax
je 0x40272c
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x402736
and dword [eax], 0
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x402740
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], 0
jne 0x40276b
xor ebx, ebx
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402758
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x402761
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x40276b
mov byte [eax], 0x20
xor eax, eax
pop ebx
leave
ret