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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
nop
xor edi, edi
mov eax, dword [ebp + 0xc]
push edi
push edi
push 3
push edi
push 1
push 0x80000000
push dword [ebp + 8]
mov dword [eax], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [ebp + 8], ebx
nop
cmp ebx, 0xffffffff
je 0x1000231e
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 2
push edi
push 0xfffffffffffffffc
push ebx
call esi
nop
lea eax, [ebp - 8]
push edi
push eax
lea eax, [ebp - 0xc]
push 4
push eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
call ebx
cmp dword [ebp - 0xc], 0xdd4a3308
je 0x10002220
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1000231e
nop
push 2
push edi
push 0xfffffffffffffff8
push dword [ebp + 8]
call esi
nop
lea eax, [ebp - 8]
push edi
push eax
lea eax, [ebp - 4]
push 4
push eax
push dword [ebp + 8]
call ebx
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp - 4]
cmp ecx, eax
ja 0x10002212
push 2
push edi
neg ecx
push ecx
push dword [ebp + 8]
call esi
nop
mov eax, dword [ebp - 4]
add eax, 0xfffffff8
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
pop ecx
cmp esi, edi
mov dword [ebp - 0x1c], esi
je 0x10002212
lea eax, [ebp - 8]
push edi
push eax
mov eax, dword [ebp - 4]
add eax, 0xfffffff8
push eax
push esi
push dword [ebp + 8]
call ebx
nop
mov eax, dword [ebp - 4]
mov ebx, 0x8c
add eax, 0xfffffff8
xor edx, edx
mov ecx, ebx
mov dword [ebp - 0x10], edi
div ecx
test eax, eax
jle 0x100022d1
mov dword [ebp - 0x14], esi
mov esi, 0x10005020
push esi
call sub.MSVCRT.dll_strlen
push eax
push esi
push ebx
push dword [ebp - 0x14]
call fcn.1000260a
mov eax, dword [ebp - 4]
xor edx, edx
add eax, 0xfffffff8
mov ecx, ebx
div ecx
add dword [ebp - 0x14], ebx
add esp, 0x14
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], eax
jl 0x100022a3
mov esi, dword [ebp - 0x1c]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x18], edi
cmp dword [eax], 0xffffffff
jne 0x100022fa
mov eax, dword [ebp + 0xc]
xor edx, edx
mov dword [eax], esi
mov eax, dword [ebp - 4]
add eax, 0xfffffff8
div ebx
jmp 0x100023aa
nop
push 9
lea eax, [ebp - 0x2c]
push edi
push eax
call sub.MSVCRT.dll_memset
mov eax, dword [ebp - 4]
add eax, 0xfffffff8
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 0x10
cmp eax, edi
mov dword [ebp - 0x20], eax
jne 0x10002325
xor eax, eax
jmp 0x100023aa
mov eax, dword [ebp - 4]
xor edx, edx
add eax, 0xfffffff8
mov ecx, ebx
div ecx
mov dword [ebp - 0x10], edi
test eax, eax
jle 0x10002396
mov eax, dword [ebp - 0x20]
mov dword [ebp + 8], esi
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
push 8
add eax, 0x84
push eax
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
nop
push dword [ebp + 0x10]
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.MSVCRT.dll__strcmpi]
add esp, 0x14
test eax, eax
jne 0x1000237f
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 0x14]
inc dword [ebp - 0x18]
add dword [ebp - 0x14], ebx
push 0x23
pop ecx
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
xor edx, edx
add eax, 0xfffffff8
mov ecx, ebx
div ecx
inc dword [ebp - 0x10]
add dword [ebp + 8], ebx
cmp dword [ebp - 0x10], eax
jl 0x10002341
nop
push esi
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [ebp + 0xc]
pop ecx
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
mov eax, dword [ebp - 0x18]
pop edi
pop esi
pop ebx
leave
ret