Function at 0x401330
Capabilities:
Get common file path

Disassembly:
sub esp, 0x408
lea eax, [esp + 0x208]
push ebx
push ebp
push 0x104
push eax
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ebp, dword [esp + 0x414]
test eax, eax
je 0x401e63
push esi
push edi
lea edi, [esp + 0x218]
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x31b], bl
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x18]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ddraw.dll
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
push ecx
call fcn.00401ea0
add esp, 8
test eax, eax
jl 0x4014c7
push 0x5f
push ebx
push 2
push 4
call fcn.00401f60
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
push edx
push eax
call fcn.00401fa0
add esp, 0x20
test eax, eax
jl 0x40142a
test ebp, ebp
je 0x401404
mov dword [ebp], 1
mov esi, dword [esp + 0x420]
test esi, esi
je 0x401415
mov dword [esi], 0
mov edi, dword [esp + 0x424]
test edi, edi
je 0x401423
mov byte [edi], 0x20
mov ebx, 1
jmp 0x401438
mov edi, dword [esp + 0x424]
mov esi, dword [esp + 0x420]
push 0x448
push 0
push 3
push 4
call fcn.00401f60
mov ecx, dword [esp + 0x24]
push edx
mov edx, dword [esp + 0x24]
push eax
push ecx
push edx
call fcn.00401fa0
add esp, 0x20
test eax, eax
jl 0x401481
test ebp, ebp
je 0x40146b
mov dword [ebp], 2
test esi, esi
je 0x401475
mov dword [esi], 0
test edi, edi
je 0x40147c
mov byte [edi], 0x20
mov ebx, 1
push 0x44
push 0
push 4
push 4
call fcn.00401f60
mov ecx, dword [esp + 0x20]
push edx
push eax
mov eax, dword [esp + 0x2c]
push eax
push ecx
call fcn.00401fa0
add esp, 0x20
test eax, eax
jl 0x4014c7
test ebp, ebp
je 0x4014b1
mov dword [ebp], 3
test esi, esi
je 0x4014bb
mov dword [esi], 0
test edi, edi
je 0x4014c2
mov byte [edi], 0x20
mov ebx, 1
lea edi, [esp + 0x218]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.d3drg8x.dll
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
push ecx
call fcn.00401ea0
add esp, 8
test eax, eax
jl 0x401587
push 0x46
push 0
push 4
push 4
call fcn.00401f60
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
push edx
push eax
call fcn.00401fa0
add esp, 0x20
test eax, eax
jl 0x401587
test ebp, ebp
je 0x401563
mov dword [ebp], 3
mov eax, dword [esp + 0x420]
test eax, eax
je 0x401574
mov dword [eax], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x401582
mov byte [eax], 0x61
mov ebx, 1
lea edi, [esp + 0x218]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ddraw.dll
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
push ecx
call fcn.00401ea0
add esp, 8
test eax, eax
jl 0x4016f0
push 0x9b
push 0
push 5
push 4
call fcn.00401f60
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
push edx
push eax
call fcn.00401fa0
add esp, 0x20
test eax, eax
jl 0x401650
test ebp, ebp
je 0x40162a
mov dword [ebp], 5
mov esi, dword [esp + 0x420]
test esi, esi
je 0x40163b
mov dword [esi], 0
mov edi, dword [esp + 0x424]
test edi, edi
je 0x401649
mov byte [edi], 0x20
mov ebx, 1
jmp 0x40165e
mov edi, dword [esp + 0x424]
mov esi, dword [esp + 0x420]
push 0x13e
push 0
push 6
push 4
call fcn.00401f60
mov ecx, dword [esp + 0x24]
push edx
mov edx, dword [esp + 0x24]
push eax
push ecx
push edx
call fcn.00401fa0
add esp, 0x20
test eax, eax
jl 0x4016a7
test ebp, ebp
je 0x401691
mov dword [ebp], 6
test esi, esi
je 0x40169b
mov dword [esi], 0
test edi, edi
je 0x4016a2
mov byte [edi], 0x20
mov ebx, 1
push 0x1b4
push 0
push 6
push 4
call fcn.00401f60
mov ecx, dword [esp + 0x20]
push edx
push eax
mov eax, dword [esp + 0x2c]
push eax
push ecx
call fcn.00401fa0
add esp, 0x20
test eax, eax
jl 0x4016f0
test ebp, ebp
je 0x4016da
mov dword [ebp], 6
test esi, esi
je 0x4016e4
mov dword [esi], 1
test edi, edi
je 0x4016eb
mov byte [edi], 0x20
mov ebx, 1
lea edi, [esp + 0x218]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.dplayx.dll
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
push ecx
call fcn.00401ea0
add esp, 8
test eax, eax
jl 0x4017b3
push 0x206
push 3
push 6
push 4
call fcn.00401f60
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
push edx
push eax
call fcn.00401fa0
add esp, 0x20
test eax, eax
jl 0x4017b3
test ebp, ebp
je 0x40178f
mov dword [ebp], 6
mov eax, dword [esp + 0x420]
test eax, eax
je 0x4017a0
mov dword [eax], 1
mov eax, dword [esp + 0x424]
test eax, eax
je 0x4017ae
mov byte [eax], 0x61
mov ebx, 1
lea edi, [esp + 0x218]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ddraw.dll
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
push ecx
call fcn.00401ea0
add esp, 8
test eax, eax
jl 0x401876
push 0x2bc
push 0
push 7
push 4
call fcn.00401f60
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
push edx
push eax
call fcn.00401fa0
add esp, 0x20
test eax, eax
jl 0x401876
test ebp, ebp
je 0x401852
mov dword [ebp], 7
mov eax, dword [esp + 0x420]
test eax, eax
je 0x401863
mov dword [eax], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x401871
mov byte [eax], 0x20
mov ebx, 1
lea edi, [esp + 0x218]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.dinput.dll
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
push ecx
call fcn.00401ea0
add esp, 8
test eax, eax
jl 0x401939
push 0x2cc
push 0
push 7
push 4
call fcn.00401f60
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
push edx
push eax
call fcn.00401fa0
add esp, 0x20
test eax, eax
jl 0x401939
test ebp, ebp
je 0x401915
mov dword [ebp], 7
mov eax, dword [esp + 0x420]
test eax, eax
je 0x401926
mov dword [eax], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x401934
mov byte [eax], 0x61
mov ebx, 1
lea edi, [esp + 0x218]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ddraw.dll
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
push ecx
call fcn.00401ea0
add esp, 8
test eax, eax
jl 0x401a43
mov eax, dword [esp + 0x14]
mov edx, eax
shr edx, 0x10
cmp edx, 4
jne 0x4019e2
push 0x190
push 0
push 8
push edx
call fcn.00401f60
mov ecx, dword [esp + 0x20]
push edx
push eax
mov eax, dword [esp + 0x2c]
push eax
push ecx
call fcn.00401fa0
add esp, 0x20
test eax, eax
jge 0x401a14
mov eax, dword [esp + 0x14]
shr eax, 0x10
cmp eax, 5
jne 0x401a43
push 0x190
push 0x8d2
push 1
push eax
call fcn.00401f60
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
push edx
push eax
call fcn.00401fa0
add esp, 0x20
test eax, eax
jl 0x401a43
test ebp, ebp
je 0x401a1f
mov dword [ebp], 8
mov eax, dword [esp + 0x420]
test eax, eax
je 0x401a30
mov dword [eax], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x401a3e
mov byte [eax], 0x20
mov ebx, 1
lea edi, [esp + 0x218]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.d3d8.dll
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
push ecx
call fcn.00401ea0
add esp, 8
test eax, eax
jl 0x401bef
mov eax, dword [esp + 0x14]
mov edx, eax
shr edx, 0x10
cmp edx, 4
jne 0x401aec
push 0x371
push 1
push 8
push edx
call fcn.00401f60
mov ecx, dword [esp + 0x20]
push edx
push eax
mov eax, dword [esp + 0x2c]
push eax
push ecx
call fcn.00401fa0
add esp, 0x20
test eax, eax
jge 0x401b20
mov eax, dword [esp + 0x14]
mov edx, eax
shr edx, 0x10
cmp edx, 5
jne 0x401b59
push 0x371
push 0xa28
push 1
push edx
call fcn.00401f60
mov ecx, dword [esp + 0x20]
push edx
push eax
mov eax, dword [esp + 0x2c]
push eax
push ecx
call fcn.00401fa0
add esp, 0x20
test eax, eax
jl 0x401b55
test ebp, ebp
je 0x401b2b
mov dword [ebp], 8
mov esi, dword [esp + 0x420]
test esi, esi
je 0x401b3c
mov dword [esi], 1
mov edi, dword [esp + 0x424]
test edi, edi
je 0x401b4a
mov byte [edi], 0x20
mov eax, dword [esp + 0x14]
mov ebx, 1
jmp 0x401b67
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x424]
mov esi, dword [esp + 0x420]
mov edx, eax
shr edx, 0x10
cmp edx, 4
jne 0x401b9c
push 0x385
push 1
push 8
push edx
call fcn.00401f60
mov ecx, dword [esp + 0x20]
push edx
push eax
mov eax, dword [esp + 0x2c]
push eax
push ecx
call fcn.00401fa0
add esp, 0x20
test eax, eax
jge 0x401bce
mov eax, dword [esp + 0x14]
shr eax, 0x10
cmp eax, 5
jne 0x401bef
push 0x385
push 0xa28
push 1
push eax
call fcn.00401f60
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
push edx
push eax
call fcn.00401fa0
add esp, 0x20
test eax, eax
jl 0x401bef
test ebp, ebp
je 0x401bd9
mov dword [ebp], 8
test esi, esi
je 0x401be3
mov dword [esi], 1
test edi, edi
je 0x401bea
mov byte [edi], 0x61
mov ebx, 1
lea edi, [esp + 0x218]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.mpg2splt.ax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
push ecx
call fcn.00401ea0
add esp, 8
test eax, eax
jl 0x401cb2
push 0x375
push 1
push 3
push 6
call fcn.00401f60
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
push edx
push eax
call fcn.00401fa0
add esp, 0x20
test eax, eax
jl 0x401cb2
test ebp, ebp
je 0x401c8e
mov dword [ebp], 8
mov eax, dword [esp + 0x420]
test eax, eax
je 0x401c9f
mov dword [eax], 1
mov eax, dword [esp + 0x424]
test eax, eax
je 0x401cad
mov byte [eax], 0x62
mov ebx, 1
lea edi, [esp + 0x218]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.dpnet.dll
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
push ecx
call fcn.00401ea0
add esp, 8
test eax, eax
jl 0x401dbc
mov eax, dword [esp + 0x14]
mov edx, eax
shr edx, 0x10
cmp edx, 4
jne 0x401d5b
push 0x86
push 0
push 9
push edx
call fcn.00401f60
mov ecx, dword [esp + 0x20]
push edx
push eax
mov eax, dword [esp + 0x2c]
push eax
push ecx
call fcn.00401fa0
add esp, 0x20
test eax, eax
jge 0x401d8d
mov eax, dword [esp + 0x14]
shr eax, 0x10
cmp eax, 5
jne 0x401dbc
push 0x86
push 0xe5d
push 2
push eax
call fcn.00401f60
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
push edx
push eax
call fcn.00401fa0
add esp, 0x20
test eax, eax
jl 0x401dbc
test ebp, ebp
je 0x401d98
mov dword [ebp], 8
mov eax, dword [esp + 0x420]
test eax, eax
je 0x401da9
mov dword [eax], 2
mov eax, dword [esp + 0x424]
test eax, eax
je 0x401db7
mov byte [eax], 0x20
mov ebx, 1
lea edi, [esp + 0x218]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.d3d9.dll
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
push ecx
call fcn.00401ea0
add esp, 8
test eax, eax
pop edi
pop esi
jl 0x401e5f
test ebp, ebp
je 0x401e35
mov dword [ebp], 9
mov eax, dword [esp + 0x418]
test eax, eax
je 0x401e46
mov dword [eax], 0
mov eax, dword [esp + 0x41c]
test eax, eax
je 0x401e8d
mov byte [eax], 0x20
pop ebp
xor eax, eax
pop ebx
add esp, 0x408
ret
test ebx, ebx
jne 0x401e8d
test ebp, ebp
je 0x401e6e
mov dword [ebp], 0
mov eax, dword [esp + 0x418]
test eax, eax
je 0x401e7f
mov dword [eax], 0
mov eax, dword [esp + 0x41c]
test eax, eax
je 0x401e8d
mov byte [eax], 0x20
pop ebp
xor eax, eax
pop ebx
add esp, 0x408
ret