Function at 0x409c80
Capabilities:
Check os version
Get file size
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x41b8ab
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x12c
mov al, byte [esp + 3]
mov dword [esp + 0x10], ecx
mov cl, byte [esp + 3]
push ebx
push ebp
push esi
mov byte [esp + 0x25], cl
push edi
lea ecx, [esp + 0x28]
mov byte [esp + 0x28], al
mov byte [esp + 0x30], 0
call fcn.0040d5d0
xor ebp, ebp
xor ebx, ebx
mov dword [esp + 0x144], ebp
mov dword [esp + 0x14], ebx
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
ja 0x409d01
mov edx, dword [esp + 0x14c]
push ebp
push 0x80
push 3
push ebp
push 1
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x18], eax
jmp 0x409d57
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x39]
mov byte [esp + 0x38], 0
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x14c]
push ebp
stosw word es:[edi], ax
stosb byte es:[edi], al
push ebp
lea eax, [esp + 0x40]
push 0x104
push eax
push 0xffffffffffffffff
push ecx
push 0x200
push ebp
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebp
push 0x80
push 3
push ebp
push 1
lea edx, [esp + 0x4c]
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
je 0x409ec9
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
shr eax, 1
add eax, 8
lea edi, [eax + eax]
push edi
call sub.MFC42.DLL_operatornew
mov ecx, edi
mov ebx, eax
mov edx, ecx
xor eax, eax
mov edi, ebx
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push ebp
and ecx, 3
mov dword [esp + 0x20], ebx
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x28]
push eax
push esi
push ebx
push ecx
mov dword [esp + 0x38], ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x409eb1
cmp dword [esp + 0x24], esi
jne 0x409eb1
cmp word [ebx], 0xfeff
jne 0x409eb1
lea esi, [ebx + 2]
jmp 0x409dd4
mov ebx, dword [esp + 0x1c]
xor ebp, ebp
mov ax, word [esi]
cmp ax, 0x20
je 0x409de9
cmp ax, 0xd
je 0x409de9
cmp ax, 0xa
jne 0x409dee
add esi, 2
jmp 0x409dd4
cmp word [esi], bp
je 0x409ea9
mov edi, dword [sym.imp.MSVCRT.dll_wcschr]
push 0xd
push esi
call edi
mov ebx, eax
add esp, 8
cmp ebx, ebp
jne 0x409e2a
push 0xa
push esi
call edi
mov ebx, eax
add esp, 8
cmp ebx, ebp
jne 0x409e2a
push esi
call dword [sym.imp.MSVCRT.dll_wcslen]
lea ebx, [esi + eax*2]
add esp, 4
cmp ebx, ebp
je 0x409e2d
mov word [ebx], bp
mov dl, byte [esp + 0x13]
sub esp, 0x10
mov edi, esp
mov dword [esp + 0x24], esp
push esi
mov byte [edi], dl
mov dword [edi + 4], ebp
mov dword [edi + 8], ebp
mov dword [edi + 0xc], ebp
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov ebp, eax
mov ecx, edi
push 1
push ebp
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x409e89
mov ecx, dword [edi + 4]
mov eax, esi
test ebp, ebp
jbe 0x409e7a
sub ecx, esi
mov edx, ebp
mov si, word [eax]
mov word [ecx + eax], si
add eax, 2
dec edx
jne 0x409e6d
mov eax, dword [edi + 4]
mov dword [edi + 8], ebp
mov word [eax + ebp*2], 0
lea ebp, [eax + ebp*2]
mov ecx, dword [esp + 0x30]
call fcn.0040a300
lea esi, [ebx + 2]
test esi, esi
je 0x409ea3
cmp word [esi], 0
jne 0x409dce
mov ebx, dword [esp + 0x1c]
xor ebp, ebp
mov dword [esp + 0x14], 1
push ebx
call sub.MFC42.DLL_operatordelete
mov ecx, dword [esp + 0x1c]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0x20]
push eax
mov dword [esp + 0x148], 0xffffffff
mov ecx, dword [eax]
push ecx
push edx
lea ecx, [esp + 0x34]
call fcn.0040d400
mov eax, dword [esp + 0x2c]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x34], ebp
xor esi, esi
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::constructor_void_]
mov eax, dword [0x427cf4]
dec eax
mov dword [0x427cf4], eax
jne 0x409f24
mov esi, dword [0x427cf0]
mov dword [0x427cf0], ebp
lea ecx, [esp + 0x14]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
cmp esi, ebp
je 0x409f3b
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x13c]
pop edi
pop esi
mov eax, ebx
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x138
ret 4