Function at 0x46230f
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 0x462343
push eax
jmp 0x46257d
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
lea ecx, [ebp - 4]
mov dword [ebp - 0x1c], eax
call fcn.00462aec
mov eax, dword [ebp - 4]
cmp dword [eax - 4], 1
jle 0x46236f
push dword [eax - 0xc]
lea eax, [ebp - 4]
push eax
call fcn.00439c9a
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 0x46256f
cmp dword [ebp - 0x20], ebx
je 0x46256f
push dword [ebp - 4]
lea eax, [ebp - 8]
call fcn.0045cb63
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.00467448
test al, al
je 0x4623df
lea edi, [ebp - 0x38]
call fcn.0045bd3c
lea ecx, [ebp - 8]
call fcn.004058e3
lea eax, [ebp - 4]
push eax
call fcn.004399d0
cmp dword [ebp - 0x2c], ebx
je 0x462583
push dword [ebp - 0x2c]
jmp 0x46257d
mov eax, dword [ebp - 0x34]
xor edi, edi
cmp eax, ebx
mov dword [ebp - 0x10], edi
jle 0x4623f1
mov edi, dword [ebp - 0x38]
mov dword [ebp - 0x10], edi
cmp eax, ebx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0xc], ebx
jle 0x46240a
dec eax
lea ecx, [ebp - 0x38]
call fcn.00467789
add eax, 0x10
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp dword [ebp - 0x10], eax
je 0x462478
push esi
mov eax, edi
call fcn.00462589
mov dword [ebp - 0x24], eax
cmp eax, ebx
je 0x46246d
push 0x4dcc3c
lea eax, [ebp - 0x10]
push eax
call fcn.00405d54
lea eax, [ebp - 0x10]
push eax
call fcn.004673f4
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x18], eax
call fcn.004058e3
cmp dword [ebp - 0x18], ebx
je 0x46246d
push str.Size
lea eax, [ebp - 0x14]
push eax
call fcn.00405d54
lea eax, [ebp - 0x14]
push eax
call fcn.004673f4
lea ecx, [ebp - 0x14]
mov ebx, eax
call fcn.004058e3
test ebx, ebx
jne 0x4624b1
add edi, 0x10
mov dword [ebp - 0x1c], edi
cmp edi, dword [ebp - 0xc]
jne 0x462412
cmp byte [0x506010], 0
je 0x4623b5
push str.No_newer_version_found.
lea eax, [ebp - 0x24]
push eax
call fcn.00466612
push eax
call fcn.00466622
push eax
mov eax, 0x505fe0
call fcn.00465a03
lea ecx, [ebp - 0x24]
call fcn.004058e3
jmp 0x4623b5
mov eax, dword [ebp - 0x18]
add eax, 4
lea edi, [esi + 0x24]
call fcn.00438b14
mov ebx, dword [ebx + 4]
call fcn.0044e890
mov dword [esi + 0x28], eax
push str.ServerFileName
lea eax, [ebp - 0x18]
push eax
call fcn.00405d54
mov edi, dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
push eax
call fcn.004673f4
lea ecx, [ebp - 0x18]
mov edi, eax
call fcn.004058e3
test edi, edi
je 0x4624fd
lea eax, [edi + 4]
lea edi, [esi + 0x2c]
call fcn.00438b14
mov eax, dword [ebp - 0x24]
lea edi, [esi + 0x20]
add eax, 4
call fcn.00438b14
cmp byte [0x506010], 0
je 0x462543
push dword [edi]
lea eax, [ebp - 0x24]
push str.Found_a_newer_version_on_server._Version_found:
push eax
call fcn.00466612
push eax
call fcn.00466622
push eax
call fcn.00466622
push eax
mov eax, 0x505fe0
call fcn.00465a03
lea ecx, [ebp - 0x24]
call fcn.004058e3
lea edi, [ebp - 0x38]
call fcn.0045bd3c
lea ecx, [ebp - 8]
call fcn.004058e3
lea eax, [ebp - 4]
push eax
call fcn.004399d0
cmp dword [ebp - 0x2c], 0
je 0x46256b
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x462585
lea eax, [ebp - 4]
push eax
call fcn.004399d0
cmp edi, ebx
je 0x462583
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
pop ebx
leave
ret