Function at 0x41c040
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 0x41c9c0
mov byte [esp + 0x313], bl
xor eax, eax
jmp 0x41c080
mov cl, byte [esp + eax + 0x210]
mov byte [esp + eax + 0x10], cl
inc eax
test cl, cl
jne 0x41c080
push edi
lea edi, [esp + 0x14]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x41c096
mov ecx, dword [str.ddraw.dll]
mov edx, dword [0x4493cc]
mov ax, word [0x4493d0]
mov dword [edi], ecx
mov cl, byte [0x4493d2]
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.0041bf40
add esp, 8
test eax, eax
jl 0x41c1b6
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov eax, 0x40002
cmp edx, eax
mov ecx, 0x5f
ja 0x41c0fb
jb 0x41c12c
cmp esi, ecx
ja 0x41c0fb
jb 0x41c12c
test ebp, ebp
je 0x41c106
mov dword [ebp], 1
mov edi, dword [esp + 0x420]
test edi, edi
je 0x41c117
mov dword [edi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x41c125
mov byte [eax], 0x20
mov ebx, 1
jmp 0x41c133
mov edi, dword [esp + 0x420]
mov eax, 0x40003
cmp edx, eax
mov ecx, 0x448
ja 0x41c149
jb 0x41c171
cmp esi, ecx
ja 0x41c149
jb 0x41c171
test ebp, ebp
je 0x41c154
mov dword [ebp], 2
test edi, edi
je 0x41c15e
mov dword [edi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x41c16c
mov byte [eax], 0x20
mov ebx, 1
mov eax, 0x40004
cmp edx, eax
mov ecx, 0x44
ja 0x41c18e
jb 0x41c1b6
cmp esi, ecx
ja 0x41c187
jb 0x41c1b6
mov edi, dword [esp + 0x420]
test ebp, ebp
je 0x41c199
mov dword [ebp], 3
test edi, edi
je 0x41c1a3
mov dword [edi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x41c1b1
mov byte [eax], 0x20
mov ebx, 1
xor eax, eax
jmp 0x41c1c0
mov cl, byte [esp + eax + 0x218]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x41c1c0
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x41c1d5
mov ecx, dword [str.d3drg8x.dll]
mov edx, dword [0x4493bc]
mov eax, dword [0x4493c0]
mov dword [edi], ecx
mov cl, byte [0x4493c4]
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.0041bf40
add esp, 8
test eax, eax
jl 0x41c262
mov edx, dword [esp + 0x14]
mov eax, 0x40004
cmp edx, eax
mov ecx, 0x46
ja 0x41c233
jb 0x41c262
mov eax, dword [esp + 0x10]
cmp eax, ecx
ja 0x41c233
jb 0x41c262
test ebp, ebp
je 0x41c23e
mov dword [ebp], 3
mov eax, dword [esp + 0x420]
test eax, eax
je 0x41c24f
mov dword [eax], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x41c25d
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 0x41c264
lea edi, [esp + 0x18]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x41c280
mov ecx, dword [str.ddraw.dll]
mov edx, dword [0x4493cc]
mov ax, word [0x4493d0]
mov dword [edi], ecx
mov cl, byte [0x4493d2]
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.0041bf40
add esp, 8
test eax, eax
jl 0x41c39f
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov eax, 0x40005
cmp edx, eax
mov ecx, 0x9b
ja 0x41c2e4
jb 0x41c315
cmp esi, ecx
ja 0x41c2e4
jb 0x41c315
test ebp, ebp
je 0x41c2ef
mov dword [ebp], 5
mov edi, dword [esp + 0x420]
test edi, edi
je 0x41c300
mov dword [edi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x41c30e
mov byte [eax], 0x20
mov ebx, 1
jmp 0x41c31c
mov edi, dword [esp + 0x420]
mov eax, 0x40006
cmp edx, eax
mov ecx, 0x13e
ja 0x41c332
jb 0x41c35a
cmp esi, ecx
ja 0x41c332
jb 0x41c35a
test ebp, ebp
je 0x41c33d
mov dword [ebp], 6
test edi, edi
je 0x41c347
mov dword [edi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x41c355
mov byte [eax], 0x20
mov ebx, 1
mov eax, 0x40006
cmp edx, eax
mov ecx, 0x1b4
ja 0x41c377
jb 0x41c39f
cmp esi, ecx
ja 0x41c370
jb 0x41c39f
mov edi, dword [esp + 0x420]
test ebp, ebp
je 0x41c382
mov dword [ebp], 6
test edi, edi
je 0x41c38c
mov dword [edi], 1
mov eax, dword [esp + 0x424]
test eax, eax
je 0x41c39a
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 0x41c3a1
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x41c3b6
mov ecx, dword [str.dplayx.dll]
mov edx, dword [0x4493b0]
mov eax, dword [0x4493b4]
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.0041bf40
add esp, 8
test eax, eax
jl 0x41c43c
mov edx, dword [esp + 0x14]
mov eax, 0x40006
cmp edx, eax
mov ecx, 0x30206
ja 0x41c40b
jb 0x41c43c
mov eax, dword [esp + 0x10]
cmp eax, ecx
ja 0x41c40b
jb 0x41c43c
test ebp, ebp
je 0x41c416
mov dword [ebp], 6
mov esi, dword [esp + 0x420]
test esi, esi
je 0x41c427
mov dword [esi], 1
mov eax, dword [esp + 0x424]
test eax, eax
je 0x41c435
mov byte [eax], 0x61
mov ebx, 1
jmp 0x41c443
mov esi, dword [esp + 0x420]
xor eax, eax
jmp 0x41c450
mov cl, byte [esp + eax + 0x218]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x41c450
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x41c465
mov eax, dword [str.ddraw.dll]
mov ecx, dword [0x4493cc]
mov dx, word [0x4493d0]
mov dword [edi], eax
mov al, byte [0x4493d2]
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.0041bf40
add esp, 8
test eax, eax
jl 0x41c4ec
mov edx, dword [esp + 0x14]
mov eax, 0x40007
cmp edx, eax
mov ecx, 0x2bc
ja 0x41c4c4
jb 0x41c4ec
mov eax, dword [esp + 0x10]
cmp eax, ecx
ja 0x41c4c4
jb 0x41c4ec
test ebp, ebp
je 0x41c4cf
mov dword [ebp], 7
test esi, esi
je 0x41c4d9
mov dword [esi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x41c4e7
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 0x41c4f0
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x41c505
mov eax, dword [str.dinput.dll]
mov ecx, dword [0x4493a4]
mov edx, dword [0x4493a8]
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.0041bf40
add esp, 8
test eax, eax
jl 0x41c5db
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov eax, 0x40007
cmp edx, eax
mov ecx, 0x2cc
ja 0x41c55e
jb 0x41c58f
cmp esi, ecx
ja 0x41c55e
jb 0x41c58f
test ebp, ebp
je 0x41c569
mov dword [ebp], 7
mov edi, dword [esp + 0x420]
test edi, edi
je 0x41c57a
mov dword [edi], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x41c588
mov byte [eax], 0x61
mov ebx, 1
jmp 0x41c596
mov edi, dword [esp + 0x420]
mov eax, 0x40007
cmp edx, eax
mov ecx, 0x10000
ja 0x41c5b3
jb 0x41c5db
cmp esi, ecx
ja 0x41c5ac
jb 0x41c5db
mov edi, dword [esp + 0x420]
test ebp, ebp
je 0x41c5be
mov dword [ebp], 7
test edi, edi
je 0x41c5c8
mov dword [edi], 1
mov eax, dword [esp + 0x424]
test eax, eax
je 0x41c5d6
mov byte [eax], 0x20
mov ebx, 1
xor eax, eax
lea ecx, [ecx]
mov cl, byte [esp + eax + 0x218]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x41c5e0
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x41c5f5
mov edx, dword [str.ddraw.dll]
mov eax, dword [0x4493cc]
mov cx, word [0x4493d0]
mov dword [edi], edx
mov dl, byte [0x4493d2]
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.0041bf40
add esp, 8
test eax, eax
jl 0x41c6ad
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov esi, ecx
shr esi, 0x10
cmp si, 4
jne 0x41c65e
mov eax, 0x40008
cmp ecx, eax
mov edx, 0x190
ja 0x41c67e
jb 0x41c65e
cmp edi, edx
jae 0x41c67e
cmp si, 5
jne 0x41c6ad
mov eax, 0x50001
push eax
mov edx, 0x8d20190
push edx
push ecx
push edi
call fcn.0041c010
add esp, 0x10
test eax, eax
jl 0x41c6ad
test ebp, ebp
je 0x41c689
mov dword [ebp], 8
mov eax, dword [esp + 0x420]
test eax, eax
je 0x41c69a
mov dword [eax], 0
mov eax, dword [esp + 0x424]
test eax, eax
je 0x41c6a8
mov byte [eax], 0x20
mov ebx, 1
xor eax, eax
nop
mov cl, byte [esp + eax + 0x218]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x41c6b0
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x41c6c5
mov edx, dword [str.d3d8.dll]
mov eax, dword [0x449398]
mov cx, word [0x44939c]
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.0041bf40
add esp, 8
test eax, eax
jl 0x41c7e1
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov edi, edx
shr edi, 0x10
cmp di, 4
jne 0x41c729
mov eax, 0x40008
cmp edx, eax
mov ecx, 0x10371
ja 0x41c749
jb 0x41c729
cmp esi, ecx
jae 0x41c749
cmp di, 5
jne 0x41c778
mov eax, 0x50001
push eax
mov ecx, 0xa280371
push ecx
push edx
push esi
call fcn.0041c010
add esp, 0x10
test eax, eax
jl 0x41c778
test ebp, ebp
je 0x41c754
mov dword [ebp], 8
mov eax, dword [esp + 0x420]
test eax, eax
je 0x41c765
mov dword [eax], 1
mov eax, dword [esp + 0x424]
test eax, eax
je 0x41c773
mov byte [eax], 0x20
mov ebx, 1
cmp di, 4
jne 0x41c792
mov eax, 0x40008
cmp edx, eax
mov ecx, 0x10385
ja 0x41c7b2
jb 0x41c792
cmp esi, ecx
jae 0x41c7b2
cmp di, 5
jne 0x41c7e1
mov eax, 0x50001
push eax
mov ecx, 0xa280385
push ecx
push edx
push esi
call fcn.0041c010
add esp, 0x10
test eax, eax
jl 0x41c7e1
test ebp, ebp
je 0x41c7bd
mov dword [ebp], 8
mov eax, dword [esp + 0x420]
test eax, eax
je 0x41c7ce
mov dword [eax], 1
mov eax, dword [esp + 0x424]
test eax, eax
je 0x41c7dc
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 0x41c7e3
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x41c7f8
mov ecx, dword [str.mpg2splt.ax]
mov edx, dword [0x449388]
mov eax, dword [0x44938c]
mov dword [edi], ecx
mov cl, byte [0x449390]
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.0041bf40
add esp, 8
test eax, eax
jl 0x41c885
mov edx, dword [esp + 0x14]
mov eax, 0x60003
cmp edx, eax
mov ecx, 0x10375
ja 0x41c856
jb 0x41c885
mov eax, dword [esp + 0x10]
cmp eax, ecx
ja 0x41c856
jb 0x41c885
test ebp, ebp
je 0x41c861
mov dword [ebp], 8
mov eax, dword [esp + 0x420]
test eax, eax
je 0x41c872
mov dword [eax], 1
mov eax, dword [esp + 0x424]
test eax, eax
je 0x41c880
mov byte [eax], 0x62
mov ebx, 1
xor eax, eax
jmp 0x41c890
mov cl, byte [esp + eax + 0x218]
mov byte [esp + eax + 0x18], cl
inc eax
test cl, cl
jne 0x41c890
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x41c8a5
mov ecx, dword [str.dpnet.dll]
mov edx, dword [0x44937c]
mov ax, word [0x449380]
mov dword [edi], ecx
mov cl, byte [0x449382]
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.0041bf40
add esp, 8
test eax, eax
jl 0x41c95d
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov esi, ecx
shr esi, 0x10
cmp si, 4
jne 0x41c90e
mov eax, 0x40009
cmp ecx, eax
mov edx, 0x86
ja 0x41c92e
jb 0x41c90e
cmp edi, edx
jae 0x41c92e
cmp si, 5
jne 0x41c95d
mov eax, 0x50002
push eax
mov edx, 0xe5d0086
push edx
push ecx
push edi
call fcn.0041c010
add esp, 0x10
test eax, eax
jl 0x41c95d
test ebp, ebp
je 0x41c939
mov dword [ebp], 8
mov eax, dword [esp + 0x420]
test eax, eax
je 0x41c94a
mov dword [eax], 2
mov eax, dword [esp + 0x424]
test eax, eax
je 0x41c958
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 0x41c960
lea edi, [esp + 0x14]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x41c975
mov ecx, dword [str.d3d9.dll]
mov edx, dword [0x449370]
mov ax, word [0x449374]
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.0041bf40
add esp, 8
test eax, eax
pop edi
jl 0x41c9bc
test ebp, ebp
je 0x41c9cb
mov dword [ebp], 9
jmp 0x41c9cb
test ebx, ebx
jne 0x41c9ea
test ebp, ebp
je 0x41c9cb
mov dword [ebp], 0
mov eax, dword [esp + 0x418]
test eax, eax
je 0x41c9dc
mov dword [eax], 0
mov eax, dword [esp + 0x41c]
test eax, eax
je 0x41c9ea
mov byte [eax], 0x20
pop ebp
xor eax, eax
pop ebx
add esp, 0x408
ret