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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
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 0x47038f
push eax
jmp 0x4705d0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
lea ecx, [ebp - 4]
mov dword [ebp - 0x1c], eax
call fcn.00470b42
mov eax, dword [ebp - 4]
cmp dword [eax - 4], 1
jle 0x4703bb
push dword [eax - 0xc]
lea eax, [ebp - 4]
push eax
call fcn.004444e9
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 0x4705c2
cmp dword [ebp - 0x20], ebx
je 0x4705c2
mov eax, dword [ebp - 4]
lea ecx, [ebp - 8]
call fcn.0046974f
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x3c], 0x4fa714
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
call fcn.0047588a
test al, al
je 0x470432
lea edi, [ebp - 0x38]
call fcn.004695f6
lea ecx, [ebp - 8]
call fcn.00402907
lea eax, [ebp - 4]
push eax
call fcn.0044421f
cmp dword [ebp - 0x2c], ebx
je 0x4705d6
push dword [ebp - 0x2c]
jmp 0x4705d0
mov eax, dword [ebp - 0x34]
xor edi, edi
cmp eax, ebx
mov dword [ebp - 0x10], edi
jle 0x470444
mov edi, dword [ebp - 0x38]
mov dword [ebp - 0x10], edi
cmp eax, ebx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0xc], ebx
jle 0x47045d
dec eax
lea ecx, [ebp - 0x38]
call fcn.00475cad
add eax, 0x10
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp dword [ebp - 0x10], eax
je 0x4704cb
push esi
mov eax, edi
call fcn.004705dc
mov dword [ebp - 0x24], eax
cmp eax, ebx
je 0x4704c0
push 0x4f5304
lea eax, [ebp - 0x10]
push eax
call fcn.004046e4
lea eax, [ebp - 0x10]
push eax
call fcn.0047580f
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x18], eax
call fcn.00402907
cmp dword [ebp - 0x18], ebx
je 0x4704c0
push str.Size
lea eax, [ebp - 0x14]
push eax
call fcn.004046e4
lea eax, [ebp - 0x14]
push eax
call fcn.0047580f
lea ecx, [ebp - 0x14]
mov ebx, eax
call fcn.00402907
test ebx, ebx
jne 0x470504
add edi, 0x10
mov dword [ebp - 0x1c], edi
cmp edi, dword [ebp - 0xc]
jne 0x470465
cmp byte [0x523354], 0
je 0x470408
push str.No_newer_version_found.
lea eax, [ebp - 0x24]
push eax
call fcn.00474809
push eax
call fcn.00474819
push eax
mov eax, 0x523324
call fcn.00473bef
lea ecx, [ebp - 0x24]
call fcn.00402907
jmp 0x470408
mov eax, dword [ebp - 0x18]
add eax, 4
lea edi, [esi + 0x24]
call fcn.004432a9
mov ebx, dword [ebx + 4]
call fcn.0045b8a0
mov dword [esi + 0x28], eax
push str.ServerFileName
lea eax, [ebp - 0x18]
push eax
call fcn.004046e4
mov edi, dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
push eax
call fcn.0047580f
lea ecx, [ebp - 0x18]
mov edi, eax
call fcn.00402907
test edi, edi
je 0x470550
lea eax, [edi + 4]
lea edi, [esi + 0x2c]
call fcn.004432a9
mov eax, dword [ebp - 0x24]
lea edi, [esi + 0x20]
add eax, 4
call fcn.004432a9
cmp byte [0x523354], 0
je 0x470596
push dword [edi]
lea eax, [ebp - 0x24]
push str.Found_a_newer_version_on_server._Version_found:
push eax
call fcn.00474809
push eax
call fcn.00474819
push eax
call fcn.00474819
push eax
mov eax, 0x523324
call fcn.00473bef
lea ecx, [ebp - 0x24]
call fcn.00402907
lea edi, [ebp - 0x38]
call fcn.004695f6
lea ecx, [ebp - 8]
call fcn.00402907
lea eax, [ebp - 4]
push eax
call fcn.0044421f
cmp dword [ebp - 0x2c], 0
je 0x4705be
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x4705d8
lea eax, [ebp - 4]
push eax
call fcn.0044421f
cmp edi, ebx
je 0x4705d6
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
pop ebx
leave
ret