Function at 0x536460
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 0x536d90
mov byte [esp + 0x313], bl
xor eax, eax
jmp 0x5364a0
mov cl, byte [esp + eax + 0x210]
mov byte [esp + eax + 0x10], cl
inc eax
test cl, cl
jne 0x5364a0
push edi
lea edi, [esp + 0x14]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x5364b6
mov ecx, dword [str.ddraw.dll]
mov edx, dword [0x6b389c]
mov ax, word [0x6b38a0]
mov dword [edi], ecx
mov cl, byte [0x6b38a2]
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.00536360
add esp, 8
test eax, eax
jl 0x5365d6
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov eax, 0x40002
cmp edx, eax
mov ecx, 0x5f
ja 0x53651b
jb 0x53654c
cmp esi, ecx
ja 0x53651b
jb 0x53654c
test ebp, ebp
je 0x536526
mov dword [ebp], 1
mov edi, dword [esp + 0x420]
test edi, edi
je 0x536537
mov dword [edi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x536545
mov byte [eax], 0x20
mov ebx, 1
jmp 0x536553
mov edi, dword [esp + 0x420]
mov eax, 0x40003
cmp edx, eax
mov ecx, 0x448
ja 0x536569
jb 0x536591
cmp esi, ecx
ja 0x536569
jb 0x536591
test ebp, ebp
je 0x536574
mov dword [ebp], 2
test edi, edi
je 0x53657e
mov dword [edi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x53658c
mov byte [eax], 0x20
mov ebx, 1
mov eax, 0x40004
cmp edx, eax
mov ecx, 0x44
ja 0x5365ae
jb 0x5365d6
cmp esi, ecx
ja 0x5365a7
jb 0x5365d6
mov edi, dword [esp + 0x420]
test ebp, ebp
je 0x5365b9
mov dword [ebp], 3
test edi, edi
je 0x5365c3
mov dword [edi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x5365d1
mov byte [eax], 0x20
mov ebx, 1
xor eax, eax
jmp 0x5365e0
mov cl, byte [esp + eax + 0x218]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x5365e0
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x5365f5
mov ecx, dword [str.d3drg8x.dll]
mov edx, dword [0x6b388c]
mov eax, dword [0x6b3890]
mov dword [edi], ecx
mov cl, byte [0x6b3894]
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.00536360
add esp, 8
test eax, eax
jl 0x536682
mov edx, dword [esp + 0x14]
mov eax, 0x40004
cmp edx, eax
mov ecx, 0x46
ja 0x536653
jb 0x536682
mov eax, dword [esp + 0x10]
cmp eax, ecx
ja 0x536653
jb 0x536682
test ebp, ebp
je 0x53665e
mov dword [ebp], 3
mov eax, dword [esp + 0x420]
test eax, eax
je 0x53666f
mov dword [eax], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x53667d
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 0x536684
lea edi, [esp + 0x18]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x5366a0
mov ecx, dword [str.ddraw.dll]
mov edx, dword [0x6b389c]
mov ax, word [0x6b38a0]
mov dword [edi], ecx
mov cl, byte [0x6b38a2]
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.00536360
add esp, 8
test eax, eax
jl 0x5367bf
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov eax, 0x40005
cmp edx, eax
mov ecx, 0x9b
ja 0x536704
jb 0x536735
cmp esi, ecx
ja 0x536704
jb 0x536735
test ebp, ebp
je 0x53670f
mov dword [ebp], 5
mov edi, dword [esp + 0x420]
test edi, edi
je 0x536720
mov dword [edi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x53672e
mov byte [eax], 0x20
mov ebx, 1
jmp 0x53673c
mov edi, dword [esp + 0x420]
mov eax, 0x40006
cmp edx, eax
mov ecx, 0x13e
ja 0x536752
jb 0x53677a
cmp esi, ecx
ja 0x536752
jb 0x53677a
test ebp, ebp
je 0x53675d
mov dword [ebp], 6
test edi, edi
je 0x536767
mov dword [edi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x536775
mov byte [eax], 0x20
mov ebx, 1
mov eax, 0x40006
cmp edx, eax
mov ecx, 0x1b4
ja 0x536797
jb 0x5367bf
cmp esi, ecx
ja 0x536790
jb 0x5367bf
mov edi, dword [esp + 0x420]
test ebp, ebp
je 0x5367a2
mov dword [ebp], 6
test edi, edi
je 0x5367ac
mov dword [edi], 1
mov eax, dword [esp + 0x424]
test eax, eax
je 0x5367ba
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 0x5367c1
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x5367d6
mov ecx, dword [str.dplayx.dll]
mov edx, dword [0x6b3880]
mov eax, dword [0x6b3884]
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.00536360
add esp, 8
test eax, eax
jl 0x53685c
mov edx, dword [esp + 0x14]
mov eax, 0x40006
cmp edx, eax
mov ecx, 0x30206
ja 0x53682b
jb 0x53685c
mov eax, dword [esp + 0x10]
cmp eax, ecx
ja 0x53682b
jb 0x53685c
test ebp, ebp
je 0x536836
mov dword [ebp], 6
mov esi, dword [esp + 0x420]
test esi, esi
je 0x536847
mov dword [esi], 1
mov eax, dword [esp + 0x424]
test eax, eax
je 0x536855
mov byte [eax], 0x61
mov ebx, 1
jmp 0x536863
mov esi, dword [esp + 0x420]
xor eax, eax
jmp 0x536870
mov cl, byte [esp + eax + 0x218]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x536870
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x536885
mov eax, dword [str.ddraw.dll]
mov ecx, dword [0x6b389c]
mov dx, word [0x6b38a0]
mov dword [edi], eax
mov al, byte [0x6b38a2]
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.00536360
add esp, 8
test eax, eax
jl 0x53690c
mov edx, dword [esp + 0x14]
mov eax, 0x40007
cmp edx, eax
mov ecx, 0x2bc
ja 0x5368e4
jb 0x53690c
mov eax, dword [esp + 0x10]
cmp eax, ecx
ja 0x5368e4
jb 0x53690c
test ebp, ebp
je 0x5368ef
mov dword [ebp], 7
test esi, esi
je 0x5368f9
mov dword [esi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x536907
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 0x536910
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x536925
mov eax, dword [str.dinput.dll]
mov ecx, dword [0x6b3874]
mov edx, dword [0x6b3878]
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.00536360
add esp, 8
test eax, eax
jl 0x5369a2
mov edx, dword [esp + 0x14]
mov eax, 0x40007
cmp edx, eax
mov ecx, 0x2cc
ja 0x53697a
jb 0x5369a2
mov eax, dword [esp + 0x10]
cmp eax, ecx
ja 0x53697a
jb 0x5369a2
test ebp, ebp
je 0x536985
mov dword [ebp], 7
test esi, esi
je 0x53698f
mov dword [esi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x53699d
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 0x5369a4
lea edi, [esp + 0x18]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x5369c0
mov edx, dword [str.ddraw.dll]
mov eax, dword [0x6b389c]
mov cx, word [0x6b38a0]
mov dword [edi], edx
mov dl, byte [0x6b38a2]
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.00536360
add esp, 8
test eax, eax
jl 0x536a78
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov esi, ecx
shr esi, 0x10
cmp si, 4
jne 0x536a29
mov eax, 0x40008
cmp ecx, eax
mov edx, 0x190
ja 0x536a49
jb 0x536a29
cmp edi, edx
jae 0x536a49
cmp si, 5
jne 0x536a78
mov eax, 0x50001
push eax
mov edx, 0x8d20190
push edx
push ecx
push edi
call fcn.00536430
add esp, 0x10
test eax, eax
jl 0x536a78
test ebp, ebp
je 0x536a54
mov dword [ebp], 8
mov eax, dword [esp + 0x420]
test eax, eax
je 0x536a65
mov dword [eax], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x536a73
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 0x536a80
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x536a95
mov edx, dword [str.d3d8.dll]
mov eax, dword [0x6b3868]
mov cx, word [0x6b386c]
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.00536360
add esp, 8
test eax, eax
jl 0x536bb1
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov edi, edx
shr edi, 0x10
cmp di, 4
jne 0x536af9
mov eax, 0x40008
cmp edx, eax
mov ecx, 0x10371
ja 0x536b19
jb 0x536af9
cmp esi, ecx
jae 0x536b19
cmp di, 5
jne 0x536b48
mov eax, 0x50001
push eax
mov ecx, 0xa280371
push ecx
push edx
push esi
call fcn.00536430
add esp, 0x10
test eax, eax
jl 0x536b48
test ebp, ebp
je 0x536b24
mov dword [ebp], 8
mov eax, dword [esp + 0x420]
test eax, eax
je 0x536b35
mov dword [eax], 1
mov eax, dword [esp + 0x424]
test eax, eax
je 0x536b43
mov byte [eax], 0x20
mov ebx, 1
cmp di, 4
jne 0x536b62
mov eax, 0x40008
cmp edx, eax
mov ecx, 0x10385
ja 0x536b82
jb 0x536b62
cmp esi, ecx
jae 0x536b82
cmp di, 5
jne 0x536bb1
mov eax, 0x50001
push eax
mov ecx, 0xa280385
push ecx
push edx
push esi
call fcn.00536430
add esp, 0x10
test eax, eax
jl 0x536bb1
test ebp, ebp
je 0x536b8d
mov dword [ebp], 8
mov eax, dword [esp + 0x420]
test eax, eax
je 0x536b9e
mov dword [eax], 1
mov eax, dword [esp + 0x424]
test eax, eax
je 0x536bac
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 0x536bb3
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x536bc8
mov ecx, dword [str.mpg2splt.ax]
mov edx, dword [0x6b3858]
mov eax, dword [0x6b385c]
mov dword [edi], ecx
mov cl, byte [0x6b3860]
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.00536360
add esp, 8
test eax, eax
jl 0x536c55
mov edx, dword [esp + 0x14]
mov eax, 0x60003
cmp edx, eax
mov ecx, 0x10375
ja 0x536c26
jb 0x536c55
mov eax, dword [esp + 0x10]
cmp eax, ecx
ja 0x536c26
jb 0x536c55
test ebp, ebp
je 0x536c31
mov dword [ebp], 8
mov eax, dword [esp + 0x420]
test eax, eax
je 0x536c42
mov dword [eax], 1
mov eax, dword [esp + 0x424]
test eax, eax
je 0x536c50
mov byte [eax], 0x62
mov ebx, 1
xor eax, eax
jmp 0x536c60
mov cl, byte [esp + eax + 0x218]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x536c60
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x536c75
mov ecx, dword [str.dpnet.dll]
mov edx, dword [0x6b384c]
mov ax, word [0x6b3850]
mov dword [edi], ecx
mov cl, byte [0x6b3852]
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.00536360
add esp, 8
test eax, eax
jl 0x536d2d
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov esi, ecx
shr esi, 0x10
cmp si, 4
jne 0x536cde
mov eax, 0x40009
cmp ecx, eax
mov edx, 0x86
ja 0x536cfe
jb 0x536cde
cmp edi, edx
jae 0x536cfe
cmp si, 5
jne 0x536d2d
mov eax, 0x50002
push eax
mov edx, 0xe5d0086
push edx
push ecx
push edi
call fcn.00536430
add esp, 0x10
test eax, eax
jl 0x536d2d
test ebp, ebp
je 0x536d09
mov dword [ebp], 8
mov eax, dword [esp + 0x420]
test eax, eax
je 0x536d1a
mov dword [eax], 2
mov eax, dword [esp + 0x424]
test eax, eax
je 0x536d28
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 0x536d30
lea edi, [esp + 0x14]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x536d45
mov ecx, dword [0x6b383c]
mov edx, dword [0x6b3840]
mov ax, word [0x6b3844]
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.00536360
add esp, 8
test eax, eax
pop edi
jl 0x536d8c
test ebp, ebp
je 0x536d9b
mov dword [ebp], 9
jmp 0x536d9b
test ebx, ebx
jne 0x536dba
test ebp, ebp
je 0x536d9b
mov dword [ebp], 0
mov eax, dword [esp + 0x418]
test eax, eax
je 0x536dac
mov dword [eax], 0
mov eax, dword [esp + 0x41c]
test eax, eax
je 0x536dba
mov byte [eax], 0x20
pop ebp
xor eax, eax
pop ebx
add esp, 0x408
ret