Function at 0x100040e0
Capabilities:
Check os version
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1002233c
mov eax, dword fs:[0]
push eax
mov eax, 0x201bc
call fcn.1000e890
mov eax, dword [0x1002d1d0]
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, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x20174], 0
call dword [sym.imp.KERNEL32.dll_GetVersion]
push 0xb0
push 0
cmp al, 6
jb 0x100043b4
lea eax, [ebp - 0x200c0]
push eax
call fcn.1000e300
add esp, 0xc
mov dword [ebp - 0x200c0], 0x100234f0
mov dword [ebp - 0x200b0], 0x100234f8
push 0
lea eax, [ebp - 0x200a8]
mov dword [ebp - 4], 0
xorps xmm0, xmm0
mov dword [ebp - 0x20174], 1
push eax
lea ecx, [ebp - 0x20058]
mov dword [ebp - method.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.0
mov dword [ebp - 0x2005c], 0x50
movlpd qword [ebp - 0x200b8], xmm0
call fcn.10006430
mov eax, dword [ebp - 0x200b0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x200b0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x200b4], eax
mov eax, dword [ebp - 0x200c0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_iostream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_iostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x200c0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x20]
mov dword [ebp + ecx - 0x200c4], eax
mov eax, dword [ebp - 0x200c0]
mov dword [ebp - 4], 5
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.virtual_0], vtable.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0x200c0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x200c4], eax
lea ecx, [ebp - 0x200a8]
call fcn.10002a30
mov dword [ebp - method.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.virtual_0], vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov dword [ebp - 0x20070], 0
mov dword [ebp - 0x2006c], 0
lea eax, [ebp - 0x200b0]
mov dword [ebp - 4], 7
push esi
push eax
call fcn.10002490
add esp, 8
lea eax, [ebp - 0x201c0]
lea ecx, [ebp - 0x200c0]
push eax
call fcn.10006d50
cmp dword [eax + 0x14], 8
jb 0x10004273
mov eax, dword [eax]
push 0
push 0x80
push 3
push 0
push 3
push 0xc0120089
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp dword [ebp - 0x201ac], 8
mov esi, eax
jb 0x100042a5
push dword [ebp - 0x201c0]
call fcn.1000cf3b
add esp, 4
xor eax, eax
mov dword [ebp - 0x201ac], 7
mov dword [ebp - 0x201b0], 0
mov word [ebp - 0x201c0], ax
cmp esi, 0xffffffff
je 0x10004385
push eax
push eax
push eax
push esi
mov dword [ebp - 0x20174], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x20174]
push eax
push 0x10000
lea eax, [ebp - 0x20010]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1000434c
mov eax, dword [ebp - 0x20174]
test eax, eax
je 0x1000434c
push eax
lea eax, [ebp - 0x20010]
mov dword [ebp - 0x2017c], 0xf
push eax
lea ecx, [ebp - 0x20190]
mov dword [ebp - 0x20180], 0
mov byte [ebp - 0x20190], 0
call fcn.10001890
lea eax, [ebp - 0x20190]
mov ecx, edi
push eax
call fcn.10003530
lea ecx, [ebp - 0x20190]
call fcn.10001150
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x20058]
mov dword [ebp - 4], 0xffffffff
call fcn.10003210
lea eax, [ebp - 0x20058]
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
push eax
call fcn.1000cdfa
add esp, 4
xor eax, eax
jmp 0x10004643
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x20058]
mov dword [ebp - 4], 0xffffffff
mov esi, eax
call fcn.10003210
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
lea eax, [ebp - 0x20058]
jmp 0x10004638
lea eax, [ebp - 0x20170]
push eax
call fcn.1000e300
add esp, 0xc
mov dword [ebp - 0x20170], 0x100234f0
mov dword [ebp - 0x20160], 0x100234f8
push 0
lea eax, [ebp - 0x20158]
mov dword [ebp - 4], 8
xorps xmm0, xmm0
mov dword [ebp - 0x20174], 0x10
push eax
lea ecx, [ebp - 0x20108]
mov dword [ebp - method.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.0
mov dword [ebp - 0x2010c], 0x50
movlpd qword [ebp - 0x20168], xmm0
call fcn.10006430
mov eax, dword [ebp - 0x20160]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x20160]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x20164], eax
mov eax, dword [ebp - 0x20170]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_iostream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_iostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x20170]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x20]
mov dword [ebp + ecx - 0x20174], eax
mov eax, dword [ebp - 0x20170]
mov dword [ebp - 4], 0xd
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.virtual_0], vtable.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0x20170]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x20174], eax
lea ecx, [ebp - 0x20158]
call fcn.10002a30
mov dword [ebp - method.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.virtual_0], vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov dword [ebp - 0x20120], 0
mov dword [ebp - 0x2011c], 0
push esi
lea eax, [ebp - 0x20160]
mov dword [ebp - 4], 0xf
push 0x10023500
push eax
call fcn.10001c70
add esp, 8
push eax
call fcn.10002490
add esp, 8
lea eax, [ebp - 0x20190]
lea ecx, [ebp - 0x20170]
push eax
call fcn.10006d50
cmp dword [eax + 0x14], 8
jb 0x100044ff
mov eax, dword [eax]
push 0
push 0x80
push 3
push 0
push 3
push 0xc0120089
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp dword [ebp - 0x2017c], 8
mov esi, eax
jb 0x10004531
push dword [ebp - 0x20190]
call fcn.1000cf3b
add esp, 4
xor eax, eax
mov dword [ebp - 0x2017c], 7
mov dword [ebp - 0x20180], 0
mov word [ebp - 0x20190], ax
cmp esi, 0xffffffff
je 0x1000460e
push eax
push eax
push eax
push esi
mov dword [ebp - 0x20178], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x20178]
push eax
push 0x10000
lea eax, [ebp - 0x10010]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100045d8
mov eax, dword [ebp - 0x20178]
test eax, eax
je 0x100045d8
push eax
lea eax, [ebp - 0x10010]
mov dword [ebp - 0x20194], 0xf
push eax
lea ecx, [ebp - 0x201a8]
mov dword [ebp - 0x20198], 0
mov byte [ebp - 0x201a8], 0
call fcn.10001890
lea eax, [ebp - 0x201a8]
mov ecx, edi
push eax
call fcn.10003530
lea ecx, [ebp - 0x201a8]
call fcn.10001150
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x20108]
mov dword [ebp - 4], 0xffffffff
call fcn.10003210
lea eax, [ebp - 0x20108]
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
push eax
call fcn.1000cdfa
add esp, 4
xor eax, eax
jmp 0x10004643
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x20108]
mov dword [ebp - 4], 0xffffffff
mov esi, eax
call fcn.10003210
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
lea eax, [ebp - 0x20108]
push eax
call fcn.1000cdfa
mov eax, esi
add esp, 4
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.1000d844
mov esp, ebp
pop ebp
ret