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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006ae90
mov eax, dword fs:[0]
push eax
sub esp, 0x430
mov eax, dword [0x100810f0]
xor eax, ebp
mov dword [ebp - 0x18], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
xor ebx, ebx
mov esi, ecx
push 0x3ff
lea ecx, [ebp - 0x41b]
mov dword [ebp - 0x42c], ebx
push ebx
push ecx
mov dword [ebp - 0x43c], esi
mov dword [ebp - 0x428], eax
mov edi, edx
mov dword [ebp - 0x420], ebx
mov byte [ebp - 0x41c], bl
call fcn.10050860
mov byte [esi + 0x408], bl
lea eax, [esi + 0x404]
add esp, 0xc
mov ebx, 0x1007aeea
mov dword [ebp - 0x424], eax
call fcn.10003180
push 0x1007cad4
lea edx, [ebp - 0x420]
push edi
push edx
mov dword [ebp - 4], 0
call fcn.1004feae
add esp, 0xc
test eax, eax
je 0x10016eb6
push str.The_file_cant_be_opened_
mov ebx, 0x19
mov eax, dword [ebp - 0x424]
call fcn.10003ad0
mov esi, dword [ebp - 0x428]
push esi
mov ecx, 0x1007a320
call fcn.10002620
mov eax, esi
jmp 0x10017092
push 0
push 0x80
push 3
push 0
push 1
push 0
push edi
mov dword [ebp - 0x438], 0
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov edi, eax
test edi, edi
jne 0x10016ee6
push str.Get_file_size_failed_
lea ebx, [eax + 0x15]
jmp 0x10016e93
push 0
push edi
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
push edi
mov dword [ebp - 0x434], eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x10016f08
cmp dword [ebp + 0x10], eax
je 0x10016f25
mov dword [ebp - 0x430], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x424], eax
push 0
mov ecx, dword [ebp - 0x430]
call dword [ebp - 0x424]
or edi, 0xffffffff
jmp 0x10016f30
mov ecx, dword [ebp - 0x420]
push ecx
push 0x400
lea edx, [ebp - 0x41c]
push 1
push edx
call fcn.10051b9e
add esp, 0x10
test eax, eax
je 0x10017015
inc dword [ebp - 0x438]
cmp byte [esi + 0x408], 0
je 0x10016f79
lea eax, [esi + 0x404]
push str.User_terminate_calculate_
mov ebx, 0x19
jmp 0x10016e99
mov ecx, eax
lea eax, [ebp - 0x41c]
mov edx, ecx
dec ecx
test edx, edx
je 0x10016f9f
movzx ebx, byte [eax]
mov edx, edi
and edx, 0xff
xor edx, ebx
shr edi, 8
xor edi, dword [esi + edx*4 + 4]
inc eax
jmp 0x10016f81
lea eax, [ebp + 0xc]
call fcn.10017130
test al, al
jne 0x10016ffa
mov eax, 0x51eb851f
mul dword [ebp - 0x434]
mov ecx, edx
shr ecx, 5
test ecx, ecx
jg 0x10016fc4
mov ecx, 1
mov eax, dword [ebp - 0x438]
shl eax, 0xa
cdq
idiv ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x430], ecx
mov dword [ebp - 0x42c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x424], eax
push dword [ebp - 0x42c]
mov ecx, dword [ebp - 0x424]
call dword [ebp - 0x430]
push 0x400
lea edx, [ebp - 0x41c]
push 0
push edx
call fcn.10050860
add esp, 0xc
jmp 0x10016f30
mov eax, dword [ebp + 0xc]
not edi
test eax, eax
jne 0x10017023
cmp dword [ebp + 0x10], eax
je 0x10017040
mov dword [ebp - 0x434], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x42c], eax
push 0x64
mov ecx, dword [ebp - 0x434]
call dword [ebp - 0x42c]
mov ecx, dword [ebp - 0x420]
push ecx
call fcn.1005015c
mov esi, dword [ebp - 0x428]
add esp, 4
push edi
call fcn.100170b0
mov eax, esi
jmp 0x10017092
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.1004ea1f
mov esp, ebp
pop ebp
ret 0xc