Function at 0x40fc40
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421530
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x260
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x24], ecx
push eax
call fcn.00417a8e
shl eax, 1
mov dword [ebp - 0x3c], eax
lea ecx, [eax + eax]
push ecx
call fcn.004180fc
mov edx, dword [ebp - 0x3c]
mov esi, eax
xor eax, eax
mov edi, esi
lea ecx, [edx + edx]
add esp, 8
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0x30000000
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [ebx + 0xc]
lea eax, [ebp - 0x3c]
push eax
push esi
push ecx
call dword [sym.imp.WININET.dll_InternetCanonicalizeUrlW]
xor ebx, ebx
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x26a]
mov word [ebp - 0x26c], bx
lea edx, [ebp - 0x58]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebx
lea eax, [ebp - 0x26c]
push edx
push eax
push esi
mov dword [ebp - 0x58], 0x104
call dword [sym.imp.SHLWAPI.dll_PathCreateFromUrlW]
push esi
call fcn.0041749e
add esp, 4
cmp word [ebp - 0x26c], bx
jne 0x40fd0d
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x26c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40fd33
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push ebx
push 0x8000000
push 3
push ebx
push 1
lea edx, [ebp - 0x26c]
push 0x80000000
push edx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x5c], edi
jne 0x40fd71
lea eax, [ebp - 0x54]
push 0x424c38
push eax
mov dword [ebp - 0x54], ebx
call fcn.00418737
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
je 0x40fff6
cmp esi, ebx
je 0x40fff6
push esi
call fcn.004180fc
add esp, 4
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x38], ebx
push ebx
push ecx
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40ffe5
cmp esi, dword [ebp - 0x38]
jne 0x40ffe5
mov edi, dword [ebp + 8]
cmp dword [edi + 0x18], ebx
jne 0x40ffc8
mov dl, byte [ebp + 0xb]
push ebx
shr esi, 1
lea ecx, [ebp - 0x4c]
dec esi
mov byte [ebp - 0x4c], dl
call fcn.0040cf30
push 1
push esi
lea ecx, [ebp - 0x4c]
call fcn.0040ce00
test al, al
je 0x40fe05
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x48]
add eax, 2
push esi
push eax
push ecx
call fcn.00401be0
mov edx, dword [ebp - 0x48]
mov dword [ebp - 0x44], esi
add esp, 0xc
mov word [edx + esi*2], bx
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 1
mov byte [ebp - 0x34], al
call fcn.0040cf30
push 0x42c54c
call fcn.00417a8e
add esp, 4
mov esi, eax
lea ecx, [ebp - 0x34]
push 1
push esi
call fcn.0040ce00
test al, al
je 0x40fe52
mov ecx, dword [ebp - 0x30]
push esi
push 0x42c54c
push ecx
call fcn.00401be0
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x2c], esi
add esp, 0xc
mov word [edx + esi*2], bx
mov eax, dword [ebp - 0x24]
mov byte [ebp - 4], 2
mov ecx, dword [eax + 0x218]
cmp ecx, ebx
je 0x40fe74
mov edx, dword [ecx]
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x4c]
push eax
call dword [edx + 0xc]
test al, al
jne 0x40fe88
mov ecx, dword [0x422604]
lea edx, [ebp - 0x4c]
push ecx
push ebx
push edx
lea ecx, [ebp - 0x34]
call fcn.0040c980
push 0x100
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], 0x100
call fcn.004180fc
add esp, 4
mov dword [ebp - 0x1c], eax
push 3
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.0040e080
mov cx, word [0x4291dc]
mov word [eax], cx
mov dl, byte [0x4291de]
mov byte [eax + 2], dl
mov edx, dword [ebp - 0x14]
add edx, 3
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x30]
mov byte [ebp - 4], 4
cmp eax, ebx
jne 0x40fedc
mov eax, 0x422470
push eax
lea ecx, [ebp - 0x1c]
call fcn.0040de60
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
cmp eax, ecx
mov dword [ebp - 0x50], eax
jne 0x40ff40
lea edx, [eax + 1]
cmp edx, ecx
jbe 0x40ff40
lea eax, [ecx + ecx*2]
shr eax, 1
cmp eax, edx
mov dword [ebp - 0x18], eax
jae 0x40ff0a
mov eax, edx
mov dword [ebp - 0x18], eax
push eax
call fcn.004180fc
mov ecx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x1c]
mov ebx, eax
mov eax, ecx
mov edi, ebx
add esp, 4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.0041749e
mov eax, dword [ebp - 0x14]
mov edi, dword [ebp + 8]
add esp, 4
mov dword [ebp - 0x1c], ebx
mov edx, dword [ebp - 0x1c]
mov byte [eax + edx], 0
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [edi + 0xc]
push eax
mov eax, dword [ebp - 0x24]
push ecx
push edx
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.MxUI.dll_HTMLayoutDataReady]
mov edx, dword [ebp - 0x1c]
test eax, eax
push edx
setne bl
call fcn.0041749e
mov ecx, dword [ebp - 0x30]
xor esi, esi
add esp, 4
cmp ecx, esi
je 0x40ff98
mov al, byte [ecx - 1]
test al, al
je 0x40ff8c
cmp al, 0xff
je 0x40ff8c
dec al
mov byte [ecx - 1], al
jmp 0x40ff98
add ecx, 0xfffffffe
push ecx
call fcn.0041749e
add esp, 4
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x30], esi
cmp ecx, esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
je 0x410014
mov al, byte [ecx - 1]
test al, al
je 0x40ffba
cmp al, 0xff
je 0x40ffba
dec al
mov byte [ecx - 1], al
jmp 0x410014
add ecx, 0xfffffffe
push ecx
call fcn.0041749e
add esp, 4
jmp 0x410014
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
mov ecx, dword [edi + 0xc]
push esi
push eax
mov eax, dword [edx + 4]
push ecx
push eax
call dword [sym.imp.MxUI.dll_HTMLayoutDataReady]
test eax, eax
setne bl
jmp 0x410014
lea ecx, [ebp - 0x60]
push 0x424c38
push ecx
mov dword [ebp - 0x60], ebx
call fcn.00418737
lea edx, [ebp - 0x64]
push 0x424c38
push edx
mov dword [ebp - 0x64], ebx
call fcn.00418737
mov byte [ebp + 0xb], 0
mov eax, 0x410011
ret
mov eax, dword [ebp - 0x5c]
cmp eax, 0xffffffff
je 0x410027
test eax, eax
je 0x410027
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x410037
push eax
call fcn.0041749e
add esp, 4
mov ecx, dword [ebp - 0xc]
pop edi
mov al, bl
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4