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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [esi + 0x20]
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 0x47e047
push eax
jmp 0x47e284
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
lea ecx, [ebp - 4]
mov dword [ebp - 0x1c], eax
call fcn.0047e84d
mov eax, dword [ebp - 4]
cmp dword [eax - 4], 1
jle 0x47e073
push dword [eax - 0xc]
lea eax, [ebp - 4]
push eax
call fcn.0044e963
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 0x47e276
cmp dword [ebp - 0x20], ebx
je 0x47e276
mov eax, dword [ebp - 4]
lea ecx, [ebp - 0xc]
call fcn.00476a3d
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x3c], 0x517eb4
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
call fcn.004843e4
test al, al
je 0x47e0ea
lea edi, [ebp - 0x38]
call fcn.004768e4
lea ecx, [ebp - 0xc]
call fcn.004036cd
lea eax, [ebp - 4]
push eax
call fcn.0044e699
cmp dword [ebp - 0x2c], ebx
je 0x47e28a
push dword [ebp - 0x2c]
jmp 0x47e284
mov eax, dword [ebp - 0x34]
xor edi, edi
cmp eax, ebx
jle 0x47e0f6
mov edi, dword [ebp - 0x38]
cmp eax, ebx
mov dword [ebp - 8], edi
mov dword [ebp - 0x10], ebx
jle 0x47e10f
dec eax
lea ecx, [ebp - 0x38]
call fcn.00484807
add eax, 0x10
mov dword [ebp - 0x10], eax
cmp edi, dword [ebp - 0x10]
je 0x47e17f
mov eax, dword [ebp - 8]
push esi
call fcn.0047e290
mov dword [ebp - 0x24], eax
cmp eax, ebx
je 0x47e173
push 0x512064
lea eax, [ebp - 0x14]
push eax
call fcn.00405d46
mov edi, dword [ebp - 8]
lea eax, [ebp - 0x14]
push eax
call fcn.0048435c
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x1c], eax
call fcn.004036cd
cmp dword [ebp - 0x1c], ebx
je 0x47e173
push str.Size
lea eax, [ebp - 0x18]
push eax
call fcn.00405d46
lea eax, [ebp - 0x18]
push eax
call fcn.0048435c
lea ecx, [ebp - 0x18]
mov ebx, eax
call fcn.004036cd
test ebx, ebx
jne 0x47e1b8
add dword [ebp - 8], 0x10
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jne 0x47e114
cmp byte [0x5457ac], 0
je 0x47e0c0
push str.No_newer_version_found.
lea eax, [ebp - 0x24]
push eax
call fcn.0048273d
push eax
call fcn.0048274d
push eax
mov eax, 0x54577c
call fcn.00481b6e
lea ecx, [ebp - 0x24]
call fcn.004036cd
jmp 0x47e0c0
mov eax, dword [ebp - 0x1c]
add eax, 4
lea edi, [esi + 0x28]
call fcn.004412d2
mov eax, dword [ebx + 4]
call fcn.004c2a60
mov dword [esi + 0x2c], eax
push str.ServerFileName
lea eax, [ebp - 0x1c]
push eax
call fcn.00405d46
mov edi, dword [ebp - 8]
lea eax, [ebp - 0x1c]
push eax
call fcn.0048435c
lea ecx, [ebp - 0x1c]
mov edi, eax
call fcn.004036cd
test edi, edi
je 0x47e204
lea eax, [edi + 4]
lea edi, [esi + 0x30]
call fcn.004412d2
mov eax, dword [ebp - 0x24]
lea edi, [esi + 0x24]
add eax, 4
call fcn.004412d2
cmp byte [0x5457ac], 0
je 0x47e24a
push dword [edi]
lea eax, [ebp - 0x24]
push str.Found_a_newer_version_on_server._Version_found:
push eax
call fcn.0048273d
push eax
call fcn.0048274d
push eax
call fcn.0048274d
push eax
mov eax, 0x54577c
call fcn.00481b6e
lea ecx, [ebp - 0x24]
call fcn.004036cd
lea edi, [ebp - 0x38]
call fcn.004768e4
lea ecx, [ebp - 0xc]
call fcn.004036cd
lea eax, [ebp - 4]
push eax
call fcn.0044e699
cmp dword [ebp - 0x2c], 0
je 0x47e272
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x47e28c
lea eax, [ebp - 4]
push eax
call fcn.0044e699
cmp edi, ebx
je 0x47e28a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
pop ebx
leave
ret