Function at 0x561391
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ebx
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
test esi, esi
je 0x5613ab
cmp byte [esi + 0x5c], 0x72
je 0x5613b5
mov edx, 0xfffffffe
jmp 0x5615b6
mov ecx, dword [esi + 0x38]
cmp ecx, 0xfffffffd
sete dl
cmp ecx, 0xffffffff
sete al
or eax, edx
or edx, 0xffffffff
test al, 1
jne 0x5615b6
xor edx, edx
dec ecx
je 0x5615b6
mov dword [ebp - 0x10], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], edi
test edi, edi
je 0x561580
mov eax, dword [esi + 0x6c]
cmp eax, 0xffffffff
je 0x561429
mov byte [ebx], al
inc ebx
inc dword [esi + 0xc]
mov dword [ebp - 0x10], ebx
dec dword [esi + 0x10]
mov dword [esi + 0x6c], 0xffffffff
inc dword [esi + 0x68]
cmp dword [esi + 0x70], 0
je 0x561429
mov dl, 1
mov dword [esi + 0x38], 1
jmp 0x5615b6
mov dword [esi + 0x38], 0xffffffff
jmp 0x561580
cmp dword [esi + 0x10], 0
je 0x561580
cmp dword [esi + 0x58], 0
mov eax, dword [esi + 4]
je 0x5614a0
mov ebx, eax
mov eax, dword [esi + 0x10]
cmp ebx, eax
jbe 0x561447
mov ebx, eax
test ebx, ebx
je 0x56146a
push ebx
push dword [esi]
push dword [esi + 0xc]
call fcn.00577220
add dword [ebp - 0x10], ebx
add dword [esi], ebx
mov eax, dword [ebp - 0x10]
sub dword [esi + 0x10], ebx
mov dword [esi + 0xc], eax
sub dword [esi + 4], ebx
add esp, 0xc
mov eax, dword [esi + 0x10]
test eax, eax
je 0x561485
push dword [esi + 0x40]
push eax
push 1
push dword [ebp - 0x10]
call sub.msvcrt.dll_fread
add esp, 0x10
sub dword [esi + 0x10], eax
sub edi, dword [esi + 0x10]
add dword [esi + 0x64], edi
add dword [esi + 0x68], edi
test edi, edi
jne 0x561499
mov dword [esi + 0x3c], 1
mov edx, edi
jmp 0x5615b6
test eax, eax
jne 0x5614ea
cmp dword [esi + 0x3c], 0
jne 0x5614ea
call sub.msvcrt.dll__errno
mov dword [eax], 0
push dword [esi + 0x40]
push 0x4000
push 1
push dword [esi + 0x44]
call sub.msvcrt.dll_fread
add esp, 0x10
test eax, eax
mov dword [esi + 4], eax
jne 0x5614e5
mov eax, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [eax + 0xc], 0x20
jne 0x56141d
mov eax, dword [esi + 0x44]
mov dword [esi], eax
mov eax, dword [esi + 4]
add dword [esi + 0x64], eax
mov eax, dword [esi + 0x10]
add dword [esi + 0x68], eax
push 0
push esi
call fcn.0055d6d1
mov edx, dword [esi + 0x64]
sub edx, dword [esi + 4]
mov dword [esi + 0x38], eax
mov dword [esi + 0x64], edx
mov edx, dword [esi + 0x68]
sub edx, dword [esi + 0x10]
dec eax
mov dword [esi + 0x68], edx
pop edx
pop ecx
jne 0x561570
mov eax, dword [esi + 0xc]
sub eax, ebx
push eax
push ebx
push dword [esi + 0x4c]
call fcn.0055ed1a
mov ebx, dword [esi + 0xc]
mov dword [esi + 0x4c], eax
mov eax, esi
call fcn.0056134d
add esp, 0xc
cmp eax, dword [esi + 0x4c]
je 0x561545
mov dword [esi + 0x38], 0xfffffffd
jmp 0x561570
mov eax, esi
call fcn.0056134d
mov eax, esi
call fcn.00560e8e
cmp dword [esi + 0x38], 0
jne 0x561580
push esi
call fcn.0055d400
push 0
push 0
push 0
call fcn.0055ed1a
add esp, 0x10
mov dword [esi + 0x4c], eax
cmp dword [esi + 0x38], 0
jne 0x561580
cmp dword [esi + 0x3c], 0
je 0x561429
mov eax, dword [esi + 0xc]
sub eax, ebx
push eax
push ebx
push dword [esi + 0x4c]
call fcn.0055ed1a
mov ecx, dword [esi + 0x10]
add esp, 0xc
cmp edi, ecx
mov dword [esi + 0x4c], eax
jne 0x5615b2
mov eax, dword [esi + 0x38]
cmp eax, 0xfffffffd
sete dl
inc eax
sete al
or eax, edx
or edx, 0xffffffff
test al, 1
jne 0x5615b6
mov edx, edi
sub edx, ecx
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret