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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov dword [ebp - 0x24], ecx
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x210146a9
push 0x2108bb48
call fcn.210123d5
add esp, 4
jmp 0x2101488e
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [ebp - 0x10]
jbe 0x210146b6
jmp 0x2101488c
mov edx, dword [ebp - 0x10]
sub edx, dword [ebp + 0xc]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp + 0x10]
jae 0x210146cf
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x28], ecx
jmp 0x210146d5
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x210146ed
mov dword [ebp - 0xc], 1
jmp 0x2101488a
push 0
push 0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x21014716
push 0x2108bb60
call fcn.210123d5
add esp, 4
jmp 0x21014888
cmp dword [ebp - 0x10], 0x7fff
jae 0x21014727
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x2c], eax
jmp 0x2101472e
mov dword [ebp - 0x2c], 0x7fff
mov cx, word [ebp - 0x2c]
mov word [ebp - 0x18], cx
mov edx, dword [ebp - 0x18]
and edx, 0xffff
push edx
call fcn.2106e07d
add esp, 4
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x21014769
push str.could_not_allocate_file_copy_buffer
call fcn.2101235d
add esp, 4
jmp 0x21014886
cmp dword [ebp + 0x14], 0
je 0x210147ad
mov ecx, dword [ebp - 0x18]
and ecx, 0xffff
push ecx
mov edx, dword [ebp - 0x18]
and edx, 0xffff
mov eax, dword [ebp - 0x10]
lea eax, [eax + edx - 1]
mov ecx, dword [ebp - 0x18]
and ecx, 0xffff
xor edx, edx
div ecx
mov edx, dword [ebp - 0x18]
and edx, 0xffff
imul eax, edx
push eax
push 0
mov ecx, dword [ebp + 0x14]
call fcn.21045253
cmp dword [ebp - 0x10], 0
je 0x21014862
cmp dword [ebp + 0x14], 0
je 0x210147d6
mov ecx, dword [ebp + 0x14]
call fcn.2104535c
mov ecx, dword [ebp + 0x14]
call fcn.21044dd0
test eax, eax
jne 0x210147d6
jmp 0x21014884
mov eax, dword [ebp - 0x18]
and eax, 0xffff
cmp dword [ebp - 0x10], eax
jae 0x210147eb
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x30], ecx
jmp 0x210147f7
mov edx, dword [ebp - 0x18]
and edx, 0xffff
mov dword [ebp - 0x30], edx
mov ax, word [ebp - 0x30]
mov word [ebp - 0x14], ax
push 0
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp - 0x14]
and edx, 0xffff
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x21014830
push 0x2108bbc8
call fcn.210123d5
add esp, 4
jmp 0x21014882
mov edx, dword [ebp - 0x14]
and edx, 0xffff
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x24]
call fcn.210145bd
test eax, eax
jne 0x2101484c
jmp 0x21014880
mov ecx, dword [ebp - 0x14]
and ecx, 0xffff
mov edx, dword [ebp - 0x10]
sub edx, ecx
mov dword [ebp - 0x10], edx
jmp 0x210147ad
mov dword [ebp - 0xc], 1
mov eax, dword [ebp - 8]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.2106e0a6
add esp, 4
mov eax, dword [ebp - 0xc]
jmp 0x21014890
jmp 0x21014869
jmp 0x21014869
jmp 0x21014869
jmp 0x21014869
jmp 0x21014869
jmp 0x21014869
jmp 0x21014869
jmp 0x21014869
mov esp, ebp
pop ebp
ret 0x10