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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41bc50
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.0041255c
shl eax, 1
mov dword [ebp - 0x3c], eax
lea ecx, [eax + eax]
push ecx
call fcn.00412b3a
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.00411f90
add esp, 4
cmp word [ebp - 0x26c], bx
jne 0x40be1d
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 0x40be43
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 0x40be81
lea eax, [ebp - 0x54]
push 0x41f860
push eax
mov dword [ebp - 0x54], ebx
call fcn.00413206
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
je 0x40c106
cmp esi, ebx
je 0x40c106
push esi
call fcn.00412b3a
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 0x40c0f5
cmp esi, dword [ebp - 0x38]
jne 0x40c0f5
mov edi, dword [ebp + 8]
cmp dword [edi + 0x18], ebx
jne 0x40c0d8
mov dl, byte [ebp + 0xb]
push ebx
shr esi, 1
lea ecx, [ebp - 0x4c]
dec esi
mov byte [ebp - 0x4c], dl
call fcn.00409580
push 1
push esi
lea ecx, [ebp - 0x4c]
call fcn.00409450
test al, al
je 0x40bf15
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x48]
add eax, 2
push esi
push eax
push ecx
call fcn.00401b80
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.00409580
push 0x426c34
call fcn.0041255c
add esp, 4
mov esi, eax
lea ecx, [ebp - 0x34]
push 1
push esi
call fcn.00409450
test al, al
je 0x40bf62
mov ecx, dword [ebp - 0x30]
push esi
push 0x426c34
push ecx
call fcn.00401b80
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 0x40bf84
mov edx, dword [ecx]
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x4c]
push eax
call dword [edx + 0xc]
test al, al
jne 0x40bf98
mov ecx, dword [0x41d5a8]
lea edx, [ebp - 0x4c]
push ecx
push ebx
push edx
lea ecx, [ebp - 0x34]
call fcn.00409170
push 0x100
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], 0x100
call fcn.00412b3a
add esp, 4
mov dword [ebp - 0x1c], eax
push 3
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.0040a560
mov cx, word [0x42402c]
mov word [eax], cx
mov dl, byte [0x42402e]
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 0x40bfec
mov eax, 0x41d59c
push eax
lea ecx, [ebp - 0x1c]
call fcn.0040a340
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
cmp eax, ecx
mov dword [ebp - 0x50], eax
jne 0x40c050
lea edx, [eax + 1]
cmp edx, ecx
jbe 0x40c050
lea eax, [ecx + ecx*2]
shr eax, 1
cmp eax, edx
mov dword [ebp - 0x18], eax
jae 0x40c01a
mov eax, edx
mov dword [ebp - 0x18], eax
push eax
call fcn.00412b3a
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.00411f90
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.00411f90
mov ecx, dword [ebp - 0x30]
xor esi, esi
add esp, 4
cmp ecx, esi
je 0x40c0a8
mov al, byte [ecx - 1]
test al, al
je 0x40c09c
cmp al, 0xff
je 0x40c09c
dec al
mov byte [ecx - 1], al
jmp 0x40c0a8
add ecx, 0xfffffffe
push ecx
call fcn.00411f90
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 0x40c124
mov al, byte [ecx - 1]
test al, al
je 0x40c0ca
cmp al, 0xff
je 0x40c0ca
dec al
mov byte [ecx - 1], al
jmp 0x40c124
add ecx, 0xfffffffe
push ecx
call fcn.00411f90
add esp, 4
jmp 0x40c124
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 0x40c124
lea ecx, [ebp - 0x60]
push 0x41f860
push ecx
mov dword [ebp - 0x60], ebx
call fcn.00413206
lea edx, [ebp - 0x64]
push 0x41f860
push edx
mov dword [ebp - 0x64], ebx
call fcn.00413206
mov byte [ebp + 0xb], 0
mov eax, 0x40c121
ret
mov eax, dword [ebp - 0x5c]
cmp eax, 0xffffffff
je 0x40c137
test eax, eax
je 0x40c137
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40c147
push eax
call fcn.00411f90
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