Function at 0x10051ef0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100ddfab
mov eax, dword fs:[0]
push eax
sub esp, 0x168
mov eax, dword [0x10108c80]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x170], ecx
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
push eax
lea eax, [ebp - 0x130]
mov dword [ebp - 0x16c], esi
push eax
mov dword [ebp - 0x168], esi
call fcn.1005f900
push 0x100e51e4
lea eax, [ebp - 0x130]
mov dword [ebp - 4], 0
push eax
call fcn.1004f2a0
test al, al
je 0x10051fce
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 5
mov dword [esi + 0x14], 0xf
mov eax, dword [str.Intel]
mov dword [esi], eax
mov al, byte [0x100e51ec]
mov byte [esi + 4], al
mov byte [esi + 5], 0
mov ecx, dword [ebp - 0x11c]
cmp ecx, 0xf
jbe 0x10052154
mov edx, dword [ebp - 0x130]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10051fc7
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10052a4e
push ecx
push edx
jmp 0x1005214c
mov edx, dword [ebp - 0x11c]
lea ecx, [ebp - 0x130]
mov edi, dword [ebp - 0x130]
cmp edx, 0xf
mov eax, dword [ebp - 0x120]
cmova ecx, edi
cmp eax, 2
jne 0x100523e3
mov esi, dword [ebp - 0x16c]
sub eax, 4
mov dword [ebp - 0x164], 0x100e51f0
mov dword [ebp - 0x168], eax
jb 0x1005203d
mov edx, dword [ebp - 0x164]
mov eax, dword [ecx]
cmp eax, dword [edx]
mov edx, dword [ebp - 0x11c]
jne 0x10052042
mov eax, dword [ebp - 0x168]
add ecx, 4
add dword [ebp - 0x164], 4
sub eax, 4
mov dword [ebp - 0x168], eax
jae 0x10052010
cmp eax, 0xfffffffc
je 0x100520ac
mov edx, dword [ebp - 0x164]
mov al, byte [ecx]
cmp al, byte [edx]
mov edx, dword [ebp - 0x11c]
jne 0x100520a5
cmp dword [ebp - 0x168], 0xfffffffd
je 0x100520ac
mov esi, dword [ebp - 0x164]
mov al, byte [ecx + 1]
cmp al, byte [esi + 1]
mov esi, dword [ebp - 0x16c]
jne 0x100520a5
cmp dword [ebp - 0x168], 0xfffffffe
je 0x100520ac
mov edx, dword [ebp - 0x164]
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
mov edx, dword [ebp - 0x11c]
jne 0x100520a5
cmp dword [ebp - 0x168], 0xffffffff
je 0x100520ac
mov al, byte [ecx + 3]
mov ecx, dword [ebp - 0x164]
cmp al, byte [ecx + 3]
je 0x100520ac
sbb eax, eax
or eax, 1
jmp 0x100520ae
xor eax, eax
test eax, eax
jne 0x100523dd
mov ecx, dword [ebp - 0x170]
mov eax, dword [ecx + 0x90]
add eax, 0xfffffffd
cmp eax, 3
ja case.default.0x100520ce
jmp dword [eax*4 + 0x10052a54]
cmp dword [ecx + 0x94], 0x33
jne case.default.0x100520ce
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0xe
mov dword [esi + 0x14], 0xf
movq xmm0, qword [str.Windows_NT_3.1]
movq qword [esi], xmm0
mov eax, dword [0x100e51fc]
mov dword [esi + 8], eax
mov ax, word [0x100e5200]
mov word [esi + 0xc], ax
mov byte [esi + 0xe], 0
cmp edx, 0xf
jbe 0x10052154
inc edx
mov eax, edi
cmp edx, 0x1000
jb 0x1005214a
mov edi, dword [eax - 4]
add edx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10052a4e
push edx
push edi
call fcn.100ace28
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100ad4b8
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ecx + 0x94]
test eax, eax
je 0x10052211
cmp eax, 0xa
je 0x100521d0
cmp eax, 0x5a
jne case.default.0x100520ce
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0xa
mov dword [esi + 0x14], 0xf
movq xmm0, qword [str.Windows_ME]
movq qword [esi], xmm0
mov ax, word [0x100e5224]
mov word [esi + 8], ax
mov byte [esi + 0xa], 0
jmp 0x10052126
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0xa
mov dword [esi + 0x14], 0xf
movq xmm0, qword [str.Windows_98]
movq qword [esi], xmm0
mov ax, word [0x100e5218]
mov word [esi + 8], ax
mov byte [esi + 0xa], 0
jmp 0x10052126
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0xa
mov dword [esi + 0x14], 0xf
movq xmm0, qword [str.Windows_95]
movq qword [esi], xmm0
mov ax, word [0x100e520c]
mov word [esi + 8], ax
mov byte [esi + 0xa], 0
jmp 0x10052126
mov eax, dword [ecx + 0x94]
sub eax, 0
je 0x1005230c
sub eax, 1
je 0x100522cb
sub eax, 1
jne case.default.0x100520ce
xorps xmm0, xmm0
mov dword [ebp - 0x168], 0x1f
movups xmmword [esi], xmm0
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
lea eax, [ebp - 0x168]
push eax
push esi
call fcn.10001bb0
mov ecx, eax
mov dword [esi + 0x10], 0x13
mov eax, dword [ebp - 0x168]
mov dword [esi], ecx
mov dword [esi + 0x14], eax
movups xmm0, xmmword [str.Windows_Server_2003]
movups xmmword [ecx], xmm0
mov ax, word [0x100e5254]
mov word [ecx + 0x10], ax
mov al, byte [0x100e5256]
mov byte [ecx + 0x12], al
mov byte [ecx + 0x13], 0
jmp 0x10051f93
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0xa
mov dword [esi + 0x14], 0xf
movq xmm0, qword [str.Windows_XP]
movq qword [esi], xmm0
mov ax, word [0x100e5240]
mov word [esi + 8], ax
mov byte [esi + 0xa], 0
jmp 0x10052126
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0xc
mov dword [esi + 0x14], 0xf
movq xmm0, qword [str.Windows_2000]
movq qword [esi], xmm0
mov eax, dword [0x100e5230]
mov dword [esi + 8], eax
mov byte [esi + 0xc], 0
jmp 0x10052126
mov eax, dword [ecx + 0x94]
sub eax, 0
je 0x10052396
sub eax, 1
jne case.default.0x100520ce
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x10], 9
mov dword [esi + 0x14], 0xf
movq xmm0, qword [str.Windows_7]
movq qword [esi], xmm0
mov al, byte [0x100e5270]
mov byte [esi + 8], al
mov byte [esi + 9], 0
jmp 0x10052126
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0xd
mov dword [esi + 0x14], 0xf
movq xmm0, qword [str.Windows_Vista]
movq qword [esi], xmm0
mov eax, dword [0x100e5260]
mov dword [esi + 8], eax
mov al, byte [0x100e5264]
mov byte [esi + 0xc], al
mov byte [esi + 0xd], 0
jmp 0x10052126
mov eax, dword [ebp - 0x120]
cmp edx, 0xf
lea ecx, [ebp - 0x130]
cmova ecx, edi
cmp eax, 6
jne 0x100526a3
mov esi, dword [ebp - 0x16c]
sub eax, 4
mov dword [ebp - 0x164], str.appdir
mov dword [ebp - 0x168], eax
jb 0x10052440
mov esi, dword [ebp - 0x164]
mov eax, dword [ecx]
cmp eax, dword [esi]
mov esi, dword [ebp - 0x16c]
jne 0x10052445
mov eax, dword [ebp - 0x168]
add ecx, 4
add dword [ebp - 0x164], 4
sub eax, 4
mov dword [ebp - 0x168], eax
jae 0x10052413
cmp eax, 0xfffffffc
je 0x100524af
mov esi, dword [ebp - 0x164]
mov al, byte [ecx]
cmp al, byte [esi]
mov esi, dword [ebp - 0x16c]
jne 0x100524a8
cmp dword [ebp - 0x168], 0xfffffffd
je 0x100524af
mov esi, dword [ebp - 0x164]
mov al, byte [ecx + 1]
cmp al, byte [esi + 1]
mov esi, dword [ebp - 0x16c]
jne 0x100524a8
cmp dword [ebp - 0x168], 0xfffffffe
je 0x100524af
mov esi, dword [ebp - 0x164]
mov al, byte [ecx + 2]
cmp al, byte [esi + 2]
mov esi, dword [ebp - 0x16c]
jne 0x100524a8
cmp dword [ebp - 0x168], 0xffffffff
je 0x100524af
mov al, byte [ecx + 3]
mov ecx, dword [ebp - 0x164]
cmp al, byte [ecx + 3]
je 0x100524af
sbb eax, eax
or eax, 1
jmp 0x100524b1
xor eax, eax
test eax, eax
jne 0x100526a3
push 0x104
lea eax, [ebp - 0x118]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x100528f7
xorps xmm0, xmm0
mov dword [ebp - 0x138], 0
lea ecx, [ebp - 0x118]
mov dword [ebp - 0x134], 0
movups xmmword [ebp - 0x148], xmm0
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10052500
sub ecx, edx
lea eax, [ebp - 0x118]
push ecx
push eax
lea ecx, [ebp - 0x148]
call fcn.10001c10
cmp dword [ebp - 0x134], 0xf
lea edx, [ebp - 0x148]
mov edi, dword [ebp - 0x138]
cmova edx, dword [ebp - 0x148]
mov byte [ebp - 4], 1
test edi, edi
je 0x1005255e
or ecx, 0xffffffff
lea eax, [edi - 1]
cmp eax, ecx
cmovb ecx, eax
add ecx, edx
cmp byte [ecx], 0x5c
je 0x1005255a
cmp ecx, edx
je 0x1005255e
dec ecx
cmp byte [ecx], 0x5c
jne 0x10052550
sub ecx, edx
jmp 0x10052561
or ecx, 0xffffffff
cmp ecx, 0xffffffff
je 0x100525fa
cmp edi, ecx
mov dword [ebp - 0x150], 0
lea eax, [ebp - 0x148]
mov dword [ebp - 0x14c], 0
cmovb ecx, edi
xorps xmm0, xmm0
cmp dword [ebp - 0x134], 0xf
push ecx
cmova eax, dword [ebp - 0x148]
lea ecx, [ebp - 0x160]
push eax
movups xmmword [ebp - 0x160], xmm0
call fcn.10001c10
lea eax, [ebp - 0x160]
push eax
lea ecx, [ebp - 0x148]
call fcn.100029a0
mov ecx, dword [ebp - 0x14c]
cmp ecx, 0xf
jbe 0x100525fa
mov edx, dword [ebp - 0x160]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x100525f0
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10052a49
push ecx
push edx
call fcn.100ace28
add esp, 8
sub esp, 0x18
lea eax, [ebp - 0x148]
mov ecx, esp
push eax
call fcn.10002200
push esi
call fcn.10052ac0
mov ecx, dword [ebp - 0x134]
cmp ecx, 0xf
jbe 0x1005264b
mov edx, dword [ebp - 0x148]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10052641
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10052a49
push ecx
push edx
call fcn.100ace28
add esp, 8
mov ecx, dword [ebp - 0x11c]
mov dword [ebp - 0x138], 0
mov dword [ebp - 0x134], 0xf
mov byte [ebp - 0x148], 0
cmp ecx, 0xf
jbe 0x10052154
mov edx, dword [ebp - 0x130]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10051fc7
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10052a49
jmp 0x10051fc7
cmp edx, 0xf
lea ecx, [ebp - 0x130]
mov edx, dword [ebp - 0x120]
cmova ecx, edi
cmp edx, 7
jne 0x1005276d
mov dword [ebp - 0x164], str.apphwnd
sub edx, 4
jb 0x100526f1
nop dword [eax]
mov esi, dword [ebp - 0x164]
mov eax, dword [ecx]
cmp eax, dword [esi]
mov esi, dword [ebp - 0x16c]
jne 0x100526f6
add dword [ebp - 0x164], 4
add ecx, 4
sub edx, 4
jae 0x100526d0
cmp edx, 0xfffffffc
je 0x10052754
mov esi, dword [ebp - 0x164]
mov al, byte [ecx]
cmp al, byte [esi]
mov esi, dword [ebp - 0x16c]
jne 0x1005274d
cmp edx, 0xfffffffd
je 0x10052754
mov esi, dword [ebp - 0x164]
mov al, byte [ecx + 1]
cmp al, byte [esi + 1]
mov esi, dword [ebp - 0x16c]
jne 0x1005274d
cmp edx, 0xfffffffe
je 0x10052754
mov esi, dword [ebp - 0x164]
mov al, byte [ecx + 2]
cmp al, byte [esi + 2]
mov esi, dword [ebp - 0x16c]
jne 0x1005274d
cmp edx, 0xffffffff
je 0x10052754
mov al, byte [ecx + 3]
mov ecx, dword [ebp - 0x164]
cmp al, byte [ecx + 3]
je 0x10052754
sbb eax, eax
or eax, 1
jmp 0x10052756
xor eax, eax
test eax, eax
jne 0x1005276d
mov eax, dword [ebp - 0x170]
push dword [eax]
push esi
call fcn.1005f890
jmp 0x10051f93
push str.apphinstance
lea eax, [ebp - 0x130]
push eax
call fcn.1004f2a0
test al, al
je 0x10052796
mov eax, dword [ebp - 0x170]
push dword [eax + 4]
push esi
call fcn.1005f890
jmp 0x10051f93
push str.windowsdir
lea eax, [ebp - 0x130]
push eax
call fcn.1004f2a0
test al, al
je 0x1005280a
push 0x104
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x100528f7
sub esp, 0x18
lea ecx, [ebp - 0x118]
mov edx, esp
lea edi, [ecx + 1]
xorps xmm0, xmm0
movups xmmword [edx], xmm0
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100527e7
sub ecx, edi
lea eax, [ebp - 0x118]
push ecx
push eax
mov ecx, edx
call fcn.10001c10
push esi
call fcn.10052ac0
jmp 0x10051f93
push str.systemdir
lea eax, [ebp - 0x130]
push eax
call fcn.1004f2a0
test al, al
je 0x10052883
push 0x104
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x100528f7
sub esp, 0x18
lea ecx, [ebp - 0x118]
mov edx, esp
lea edi, [ecx + 1]
xorps xmm0, xmm0
movups xmmword [edx], xmm0
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10052860
sub ecx, edi
lea eax, [ebp - 0x118]
push ecx
push eax
mov ecx, edx
call fcn.10001c10
push esi
call fcn.10052ac0
jmp 0x10051f93
push str.tempdir
lea eax, [ebp - 0x130]
push eax
call fcn.1004f2a0
test al, al
je 0x10052959
lea eax, [ebp - 0x118]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x100528f7
sub esp, 0x18
lea ecx, [ebp - 0x118]
mov edx, esp
lea edi, [ecx + 1]
xorps xmm0, xmm0
movups xmmword [edx], xmm0
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100528d4
sub ecx, edi
lea eax, [ebp - 0x118]
push ecx
push eax
mov ecx, edx
call fcn.10001c10
push esi
call fcn.10052ac0
jmp 0x10051f93
mov edi, dword [ebp - 0x130]
mov edx, dword [ebp - 0x11c]
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
cmp edx, 0xf
jbe 0x10052154
inc edx
mov eax, edi
cmp edx, 0x1000
jb 0x1005214a
mov edi, dword [eax - 4]
add edx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10052a4e
jmp 0x1005214a
push str.direct3d7
lea eax, [ebp - 0x130]
push eax
call fcn.1004f2a0
test al, al
je 0x10052989
mov eax, dword [ebp - 0x170]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x100528fd
push dword [eax + 8]
push esi
call fcn.1005f890
jmp 0x10051f93
push str.direct3ddevice7
lea eax, [ebp - 0x130]
push eax
call fcn.1004f2a0
test al, al
je 0x100529c8
mov eax, dword [ebp - 0x170]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x100528fd
push dword [eax + 0xc]
push esi
call fcn.1005f890
lea ecx, [ebp - 0x130]
call fcn.10002900
jmp 0x10052154
push str.directdraw7
lea eax, [ebp - 0x130]
push eax
call fcn.1004f2a0
test al, al
je 0x10052a06
mov eax, dword [ebp - 0x170]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x100528fd
push dword [eax]
push esi
call fcn.1005f890
lea ecx, [ebp - 0x130]
call fcn.10002900
jmp 0x10052154
push str.directinput7
lea eax, [ebp - 0x130]
push eax
call fcn.1004f2a0
test al, al
je 0x100528fd
mov eax, dword [ebp - 0x170]
mov eax, dword [eax + 8]
test eax, eax
je 0x100528fd
push dword [eax + 4]
push esi
call fcn.1005f890
lea ecx, [ebp - 0x130]
call fcn.10002900
jmp 0x10052154
call fcn.100b251a
call fcn.100b251a
nop
aad 0x20
add eax, 86078224
adc byte [edx + 0x22], dl
add eax, 0x5234b10
adc ah, cl
int3