Function at 0x475090
Capabilities:
Get common file path

Disassembly:
sub esp, 0x418
mov eax, dword [0x60bd28]
xor eax, esp
mov dword [esp + 0x414], eax
mov eax, dword [esp + 0x420]
mov ecx, dword [esp + 0x424]
push ebx
mov ebx, dword [esp + 0x420]
push ebp
push 0x104
lea edx, [esp + 0x220]
push edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x475b14
mov byte [esp + 0x31f], 0
xor eax, eax
mov edi, edi
mov cl, byte [esp + eax + 0x21c]
mov byte [esp + eax + 0x1c], cl
add eax, 1
test cl, cl
jne 0x4750f0
lea eax, [esp + 0x1c]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x475110
mov ecx, dword [str.ddraw.dll]
mov edx, dword [0x5a2050]
mov dword [eax], ecx
mov cx, word [0x5a2054]
mov dword [eax + 4], edx
mov dl, byte [0x5a2056]
mov word [eax + 8], cx
push esi
mov byte [eax + 0xa], dl
push edi
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00474d50
add esp, 8
test eax, eax
jl 0x475231
push 0x5f
push 0
push 2
push 4
call fcn.00474e20
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
push edx
push eax
push esi
push edi
call fcn.00474e40
add esp, 0x20
test eax, eax
jl 0x4751a4
test ebx, ebx
je 0x47518a
mov dword [ebx], 1
mov eax, dword [esp + 0x14]
test eax, eax
je 0x475194
mov dword [eax], ebp
mov eax, dword [esp + 0x10]
test eax, eax
je 0x47519f
mov byte [eax], 0x20
mov ebp, 1
push 0x448
push 0
push 3
push 4
call fcn.00474e20
push edx
push eax
push esi
push edi
call fcn.00474e40
add esp, 0x20
test eax, eax
jl 0x4751ec
test ebx, ebx
je 0x4751ce
mov dword [ebx], 2
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4751dc
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4751e7
mov byte [eax], 0x20
mov ebp, 1
push 0x44
push 0
push 4
push 4
call fcn.00474e20
push edx
push eax
push esi
push edi
call fcn.00474e40
add esp, 0x20
test eax, eax
jl 0x475231
test ebx, ebx
je 0x475213
mov dword [ebx], 3
mov eax, dword [esp + 0x14]
test eax, eax
je 0x475221
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x47522c
mov byte [eax], 0x20
mov ebp, 1
xor eax, eax
jmp 0x475240
mov cl, byte [esp + eax + 0x224]
mov byte [esp + eax + 0x24], cl
add eax, 1
test cl, cl
jne 0x475240
lea eax, [esp + 0x24]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x475260
mov edx, dword [str.d3drg8x.dll]
mov ecx, dword [0x5a2040]
mov dword [eax], edx
mov edx, dword [0x5a2044]
mov dword [eax + 4], ecx
mov cl, byte [0x5a2048]
mov dword [eax + 8], edx
lea edx, [esp + 0x18]
mov byte [eax + 0xc], cl
push edx
lea eax, [esp + 0x28]
push eax
call fcn.00474d50
add esp, 8
test eax, eax
jl 0x4752f2
push 0x46
push 0
push 4
push 4
call fcn.00474e20
mov ecx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x2c]
push eax
push ecx
push edx
call fcn.00474e40
add esp, 0x20
test eax, eax
jl 0x4752f2
test ebx, ebx
je 0x4752d2
mov dword [ebx], 3
mov esi, dword [esp + 0x14]
test esi, esi
je 0x4752e0
mov dword [esi], 0
mov edi, dword [esp + 0x10]
test edi, edi
je 0x4752eb
mov byte [edi], 0x61
mov ebp, 1
jmp 0x4752fa
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
xor eax, eax
lea esp, [esp]
mov cl, byte [esp + eax + 0x224]
mov byte [esp + eax + 0x24], cl
add eax, 1
test cl, cl
jne 0x475300
lea eax, [esp + 0x24]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x475320
mov ecx, dword [str.ddraw.dll]
mov edx, dword [0x5a2050]
mov dword [eax], ecx
mov cx, word [0x5a2054]
mov dword [eax + 4], edx
mov dl, byte [0x5a2056]
mov word [eax + 8], cx
mov byte [eax + 0xa], dl
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00474d50
add esp, 8
test eax, eax
jl 0x475455
push 0x9b
push 0
push 5
push 4
call fcn.00474e20
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
push edx
push eax
push esi
push edi
call fcn.00474e40
add esp, 0x20
test eax, eax
jl 0x4753b9
test ebx, ebx
je 0x47539b
mov dword [ebx], 5
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4753a9
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4753b4
mov byte [eax], 0x20
mov ebp, 1
push 0x13e
push 0
push 6
push 4
call fcn.00474e20
push edx
push eax
push esi
push edi
call fcn.00474e40
add esp, 0x20
test eax, eax
jl 0x475401
test ebx, ebx
je 0x4753e3
mov dword [ebx], 6
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4753f1
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4753fc
mov byte [eax], 0x20
mov ebp, 1
push 0x1b4
push 0
push 6
push 4
call fcn.00474e20
push edx
push eax
push esi
push edi
call fcn.00474e40
add esp, 0x20
test eax, eax
jl 0x47544d
test ebx, ebx
je 0x47542b
mov dword [ebx], 6
mov eax, dword [esp + 0x14]
test eax, eax
je 0x475439
mov dword [eax], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x475444
mov byte [eax], 0x20
mov ebp, 1
mov edi, eax
jmp 0x475451
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
xor eax, eax
jmp 0x475460
mov cl, byte [esp + eax + 0x224]
mov byte [esp + eax + 0x24], cl
add eax, 1
test cl, cl
jne 0x475460
lea eax, [esp + 0x24]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x475480
mov edx, dword [str.dplayx.dll]
mov ecx, dword [0x5a2034]
mov dword [eax], edx
mov edx, dword [0x5a2038]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00474d50
add esp, 8
test eax, eax
jl 0x475502
push 0x206
push 3
push 6
push 4
call fcn.00474e20
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
push edx
push eax
call fcn.00474e40
add esp, 0x20
test eax, eax
jl 0x475502
test ebx, ebx
je 0x4754ec
mov dword [ebx], 6
test esi, esi
je 0x4754f6
mov dword [esi], 1
test edi, edi
je 0x4754fd
mov byte [edi], 0x61
mov ebp, 1
xor eax, eax
jmp 0x475510
mov cl, byte [esp + eax + 0x224]
mov byte [esp + eax + 0x24], cl
add eax, 1
test cl, cl
jne 0x475510
lea eax, [esp + 0x24]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x475530
mov ecx, dword [str.ddraw.dll]
mov edx, dword [0x5a2050]
mov dword [eax], ecx
mov cx, word [0x5a2054]
mov dword [eax + 4], edx
mov dl, byte [0x5a2056]
mov word [eax + 8], cx
mov byte [eax + 0xa], dl
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00474d50
add esp, 8
test eax, eax
jl 0x4755bd
push 0x2bc
push 0
push 7
push 4
call fcn.00474e20
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
push edx
push eax
call fcn.00474e40
add esp, 0x20
test eax, eax
jl 0x4755bd
test ebx, ebx
je 0x4755a7
mov dword [ebx], 7
test esi, esi
je 0x4755b1
mov dword [esi], 0
test edi, edi
je 0x4755b8
mov byte [edi], 0x20
mov ebp, 1
xor eax, eax
nop
mov cl, byte [esp + eax + 0x224]
mov byte [esp + eax + 0x24], cl
add eax, 1
test cl, cl
jne 0x4755c0
lea eax, [esp + 0x24]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x4755e0
mov ecx, dword [str.dinput.dll]
mov edx, dword [0x5a2028]
mov dword [eax], ecx
mov ecx, dword [0x5a202c]
mov dword [eax + 4], edx
lea edx, [esp + 0x18]
mov dword [eax + 8], ecx
push edx
lea eax, [esp + 0x28]
push eax
call fcn.00474d50
add esp, 8
test eax, eax
jl 0x475662
push 0x2cc
push 0
push 7
push 4
call fcn.00474e20
mov ecx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x2c]
push eax
push ecx
push edx
call fcn.00474e40
add esp, 0x20
test eax, eax
jl 0x475662
test ebx, ebx
je 0x47564c
mov dword [ebx], 7
test esi, esi
je 0x475656
mov dword [esi], 0
test edi, edi
je 0x47565d
mov byte [edi], 0x61
mov ebp, 1
xor eax, eax
jmp 0x475670
mov cl, byte [esp + eax + 0x224]
mov byte [esp + eax + 0x24], cl
add eax, 1
test cl, cl
jne 0x475670
lea eax, [esp + 0x24]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x475690
mov ecx, dword [str.ddraw.dll]
mov edx, dword [0x5a2050]
mov dword [eax], ecx
mov cx, word [0x5a2054]
mov dword [eax + 4], edx
mov dl, byte [0x5a2056]
mov word [eax + 8], cx
mov byte [eax + 0xa], dl
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00474d50
add esp, 8
test eax, eax
jl 0x475761
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov ebx, esi
shr ebx, 0x10
cmp bx, 4
jne 0x47570c
push 0x190
push 0
push 8
push 4
call fcn.00474e20
push edx
push eax
push esi
push edi
call fcn.00474e40
add esp, 0x20
test eax, eax
jge 0x475735
cmp bx, 5
jne 0x475761
push 0x190
push 0x8d2
push 1
push 5
call fcn.00474e20
push edx
push eax
push esi
push edi
call fcn.00474e40
add esp, 0x20
test eax, eax
jl 0x475761
mov eax, dword [esp + 0x20]
test eax, eax
je 0x475743
mov dword [eax], 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x475751
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x47575c
mov byte [eax], 0x20
mov ebp, 1
xor eax, eax
jmp 0x475770
mov cl, byte [esp + eax + 0x224]
mov byte [esp + eax + 0x24], cl
add eax, 1
test cl, cl
jne 0x475770
lea eax, [esp + 0x24]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x475790
mov edx, dword [str.d3d8.dll]
mov ecx, dword [0x5a201c]
mov dword [eax], edx
mov dx, word [0x5a2020]
mov dword [eax + 4], ecx
mov word [eax + 8], dx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00474d50
add esp, 8
test eax, eax
jl 0x4758d3
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov ebx, esi
shr ebx, 0x10
cmp bx, 4
jne 0x475803
push 0x371
push 1
push 8
push 4
call fcn.00474e20
push edx
push eax
push esi
push edi
call fcn.00474e40
add esp, 0x20
test eax, eax
jge 0x47582c
cmp bx, 5
jne 0x475858
push 0x371
push 0xa28
push 1
push 5
call fcn.00474e20
push edx
push eax
push esi
push edi
call fcn.00474e40
add esp, 0x20
test eax, eax
jl 0x475858
mov eax, dword [esp + 0x20]
test eax, eax
je 0x47583a
mov dword [eax], 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x475848
mov dword [eax], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x475853
mov byte [eax], 0x20
mov ebp, 1
cmp bx, 4
jne 0x47587e
push 0x385
push 1
push 8
push 4
call fcn.00474e20
push edx
push eax
push esi
push edi
call fcn.00474e40
add esp, 0x20
test eax, eax
jge 0x4758a7
cmp bx, 5
jne 0x4758d3
push 0x385
push 0xa28
push 1
push 5
call fcn.00474e20
push edx
push eax
push esi
push edi
call fcn.00474e40
add esp, 0x20
test eax, eax
jl 0x4758d3
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4758b5
mov dword [eax], 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4758c3
mov dword [eax], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4758ce
mov byte [eax], 0x61
mov ebp, 1
xor eax, eax
jmp 0x4758e0
mov cl, byte [esp + eax + 0x224]
mov byte [esp + eax + 0x24], cl
add eax, 1
test cl, cl
jne 0x4758e0
lea eax, [esp + 0x24]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x475900
mov edx, dword [str.mpg2splt.ax]
mov ecx, dword [0x5a200c]
mov dword [eax], edx
mov edx, dword [0x5a2010]
mov dword [eax + 4], ecx
mov cl, byte [0x5a2014]
mov dword [eax + 8], edx
lea edx, [esp + 0x18]
mov byte [eax + 0xc], cl
push edx
lea eax, [esp + 0x28]
push eax
call fcn.00474d50
add esp, 8
test eax, eax
jl 0x475997
push 0x375
push 1
push 3
push 6
call fcn.00474e20
mov ecx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x2c]
push eax
push ecx
push edx
call fcn.00474e40
add esp, 0x20
test eax, eax
jl 0x475997
mov eax, dword [esp + 0x20]
test eax, eax
je 0x475979
mov dword [eax], 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x475987
mov dword [eax], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x475992
mov byte [eax], 0x62
mov ebp, 1
xor eax, eax
lea esp, [esp]
mov cl, byte [esp + eax + 0x224]
mov byte [esp + eax + 0x24], cl
add eax, 1
test cl, cl
jne 0x4759a0
lea eax, [esp + 0x24]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x4759c0
mov ecx, dword [str.dpnet.dll]
mov edx, dword [0x5a2000]
mov dword [eax], ecx
mov cx, word [0x5a2004]
mov dword [eax + 4], edx
mov dl, byte [0x5a2006]
mov word [eax + 8], cx
mov byte [eax + 0xa], dl
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00474d50
add esp, 8
test eax, eax
jl 0x475a91
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov ebx, esi
shr ebx, 0x10
cmp bx, 4
jne 0x475a3c
push 0x86
push 0
push 9
push 4
call fcn.00474e20
push edx
push eax
push esi
push edi
call fcn.00474e40
add esp, 0x20
test eax, eax
jge 0x475a65
cmp bx, 5
jne 0x475a91
push 0x86
push 0xe5d
push 2
push 5
call fcn.00474e20
push edx
push eax
push esi
push edi
call fcn.00474e40
add esp, 0x20
test eax, eax
jl 0x475a91
mov eax, dword [esp + 0x20]
test eax, eax
je 0x475a73
mov dword [eax], 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x475a81
mov dword [eax], 2
mov eax, dword [esp + 0x10]
test eax, eax
je 0x475a8c
mov byte [eax], 0x20
mov ebp, 1
pop edi
xor eax, eax
pop esi
jmp 0x475aa0
mov cl, byte [esp + eax + 0x21c]
mov byte [esp + eax + 0x1c], cl
add eax, 1
test cl, cl
jne 0x475aa0
lea eax, [esp + 0x1c]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x475ac0
mov edx, dword [str.d3d9.dll]
mov ecx, dword [0x5a1ff4]
mov dword [eax], edx
mov dx, word [0x5a1ff8]
mov dword [eax + 4], ecx
mov word [eax + 8], dx
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.00474d50
add esp, 8
test eax, eax
jl 0x475b0c
mov eax, dword [esp + 0x18]
test eax, eax
je 0x475b1e
mov dword [eax], 9
jmp 0x475b1e
test ebp, ebp
jne 0x475b37
mov ebx, dword [esp + 0x18]
test ebx, ebx
je 0x475b1e
mov dword [ebx], 0
mov eax, dword [esp + 0xc]
test eax, eax
je 0x475b2c
mov dword [eax], 0
mov eax, dword [esp + 8]
test eax, eax
je 0x475b37
mov byte [eax], 0x20
mov ecx, dword [esp + 0x41c]
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0053fab2
add esp, 0x418
ret