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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [esi + 0x1c]
push ebx
push edi
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp edi, 0xffffffff
jne 0x461780
push eax
jmp 0x4619ba
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
lea ecx, [ebp - 4]
mov dword [ebp - 0x1c], eax
call fcn.00461f29
mov eax, dword [ebp - 4]
cmp dword [eax - 4], 1
jle 0x4617ac
push dword [eax - 0xc]
lea eax, [ebp - 4]
push eax
call fcn.0043a01d
mov eax, dword [ebp - 4]
push ebx
lea ecx, [ebp - 0x20]
push ecx
push dword [ebp - 0x1c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4619ac
cmp dword [ebp - 0x20], ebx
je 0x4619ac
push dword [ebp - 4]
lea eax, [ebp - 8]
call fcn.0045c07b
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x38]
push eax
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
call fcn.004668a0
test al, al
je 0x46181c
lea edi, [ebp - 0x38]
call fcn.0045b254
lea ecx, [ebp - 8]
call fcn.004058a3
lea eax, [ebp - 4]
push eax
call fcn.00439d53
cmp dword [ebp - 0x2c], ebx
je 0x4619c0
push dword [ebp - 0x2c]
jmp 0x4619ba
mov eax, dword [ebp - 0x34]
xor edi, edi
cmp eax, ebx
mov dword [ebp - 0x10], edi
jle 0x46182e
mov edi, dword [ebp - 0x38]
mov dword [ebp - 0x10], edi
cmp eax, ebx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0xc], ebx
jle 0x461847
dec eax
lea ecx, [ebp - 0x38]
call fcn.00466be1
add eax, 0x10
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp dword [ebp - 0x10], eax
je 0x4618b5
push esi
mov eax, edi
call fcn.004619c6
mov dword [ebp - 0x24], eax
cmp eax, ebx
je 0x4618aa
push 0x4dbc1c
lea eax, [ebp - 0x10]
push eax
call fcn.00405d14
lea eax, [ebp - 0x10]
push eax
call fcn.0046684c
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x18], eax
call fcn.004058a3
cmp dword [ebp - 0x18], ebx
je 0x4618aa
push str.Size
lea eax, [ebp - 0x14]
push eax
call fcn.00405d14
lea eax, [ebp - 0x14]
push eax
call fcn.0046684c
lea ecx, [ebp - 0x14]
mov ebx, eax
call fcn.004058a3
test ebx, ebx
jne 0x4618ee
add edi, 0x10
mov dword [ebp - 0x1c], edi
cmp edi, dword [ebp - 0xc]
jne 0x46184f
cmp byte [0x505028], 0
je 0x4617f2
push str.No_newer_version_found.
lea eax, [ebp - 0x24]
push eax
call fcn.00465a6a
push eax
call fcn.00465a7a
push eax
mov eax, 0x504ff8
call fcn.00464e5b
lea ecx, [ebp - 0x24]
call fcn.004058a3
jmp 0x4617f2
mov eax, dword [ebp - 0x18]
add eax, 4
lea edi, [esi + 0x24]
call fcn.00438ebc
mov ebx, dword [ebx + 4]
call fcn.0044eb00
mov dword [esi + 0x28], eax
push str.ServerFileName
lea eax, [ebp - 0x18]
push eax
call fcn.00405d14
mov edi, dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
push eax
call fcn.0046684c
lea ecx, [ebp - 0x18]
mov edi, eax
call fcn.004058a3
test edi, edi
je 0x46193a
lea eax, [edi + 4]
lea edi, [esi + 0x2c]
call fcn.00438ebc
mov eax, dword [ebp - 0x24]
lea edi, [esi + 0x20]
add eax, 4
call fcn.00438ebc
cmp byte [0x505028], 0
je 0x461980
push dword [edi]
lea eax, [ebp - 0x24]
push str.Found_a_newer_version_on_server._Version_found:
push eax
call fcn.00465a6a
push eax
call fcn.00465a7a
push eax
call fcn.00465a7a
push eax
mov eax, 0x504ff8
call fcn.00464e5b
lea ecx, [ebp - 0x24]
call fcn.004058a3
lea edi, [ebp - 0x38]
call fcn.0045b254
lea ecx, [ebp - 8]
call fcn.004058a3
lea eax, [ebp - 4]
push eax
call fcn.00439d53
cmp dword [ebp - 0x2c], 0
je 0x4619a8
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x4619c2
lea eax, [ebp - 4]
push eax
call fcn.00439d53
cmp edi, ebx
je 0x4619c0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
pop ebx
leave
ret