Function at 0x5472c0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x408
push ebx
push ebp
push 0x104
lea eax, [esp + 0x214]
push eax
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
mov ebp, dword [esp + 0x414]
je 0x547bf0
mov byte [esp + 0x313], bl
xor eax, eax
jmp 0x547300
mov cl, byte [esp + eax + 0x210]
mov byte [esp + eax + 0x10], cl
inc eax
test cl, cl
jne 0x547300
push edi
lea edi, [esp + 0x14]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x547316
mov ecx, dword [str.ddraw.dll]
mov edx, dword [0x6c875c]
mov ax, word [0x6c8760]
mov dword [edi], ecx
mov cl, byte [0x6c8762]
mov dword [edi + 4], edx
push esi
mov word [edi + 8], ax
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x1c]
push eax
mov byte [edi + 0xa], cl
call fcn.005471c0
add esp, 8
test eax, eax
jl 0x547436
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov eax, 0x40002
cmp edx, eax
mov ecx, 0x5f
ja 0x54737b
jb 0x5473ac
cmp esi, ecx
ja 0x54737b
jb 0x5473ac
test ebp, ebp
je 0x547386
mov dword [ebp], 1
mov edi, dword [esp + 0x420]
test edi, edi
je 0x547397
mov dword [edi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x5473a5
mov byte [eax], 0x20
mov ebx, 1
jmp 0x5473b3
mov edi, dword [esp + 0x420]
mov eax, 0x40003
cmp edx, eax
mov ecx, 0x448
ja 0x5473c9
jb 0x5473f1
cmp esi, ecx
ja 0x5473c9
jb 0x5473f1
test ebp, ebp
je 0x5473d4
mov dword [ebp], 2
test edi, edi
je 0x5473de
mov dword [edi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x5473ec
mov byte [eax], 0x20
mov ebx, 1
mov eax, 0x40004
cmp edx, eax
mov ecx, 0x44
ja 0x54740e
jb 0x547436
cmp esi, ecx
ja 0x547407
jb 0x547436
mov edi, dword [esp + 0x420]
test ebp, ebp
je 0x547419
mov dword [ebp], 3
test edi, edi
je 0x547423
mov dword [edi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x547431
mov byte [eax], 0x20
mov ebx, 1
xor eax, eax
jmp 0x547440
mov cl, byte [esp + eax + 0x218]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x547440
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x547455
mov ecx, dword [str.d3drg8x.dll]
mov edx, dword [0x6c874c]
mov eax, dword [0x6c8750]
mov dword [edi], ecx
mov cl, byte [0x6c8754]
mov dword [edi + 4], edx
mov dword [edi + 8], eax
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x1c]
push eax
mov byte [edi + 0xc], cl
call fcn.005471c0
add esp, 8
test eax, eax
jl 0x5474e2
mov edx, dword [esp + 0x14]
mov eax, 0x40004
cmp edx, eax
mov ecx, 0x46
ja 0x5474b3
jb 0x5474e2
mov eax, dword [esp + 0x10]
cmp eax, ecx
ja 0x5474b3
jb 0x5474e2
test ebp, ebp
je 0x5474be
mov dword [ebp], 3
mov eax, dword [esp + 0x420]
test eax, eax
je 0x5474cf
mov dword [eax], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x5474dd
mov byte [eax], 0x61
mov ebx, 1
xor eax, eax
mov cl, byte [esp + eax + 0x218]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x5474e4
lea edi, [esp + 0x18]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x547500
mov ecx, dword [str.ddraw.dll]
mov edx, dword [0x6c875c]
mov ax, word [0x6c8760]
mov dword [edi], ecx
mov cl, byte [0x6c8762]
mov dword [edi + 4], edx
mov word [edi + 8], ax
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x1c]
push eax
mov byte [edi + 0xa], cl
call fcn.005471c0
add esp, 8
test eax, eax
jl 0x54761f
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov eax, 0x40005
cmp edx, eax
mov ecx, 0x9b
ja 0x547564
jb 0x547595
cmp esi, ecx
ja 0x547564
jb 0x547595
test ebp, ebp
je 0x54756f
mov dword [ebp], 5
mov edi, dword [esp + 0x420]
test edi, edi
je 0x547580
mov dword [edi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x54758e
mov byte [eax], 0x20
mov ebx, 1
jmp 0x54759c
mov edi, dword [esp + 0x420]
mov eax, 0x40006
cmp edx, eax
mov ecx, 0x13e
ja 0x5475b2
jb 0x5475da
cmp esi, ecx
ja 0x5475b2
jb 0x5475da
test ebp, ebp
je 0x5475bd
mov dword [ebp], 6
test edi, edi
je 0x5475c7
mov dword [edi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x5475d5
mov byte [eax], 0x20
mov ebx, 1
mov eax, 0x40006
cmp edx, eax
mov ecx, 0x1b4
ja 0x5475f7
jb 0x54761f
cmp esi, ecx
ja 0x5475f0
jb 0x54761f
mov edi, dword [esp + 0x420]
test ebp, ebp
je 0x547602
mov dword [ebp], 6
test edi, edi
je 0x54760c
mov dword [edi], 1
mov eax, dword [esp + 0x424]
test eax, eax
je 0x54761a
mov byte [eax], 0x20
mov ebx, 1
xor eax, eax
mov cl, byte [esp + eax + 0x218]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x547621
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x547636
mov ecx, dword [str.dplayx.dll]
mov edx, dword [0x6c8740]
mov eax, dword [0x6c8744]
mov dword [edi], ecx
mov dword [edi + 4], edx
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x1c]
push edx
mov dword [edi + 8], eax
call fcn.005471c0
add esp, 8
test eax, eax
jl 0x5476bc
mov edx, dword [esp + 0x14]
mov eax, 0x40006
cmp edx, eax
mov ecx, 0x30206
ja 0x54768b
jb 0x5476bc
mov eax, dword [esp + 0x10]
cmp eax, ecx
ja 0x54768b
jb 0x5476bc
test ebp, ebp
je 0x547696
mov dword [ebp], 6
mov esi, dword [esp + 0x420]
test esi, esi
je 0x5476a7
mov dword [esi], 1
mov eax, dword [esp + 0x424]
test eax, eax
je 0x5476b5
mov byte [eax], 0x61
mov ebx, 1
jmp 0x5476c3
mov esi, dword [esp + 0x420]
xor eax, eax
jmp 0x5476d0
mov cl, byte [esp + eax + 0x218]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x5476d0
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x5476e5
mov eax, dword [str.ddraw.dll]
mov ecx, dword [0x6c875c]
mov dx, word [0x6c8760]
mov dword [edi], eax
mov al, byte [0x6c8762]
mov dword [edi + 4], ecx
mov word [edi + 8], dx
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x1c]
push edx
mov byte [edi + 0xa], al
call fcn.005471c0
add esp, 8
test eax, eax
jl 0x54776c
mov edx, dword [esp + 0x14]
mov eax, 0x40007
cmp edx, eax
mov ecx, 0x2bc
ja 0x547744
jb 0x54776c
mov eax, dword [esp + 0x10]
cmp eax, ecx
ja 0x547744
jb 0x54776c
test ebp, ebp
je 0x54774f
mov dword [ebp], 7
test esi, esi
je 0x547759
mov dword [esi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x547767
mov byte [eax], 0x20
mov ebx, 1
xor eax, eax
mov edi, edi
mov cl, byte [esp + eax + 0x218]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x547770
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x547785
mov eax, dword [str.dinput.dll]
mov ecx, dword [0x6c8734]
mov edx, dword [0x6c8738]
mov dword [edi], eax
mov dword [edi + 4], ecx
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov dword [edi + 8], edx
call fcn.005471c0
add esp, 8
test eax, eax
jl 0x547802
mov edx, dword [esp + 0x14]
mov eax, 0x40007
cmp edx, eax
mov ecx, 0x2cc
ja 0x5477da
jb 0x547802
mov eax, dword [esp + 0x10]
cmp eax, ecx
ja 0x5477da
jb 0x547802
test ebp, ebp
je 0x5477e5
mov dword [ebp], 7
test esi, esi
je 0x5477ef
mov dword [esi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x5477fd
mov byte [eax], 0x61
mov ebx, 1
xor eax, eax
mov cl, byte [esp + eax + 0x218]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x547804
lea edi, [esp + 0x18]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x547820
mov edx, dword [str.ddraw.dll]
mov eax, dword [0x6c875c]
mov cx, word [0x6c8760]
mov dword [edi], edx
mov dl, byte [0x6c8762]
mov dword [edi + 4], eax
mov word [edi + 8], cx
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov byte [edi + 0xa], dl
call fcn.005471c0
add esp, 8
test eax, eax
jl 0x5478d8
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov esi, ecx
shr esi, 0x10
cmp si, 4
jne 0x547889
mov eax, 0x40008
cmp ecx, eax
mov edx, 0x190
ja 0x5478a9
jb 0x547889
cmp edi, edx
jae 0x5478a9
cmp si, 5
jne 0x5478d8
mov eax, 0x50001
push eax
mov edx, 0x8d20190
push edx
push ecx
push edi
call fcn.00547290
add esp, 0x10
test eax, eax
jl 0x5478d8
test ebp, ebp
je 0x5478b4
mov dword [ebp], 8
mov eax, dword [esp + 0x420]
test eax, eax
je 0x5478c5
mov dword [eax], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x5478d3
mov byte [eax], 0x20
mov ebx, 1
xor eax, eax
lea ebx, [ebx]
mov cl, byte [esp + eax + 0x218]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x5478e0
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x5478f5
mov edx, dword [str.d3d8.dll]
mov eax, dword [0x6c8728]
mov cx, word [0x6c872c]
mov dword [edi], edx
mov dword [edi + 4], eax
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x1c]
push eax
mov word [edi + 8], cx
call fcn.005471c0
add esp, 8
test eax, eax
jl 0x547a11
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov edi, edx
shr edi, 0x10
cmp di, 4
jne 0x547959
mov eax, 0x40008
cmp edx, eax
mov ecx, 0x10371
ja 0x547979
jb 0x547959
cmp esi, ecx
jae 0x547979
cmp di, 5
jne 0x5479a8
mov eax, 0x50001
push eax
mov ecx, 0xa280371
push ecx
push edx
push esi
call fcn.00547290
add esp, 0x10
test eax, eax
jl 0x5479a8
test ebp, ebp
je 0x547984
mov dword [ebp], 8
mov eax, dword [esp + 0x420]
test eax, eax
je 0x547995
mov dword [eax], 1
mov eax, dword [esp + 0x424]
test eax, eax
je 0x5479a3
mov byte [eax], 0x20
mov ebx, 1
cmp di, 4
jne 0x5479c2
mov eax, 0x40008
cmp edx, eax
mov ecx, 0x10385
ja 0x5479e2
jb 0x5479c2
cmp esi, ecx
jae 0x5479e2
cmp di, 5
jne 0x547a11
mov eax, 0x50001
push eax
mov ecx, 0xa280385
push ecx
push edx
push esi
call fcn.00547290
add esp, 0x10
test eax, eax
jl 0x547a11
test ebp, ebp
je 0x5479ed
mov dword [ebp], 8
mov eax, dword [esp + 0x420]
test eax, eax
je 0x5479fe
mov dword [eax], 1
mov eax, dword [esp + 0x424]
test eax, eax
je 0x547a0c
mov byte [eax], 0x61
mov ebx, 1
xor eax, eax
mov cl, byte [esp + eax + 0x218]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x547a13
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x547a28
mov ecx, dword [str.mpg2splt.ax]
mov edx, dword [0x6c8718]
mov eax, dword [0x6c871c]
mov dword [edi], ecx
mov cl, byte [0x6c8720]
mov dword [edi + 4], edx
mov dword [edi + 8], eax
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x1c]
push eax
mov byte [edi + 0xc], cl
call fcn.005471c0
add esp, 8
test eax, eax
jl 0x547ab5
mov edx, dword [esp + 0x14]
mov eax, 0x60003
cmp edx, eax
mov ecx, 0x10375
ja 0x547a86
jb 0x547ab5
mov eax, dword [esp + 0x10]
cmp eax, ecx
ja 0x547a86
jb 0x547ab5
test ebp, ebp
je 0x547a91
mov dword [ebp], 8
mov eax, dword [esp + 0x420]
test eax, eax
je 0x547aa2
mov dword [eax], 1
mov eax, dword [esp + 0x424]
test eax, eax
je 0x547ab0
mov byte [eax], 0x62
mov ebx, 1
xor eax, eax
jmp 0x547ac0
mov cl, byte [esp + eax + 0x218]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x547ac0
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x547ad5
mov ecx, dword [str.dpnet.dll]
mov edx, dword [0x6c870c]
mov ax, word [0x6c8710]
mov dword [edi], ecx
mov cl, byte [0x6c8712]
mov dword [edi + 4], edx
mov word [edi + 8], ax
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x1c]
push eax
mov byte [edi + 0xa], cl
call fcn.005471c0
add esp, 8
test eax, eax
jl 0x547b8d
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov esi, ecx
shr esi, 0x10
cmp si, 4
jne 0x547b3e
mov eax, 0x40009
cmp ecx, eax
mov edx, 0x86
ja 0x547b5e
jb 0x547b3e
cmp edi, edx
jae 0x547b5e
cmp si, 5
jne 0x547b8d
mov eax, 0x50002
push eax
mov edx, 0xe5d0086
push edx
push ecx
push edi
call fcn.00547290
add esp, 0x10
test eax, eax
jl 0x547b8d
test ebp, ebp
je 0x547b69
mov dword [ebp], 8
mov eax, dword [esp + 0x420]
test eax, eax
je 0x547b7a
mov dword [eax], 2
mov eax, dword [esp + 0x424]
test eax, eax
je 0x547b88
mov byte [eax], 0x20
mov ebx, 1
xor eax, eax
pop esi
mov cl, byte [esp + eax + 0x214]
mov byte [esp + eax + 0x14], cl
inc eax
test cl, cl
jne 0x547b90
lea edi, [esp + 0x14]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x547ba5
mov ecx, dword [0x6c86fc]
mov edx, dword [0x6c8700]
mov ax, word [0x6c8704]
mov dword [edi], ecx
mov dword [edi + 4], edx
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x18]
push edx
mov word [edi + 8], ax
call fcn.005471c0
add esp, 8
test eax, eax
pop edi
jl 0x547bec
test ebp, ebp
je 0x547bfb
mov dword [ebp], 9
jmp 0x547bfb
test ebx, ebx
jne 0x547c1a
test ebp, ebp
je 0x547bfb
mov dword [ebp], 0
mov eax, dword [esp + 0x418]
test eax, eax
je 0x547c0c
mov dword [eax], 0
mov eax, dword [esp + 0x41c]
test eax, eax
je 0x547c1a
mov byte [eax], 0x20
pop ebp
xor eax, eax
pop ebx
add esp, 0x408
ret