Function at 0x10052590
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 8]
push esi
push edi
mov edi, edx
mov eax, dword [ebx + 0x248]
lea edx, [ecx + ecx*2]
shl edx, 3
cmp dword [ebx + 0xd9fc], 0
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x10], edx
mov esi, dword [edx + eax + 0x10]
jne 0x10052672
mov ecx, dword [edx + eax + 8]
mov dword [ebp - 0x1c], ecx
mov eax, dword [edx + eax + 0xc]
push 0
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push ecx
push dword [ebx + 0x208]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x100525f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1005281c
push 0
lea eax, [ebp - 8]
push eax
push esi
push edi
push dword [ebx + 0x208]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 8], esi
jne 0x1005281c
cmp byte [ebx + 0x21c], 0
je 0x10052895
push esi
push edi
push dword [ebx + 0x244]
call fcn.1008bac0
shr esi, 4
add esp, 0xc
xor edi, edi
test esi, esi
je 0x10052895
lea eax, [ebx + 0xda28]
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebx + 0x244]
push eax
add ecx, edi
lea edx, [edi + edx]
call fcn.10079d90
add esp, 4
lea eax, [ebx + 0xda28]
add edi, 0x10
sub esi, 1
jne 0x10052644
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
imul eax, dword [ebx + 0xd9f8], 0x228
cmp ecx, dword [eax + ebx + 0x460]
jl 0x1005268e
cmp ecx, dword [eax + ebx + 0x464]
jle 0x1005269f
mov edx, ecx
mov ecx, ebx
call fcn.100524f0
test eax, eax
je 0x1005281c
imul eax, dword [ebx + 0xd9f8], 0x228
mov edi, dword [ebx + 0x248]
push 0
mov ecx, dword [eax + ebx + 0x460]
mov eax, dword [eax + ebx + 0x46c]
cdq
lea ecx, [ecx + ecx*2]
sub eax, dword [edi + ecx*8 + 8]
sbb edx, dword [edi + ecx*8 + 0xc]
mov ecx, dword [ebp - 0x10]
add eax, dword [edi + ecx + 8]
adc edx, dword [edi + ecx + 0xc]
lea ecx, [ebp - 0x18]
push ecx
push eax
push dword [ebx + 0x208]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x10052700
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1005281c
imul ecx, dword [ebx + 0xd9f8], 0x228
mov eax, dword [ebp + 8]
mov edi, dword [ebp - 0xc]
push 0
cmp eax, dword [ecx + ebx + 0x464]
jne 0x10052826
mov eax, dword [ecx + ebx + 0x470]
mov ecx, esi
sub ecx, eax
mov dword [ebp + 8], eax
lea eax, [ebp - 8]
mov dword [ebp - 0x10], ecx
push eax
push ecx
push edi
push dword [ebx + 0x208]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 8], eax
jne 0x1005281c
cmp dword [ebp + 8], 0
jbe 0x10052847
inc dword [ebx + 0xd9f8]
mov eax, dword [ebx + 0xd9f8]
cmp eax, dword [ebx + 0xd9fc]
jge 0x1005281c
mov eax, dword [ebx + 0x208]
cmp eax, 0xffffffff
je 0x1005278c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0x208], 0xffffffff
imul eax, dword [ebx + 0xd9f8], 0x228
push 0
push 0
push 3
push 0
push 1
add eax, 0x258
push connect
add eax, ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebx + 0x208], eax
cmp eax, 0xffffffff
je 0x1005281c
imul ecx, dword [ebx + 0xd9f8], 0x228
lea edx, [ebp - 0x18]
push 0
push edx
mov ecx, dword [ecx + ebx + 0x46c]
sub ecx, dword [ebp + 8]
push ecx
push eax
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x100527f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1005281c
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov eax, dword [ebp - 0x10]
add eax, edi
push eax
push dword [ebx + 0x208]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp + 8]
cmp dword [ebp - 8], eax
je 0x10052847
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 8]
push eax
push esi
push edi
push dword [ebx + 0x208]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 8], esi
je 0x10052847
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [ebx + 0x21c], 0
je 0x10052895
push esi
push edi
push dword [ebx + 0x244]
call fcn.1008bac0
shr esi, 4
add esp, 0xc
xor edi, edi
test esi, esi
je 0x10052895
lea eax, [ebx + 0xda28]
nop
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebx + 0x244]
push eax
add ecx, edi
lea edx, [edi + edx]
call fcn.10079d90
add esp, 4
lea eax, [ebx + 0xda28]
add edi, 0x10
sub esi, 1
jne 0x10052870
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret