Function at 0x40be27
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, 0x41d568
call fcn.004128c4
sub esp, 0x220
mov eax, dword [0x4280c8]
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x228], ebx
cmp dword [ebp + 0xc], ebx
mov esi, str._build_info
lea edi, [ebp - 0x1c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x10], eax
mov edi, 0x104
jne 0x40be6f
push edi
lea esi, [ebp - 0x224]
call fcn.0040c36c
test eax, eax
jne 0x40be92
push edi
lea eax, [ebp - 0x224]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x224]
push 0x5c
push eax
call fcn.00410545
pop ecx
pop ecx
mov word [eax + 2], bx
lea eax, [ebp - 0x224]
push eax
push str.GetLavaVersion_GetValidInstallDir___s_n
call fcn.0040b1f8
pop ecx
pop ecx
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp word [ebp + eax*2 - 0x226], 0x5c
lea eax, [ebp - 0x224]
je 0x40beca
push str._verinfo.dat
jmp 0x40becf
push str.verinfo.dat
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x224]
push eax
push str.GetLavaVersion_szVerFile___s_n
call fcn.0040b1f8
pop ecx
pop ecx
push ebx
push 0x80
push 3
push ebx
push 1
push connect
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40bf22
push 0x422d50
push dword [ebp + 8]
call fcn.00405bee
mov eax, dword [ebp + 8]
jmp 0x40c069
lea eax, [ebp - 0x224]
push eax
push str.GetLavaVersion_OpenFile_OK.___s_n
call fcn.0040b1f8
pop ecx
pop ecx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x22c], eax
inc eax
push eax
call fcn.0040f0dc
pop ecx
push ebx
mov esi, eax
lea eax, [ebp - 0x22c]
push eax
push dword [ebp - 0x22c]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0xc], ebx
mov eax, dword [ebp - 0x22c]
mov byte [esi + eax], bl
je 0x40bfaa
push esi
lea eax, [ebp + 0xc]
push eax
call fcn.00405bee
mov dword [ebp - 4], ebx
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
call fcn.00405f25
mov esi, dword [ebp + 8]
add eax, 0x10
mov dword [esi], eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
call fcn.00402528
mov eax, esi
jmp 0x40c069
push 0x208
lea eax, [ebp - 0x224]
push ebx
push eax
call fcn.0040f270
add esp, 0xc
lea eax, [ebp - 0x224]
push eax
push dword [ebp - 0x22c]
push esi
call fcn.0040b0b3
push esi
call fcn.00410b38
pop ecx
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x228]
push eax
call fcn.00405bee
lea eax, [ebp - 0x224]
push eax
push str._build_real
push eax
lea edi, [ebp + 0xc]
mov dword [ebp - 4], 1
call fcn.0040ec22
mov byte [ebp - 4], 2
push dword [ebp - 0x228]
mov esi, dword [ebp + 0xc]
push esi
call fcn.00411cf5
test eax, eax
pop ecx
pop ecx
je 0x40c037
add esi, 0xfffffff0
mov eax, esi
call fcn.00405f25
mov edi, dword [ebp + 8]
add eax, 0x10
mov dword [edi], eax
mov eax, esi
jmp 0x40c054
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x224]
push eax
call fcn.0040ec22
lea eax, [esi - 0x10]
call fcn.00402528
mov eax, dword [ebp - 0x228]
add eax, 0xfffffff0
call fcn.00402528
mov eax, edi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop ebx
call fcn.004120cb
leave
ret