Function at 0x408bb0
Capabilities:
Get common file path
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52005c
mov eax, dword fs:[0]
push eax
sub esp, 0x43c
mov eax, dword [0x55c380]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
push 0x11c
mov dword [ebp - 0x374], eax
lea eax, [ebp - 0x368]
push 0
push eax
movups xmmword [ebp - 0x448], xmm0
mov dword [ebp - 0x428], 0
movups xmmword [ebp - 0x438], xmm0
call fcn.004f8b70
add esp, 0xc
mov dword [ebp - 0x368], 0x11c
push 0x5486e0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edi, eax
mov ecx, edi
call fcn.00408860
push str.GetVersionExW
push edi
mov dword [ebp - 0x36c], eax
call eax
lea ecx, [ebp - 0x368]
push ecx
call eax
test eax, eax
je 0x40931f
push str.GetNativeSystemInfo
push edi
call dword [ebp - 0x36c]
test eax, eax
je 0x408c71
lea ecx, [ebp - 0x448]
push ecx
call eax
jmp 0x408c7e
lea eax, [ebp - 0x448]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp dword [ebp - 0x358], 2
mov ecx, dword [ebp - 0x364]
mov eax, dword [ebp - 0x360]
mov dword [esi + 0x3c], ecx
mov dword [esi + 0x40], eax
jne 0x409318
cmp ecx, 4
jbe 0x409318
cmp ecx, 6
jb 0x408ccb
mov ax, word [ebp - 0x448]
cmp ax, 9
jne 0x408cc0
mov dword [esi], 1
jmp 0x408ccb
test ax, ax
jne 0x408ccb
mov dword [esi], 0
sub esp, 8
lea ecx, [ebp - 0x424]
call fcn.004098d0
mov edx, str.Microsoft
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x414]
call fcn.0040c8f0
cmp dword [ebp - 0x364], 6
jne case.0x408f2e.5
cmp dword [ebp - 0x360], 0
jne 0x408d37
cmp byte [ebp - 0x24e], 1
lea ecx, [ebp - 0x414]
mov edx, str.Windows_Vista
je 0x408d1f
mov edx, str.Windows_Server_2008
call fcn.0040c590
cmp dword [esi], 0
mov eax, 8
mov ecx, 0xf
cmovne eax, ecx
mov dword [esi + 4], eax
cmp dword [ebp - 0x360], 1
jne 0x408d71
cmp byte [ebp - 0x24e], 1
lea ecx, [ebp - 0x414]
mov edx, str.Windows_7
je 0x408d59
mov edx, str.Windows_Server_2008_R2
call fcn.0040c590
cmp dword [esi], 0
mov eax, 9
mov ecx, 0x10
cmovne eax, ecx
mov dword [esi + 4], eax
cmp dword [ebp - 0x360], 2
jne 0x408eb8
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x567028]
cmp eax, dword [ecx + 4]
jle 0x408ddc
push 0x567028
call fcn.004f5dd4
add esp, 4
cmp dword [0x567028], 0xffffffff
jne 0x408ddc
xor eax, eax
mov dword [0x567020], 7
push 0x524ae0
mov dword [0x56701c], 0
mov word [0x56700c], ax
call fcn.004f615e
push 0x567028
call fcn.004f5d95
add esp, 8
mov eax, dword [0x56701c]
test eax, eax
jne 0x408e5c
push 0x104
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x234]
call fcn.00402330
push str.kernel32.dll
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 1
call fcn.00402220
push ecx
lea edx, [ebp - 0x234]
lea ecx, [ebp - 0x24c]
call fcn.00408ac0
add esp, 4
mov ecx, 0x56700c
push eax
call fcn.004022b0
lea ecx, [ebp - 0x24c]
call fcn.00402270
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 0
call fcn.00402270
mov eax, dword [0x56701c]
cmp eax, 4
jbe 0x408e87
sub esp, 0xc
call fcn.00409710
test eax, eax
jne 0x408e87
mov edx, str.Windows_10
lea ecx, [ebp - 0x414]
call fcn.0040c590
mov eax, 0xc
lea ecx, [eax + 7]
jmp 0x408eaf
cmp byte [ebp - 0x24e], 1
lea ecx, [ebp - 0x414]
mov edx, str.Windows_8
je 0x408ea0
mov edx, str.Windows_Server_2012
call fcn.0040c590
mov eax, 0xa
mov ecx, 0x11
cmp dword [esi], 0
cmovne eax, ecx
mov dword [esi + 4], eax
cmp dword [ebp - 0x360], 3
jne 0x408ef2
cmp byte [ebp - 0x24e], 1
lea ecx, [ebp - 0x414]
mov edx, str.Windows_8.1
je 0x408eda
mov edx, str.Windows_Server_2012_R2
call fcn.0040c590
cmp dword [esi], 0
mov eax, 0xb
mov ecx, 0x12
cmovne eax, ecx
mov dword [esi + 4], eax
push str.GetProductInfo
push edi
call dword [ebp - 0x36c]
lea ecx, [ebp - 0x370]
push ecx
push 0
push 0
push dword [ebp - 0x360]
push dword [ebp - 0x364]
call eax
mov eax, dword [ebp - 0x370]
dec eax
cmp eax, 0x2f
ja case.0x408f2e.5
movzx eax, byte [eax + 0x409388]
jmp dword [eax*4 + 0x409340]
mov edx, str.Ultimate_Edition
jmp 0x408faa
mov edx, str.Professional
jmp 0x408faa
mov edx, str.Home_Premium_Edition
jmp 0x408faa
mov edx, str.Home_Basic_Edition
jmp 0x408faa
mov edx, str.Enterprise_Edition
jmp 0x408faa
mov edx, str.Business_Edition
jmp 0x408faa
mov edx, str.Starter_Edition
jmp 0x408faa
mov edx, str.Cluster_Server_Edition
jmp 0x408faa
mov edx, str.Datacenter_Edition
jmp 0x408faa
mov edx, str.Datacenter_Edition__core_installation_
jmp 0x408faa
mov edx, str.Enterprise_Edition__core_installation_
jmp 0x408faa
mov edx, str.Enterprise_Edition_for_Itanium_based_Systems
jmp 0x408faa
mov edx, str.Small_Business_Server
jmp 0x408faa
mov edx, str.Small_Business_Server_Premium_Edition
jmp 0x408faa
mov edx, str.Standard_Edition
jmp 0x408faa
mov edx, str.Standard_Edition__core_installation_
jmp 0x408faa
mov edx, str.Web_Server_Edition
lea ecx, [ebp - 0x414]
call fcn.0040c590
cmp dword [ebp - 0x364], 5
jne 0x4091a5
mov eax, dword [ebp - 0x360]
cmp eax, 2
jne 0x409104
push 0x59
mov dword [esi + 4], 7
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x408feb
mov edx, str.Windows_Server_2003_R2_
jmp 0x409033
mov eax, dword [ebp - 0x250]
test eax, 0x2000
je 0x408fff
mov edx, str.Windows_Storage_Server_2003
jmp 0x409033
test eax, 0x8000
je 0x40900d
mov edx, str.Windows_Home_Server
jmp 0x409033
cmp byte [ebp - 0x24e], 1
jne 0x40902e
cmp word [ebp - 0x448], 9
jne 0x40902e
mov dword [esi + 4], 0xd
mov edx, str.Windows_XP_Professional_x64_Edition
jmp 0x409033
mov edx, str.Windows_Server_2003_
lea ecx, [ebp - 0x414]
call fcn.0040c590
cmp byte [ebp - 0x24e], 1
je 0x4090f1
mov ax, word [ebp - 0x448]
cmp ax, 6
jne 0x40907b
mov eax, dword [ebp - 0x250]
mov dword [esi + 4], 0xe
test al, al
jns 0x409070
mov edx, str.Datacenter_Edition_for_Itanium_based_Systems
jmp 0x4090e6
test al, 2
je 0x4090f1
mov edx, str.Enterprise_Edition_for_Itanium_based_Systems
jmp 0x4090e6
cmp ax, 9
mov eax, dword [ebp - 0x250]
jne 0x4090b1
mov dword [esi + 4], 0xe
test al, al
jns 0x409099
mov edx, str.Datacenter_x64_Edition
jmp 0x4090e6
lea ecx, [ebp - 0x414]
test al, 2
je 0x4090aa
mov edx, str.Enterprise_x64_Edition
jmp 0x4090ec
mov edx, str.Standard_x64_Edition
jmp 0x4090ec
test eax, 0x4000
je 0x4090bf
mov edx, str.Compute_Cluster_Edition
jmp 0x4090e6
test al, al
jns 0x4090ca
mov edx, str.Datacenter_Edition
jmp 0x4090e6
test al, 2
je 0x4090d5
mov edx, str.Enterprise_Edition
jmp 0x4090e6
mov edx, str.Web_Edition
test eax, 0x400
jne 0x4090e6
mov edx, str.Standard_Edition
lea ecx, [ebp - 0x414]
call fcn.0040c590
cmp dword [ebp - 0x364], 5
jne 0x4091a5
mov eax, dword [ebp - 0x360]
cmp eax, 1
jne 0x409150
mov edx, str.Windows_XP
mov dword [esi + 4], 3
lea ecx, [ebp - 0x414]
call fcn.0040c590
test dword [ebp - 0x250], 0x200
lea ecx, [ebp - 0x414]
mov edx, str.Home_Edition
jne 0x40913c
mov edx, str.Professional
call fcn.0040c590
cmp dword [ebp - 0x364], 5
jne 0x4091a5
mov eax, dword [ebp - 0x360]
test eax, eax
jne 0x4091a5
mov edx, str.Windows_2000
mov dword [esi + 4], 2
lea ecx, [ebp - 0x414]
call fcn.0040c590
cmp byte [ebp - 0x24e], 1
jne 0x40917b
mov edx, str.Professional
jmp 0x40919a
mov eax, dword [ebp - 0x250]
test al, al
jns 0x40918c
mov edx, str.Datacenter_Server
jmp 0x40919a
mov edx, str.Advanced_Server
test al, 2
jne 0x40919a
mov edx, str.Server
lea ecx, [ebp - 0x414]
call fcn.0040c590
lea ecx, [ebp - 0x354]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4091b0
sub ecx, edx
sar ecx, 1
je 0x409249
cmp dword [esi + 4], 3
jne 0x40922c
lea eax, [ebp - 0x354]
push str.Service_Pack_3
push eax
call fcn.004ffcc5
add esp, 8
test eax, eax
jne 0x4091ec
mov dword [esi + 4], 6
jmp 0x40922c
lea eax, [ebp - 0x354]
push str.Service_Pack_2
push eax
call fcn.004ffcc5
add esp, 8
test eax, eax
jne 0x40920d
mov dword [esi + 4], 5
jmp 0x40922c
lea eax, [ebp - 0x354]
push str.Service_Pack_1
push eax
call fcn.004ffcc5
add esp, 8
test eax, eax
jne 0x40922c
mov dword [esi + 4], 4
mov edx, 0x5485c8
lea ecx, [ebp - 0x414]
call fcn.0040c590
lea edx, [ebp - 0x354]
mov ecx, eax
call fcn.0040c8f0
push dword [ebp - 0x35c]
mov edx, 0x548bc8
lea ecx, [ebp - 0x414]
call fcn.0040c8f0
mov ecx, eax
call fcn.0040a040
mov edx, 0x548bc4
mov ecx, eax
call fcn.0040c8f0
cmp dword [ebp - 0x364], 6
mov eax, dword [ebp - 0x35c]
mov dword [esi + 8], eax
jb 0x4092ad
mov ax, word [ebp - 0x448]
cmp ax, 9
jne 0x409298
mov edx, str.__64_bit
jmp 0x4092a2
test ax, ax
jne 0x4092ad
mov edx, str.__32_bit
lea ecx, [ebp - 0x414]
call fcn.0040c590
lea eax, [ebp - 0x24c]
push eax
lea ecx, [ebp - 0x424]
call fcn.004097c0
cmp dword [eax + 0x14], 8
jb 0x4092c7
mov eax, dword [eax]
push eax
push 0x104
push dword [ebp - 0x374]
call fcn.0050000e
add esp, 0xc
lea ecx, [ebp - 0x24c]
call fcn.00402270
lea ecx, [ebp - 0x3bc]
call fcn.004097e0
lea eax, [ebp - 0x3bc]
mov dword [ebp - 4], 2
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.004f441a
add esp, 4
mov eax, 1
jmp 0x409321
mov dword [esi + 4], 1
xor eax, eax
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.004f5c8b
mov esp, ebp
pop ebp
ret 8