Function at 0x10052430
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 0x100524dc
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 0x10052495
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10052647
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 0x10052647
cmp byte [esi + 0x21c], 0
je 0x10052685
push ebx
mov eax, edi
push esi
call fcn.100522c0
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 0x100524fc
cmp ebp, dword [eax + 0x464]
jle 0x1005250b
mov edi, ebp
call fcn.100523a0
test eax, eax
je 0x10052647
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 0x10052574
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10052647
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 0x10052652
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 0x10052647
test ebx, ebx
jbe 0x1005266e
inc dword [esi + 0xd9f8]
mov eax, dword [esi + 0xd9f8]
cmp eax, dword [esi + 0xd9fc]
jge 0x10052647
call fcn.10052340
test eax, eax
jne 0x10052647
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 0x10052629
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10052647
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 0x1005266e
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 0x10052647
mov ebp, dword [esp + 0x28]
cmp byte [esi + 0x21c], 0
je 0x10052685
mov eax, dword [esp + 0x14]
push ebp
push esi
call fcn.100522c0
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret