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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x402ff0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2a8
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], 0
mov eax, 0
cpuid
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], ecx
mov eax, 1
cpuid
mov dword [ebp - 0x10], edx
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x4026f5
mov eax, ebx
xor edx, edx
mov ecx, 0x1a
lea edi, [esi + 0xe8]
div ecx
mov ecx, edi
add dl, 0x61
push edx
call fcn.00402a44
mov eax, ebx
xor edx, edx
mov ecx, 0x19
div ecx
mov ecx, edi
add dl, 0x62
push edx
call fcn.00402a44
mov eax, ebx
xor edx, edx
mov ecx, 0x18
div ecx
mov ecx, edi
add dl, 0x63
push edx
call fcn.00402a44
mov eax, ebx
xor edx, edx
mov ecx, 0x17
div ecx
mov ecx, edi
add dl, 0x64
push edx
call fcn.00402a44
mov eax, ebx
xor edx, edx
mov ecx, 0x16
div ecx
mov ecx, edi
add dl, 0x65
push edx
call fcn.00402a44
mov eax, ebx
xor edx, edx
mov ecx, 0x15
div ecx
mov ecx, edi
add dl, 0x66
push edx
call fcn.00402a44
push str..dll
mov ecx, edi
call fcn.00402a14
mov eax, ebx
xor edx, edx
mov ecx, 0x14
lea edi, [esi + 0xf0]
div ecx
mov ecx, edi
add dl, 0x66
push edx
call fcn.00402a44
mov eax, ebx
xor edx, edx
mov ecx, 0x13
div ecx
mov ecx, edi
add dl, 0x67
push edx
call fcn.00402a44
mov eax, ebx
xor edx, edx
mov ecx, 0x12
div ecx
mov ecx, edi
add dl, 0x68
push edx
call fcn.00402a44
mov eax, ebx
xor edx, edx
mov ecx, 0x11
div ecx
add dl, 0x69
mov ecx, edi
push edx
call fcn.00402a44
mov dl, bl
mov ecx, edi
and dl, 0xf
add dl, 0x6a
push edx
call fcn.00402a44
mov eax, ebx
xor edx, edx
mov ecx, 0xf
div ecx
mov ecx, edi
add dl, 0x6b
push edx
call fcn.00402a44
push str..dll
mov ecx, edi
call fcn.00402a14
lea edi, [esi + 0xe4]
push 0x40424c
mov ecx, edi
call sub.MFC42.DLL_CString::operator_1
push 0x404248
mov ecx, edi
call fcn.00402a14
push str..dll
mov ecx, edi
call fcn.00402a14
lea edi, [esi + 0xec]
push 0x404244
mov ecx, edi
call sub.MFC42.DLL_CString::operator_1
push 0x404240
mov ecx, edi
call fcn.00402a14
push str..dll
mov ecx, edi
call fcn.00402a14
lea ebx, [esi + 0x100]
push str.c:RE
mov ecx, ebx
call sub.MFC42.DLL_CString::operator_1
push 0x404234
mov ecx, ebx
call fcn.00402a14
push str.led_
mov ecx, ebx
call fcn.00402a14
mov ecx, 0x27
xor eax, eax
lea edi, [ebp - 0xc0]
lea edx, [ebp - 0xc0]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push edx
mov dword [ebp - 0xc0], 0x9c
call edi
test eax, eax
jne 0x4027b2
lea eax, [ebp - 0xc0]
mov dword [ebp - 0xc0], 0x94
push eax
call edi
cmp dword [ebp - 0xbc], 6
jb 0x4027df
push str.c:_Re
mov ecx, ebx
call sub.MFC42.DLL_CString::operator_1
push 0x404234
mov ecx, ebx
call fcn.00402a14
push str.le.bin_
mov ecx, ebx
call fcn.00402a14
push 0x404218
lea ecx, [ebp - 0x10]
push ebx
push ecx
call sub.MFC42.DLL_operator_1
lea edi, [esi + 0xf4]
push eax
mov ecx, edi
mov dword [ebp - 4], 0
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
push str..dat
mov ecx, edi
call fcn.00402a14
push 0x40424c
lea edx, [ebp - 0x14]
push ebx
push edx
call sub.MFC42.DLL_operator_1
lea edi, [esi + 0xf8]
push eax
mov ecx, edi
mov dword [ebp - 4], 1
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
push str..dat
mov ecx, edi
call fcn.00402a14
lea eax, [ebp - 0x2b4]
push 0x1f4
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [ebp - 0x2b4]
add esi, 0xfc
push ecx
mov ecx, esi
call sub.MFC42.DLL_CString::operator_1
push 0x5c
mov ecx, esi
call fcn.00402a44
mov ecx, esi
call sub.MFC42.DLL_CString::MakeUpper
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret