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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
or dword [ebp - 8], 0xffffffff
push ebx
push esi
xor ebx, ebx
mov esi, ecx
mov dword [ebp - 4], ebx
cmp dword [esi + 0x14], ebx
je 0x10d780a
push 5
pop eax
jmp 0x10d7930
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov dword [ebp - 0xc], ebx
push edi
call fcn.01104e5a
test eax, eax
jge 0x10d782c
mov eax, 0x8007000e
jmp 0x10d792f
mov eax, dword [ebp + 0x20]
push eax
push 0x1000
push dword [ebp - 0xc]
mov dword [esi + 0x10], eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [esi + 0x14], eax
cmp eax, ebx
jne 0x10d7856
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jmp 0x10d7985
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov eax, edi
div ecx
cmp dword [ebp + 0x1c], ebx
mov dword [esi + 8], ecx
mov ecx, dword [ebp + 0x18]
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], ebx
mov dword [esi], edi
mov dword [esi + 0xc], ecx
mov dword [esi + 4], eax
mov ebx, eax
jne 0x10d787f
mov ebx, edi
mov edi, dword [ebp + 0x14]
push 0x10162ec
mov ecx, edi
call fcn.010813f5
test eax, eax
jne 0x10d7936
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call dword [sym.imp.msvcrt.dll_srand]
xor edi, edi
pop ecx
test ebx, ebx
jbe 0x10d78bb
call dword [sym.imp.msvcrt.dll_rand]
mov ecx, dword [esi + 0x14]
mov byte [edi + ecx], al
inc edi
cmp edi, ebx
jb 0x10d78aa
cmp dword [ebp + 0x1c], 0
je 0x10d78e5
xor edi, edi
inc edi
cmp dword [esi + 8], edi
jbe 0x10d78e5
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0x14]
push eax
imul eax, edi
push ecx
add eax, ecx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
inc edi
cmp edi, dword [esi + 8]
jb 0x10d78c9
push dword [esi + 0x18]
mov ecx, esi
call fcn.010d7707
cmp dword [ebp - 8], 0xffffffff
je 0x10d7902
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 8], 0xffffffff
xor edi, edi
cmp dword [ebp - 4], edi
je 0x10d792c
mov eax, dword [esi + 0x14]
cmp eax, edi
je 0x10d791d
push 0x8000
push edi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [esi + 0x14], edi
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x1c], edi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x1c
mov ecx, edi
call fcn.0107cb17
test al, al
jne 0x10d78bb
mov eax, dword [edi]
mov eax, dword [eax + 0xc]
lea ecx, [ebp - 8]
push ecx
push 5
push eax
call fcn.010b7b7b
test eax, eax
je 0x10d7964
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jmp 0x10d7985
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 8]
xor edi, edi
mov dword [ebp + 0x20], edi
mov dword [ebp + 0xc], edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x10d799a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jle 0x10d7a49
and eax, 0xffff
or eax, 0x80070000
jmp 0x10d7a49
mov eax, dword [ebp - 0x10]
mov ecx, eax
or ecx, dword [ebp - 0xc]
jne 0x10d79b0
mov dword [ebp - 4], 0x80040002
jmp 0x10d78ef
cmp dword [ebp - 0xc], edi
jl 0x10d79c2
jg 0x10d79bc
cmp eax, 0xffffffff
jbe 0x10d79c2
or dword [ebp + 8], 0xffffffff
jmp 0x10d79c5
mov dword [ebp + 8], eax
mov dword [ebp + 0x10], ebx
cmp ebx, edi
jbe 0x10d78bb
mov ebx, 0x80070000
mov edi, dword [ebp + 0x10]
cmp edi, dword [ebp + 8]
jb 0x10d79e0
mov edi, dword [ebp + 8]
push 0
lea eax, [ebp + 0xc]
push eax
mov eax, dword [esi + 0x14]
add eax, dword [ebp + 0x20]
push edi
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10d7a38
cmp edi, dword [ebp + 0xc]
jne 0x10d7a51
sub dword [ebp + 0x10], edi
add dword [ebp + 0x20], edi
cmp dword [ebp + 0x10], 0
jbe 0x10d78bb
xor eax, eax
push eax
push eax
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x10d79d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10d7a33
and eax, 0xffff
or eax, ebx
mov dword [ebp - 4], eax
jmp 0x10d79d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10d7a49
and eax, 0xffff
or eax, ebx
mov dword [ebp - 4], eax
jmp 0x10d78ef
mov dword [ebp - 4], 0x80040003
jmp 0x10d78ef