Function at 0x10040814
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x100f2491
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x144
mov eax, dword [esp + 0x158]
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x14]
xor ebp, ebp
push eax
push ecx
mov dword [esp + 0x30], esi
mov dword [esp + 0x2c], ebp
call fcn.10057d20
or ebx, 0xffffffff
mov edi, 0x1010cdc4
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x15c], ebp
not ecx
dec ecx
push ecx
push 0x1010cdc4
push edx
push ebp
lea ecx, [esp + 0x24]
call fcn.10003694
cmp eax, ebp
jne 0x100408a5
mov esi, dword [esp + 0x164]
mov al, byte [esp + 0x13]
push ebp
mov ecx, esi
mov byte [esi], al
call fcn.10002040
mov edi, str.Intel
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Intel
mov ecx, esi
call fcn.100022af
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x160], ebx
call fcn.10002040
jmp 0x10041128
mov edi, 0x1010cdb8
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, dword [esp + 0x20]
push 0x1010cdb8
push ecx
push ebp
lea ecx, [esp + 0x24]
call fcn.10003694
cmp eax, ebp
jne 0x10040bba
mov eax, dword [esi + 0x80]
add eax, 0xfffffffd
cmp eax, 3
ja case.default.0x100408e2
jmp dword [eax*4 + 0x10041148]
cmp dword [esi + 0x84], 0x33
jne case.default.0x100408e2
mov esi, dword [esp + 0x164]
mov dl, byte [esp + 0x13]
push ebp
mov ecx, esi
mov byte [esi], dl
call fcn.10002040
mov edi, str.Windows_NT_3.1
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Windows_NT_3.1
mov ecx, esi
call fcn.100022af
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x160], ebx
call fcn.10002040
jmp 0x10041128
mov eax, dword [esi + 0x84]
cmp eax, ebp
je 0x100409e7
cmp eax, 0xa
je 0x100409a0
cmp eax, 0x5a
jne case.default.0x100408e2
mov esi, dword [esp + 0x164]
mov al, byte [esp + 0x13]
push ebp
mov ecx, esi
mov byte [esi], al
call fcn.10002040
mov edi, str.Windows_ME
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Windows_ME
mov ecx, esi
call fcn.100022af
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x160], ebx
call fcn.10002040
jmp 0x10041128
mov esi, dword [esp + 0x164]
mov cl, byte [esp + 0x13]
push ebp
mov byte [esi], cl
mov ecx, esi
call fcn.10002040
mov edi, str.Windows_98
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Windows_98
mov ecx, esi
call fcn.100022af
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x160], ebx
call fcn.10002040
jmp 0x10041128
mov esi, dword [esp + 0x164]
mov dl, byte [esp + 0x13]
push ebp
mov ecx, esi
mov byte [esi], dl
call fcn.10002040
mov edi, str.Windows_95
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Windows_95
mov ecx, esi
call fcn.100022af
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x160], ebx
call fcn.10002040
jmp 0x10041128
mov eax, dword [esi + 0x84]
sub eax, ebp
je 0x10040ad4
dec eax
je 0x10040a8d
dec eax
jne case.default.0x100408e2
mov esi, dword [esp + 0x164]
mov al, byte [esp + 0x13]
push ebp
mov ecx, esi
mov byte [esi], al
call fcn.10002040
mov edi, str.Windows_Server_2003
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Windows_Server_2003
mov ecx, esi
call fcn.100022af
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x160], ebx
call fcn.10002040
jmp 0x10041128
mov esi, dword [esp + 0x164]
mov cl, byte [esp + 0x13]
push ebp
mov byte [esi], cl
mov ecx, esi
call fcn.10002040
mov edi, str.Windows_XP
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Windows_XP
mov ecx, esi
call fcn.100022af
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x160], ebx
call fcn.10002040
jmp 0x10041128
mov esi, dword [esp + 0x164]
mov dl, byte [esp + 0x13]
push ebp
mov ecx, esi
mov byte [esi], dl
call fcn.10002040
mov edi, str.Windows_2000
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Windows_2000
mov ecx, esi
call fcn.100022af
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x160], ebx
call fcn.10002040
jmp 0x10041128
mov eax, dword [esi + 0x84]
sub eax, ebp
je 0x10040b73
dec eax
jne case.default.0x100408e2
mov esi, dword [esp + 0x164]
mov al, byte [esp + 0x13]
push ebp
mov ecx, esi
mov byte [esi], al
call fcn.10002040
mov edi, str.Windows_7
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Windows_7
mov ecx, esi
call fcn.100022af
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x160], ebx
call fcn.10002040
jmp 0x10041128
mov esi, dword [esp + 0x164]
mov cl, byte [esp + 0x13]
push ebp
mov byte [esi], cl
mov ecx, esi
call fcn.10002040
mov edi, str.Windows_Vista
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Windows_Vista
mov ecx, esi
call fcn.100022af
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x160], ebx
call fcn.10002040
jmp 0x10041128
mov edi, str.appdir
mov ecx, ebx
xor eax, eax
mov edx, dword [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.appdir
push edx
push ebp
lea ecx, [esp + 0x24]
call fcn.10003694
cmp eax, ebp
jne 0x10040d0d
lea eax, [esp + 0x4c]
push 0x104
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je case.default.0x100408e2
mov cl, byte [esp + 0x13]
push ebp
mov byte [esp + 0x30], cl
lea ecx, [esp + 0x30]
call fcn.10002040
lea edi, [esp + 0x4c]
mov ecx, ebx
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x30]
push ebp
call fcn.1000234b
test al, al
je 0x10040c51
mov edi, dword [esp + 0x30]
mov ecx, ebp
mov edx, ecx
lea esi, [esp + 0x4c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x30]
call fcn.100044e0
mov eax, dword [0x100f7360]
push 1
push eax
lea eax, [esp + 0x1b]
push eax
lea ecx, [esp + 0x38]
mov byte [esp + 0x168], 1
mov byte [esp + 0x1f], 0x5c
call fcn.1001c440
cmp eax, dword [0x100f7360]
je 0x10040cbb
push eax
lea ecx, [esp + 0x40]
push 0
push ecx
lea ecx, [esp + 0x38]
call fcn.10001be6
mov edx, dword [0x100f7360]
lea ecx, [esp + 0x2c]
push edx
push 0
push eax
mov byte [esp + 0x168], 2
call fcn.10001ec4
push 1
lea ecx, [esp + 0x40]
mov byte [esp + 0x160], 1
call fcn.10002040
mov al, byte [esp + 0x2c]
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x34], esp
push 0
mov ecx, esi
mov byte [esi], al
call fcn.10002040
mov ecx, dword [0x100f7360]
lea edx, [esp + 0x3c]
push ecx
push 0
push edx
mov ecx, esi
call fcn.10001ec4
mov esi, dword [esp + 0x174]
push esi
call fcn.10041160
push 1
lea ecx, [esp + 0x30]
mov byte [esp + 0x160], 0
call fcn.10002040
jmp 0x1004088e
mov edi, str.apphwnd
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x1c]
not ecx
dec ecx
push ecx
push str.apphwnd
push eax
push ebp
lea ecx, [esp + 0x24]
call fcn.10003694
cmp eax, ebp
jne 0x10040d49
mov ecx, dword [esi]
mov esi, dword [esp + 0x164]
push ecx
push esi
call fcn.10057600
jmp 0x1004088e
mov edi, str.apphinstance
mov ecx, ebx
xor eax, eax
mov edx, dword [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.apphinstance
push edx
push ebp
lea ecx, [esp + 0x24]
call fcn.10003694
cmp eax, ebp
jne 0x10040d86
mov eax, dword [esi + 4]
mov esi, dword [esp + 0x164]
push eax
push esi
call fcn.10057600
jmp 0x1004088e
mov edi, str.windowsdir
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, dword [esp + 0x20]
push str.windowsdir
push ecx
push ebp
lea ecx, [esp + 0x24]
call fcn.10003694
cmp eax, ebp
jne 0x10040e24
lea edx, [esp + 0x4c]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je case.default.0x100408e2
mov al, byte [esp + 0x13]
sub esp, 0x10
mov ebp, esp
mov dword [esp + 0x34], esp
push 0
mov ecx, ebp
mov byte [ebp], al
call fcn.10002040
lea edi, [esp + 0x5c]
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
mov ecx, ebp
push ebx
call fcn.1000234b
test al, al
je 0x10040f5f
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
lea esi, [esp + 0x5c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call fcn.100044e0
jmp 0x10040f5f
mov edi, str.systemdir
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x1c]
not ecx
dec ecx
push ecx
push str.systemdir
push eax
push ebp
lea ecx, [esp + 0x24]
call fcn.10003694
cmp eax, ebp
jne 0x10040ec2
lea ecx, [esp + 0x4c]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je case.default.0x100408e2
mov dl, byte [esp + 0x13]
sub esp, 0x10
mov ebp, esp
mov dword [esp + 0x34], esp
push 0
mov ecx, ebp
mov byte [ebp], dl
call fcn.10002040
lea edi, [esp + 0x5c]
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
mov ecx, ebp
push ebx
call fcn.1000234b
test al, al
je 0x10040f5f
mov edi, dword [ebp + 4]
mov ecx, ebx
mov eax, ecx
lea esi, [esp + 0x5c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call fcn.100044e0
jmp 0x10040f5f
mov edi, str.tempdir
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, dword [esp + 0x20]
push str.tempdir
push ecx
push ebp
lea ecx, [esp + 0x24]
call fcn.10003694
cmp eax, ebp
jne 0x10040f87
lea edx, [esp + 0x4c]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je case.default.0x100408e2
mov al, byte [esp + 0x13]
sub esp, 0x10
mov ebp, esp
mov dword [esp + 0x34], esp
push 0
mov ecx, ebp
mov byte [ebp], al
call fcn.10002040
lea edi, [esp + 0x5c]
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
mov ecx, ebp
push ebx
call fcn.1000234b
test al, al
je 0x10040f5f
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
lea esi, [esp + 0x5c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp + 8], ebx
mov ebp, dword [ebp + 4]
add ebp, ebx
mov byte [ebp], 0
mov esi, dword [esp + 0x174]
push esi
call fcn.10041160
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x160], 0xffffffff
call fcn.10002040
jmp 0x10041128
mov edi, str.direct3d7
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x1c]
not ecx
dec ecx
push ecx
push str.direct3d7
push eax
push ebp
lea ecx, [esp + 0x24]
call fcn.10003694
cmp eax, ebp
jne 0x10040fcf
mov eax, dword [esi + 0x10]
cmp eax, ebp
je case.default.0x100408e2
mov ecx, dword [eax + 8]
mov esi, dword [esp + 0x164]
push ecx
push esi
call fcn.10057600
jmp 0x1004088e
mov edi, str.direct3ddevice7
mov ecx, ebx
xor eax, eax
mov edx, dword [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.direct3ddevice7
push edx
push ebp
lea ecx, [esp + 0x24]
call fcn.10003694
test eax, eax
jne 0x1004101d
mov eax, dword [esi + 0x10]
cmp eax, ebp
je case.default.0x100408e2
mov eax, dword [eax + 0xc]
mov esi, dword [esp + 0x164]
push eax
push esi
call fcn.10057600
mov ecx, dword [esp + 0x18]
cmp ecx, ebp
jmp 0x1004110a
mov edi, str.directdraw7
mov ecx, ebx
xor eax, eax
mov edx, dword [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
mov ecx, edx
cmp edx, ebp
jb 0x10041039
mov ecx, ebp
mov ebx, dword [esp + 0x18]
mov edi, str.directdraw7
mov esi, ebx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x1004104f
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x10041070
cmp edx, ebp
jb 0x10041070
cmp edx, ebp
setne al
test eax, eax
jne 0x10041070
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx + 0x10]
test eax, eax
je case.default.0x100408e2
mov edx, dword [eax]
push edx
jmp 0x100410bb
mov edi, str.directinput7
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
mov ecx, edx
cmp edx, ebp
jb 0x10041089
mov ecx, ebp
mov edi, str.directinput7
mov esi, ebx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x1004109b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne case.default.0x100408e2
cmp edx, ebp
jb case.default.0x100408e2
cmp edx, ebp
setne al
test eax, eax
jne case.default.0x100408e2
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 0xc]
test eax, eax
je case.default.0x100408e2
mov ecx, dword [eax + 4]
push ecx
mov esi, dword [esp + 0x168]
push esi
call fcn.10057600
mov ecx, dword [esp + 0x18]
test ecx, ecx
jmp 0x1004110a
mov esi, dword [esp + 0x164]
mov dl, byte [esp + 0x13]
xor ebx, ebx
mov edi, 0x10115cbc
or ecx, 0xffffffff
xor eax, eax
mov byte [esi], dl
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x10115cbc
mov ecx, esi
call fcn.100022af
mov ecx, dword [esp + 0x18]
cmp ecx, ebx
je 0x10041128
mov al, byte [ecx - 1]
test al, al
je 0x1004111e
cmp al, 0xff
je 0x1004111e
dec al
mov byte [ecx - 1], al
jmp 0x10041128
dec ecx
push ecx
call fcn.100d0293
add esp, 4
mov ecx, dword [esp + 0x154]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x150
ret 8