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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
push edi
xor esi, esi
push esi
push 0x80
push 3
push esi
push 1
mov ebx, eax
mov eax, dword [ebx + 0x1c]
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x2c], eax
cmp eax, 0xffffffff
jne 0x40e8e8
push eax
jmp 0x40e97c
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
lea ecx, [ebp - 8]
mov dword [ebp - 0x1c], eax
call fcn.0040f14a
mov edi, dword [ebp - 8]
cmp dword [edi - 4], 1
jle 0x40e914
push dword [edi - 0xc]
lea eax, [ebp - 8]
push eax
call fcn.0040224e
mov edi, dword [ebp - 8]
push esi
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x1c]
push edi
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40e96c
cmp dword [ebp - 0x20], esi
je 0x40e96c
push edi
lea eax, [ebp - 0xc]
call fcn.00409a11
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x3c], 0x44e868
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], esi
call fcn.004153dc
test al, al
je 0x40e989
lea ebx, [ebp - 0x38]
call fcn.00409629
mov eax, dword [ebp - 0xc]
add eax, 0xfffffff0
call fcn.004046a2
lea eax, [edi - 0x10]
call fcn.004046a2
cmp dword [ebp - 0x2c], esi
je 0x40e982
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
pop esi
pop ebx
leave
ret
mov eax, dword [ebp - 0x34]
cmp eax, esi
mov dword [ebp - 0x10], esi
jle 0x40e999
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x10], ecx
cmp eax, esi
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 4], ecx
mov dword [ebp - 0x14], esi
jle 0x40e9b5
dec eax
lea ecx, [ebp - 0x38]
call fcn.0041584e
add eax, 0x10
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x10], eax
je 0x40ea2f
mov eax, dword [ebp - 4]
push ebx
call fcn.0040eb4f
mov dword [ebp - 0x24], eax
cmp eax, esi
je 0x40ea23
push 0x448e78
lea eax, [ebp - 0x10]
call fcn.004045c9
mov edi, dword [ebp - 4]
lea eax, [ebp - 0x10]
push eax
call fcn.00415361
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.004046a2
cmp dword [ebp - 0x1c], esi
je 0x40ea20
push str.Size
lea eax, [ebp - 0x18]
call fcn.004045c9
lea eax, [ebp - 0x18]
push eax
call fcn.00415361
mov esi, eax
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
call fcn.004046a2
test esi, esi
jne 0x40ea85
mov edi, dword [ebp - 8]
add dword [ebp - 4], 0x10
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x14]
jne 0x40e9bd
cmp byte [0x456c38], 0
je 0x40ea61
push str.No_newer_version_found.
lea eax, [ebp - 0x24]
call fcn.004141f6
push eax
call fcn.00414207
push eax
mov eax, 0x456c08
call fcn.004134f0
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
call fcn.004046a2
lea ebx, [ebp - 0x38]
call fcn.00409629
mov eax, dword [ebp - 0xc]
add eax, 0xfffffff0
call fcn.004046a2
lea eax, [edi - 0x10]
call fcn.004046a2
cmp dword [ebp - 0x2c], 0
jmp 0x40e977
mov eax, dword [ebp - 0x1c]
add eax, 4
lea edi, [ebx + 0x24]
call fcn.0040872e
mov esi, dword [esi + 4]
call fcn.004012bc
mov dword [ebx + 0x28], eax
push str.ServerFileName
lea eax, [ebp - 0x1c]
call fcn.004045c9
mov edi, dword [ebp - 4]
lea eax, [ebp - 0x1c]
push eax
call fcn.00415361
mov esi, eax
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.004046a2
test esi, esi
je 0x40ead3
lea eax, [esi + 4]
lea edi, [ebx + 0x2c]
call fcn.0040872e
mov eax, dword [ebp - 0x24]
lea edi, [ebx + 0x20]
add eax, 4
call fcn.0040872e
cmp byte [0x456c38], 0
je 0x40eb1b
push dword [edi]
lea eax, [ebp - 0x24]
push str.Found_a_newer_version_on_server._Version_found:
call fcn.004141f6
push eax
call fcn.00414207
push eax
call fcn.00414207
push eax
mov eax, 0x456c08
call fcn.004134f0
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
call fcn.004046a2
lea ebx, [ebp - 0x38]
call fcn.00409629
mov eax, dword [ebp - 0xc]
add eax, 0xfffffff0
call fcn.004046a2
mov eax, dword [ebp - 8]
add eax, 0xfffffff0
call fcn.004046a2
cmp dword [ebp - 0x2c], 0
je 0x40eb48
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x40e984