Function at 0x1003ddc0
Capabilities:
Check os version
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x100fc4a1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1d4
mov eax, dword [esp + 0x1e8]
push ebx
push ebp
push esi
push edi
push eax
lea ecx, [esp + 0x18]
xor ebp, ebp
push ecx
mov dword [esp + 0x2c], ebp
call fcn.100561d0
mov edx, dword [esp + 0x1c]
or esi, 0xffffffff
xor eax, eax
mov edi, 0x10111ac4
mov ecx, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x10111ac4
push edx
push ebp
lea ecx, [esp + 0x24]
mov dword [esp + 0x1fc], ebp
call fcn.1000322d
cmp eax, ebp
jne 0x1003de71
mov ebx, dword [esp + 0x1f4]
mov al, byte [esp + 0x13]
push ebp
mov ecx, ebx
mov byte [ebx], al
call fcn.10001fd0
xor eax, eax
mov edi, str.Intel
mov ecx, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Intel
mov ecx, ebx
call fcn.100021fe
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x1f0], esi
call fcn.10001fd0
mov eax, ebx
jmp 0x1003e4ca
xor eax, eax
mov edi, 0x10111ab8
mov ecx, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, dword [esp + 0x20]
push 0x10111ab8
push ecx
push ebp
lea ecx, [esp + 0x24]
call fcn.1000322d
cmp eax, ebp
jne 0x1003e0c9
lea edx, [esp + 0x48]
xor eax, eax
mov dword [esp + 0x48], 0x94
mov ecx, 0x24
lea edi, [esp + 0x4c]
push edx
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x1003e44d
mov eax, dword [esp + 0x4c]
sub eax, 3
je 0x1003e075
dec eax
je 0x1003df80
dec eax
jne 0x1003e44d
mov eax, dword [esp + 0x50]
sub eax, ebp
je 0x1003df37
dec eax
jne 0x1003e44d
mov ebx, dword [esp + 0x1f4]
mov al, byte [esp + 0x13]
push ebp
mov ecx, ebx
mov byte [ebx], al
call fcn.10001fd0
xor eax, eax
mov edi, 0x10111aac
mov ecx, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x10111aac
mov ecx, ebx
call fcn.100021fe
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x1f0], esi
call fcn.10001fd0
mov eax, ebx
jmp 0x1003e4ca
mov ebx, dword [esp + 0x1f4]
mov cl, byte [esp + 0x13]
mov byte [ebx], cl
push ebp
mov ecx, ebx
call fcn.10001fd0
xor eax, eax
mov edi, 0x10111a9c
mov ecx, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x10111a9c
mov ecx, ebx
call fcn.100021fe
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x1f0], esi
call fcn.10001fd0
mov eax, ebx
jmp 0x1003e4ca
mov eax, dword [esp + 0x50]
cmp eax, ebp
je 0x1003e02c
cmp eax, 0xa
je 0x1003dfe3
cmp eax, 0x5a
jne 0x1003e44d
mov ebx, dword [esp + 0x1f4]
mov dl, byte [esp + 0x13]
push ebp
mov ecx, ebx
mov byte [ebx], dl
call fcn.10001fd0
xor eax, eax
mov edi, 0x10111a90
mov ecx, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x10111a90
mov ecx, ebx
call fcn.100021fe
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x1f0], esi
call fcn.10001fd0
mov eax, ebx
jmp 0x1003e4ca
mov ebx, dword [esp + 0x1f4]
mov al, byte [esp + 0x13]
push ebp
mov ecx, ebx
mov byte [ebx], al
call fcn.10001fd0
xor eax, eax
mov edi, 0x10111a84
mov ecx, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x10111a84
mov ecx, ebx
call fcn.100021fe
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x1f0], esi
call fcn.10001fd0
mov eax, ebx
jmp 0x1003e4ca
mov ebx, dword [esp + 0x1f4]
mov cl, byte [esp + 0x13]
mov byte [ebx], cl
push ebp
mov ecx, ebx
call fcn.10001fd0
xor eax, eax
mov edi, str.Windows_95
mov ecx, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Windows_95
mov ecx, ebx
call fcn.100021fe
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x1f0], esi
call fcn.10001fd0
mov eax, ebx
jmp 0x1003e4ca
cmp dword [esp + 0x50], 0x33
jne 0x1003e44d
mov ebx, dword [esp + 0x1f4]
mov dl, byte [esp + 0x13]
push ebp
mov ecx, ebx
mov byte [ebx], dl
call fcn.10001fd0
xor eax, eax
mov edi, str.Windows_NT_3.1
mov ecx, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Windows_NT_3.1
mov ecx, ebx
call fcn.100021fe
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x1f0], esi
call fcn.10001fd0
mov eax, ebx
jmp 0x1003e4ca
xor eax, eax
mov edi, str.appdir
mov ecx, esi
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x1c]
not ecx
dec ecx
push ecx
push str.appdir
push eax
push ebp
lea ecx, [esp + 0x24]
call fcn.1000322d
cmp eax, ebp
jne 0x1003e225
push 0x104
lea ecx, [esp + 0xe0]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x1003e44d
mov dl, byte [esp + 0x13]
push ebp
lea ecx, [esp + 0x2c]
mov byte [esp + 0x2c], dl
call fcn.10001fd0
xor eax, eax
lea edi, [esp + 0xdc]
mov ecx, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
push 1
push ebx
lea ecx, [esp + 0x30]
call fcn.1000229a
test al, al
je 0x1003e16e
mov edi, dword [esp + 0x2c]
mov ecx, ebx
mov eax, ecx
shr ecx, 2
lea esi, [esp + 0xdc]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
lea ecx, [esp + 0x2c]
call fcn.10004020
or esi, 0xffffffff
xor ebp, ebp
mov eax, dword [0x10100440]
push 1
push eax
lea ecx, [esp + 0x1b]
push ecx
lea ecx, [esp + 0x34]
mov byte [esp + 0x1f8], 1
mov byte [esp + 0x1f], 0x5c
call fcn.1001bcc0
cmp eax, dword [0x10100440]
je 0x1003e1d6
push eax
push ebp
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x34]
call fcn.10001b28
mov ecx, dword [0x10100440]
push ecx
push ebp
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x1f8], 2
call fcn.10001e54
push 1
lea ecx, [esp + 0x3c]
mov byte [esp + 0x1f0], 1
call fcn.10001fd0
mov dl, byte [esp + 0x28]
sub esp, 0x10
mov edi, esp
mov dword [esp + 0x34], esp
push ebp
mov ecx, edi
mov byte [edi], dl
call fcn.10001fd0
mov eax, dword [0x10100440]
push eax
push ebp
lea ecx, [esp + 0x40]
push ecx
mov ecx, edi
call fcn.10001e54
mov edi, dword [esp + 0x204]
push edi
call fcn.1003e4f0
push 1
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1f0], 0
call fcn.10001fd0
jmp 0x1003e380
mov edx, dword [esp + 0x1c]
xor eax, eax
mov edi, str.windowsdir
mov ecx, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.windowsdir
push edx
push ebp
lea ecx, [esp + 0x24]
call fcn.1000322d
cmp eax, ebp
jne 0x1003e2cb
push 0x104
lea eax, [esp + 0xe0]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x1003e44d
mov cl, byte [esp + 0x13]
sub esp, 0x10
mov ebp, esp
mov dword [esp + 0x34], esp
mov byte [ebp], cl
push 0
mov ecx, ebp
call fcn.10001fd0
xor eax, eax
lea edi, [esp + 0xec]
mov ecx, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
push 1
push ebx
mov ecx, ebp
call fcn.1000229a
test al, al
je 0x1003e373
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
lea esi, [esp + 0xec]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
mov ecx, ebp
call fcn.10004020
jmp 0x1003e370
xor eax, eax
mov edi, str.systemdir
mov ecx, esi
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.1000322d
cmp eax, ebp
jne 0x1003e399
push 0x104
lea ecx, [esp + 0xe0]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x1003e44d
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.10001fd0
xor eax, eax
lea edi, [esp + 0xec]
mov ecx, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
push 1
push ebx
mov ecx, ebp
call fcn.1000229a
test al, al
je 0x1003e373
mov edi, dword [ebp + 4]
mov ecx, ebx
mov eax, ecx
shr ecx, 2
lea esi, [esp + 0xec]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
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
or esi, 0xffffffff
mov edi, dword [esp + 0x204]
push edi
call fcn.1003e4f0
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x1f0], esi
call fcn.10001fd0
mov eax, edi
jmp 0x1003e4ca
xor eax, eax
mov edi, str.tempdir
mov ecx, esi
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.1000322d
test eax, eax
jne 0x1003e44d
lea edx, [esp + 0xdc]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x1003e44d
mov al, byte [esp + 0x13]
sub esp, 0x10
mov edx, esp
mov byte [edx], al
xor eax, eax
mov dword [edx + 4], ebp
mov dword [edx + 8], ebp
mov dword [edx + 0xc], ebp
lea edi, [esp + 0xec]
mov ecx, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x34], esp
push ecx
lea ecx, [esp + 0xf0]
push ecx
mov ecx, edx
call fcn.100021fe
mov esi, dword [esp + 0x204]
push esi
call fcn.1003e4f0
mov ecx, dword [esp + 0x18]
cmp ecx, ebp
je 0x1003e449
mov al, byte [ecx - 1]
test al, al
je 0x1003e43f
cmp al, 0xff
je 0x1003e43f
dec al
mov byte [ecx - 1], al
mov eax, esi
jmp 0x1003e4ca
dec ecx
push ecx
call fcn.1008cc5c
add esp, 4
mov eax, esi
jmp 0x1003e4ca
mov ebp, dword [esp + 0x1f4]
mov dl, byte [esp + 0x13]
push 0
mov ecx, ebp
mov byte [ebp], dl
call fcn.10001fd0
xor eax, eax
mov edi, 0x1012aca8
mov ecx, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
push 1
push ebx
mov ecx, ebp
call fcn.1000229a
test al, al
je 0x1003e4a4
mov edi, dword [ebp + 4]
mov ecx, ebx
mov eax, ecx
shr ecx, 2
mov esi, 0x1012aca8
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [ecx + ebx], 0
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x1003e4c8
mov al, byte [ecx - 1]
test al, al
je 0x1003e4be
cmp al, 0xff
je 0x1003e4be
dec al
mov byte [ecx - 1], al
jmp 0x1003e4c8
dec ecx
push ecx
call fcn.1008cc5c
add esp, 4
mov eax, ebp
mov ecx, dword [esp + 0x1e4]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x1e0
ret 8