Function at 0x10019080
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push ebx
push ebp
mov ebp, dword [esp + 0x24]
lea ebx, [ebp + ebp*2]
add ebx, ebx
push esi
mov esi, eax
mov eax, dword [esi + 0x248]
add ebx, ebx
add ebx, ebx
add eax, ebx
cmp dword [esi + 0xd9fc], 0
push edi
mov edi, dword [eax + 0x10]
mov dword [esp + 0x14], edi
jne 0x1001912c
mov ecx, dword [eax + 8]
mov dword [esp + 0x18], ecx
mov edx, dword [eax + 0xc]
push 0
lea eax, [esp + 0x20]
push eax
push ecx
mov ecx, dword [esi + 0x208]
push ecx
mov dword [esp + 0x2c], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x100190e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10019297
mov ebx, dword [esp + 0x28]
mov eax, dword [esi + 0x208]
push 0
lea edx, [esp + 0x30]
push edx
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x2c], edi
jne 0x10019297
cmp byte [esi + 0x21c], 0
je 0x100192d5
push ebx
mov eax, edi
push esi
call fcn.10018f10
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov ecx, dword [esi + 0xd9f8]
imul ecx, ecx, 0x228
cmp ebp, dword [ecx + esi + 0x460]
lea eax, [ecx + esi]
jl 0x1001914c
cmp ebp, dword [eax + 0x464]
jle 0x1001915b
mov edi, ebp
call fcn.10018ff0
test eax, eax
je 0x10019297
mov edx, dword [esi + 0xd9f8]
mov eax, dword [esi + 0x248]
imul edx, edx, 0x228
mov ecx, dword [edx + esi + 0x460]
add edx, esi
lea edi, [ecx + ecx*2]
mov ecx, dword [eax + ebx + 8]
sub ecx, dword [eax + edi*8 + 8]
mov ebx, dword [eax + ebx + 0xc]
sbb ebx, dword [eax + edi*8 + 0xc]
mov eax, dword [edx + 0x46c]
cdq
add ecx, eax
push 0
lea eax, [esp + 0x20]
push eax
push ecx
mov dword [esp + 0x24], ecx
mov ecx, dword [esi + 0x208]
adc ebx, edx
push ecx
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x100191c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10019297
mov edx, dword [esi + 0xd9f8]
mov edi, dword [esp + 0x14]
imul edx, edx, 0x228
mov ecx, dword [esi + 0x208]
lea eax, [edx + esi]
push 0
cmp ebp, dword [eax + 0x464]
jne 0x100192a2
mov ebx, dword [eax + 0x470]
mov ebp, dword [esp + 0x2c]
lea eax, [esp + 0x30]
push eax
sub edi, ebx
push edi
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x2c], edi
jne 0x10019297
test ebx, ebx
jbe 0x100192be
inc dword [esi + 0xd9f8]
mov eax, dword [esi + 0xd9f8]
cmp eax, dword [esi + 0xd9fc]
jge 0x10019297
call fcn.10018f90
test eax, eax
jne 0x10019297
mov edx, dword [esi + 0xd9f8]
imul edx, edx, 0x228
mov eax, dword [edx + esi + 0x46c]
mov edx, dword [esi + 0x208]
push 0
lea ecx, [esp + 0x20]
sub eax, ebx
push ecx
push eax
push edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x10019279
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10019297
mov ecx, dword [esi + 0x208]
push 0
lea eax, [esp + 0x30]
push eax
push ebx
add edi, ebp
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x2c], ebx
je 0x100192be
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0x30]
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x2c], edi
jne 0x10019297
mov ebp, dword [esp + 0x28]
cmp byte [esi + 0x21c], 0
je 0x100192d5
mov eax, dword [esp + 0x14]
push ebp
push esi
call fcn.10018f10
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret