Function at 0x401fe8
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 0x402839
and byte [ebp - 0x30d], bl
push esi
push edi
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.004161d0
lea eax, [ebp - 0x210]
push str.ddraw.dll
push eax
call fcn.004161e0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040285a
add esp, 0x14
test eax, eax
push 4
pop esi
jl 0x40213c
push ebx
mov cx, 0x5f
mov ax, 2
mov dx, si
call fcn.004028f5
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290e
add esp, 0x14
test eax, eax
jl 0x4020a8
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x40208c
mov dword [eax], 1
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x402095
mov dword [edi], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x40209f
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
jmp 0x4020ab
mov edi, dword [ebp + 0xc]
push ebx
mov cx, 0x448
mov ax, 3
mov dx, si
call fcn.004028f5
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290e
add esp, 0x14
test eax, eax
jl 0x4020f4
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4020dd
mov dword [eax], 2
cmp edi, ebx
je 0x4020e3
mov dword [edi], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x4020ed
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
push ebx
mov cx, 0x44
mov ax, si
mov dx, si
call fcn.004028f5
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290e
add esp, 0x14
test eax, eax
jl 0x40213c
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402125
mov dword [eax], 3
cmp edi, ebx
je 0x40212b
mov dword [edi], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x402135
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.004161d0
lea eax, [ebp - 0x210]
push str.d3drg8x.dll
push eax
call fcn.004161e0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040285a
add esp, 0x14
test eax, eax
jl 0x4021c1
push ebx
mov cx, 0x46
mov ax, si
mov dx, si
call fcn.004028f5
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290e
add esp, 0x14
test eax, eax
jl 0x4021c1
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4021a7
mov dword [eax], 3
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x4021b0
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x4021ba
mov byte [eax], 0x61
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.004161d0
lea eax, [ebp - 0x210]
push str.ddraw.dll
push eax
call fcn.004161e0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040285a
add esp, 0x14
test eax, eax
push 5
pop edi
push 6
pop esi
jl 0x4022e3
push ebx
mov cx, 0x9b
mov ax, di
mov dx, 4
call fcn.004028f5
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290e
add esp, 0x14
test eax, eax
jl 0x40224d
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402233
mov dword [eax], edi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x40223c
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x402246
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
push ebx
mov cx, 0x13e
mov ax, si
mov dx, 4
call fcn.004028f5
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290e
add esp, 0x14
test eax, eax
jl 0x402297
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x40227b
mov dword [eax], esi
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x402284
mov dword [edi], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x40228e
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
jmp 0x40229a
mov edi, dword [ebp + 0xc]
push ebx
mov cx, 0x1b4
mov ax, si
mov dx, 4
call fcn.004028f5
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290e
add esp, 0x14
test eax, eax
jl 0x4022e3
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4022c8
mov dword [eax], esi
cmp edi, ebx
je 0x4022d2
mov dword [edi], 1
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x4022dc
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.004161d0
lea eax, [ebp - 0x210]
push str.dplayx.dll
push eax
call fcn.004161e0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040285a
add esp, 0x14
test eax, eax
jl 0x40236a
push 3
mov cx, 0x206
mov ax, si
mov dx, 4
call fcn.004028f5
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290e
add esp, 0x14
test eax, eax
jl 0x40236a
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x40234c
mov dword [eax], esi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x402359
mov dword [eax], 1
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x402363
mov byte [eax], 0x61
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.004161d0
lea eax, [ebp - 0x210]
push str.ddraw.dll
push eax
call fcn.004161e0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040285a
add esp, 0x14
test eax, eax
push 7
pop esi
jl 0x4023ef
push ebx
mov cx, 0x2bc
mov ax, si
mov dx, 4
call fcn.004028f5
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290e
add esp, 0x14
test eax, eax
jl 0x4023ef
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4023d5
mov dword [eax], esi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x4023de
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x4023e8
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.004161d0
lea eax, [ebp - 0x210]
push str.dinput.dll
push eax
call fcn.004161e0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040285a
add esp, 0x14
test eax, eax
jl 0x402471
push ebx
mov cx, 0x2cc
mov ax, si
mov dx, 4
call fcn.004028f5
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290e
add esp, 0x14
test eax, eax
jl 0x402471
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402457
mov dword [eax], esi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x402460
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x40246a
mov byte [eax], 0x61
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.004161d0
lea eax, [ebp - 0x210]
push str.ddraw.dll
push eax
call fcn.004161e0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040285a
add esp, 0x14
test eax, eax
push 8
pop edi
jl 0x402534
mov esi, dword [ebp - 4]
shr esi, 0x10
cmp si, 4
jne 0x4024e2
push ebx
mov cx, 0x190
mov ax, di
mov dx, si
call fcn.004028f5
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290e
add esp, 0x14
test eax, eax
jge 0x402511
cmp si, 5
jne 0x402534
push 0x8d2
mov cx, 0x190
mov ax, 1
mov dx, si
call fcn.004028f5
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290e
add esp, 0x14
test eax, eax
jl 0x402534
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x40251a
mov dword [eax], edi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x402523
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x40252d
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.004161d0
lea eax, [ebp - 0x210]
push str.d3d8.dll
push eax
call fcn.004161e0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040285a
add esp, 0x14
test eax, eax
jl 0x402680
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 0x4025ae
push 1
mov cx, 0x371
mov ax, 8
mov dx, 4
call fcn.004028f5
push edx
push eax
push edi
push ebx
call fcn.0040290e
add esp, 0x14
test eax, eax
jge 0x4025d7
cmp word [ebp - 0x10], 5
jne 0x402602
push esi
mov cx, 0x371
mov ax, 1
mov dx, 5
call fcn.004028f5
push edx
push eax
push edi
push ebx
call fcn.0040290e
add esp, 0x14
test eax, eax
jl 0x402602
mov eax, dword [ebp + 8]
test eax, eax
je 0x4025e4
mov dword [eax], 8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4025f1
mov dword [eax], 1
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4025fb
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
cmp word [ebp - 0x10], 4
jne 0x40262c
push 1
mov cx, 0x385
mov ax, 8
mov dx, 4
call fcn.004028f5
push edx
push eax
push edi
push ebx
call fcn.0040290e
add esp, 0x14
test eax, eax
jge 0x402655
cmp word [ebp - 0x10], 5
jne 0x402680
push esi
mov cx, 0x385
mov ax, 1
mov dx, 5
call fcn.004028f5
push edx
push eax
push edi
push ebx
call fcn.0040290e
add esp, 0x14
test eax, eax
jl 0x402680
mov eax, dword [ebp + 8]
test eax, eax
je 0x402662
mov dword [eax], 8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40266f
mov dword [eax], 1
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x402679
mov byte [eax], 0x61
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.004161d0
lea eax, [ebp - 0x210]
push str.mpg2splt.ax
push eax
call fcn.004161e0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040285a
add esp, 0x14
test eax, eax
jl 0x402706
xor esi, esi
inc esi
push esi
mov cx, 0x375
mov ax, 3
mov dx, 6
call fcn.004028f5
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290e
add esp, 0x14
test eax, eax
jl 0x402706
mov eax, dword [ebp + 8]
test eax, eax
je 0x4026f0
mov dword [eax], 8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4026f9
mov dword [eax], esi
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x402703
mov byte [eax], 0x62
mov dword [ebp - 0xc], esi
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.004161d0
lea eax, [ebp - 0x210]
push str.dpnet.dll
push eax
call fcn.004161e0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040285a
add esp, 0x14
test eax, eax
push 9
pop ebx
jl 0x4027d1
mov esi, dword [ebp - 4]
push 4
shr esi, 0x10
pop edx
cmp si, dx
jne 0x402777
push 0
mov cx, 0x86
mov ax, bx
call fcn.004028f5
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290e
add esp, 0x14
test eax, eax
jge 0x4027a6
cmp si, 5
jne 0x4027d1
push 0xe5d
mov cx, 0x86
mov ax, 2
mov dx, si
call fcn.004028f5
push edx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0040290e
add esp, 0x14
test eax, eax
jl 0x4027d1
mov eax, dword [ebp + 8]
test eax, eax
je 0x4027b3
mov dword [eax], 8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4027c0
mov dword [eax], 2
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4027ca
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.004161d0
lea eax, [ebp - 0x210]
push str.d3d9.dll
push eax
call fcn.004161e0
lea eax, [ebp - 0x210]
push eax
lea edi, [ebp - 8]
call fcn.0040285a
add esp, 0x14
test eax, eax
pop edi
pop esi
jl 0x402831
mov eax, dword [ebp + 8]
test eax, eax
je 0x402816
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x402820
and dword [eax], 0
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40282a
mov byte [eax], 0x20
mov dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], 0
jne 0x402855
xor ebx, ebx
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x402842
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x40284b
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x402855
mov byte [eax], 0x20
xor eax, eax
pop ebx
leave
ret