Function at 0x210127f2
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 0x2101282d
push 0x2107fe60
call fcn.210107ec
jmp 0x21012a09
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [ebp - 0x10]
jbe 0x2101283a
jmp 0x21012a07
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 0x21012853
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x28], ecx
jmp 0x21012859
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 0x21012871
mov dword [ebp - 0xc], 1
jmp 0x21012a05
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 0x21012897
push 0x2107fe6c
call fcn.210107ec
jmp 0x21012a03
cmp dword [ebp - 0x10], 0x7fff
jae 0x210128a8
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x2c], eax
jmp 0x210128af
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.210636c3
add esp, 4
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x210128e7
push str.could_not_allocate_file_copy_buffer
call fcn.21010778
jmp 0x21012a01
cmp dword [ebp + 0x14], 0
je 0x2101292b
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.2103c44d
cmp dword [ebp - 0x10], 0
je 0x210129dd
cmp dword [ebp + 0x14], 0
je 0x21012954
mov ecx, dword [ebp + 0x14]
call fcn.2103c556
mov ecx, dword [ebp + 0x14]
call fcn.2103bfe5
test eax, eax
jne 0x21012954
jmp 0x210129ff
mov eax, dword [ebp - 0x18]
and eax, 0xffff
cmp dword [ebp - 0x10], eax
jae 0x21012969
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x30], ecx
jmp 0x21012975
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 0x210129ab
push 0x2107fea0
call fcn.210107ec
jmp 0x210129fd
mov edx, dword [ebp - 0x14]
and edx, 0xffff
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x24]
call fcn.21012744
test eax, eax
jne 0x210129c7
jmp 0x210129fb
mov ecx, dword [ebp - 0x14]
and ecx, 0xffff
mov edx, dword [ebp - 0x10]
sub edx, ecx
mov dword [ebp - 0x10], edx
jmp 0x2101292b
mov dword [ebp - 0xc], 1
mov eax, dword [ebp - 8]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.210636ec
add esp, 4
mov eax, dword [ebp - 0xc]
jmp 0x21012a0b
jmp 0x210129e4
jmp 0x210129e4
jmp 0x210129e4
jmp 0x210129e4
jmp 0x210129e4
jmp 0x210129e4
jmp 0x210129e4
jmp 0x210129e4
mov esp, ebp
pop ebp
ret 0x10