Function at 0x401fe4
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 0x402835
and byte [ebp - 0x30d], bl
push esi
push edi
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00416bf0
lea eax, [ebp - 0x210]
push str.ddraw.dll
push eax
call fcn.00416c00
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402856
add esp, 0x14
test eax, eax
push 4
pop esi
jl 0x402138
push ebx
mov cx, 0x5f
mov ax, 2
mov dx, si
call fcn.004028f1
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290a
add esp, 0x14
test eax, eax
jl 0x4020a4
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402088
mov dword [eax], 1
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x402091
mov dword [edi], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x40209b
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
jmp 0x4020a7
mov edi, dword [ebp + 0xc]
push ebx
mov cx, 0x448
mov ax, 3
mov dx, si
call fcn.004028f1
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290a
add esp, 0x14
test eax, eax
jl 0x4020f0
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4020d9
mov dword [eax], 2
cmp edi, ebx
je 0x4020df
mov dword [edi], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x4020e9
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
push ebx
mov cx, 0x44
mov ax, si
mov dx, si
call fcn.004028f1
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290a
add esp, 0x14
test eax, eax
jl 0x402138
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402121
mov dword [eax], 3
cmp edi, ebx
je 0x402127
mov dword [edi], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x402131
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00416bf0
lea eax, [ebp - 0x210]
push str.d3drg8x.dll
push eax
call fcn.00416c00
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402856
add esp, 0x14
test eax, eax
jl 0x4021bd
push ebx
mov cx, 0x46
mov ax, si
mov dx, si
call fcn.004028f1
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290a
add esp, 0x14
test eax, eax
jl 0x4021bd
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4021a3
mov dword [eax], 3
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x4021ac
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x4021b6
mov byte [eax], 0x61
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00416bf0
lea eax, [ebp - 0x210]
push str.ddraw.dll
push eax
call fcn.00416c00
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402856
add esp, 0x14
test eax, eax
push 5
pop edi
push 6
pop esi
jl 0x4022df
push ebx
mov cx, 0x9b
mov ax, di
mov dx, 4
call fcn.004028f1
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290a
add esp, 0x14
test eax, eax
jl 0x402249
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x40222f
mov dword [eax], edi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x402238
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x402242
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
push ebx
mov cx, 0x13e
mov ax, si
mov dx, 4
call fcn.004028f1
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290a
add esp, 0x14
test eax, eax
jl 0x402293
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402277
mov dword [eax], esi
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x402280
mov dword [edi], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x40228a
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
jmp 0x402296
mov edi, dword [ebp + 0xc]
push ebx
mov cx, 0x1b4
mov ax, si
mov dx, 4
call fcn.004028f1
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290a
add esp, 0x14
test eax, eax
jl 0x4022df
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4022c4
mov dword [eax], esi
cmp edi, ebx
je 0x4022ce
mov dword [edi], 1
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x4022d8
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00416bf0
lea eax, [ebp - 0x210]
push str.dplayx.dll
push eax
call fcn.00416c00
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402856
add esp, 0x14
test eax, eax
jl 0x402366
push 3
mov cx, 0x206
mov ax, si
mov dx, 4
call fcn.004028f1
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290a
add esp, 0x14
test eax, eax
jl 0x402366
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402348
mov dword [eax], esi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x402355
mov dword [eax], 1
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x40235f
mov byte [eax], 0x61
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00416bf0
lea eax, [ebp - 0x210]
push str.ddraw.dll
push eax
call fcn.00416c00
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402856
add esp, 0x14
test eax, eax
push 7
pop esi
jl 0x4023eb
push ebx
mov cx, 0x2bc
mov ax, si
mov dx, 4
call fcn.004028f1
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290a
add esp, 0x14
test eax, eax
jl 0x4023eb
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4023d1
mov dword [eax], esi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x4023da
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x4023e4
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00416bf0
lea eax, [ebp - 0x210]
push str.dinput.dll
push eax
call fcn.00416c00
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402856
add esp, 0x14
test eax, eax
jl 0x40246d
push ebx
mov cx, 0x2cc
mov ax, si
mov dx, 4
call fcn.004028f1
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290a
add esp, 0x14
test eax, eax
jl 0x40246d
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402453
mov dword [eax], esi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x40245c
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x402466
mov byte [eax], 0x61
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00416bf0
lea eax, [ebp - 0x210]
push str.ddraw.dll
push eax
call fcn.00416c00
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402856
add esp, 0x14
test eax, eax
push 8
pop edi
jl 0x402530
mov esi, dword [ebp - 4]
shr esi, 0x10
cmp si, 4
jne 0x4024de
push ebx
mov cx, 0x190
mov ax, di
mov dx, si
call fcn.004028f1
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290a
add esp, 0x14
test eax, eax
jge 0x40250d
cmp si, 5
jne 0x402530
push 0x8d2
mov cx, 0x190
mov ax, 1
mov dx, si
call fcn.004028f1
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290a
add esp, 0x14
test eax, eax
jl 0x402530
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402516
mov dword [eax], edi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x40251f
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x402529
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00416bf0
lea eax, [ebp - 0x210]
push str.d3d8.dll
push eax
call fcn.00416c00
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402856
add esp, 0x14
test eax, eax
jl 0x40267c
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 0x4025aa
push 1
mov cx, 0x371
mov ax, 8
mov dx, 4
call fcn.004028f1
push edx
push eax
push edi
push ebx
call fcn.0040290a
add esp, 0x14
test eax, eax
jge 0x4025d3
cmp word [ebp - 0x10], 5
jne 0x4025fe
push esi
mov cx, 0x371
mov ax, 1
mov dx, 5
call fcn.004028f1
push edx
push eax
push edi
push ebx
call fcn.0040290a
add esp, 0x14
test eax, eax
jl 0x4025fe
mov eax, dword [ebp + 8]
test eax, eax
je 0x4025e0
mov dword [eax], 8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4025ed
mov dword [eax], 1
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4025f7
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
cmp word [ebp - 0x10], 4
jne 0x402628
push 1
mov cx, 0x385
mov ax, 8
mov dx, 4
call fcn.004028f1
push edx
push eax
push edi
push ebx
call fcn.0040290a
add esp, 0x14
test eax, eax
jge 0x402651
cmp word [ebp - 0x10], 5
jne 0x40267c
push esi
mov cx, 0x385
mov ax, 1
mov dx, 5
call fcn.004028f1
push edx
push eax
push edi
push ebx
call fcn.0040290a
add esp, 0x14
test eax, eax
jl 0x40267c
mov eax, dword [ebp + 8]
test eax, eax
je 0x40265e
mov dword [eax], 8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40266b
mov dword [eax], 1
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x402675
mov byte [eax], 0x61
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00416bf0
lea eax, [ebp - 0x210]
push str.mpg2splt.ax
push eax
call fcn.00416c00
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402856
add esp, 0x14
test eax, eax
jl 0x402702
xor esi, esi
inc esi
push esi
mov cx, 0x375
mov ax, 3
mov dx, 6
call fcn.004028f1
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290a
add esp, 0x14
test eax, eax
jl 0x402702
mov eax, dword [ebp + 8]
test eax, eax
je 0x4026ec
mov dword [eax], 8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4026f5
mov dword [eax], esi
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4026ff
mov byte [eax], 0x62
mov dword [ebp - 0xc], esi
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00416bf0
lea eax, [ebp - 0x210]
push str.dpnet.dll
push eax
call fcn.00416c00
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402856
add esp, 0x14
test eax, eax
push 9
pop ebx
jl 0x4027cd
mov esi, dword [ebp - 4]
push 4
shr esi, 0x10
pop edx
cmp si, dx
jne 0x402773
push 0
mov cx, 0x86
mov ax, bx
call fcn.004028f1
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290a
add esp, 0x14
test eax, eax
jge 0x4027a2
cmp si, 5
jne 0x4027cd
push 0xe5d
mov cx, 0x86
mov ax, 2
mov dx, si
call fcn.004028f1
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290a
add esp, 0x14
test eax, eax
jl 0x4027cd
mov eax, dword [ebp + 8]
test eax, eax
je 0x4027af
mov dword [eax], 8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4027bc
mov dword [eax], 2
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4027c6
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00416bf0
lea eax, [ebp - 0x210]
push str.d3d9.dll
push eax
call fcn.00416c00
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.00402856
add esp, 0x14
test eax, eax
pop edi
pop esi
jl 0x40282d
mov eax, dword [ebp + 8]
test eax, eax
je 0x402812
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40281c
and dword [eax], 0
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x402826
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], 0
jne 0x402851
xor ebx, ebx
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x40283e
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x402847
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x402851
mov byte [eax], 0x20
xor eax, eax
pop ebx
leave
ret