Function at 0x1002c770
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x824
mov eax, dword [0x1008e418]
xor eax, esp
mov dword [esp + 0x820], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, ecx
push 0x104
lea ecx, [esp + 0x42c]
push ecx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x1002d21a
xor edx, edx
mov word [esp + 0x62e], dx
xor eax, eax
lea esp, [esp]
movzx ecx, word [esp + eax + 0x428]
mov word [esp + eax + 0x28], cx
add eax, 2
test cx, cx
jne 0x1002c7d0
lea eax, [esp + 0x28]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x1002c7f0
mov ecx, dword [str.ddraw.dll]
mov edx, dword [0x1007fe74]
mov dword [eax], ecx
mov ecx, dword [0x1007fe78]
mov dword [eax + 4], edx
mov edx, dword [0x1007fe7c]
mov dword [eax + 8], ecx
mov ecx, dword [0x1007fe80]
mov dword [eax + 0xc], edx
mov dx, word [0x1007fe84]
mov dword [eax + 0x10], ecx
lea ebx, [esp + 0x18]
lea edi, [esp + 0x28]
mov word [eax + 0x14], dx
call fcn.10015430
test eax, eax
je 0x1002c8e5
mov eax, dword [esp + 0x1c]
cmp eax, 0x40002
mov ecx, dword [esp + 0x18]
jg 0x1002c860
jl 0x1002c882
cmp ecx, 0x5f
ja 0x1002c860
jb 0x1002c882
test esi, esi
je 0x1002c86a
mov dword [esi], 1
mov edx, dword [esp + 0x24]
test edx, edx
je 0x1002c878
mov dword [edx], 0
mov dword [esp + 0x10], 1
jmp 0x1002c886
mov edx, dword [esp + 0x24]
cmp eax, 0x40003
jg 0x1002c899
jl 0x1002c8b5
cmp ecx, 0x448
ja 0x1002c899
jb 0x1002c8b5
test esi, esi
je 0x1002c8a3
mov dword [esi], 2
test edx, edx
je 0x1002c8ad
mov dword [edx], 0
mov dword [esp + 0x10], 1
cmp eax, 0x40004
jg 0x1002c8c9
jl 0x1002c8e5
cmp ecx, 0x44
ja 0x1002c8c5
jb 0x1002c8e5
mov edx, dword [esp + 0x24]
test esi, esi
je 0x1002c8d3
mov dword [esi], 3
test edx, edx
je 0x1002c8dd
mov dword [edx], 0
mov dword [esp + 0x10], 1
xor eax, eax
jmp 0x1002c8f0
movzx ecx, word [esp + eax + 0x428]
mov word [esp + eax + 0x28], cx
add eax, 2
test cx, cx
jne 0x1002c8f0
lea edi, [esp + 0x28]
add edi, 0xfffffffe
lea esp, [esp]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x1002c910
mov ecx, 6
mov esi, str.d3drg8x.dll
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea ebx, [esp + 0x18]
lea edi, [esp + 0x28]
call fcn.10015430
test eax, eax
je 0x1002c979
mov eax, dword [esp + 0x1c]
cmp eax, 0x40004
jg 0x1002c953
jl 0x1002c979
mov eax, dword [esp + 0x18]
cmp eax, 0x46
ja 0x1002c953
jb 0x1002c979
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1002c961
mov dword [eax], 3
mov esi, dword [esp + 0x24]
test esi, esi
je 0x1002c96f
mov dword [esi], 0
mov dword [esp + 0x10], 1
jmp 0x1002c97d
mov esi, dword [esp + 0x24]
xor eax, eax
nop
movzx ecx, word [esp + eax + 0x428]
mov word [esp + eax + 0x28], cx
add eax, 2
test cx, cx
jne 0x1002c980
lea eax, [esp + 0x28]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x1002c9a0
mov ecx, dword [str.ddraw.dll]
mov edx, dword [0x1007fe74]
mov dword [eax], ecx
mov ecx, dword [0x1007fe78]
mov dword [eax + 4], edx
mov edx, dword [0x1007fe7c]
mov dword [eax + 8], ecx
mov ecx, dword [0x1007fe80]
mov dword [eax + 0xc], edx
mov dx, word [0x1007fe84]
mov dword [eax + 0x10], ecx
lea ebx, [esp + 0x18]
lea edi, [esp + 0x28]
mov word [eax + 0x14], dx
call fcn.10015430
test eax, eax
je 0x1002ca9b
mov eax, dword [esp + 0x1c]
cmp eax, 0x40005
mov ecx, dword [esp + 0x18]
jg 0x1002ca13
jl 0x1002ca35
cmp ecx, 0x9b
ja 0x1002ca13
jb 0x1002ca35
mov edx, dword [esp + 0x14]
test edx, edx
je 0x1002ca21
mov dword [edx], 5
test esi, esi
je 0x1002ca2b
mov dword [esi], 0
mov dword [esp + 0x10], 1
jmp 0x1002ca39
mov edx, dword [esp + 0x14]
cmp eax, 0x40006
jg 0x1002ca4c
jl 0x1002ca68
cmp ecx, 0x13e
ja 0x1002ca4c
jb 0x1002ca68
test edx, edx
je 0x1002ca56
mov dword [edx], 6
test esi, esi
je 0x1002ca60
mov dword [esi], 0
mov dword [esp + 0x10], 1
cmp eax, 0x40006
jg 0x1002ca7f
jl 0x1002ca9b
cmp ecx, 0x1b4
ja 0x1002ca7b
jb 0x1002ca9b
mov edx, dword [esp + 0x14]
test edx, edx
je 0x1002ca89
mov dword [edx], 6
test esi, esi
je 0x1002ca93
mov dword [esi], 1
mov dword [esp + 0x10], 1
xor eax, eax
lea ecx, [ecx]
movzx ecx, word [esp + eax + 0x428]
mov word [esp + eax + 0x28], cx
add eax, 2
test cx, cx
jne 0x1002caa0
lea eax, [esp + 0x28]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x1002cac0
mov ecx, dword [str.dplayx.dll]
mov edx, dword [0x1007fea8]
mov dword [eax], ecx
mov ecx, dword [0x1007feac]
mov dword [eax + 4], edx
mov edx, dword [0x1007feb0]
mov dword [eax + 8], ecx
mov ecx, dword [0x1007feb4]
mov dword [eax + 0xc], edx
mov edx, dword [0x1007feb8]
mov dword [eax + 0x10], ecx
lea ebx, [esp + 0x18]
lea edi, [esp + 0x28]
mov dword [eax + 0x14], edx
call fcn.10015430
test eax, eax
je 0x1002cb4c
mov eax, dword [esp + 0x1c]
cmp eax, 0x40006
jg 0x1002cb2c
jl 0x1002cb4c
mov eax, dword [esp + 0x18]
cmp eax, 0x30206
ja 0x1002cb2c
jb 0x1002cb4c
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1002cb3a
mov dword [eax], 6
test esi, esi
je 0x1002cb44
mov dword [esi], 1
mov dword [esp + 0x10], 1
xor eax, eax
mov edi, edi
movzx ecx, word [esp + eax + 0x428]
mov word [esp + eax + 0x28], cx
add eax, 2
test cx, cx
jne 0x1002cb50
lea eax, [esp + 0x28]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x1002cb70
mov ecx, dword [str.ddraw.dll]
mov edx, dword [0x1007fe74]
mov dword [eax], ecx
mov ecx, dword [0x1007fe78]
mov dword [eax + 4], edx
mov edx, dword [0x1007fe7c]
mov dword [eax + 8], ecx
mov ecx, dword [0x1007fe80]
mov dword [eax + 0xc], edx
mov dx, word [0x1007fe84]
mov dword [eax + 0x10], ecx
lea ebx, [esp + 0x18]
lea edi, [esp + 0x28]
mov word [eax + 0x14], dx
call fcn.10015430
test eax, eax
je 0x1002cbfe
mov eax, dword [esp + 0x1c]
cmp eax, 0x40007
jg 0x1002cbde
jl 0x1002cbfe
mov eax, dword [esp + 0x18]
cmp eax, 0x2bc
ja 0x1002cbde
jb 0x1002cbfe
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1002cbec
mov dword [eax], 7
test esi, esi
je 0x1002cbf6
mov dword [esi], 0
mov dword [esp + 0x10], 1
xor eax, eax
movzx ecx, word [esp + eax + 0x428]
mov word [esp + eax + 0x28], cx
add eax, 2
test cx, cx
jne 0x1002cc00
lea eax, [esp + 0x28]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x1002cc20
mov ecx, dword [str.dinput.dll]
mov edx, dword [0x1007fec0]
mov dword [eax], ecx
mov ecx, dword [0x1007fec4]
mov dword [eax + 4], edx
mov edx, dword [0x1007fec8]
mov dword [eax + 8], ecx
mov ecx, dword [0x1007fecc]
mov dword [eax + 0xc], edx
mov edx, dword [0x1007fed0]
mov dword [eax + 0x10], ecx
lea ebx, [esp + 0x18]
lea edi, [esp + 0x28]
mov dword [eax + 0x14], edx
call fcn.10015430
test eax, eax
je 0x1002ccac
mov eax, dword [esp + 0x1c]
cmp eax, 0x40007
jg 0x1002cc8c
jl 0x1002ccac
mov eax, dword [esp + 0x18]
cmp eax, 0x2cc
ja 0x1002cc8c
jb 0x1002ccac
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1002cc9a
mov dword [eax], 7
test esi, esi
je 0x1002cca4
mov dword [esi], 0
mov dword [esp + 0x10], 1
xor eax, eax
mov edi, edi
movzx ecx, word [esp + eax + 0x428]
mov word [esp + eax + 0x28], cx
add eax, 2
test cx, cx
jne 0x1002ccb0
lea eax, [esp + 0x28]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x1002ccd0
mov ecx, dword [str.ddraw.dll]
mov edx, dword [0x1007fe74]
mov dword [eax], ecx
mov ecx, dword [0x1007fe78]
mov dword [eax + 4], edx
mov edx, dword [0x1007fe7c]
mov dword [eax + 8], ecx
mov ecx, dword [0x1007fe80]
mov dword [eax + 0xc], edx
mov dx, word [0x1007fe84]
mov dword [eax + 0x10], ecx
lea ebx, [esp + 0x18]
lea edi, [esp + 0x28]
mov word [eax + 0x14], dx
call fcn.10015430
test eax, eax
je 0x1002cd89
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov eax, edx
shr eax, 0x10
cmp ax, 4
jne 0x1002cd49
cmp edx, 0x40008
jg 0x1002cd69
jl 0x1002cd49
cmp edi, 0x190
jae 0x1002cd69
cmp ax, 5
jne 0x1002cd89
mov eax, 0x50001
push eax
mov ecx, 0x8d20190
push ecx
push edx
push edi
call fcn.1002d250
add esp, 0x10
test eax, eax
jl 0x1002cd89
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1002cd77
mov dword [eax], 8
test esi, esi
je 0x1002cd81
mov dword [esi], 0
mov dword [esp + 0x10], 1
xor eax, eax
jmp 0x1002cd90
movzx ecx, word [esp + eax + 0x428]
mov word [esp + eax + 0x28], cx
add eax, 2
test cx, cx
jne 0x1002cd90
lea eax, [esp + 0x28]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x1002cdb0
mov ecx, dword [str.d3d8.dll]
mov edx, dword [0x1007fed8]
mov dword [eax], ecx
mov ecx, dword [0x1007fedc]
mov dword [eax + 4], edx
mov edx, dword [0x1007fee0]
mov dword [eax + 8], ecx
mov ecx, dword [0x1007fee4]
mov dword [eax + 0xc], edx
lea ebx, [esp + 0x18]
lea edi, [esp + 0x28]
mov dword [eax + 0x10], ecx
call fcn.10015430
test eax, eax
je 0x1002ceba
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov ebx, edx
shr ebx, 0x10
cmp bx, 4
jne 0x1002ce22
cmp edx, 0x40008
jg 0x1002ce42
jl 0x1002ce22
cmp edi, 0x10371
jae 0x1002ce42
cmp bx, 5
jne 0x1002ce62
mov eax, 0x50001
push eax
mov ecx, 0xa280371
push ecx
push edx
push edi
call fcn.1002d250
add esp, 0x10
test eax, eax
jl 0x1002ce62
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1002ce50
mov dword [eax], 8
test esi, esi
je 0x1002ce5a
mov dword [esi], 1
mov dword [esp + 0x10], 1
cmp bx, 4
jne 0x1002ce7a
cmp edx, 0x40008
jg 0x1002ce9a
jl 0x1002ce7a
cmp edi, 0x10385
jae 0x1002ce9a
cmp bx, 5
jne 0x1002ceba
mov eax, 0x50001
push eax
mov ecx, 0xa280385
push ecx
push edx
push edi
call fcn.1002d250
add esp, 0x10
test eax, eax
jl 0x1002ceba
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1002cea8
mov dword [eax], 8
test esi, esi
je 0x1002ceb2
mov dword [esi], 1
mov dword [esp + 0x10], 1
xor eax, eax
lea esp, [esp]
movzx ecx, word [esp + eax + 0x428]
mov word [esp + eax + 0x28], cx
add eax, 2
test cx, cx
jne 0x1002cec0
lea edi, [esp + 0x28]
add edi, 0xfffffffe
lea esp, [esp]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x1002cee0
mov ecx, 6
mov esi, str.mpg2splt.ax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea ebx, [esp + 0x18]
lea edi, [esp + 0x28]
call fcn.10015430
test eax, eax
je 0x1002cf4b
mov eax, dword [esp + 0x1c]
cmp eax, 0x60003
jg 0x1002cf25
jl 0x1002cf4b
mov eax, dword [esp + 0x18]
cmp eax, 0x10375
ja 0x1002cf25
jb 0x1002cf4b
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1002cf33
mov dword [eax], 8
mov esi, dword [esp + 0x24]
test esi, esi
je 0x1002cf41
mov dword [esi], 1
mov dword [esp + 0x10], 1
jmp 0x1002cf4f
mov esi, dword [esp + 0x24]
xor eax, eax
jmp 0x1002cf60
movzx ecx, word [esp + eax + 0x428]
mov word [esp + eax + 0x28], cx
add eax, 2
test cx, cx
jne 0x1002cf60
lea eax, [esp + 0x28]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x1002cf80
mov edx, dword [str.dpnet.dll]
mov ecx, dword [0x1007ff08]
mov dword [eax], edx
mov edx, dword [0x1007ff0c]
mov dword [eax + 4], ecx
mov ecx, dword [0x1007ff10]
mov dword [eax + 8], edx
mov edx, dword [0x1007ff14]
mov dword [eax + 0xc], ecx
mov cx, word [0x1007ff18]
mov dword [eax + 0x10], edx
lea ebx, [esp + 0x18]
lea edi, [esp + 0x28]
mov word [eax + 0x14], cx
call fcn.10015430
test eax, eax
je 0x1002d039
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov eax, ecx
shr eax, 0x10
cmp ax, 4
jne 0x1002cff9
cmp ecx, 0x40009
jg 0x1002d019
jl 0x1002cff9
cmp edi, 0x86
jae 0x1002d019
cmp ax, 5
jne 0x1002d039
mov eax, 0x50002
push eax
mov edx, 0xe5d0086
push edx
push ecx
push edi
call fcn.1002d250
add esp, 0x10
test eax, eax
jl 0x1002d039
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1002d027
mov dword [eax], 8
test esi, esi
je 0x1002d031
mov dword [esi], 2
mov dword [esp + 0x10], 1
xor eax, eax
jmp 0x1002d040
movzx ecx, word [esp + eax + 0x428]
mov word [esp + eax + 0x28], cx
add eax, 2
test cx, cx
jne 0x1002d040
lea eax, [esp + 0x28]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x1002d060
mov edx, dword [str.d3d9.dll]
mov ecx, dword [0x1007ff20]
mov dword [eax], edx
mov edx, dword [0x1007ff24]
mov dword [eax + 4], ecx
mov ecx, dword [0x1007ff28]
mov dword [eax + 8], edx
mov edx, dword [0x1007ff2c]
mov dword [eax + 0xc], ecx
lea ebx, [esp + 0x18]
lea edi, [esp + 0x28]
mov dword [eax + 0x10], edx
call fcn.10015430
test eax, eax
je 0x1002d0c9
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1002d0b7
mov dword [eax], 9
test esi, esi
je 0x1002d0c1
mov dword [esi], 0
mov dword [esp + 0x10], 1
xor eax, eax
jmp 0x1002d0d0
movzx ecx, word [esp + eax + 0x428]
mov word [esp + eax + 0x28], cx
add eax, 2
test cx, cx
jne 0x1002d0d0
lea eax, [esp + 0x28]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x1002d0f0
mov ecx, dword [str.d3d10.dll]
mov edx, dword [0x1007ff34]
mov dword [eax], ecx
mov ecx, dword [0x1007ff38]
mov dword [eax + 4], edx
mov edx, dword [0x1007ff3c]
mov dword [eax + 8], ecx
mov ecx, dword [0x1007ff40]
mov dword [eax + 0xc], edx
mov dx, word [0x1007ff44]
mov dword [eax + 0x10], ecx
lea ebx, [esp + 0x18]
lea edi, [esp + 0x28]
mov word [eax + 0x14], dx
call fcn.10015430
test eax, eax
je 0x1002d164
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1002d152
mov dword [eax], 0xa
test esi, esi
je 0x1002d15c
mov dword [esi], 0
mov dword [esp + 0x10], 1
xor eax, eax
jmp 0x1002d170
movzx ecx, word [esp + eax + 0x428]
mov word [esp + eax + 0x28], cx
add eax, 2
test cx, cx
jne 0x1002d170
lea eax, [esp + 0x28]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x1002d190
mov ecx, dword [str.d3d11.dll]
mov edx, dword [0x1007ff4c]
mov dword [eax], ecx
mov ecx, dword [0x1007ff50]
mov dword [eax + 4], edx
mov edx, dword [0x1007ff54]
mov dword [eax + 8], ecx
mov ecx, dword [0x1007ff58]
mov dword [eax + 0xc], edx
mov dx, word [0x1007ff5c]
mov dword [eax + 0x10], ecx
lea ebx, [esp + 0x18]
lea edi, [esp + 0x28]
mov word [eax + 0x14], dx
call fcn.10015430
test eax, eax
je 0x1002d20f
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1002d1f2
mov dword [eax], 0xb
xor eax, eax
test esi, esi
je 0x1002d234
mov dword [esi], eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x820]
xor ecx, esp
call fcn.10055232
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x10], 0
jne 0x1002d232
mov esi, dword [esp + 0x14]
test esi, esi
je 0x1002d224
mov dword [esi], 0
mov eax, dword [esp + 0x24]
test eax, eax
je 0x1002d232
mov dword [eax], 0
xor eax, eax
mov ecx, dword [esp + 0x82c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10055232
mov esp, ebp
pop ebp
ret