Function at 0x57a5c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 8], esi
mov esi, eax
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], edi
mov ebx, dword [eax + 4]
cmp ebx, 1
ja 0x57a652
test ebx, ebx
jne 0x57a670
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov edi, dword [esi + 0x40]
mov cl, bl
mov edx, 0x4000
mov eax, 1
sar edx, cl
mov dword [esp + 8], edx
mov dword [esp + 0xc], edi
mov dword [esp + 4], eax
mov edi, dword [esi + 0x44]
add ebx, edi
mov dword [esp], ebx
call sub.msvcrt.dll_fread
test eax, eax
mov edx, eax
jne 0x57a630
mov ebx, dword [esi + 0x40]
test byte [ebx + 0xc], 0x20
jne 0x57a6d7
lea esi, [esi]
mov ebx, dword [esi + 4]
mov eax, dword [esi + 0x44]
add ebx, edx
mov dword [esi + 4], ebx
cmp ebx, 1
mov dword [esi], eax
ja 0x57a654
mov dword [esi + 0x58], ebx
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov eax, dword [eax]
cmp byte [eax], 0x1f
je 0x57a680
mov dword [esi + 0x58], 1
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi]
mov eax, dword [eax + 0x44]
movzx edx, byte [ecx]
mov byte [eax], dl
jmp 0x57a5e1
cmp byte [eax + 1], 0x8b
jne 0x57a659
mov edx, dword [esi + 0x3c]
add eax, 2
lea ecx, [ebx - 2]
mov dword [esi], eax
test edx, edx
jne 0x57a6e3
test ecx, ecx
je 0x57a7ca
dec ecx
mov dword [esi + 4], ecx
movzx ebx, byte [eax]
inc eax
mov dword [esi], eax
mov dword [ebp - 0x10], 0xffffffff
test edx, edx
jne 0x57a6c9
test ecx, ecx
je 0x57a835
mov eax, dword [esi]
dec ecx
mov dword [esi + 4], ecx
movzx edx, byte [eax]
inc eax
mov dword [esi], eax
mov dword [ebp - 0x10], edx
cmp ebx, 8
je 0x57a6ed
mov dword [esi + 0x38], 0xfffffffd
jmp 0x57a660
mov dword [esi + 0x38], 0xffffffff
jmp 0x57a630
mov dword [esi + 4], ecx
mov ebx, 0xffffffff
jmp 0x57a6a7
test byte [ebp - 0x10], 0xe0
jne 0x57a6ce
mov ebx, dword [esi + 0x3c]
mov edi, 5
test ebx, ebx
jne 0x57a710
test ecx, ecx
je 0x57a9c6
mov eax, dword [esi]
dec ecx
inc eax
mov dword [esi + 4], ecx
mov dword [esi], eax
dec edi
jns 0x57a6fb
test byte [ebp - 0x10], 4
je 0x57a8b9
test ebx, ebx
mov edi, 0xffffffff
jne 0x57a73a
test ecx, ecx
je 0x57aaae
mov eax, dword [esi]
dec ecx
mov dword [esi + 4], ecx
movzx edi, byte [eax]
inc eax
mov dword [esi], eax
test ebx, ebx
mov edx, 0xffffffff
jne 0x57a757
test ecx, ecx
je 0x57ab12
mov eax, dword [esi]
dec ecx
mov dword [esi + 4], ecx
movzx edx, byte [eax]
inc eax
mov dword [esi], eax
shl edx, 8
add edi, edx
jmp 0x57a771
mov eax, dword [esi]
dec ecx
mov dword [esi + 4], ecx
movzx edx, byte [eax]
inc eax
mov dword [esi], eax
inc edx
je 0x57a8b9
dec edi
cmp edi, 0xffffffff
je 0x57a8b9
test ebx, ebx
jne 0x57a8b9
test ecx, ecx
jne 0x57a75e
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov ebx, dword [esi + 0x40]
mov eax, 0x4000
mov dword [esp + 8], eax
mov edx, 1
mov dword [esp + 4], edx
mov dword [esp + 0xc], ebx
mov ecx, dword [esi + 0x44]
mov dword [esp], ecx
call sub.msvcrt.dll_fread
test eax, eax
mov ecx, eax
je 0x57a898
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
mov dword [esi], eax
jmp 0x57a760
mov dword [esi + 4], 0
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov edi, dword [esi + 0x40]
mov ecx, 0x4000
mov dword [esp + 8], ecx
mov edx, 1
mov dword [esp + 4], edx
mov dword [esp + 0xc], edi
mov eax, dword [esi + 0x44]
mov dword [esp], eax
call sub.msvcrt.dll_fread
test eax, eax
mov ecx, eax
jne 0x57aa31
mov dword [esi + 4], 0
mov ebx, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [ebx + 0xc], 0x20
je 0x57a828
mov dword [esi + 0x38], 0xffffffff
mov edx, dword [esi + 0x3c]
mov ebx, 0xffffffff
jmp 0x57a6a7
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov edi, dword [esi + 0x40]
mov ecx, 0x4000
mov dword [esp + 8], ecx
mov edx, 1
mov dword [esp + 4], edx
mov dword [esp + 0xc], edi
mov eax, dword [esi + 0x44]
mov dword [esp], eax
call sub.msvcrt.dll_fread
test eax, eax
mov ecx, eax
jne 0x57aa27
mov dword [esi + 4], 0
mov eax, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [eax + 0xc], 0x20
je 0x57a88c
mov dword [esi + 0x38], 0xffffffff
mov dword [ebp - 0x10], 0xffffffff
jmp 0x57a6c9
mov dword [esi + 4], 0
mov edi, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [edi + 0xc], 0x20
je 0x57a8b6
mov dword [esi + 0x38], 0xffffffff
mov ebx, dword [esi + 0x3c]
test byte [ebp - 0x10], 8
je 0x57a8da
test ebx, ebx
jne 0x57a8da
test ecx, ecx
je 0x57a93a
mov eax, dword [esi]
dec ecx
mov dword [esi + 4], ecx
movzx edx, byte [eax]
inc eax
mov dword [esi], eax
test edx, edx
je 0x57a8da
inc edx
jne 0x57a8bf
test byte [ebp - 0x10], 0x10
je 0x57a8ff
test ebx, ebx
jne 0x57a8ff
test ecx, ecx
je 0x57a980
mov eax, dword [esi]
dec ecx
mov dword [esi + 4], ecx
movzx edx, byte [eax]
inc eax
mov dword [esi], eax
test edx, edx
je 0x57a8ff
inc edx
jne 0x57a8e0
test byte [ebp - 0x10], 2
je 0x57a928
mov edi, 1
test ebx, ebx
jne 0x57a925
test ecx, ecx
je 0x57aa49
mov edx, dword [esi]
lea eax, [ecx - 1]
mov ecx, eax
mov dword [esi + 4], eax
lea eax, [edx + 1]
mov dword [esi], eax
dec edi
jns 0x57a90a
cmp ebx, 1
sbb edi, edi
not edi
and edi, 0xfffffffd
mov dword [esi + 0x38], edi
jmp 0x57a660
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov edi, dword [esi + 0x40]
mov eax, 1
mov dword [esp + 4], eax
mov ebx, 0x4000
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edi
mov ecx, dword [esi + 0x44]
mov dword [esp], ecx
call sub.msvcrt.dll_fread
test eax, eax
mov ecx, eax
je 0x57ab97
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
mov dword [esi], eax
jmp 0x57a8c9
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov edi, dword [esi + 0x40]
mov eax, 1
mov dword [esp + 4], eax
mov ebx, 0x4000
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edi
mov ecx, dword [esi + 0x44]
mov dword [esp], ecx
call sub.msvcrt.dll_fread
test eax, eax
mov ecx, eax
je 0x57abbd
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
mov dword [esi], eax
jmp 0x57a8ee
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov edx, dword [esi + 0x40]
mov ecx, 1
mov dword [esp + 4], ecx
mov eax, 0x4000
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov ebx, dword [esi + 0x44]
mov dword [esp], ebx
call sub.msvcrt.dll_fread
test eax, eax
mov ecx, eax
jne 0x57aa3e
mov dword [esi + 4], 0
mov eax, dword [esi + 0x40]
mov ebx, 1
mov dword [esi + 0x3c], 1
test byte [eax + 0xc], 0x20
je 0x57a710
mov dword [esi + 0x38], 0xffffffff
jmp 0x57a710
mov eax, dword [esi + 0x44]
mov dword [esi], eax
jmp 0x57a6bc
mov eax, dword [esi + 0x44]
mov edx, dword [esi + 0x3c]
mov dword [esi], eax
jmp 0x57a69d
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
jmp 0x57a709
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov edx, dword [esi + 0x40]
mov eax, 1
mov dword [esp + 4], eax
mov ebx, 0x4000
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edx
mov ecx, dword [esi + 0x44]
mov dword [esp], ecx
call sub.msvcrt.dll_fread
test eax, eax
mov ecx, eax
jne 0x57ab72
mov dword [esi + 4], 0
mov eax, dword [esi + 0x40]
mov ebx, 1
mov dword [esi + 0x3c], 1
test byte [eax + 0xc], 0x20
je 0x57a925
mov dword [esi + 0x38], 0xffffffff
jmp 0x57a925
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov edx, dword [esi + 0x40]
mov ecx, 0x4000
mov dword [esp + 8], ecx
mov ebx, 1
mov dword [esp + 4], ebx
mov dword [esp + 0xc], edx
mov edi, dword [esi + 0x44]
mov dword [esp], edi
call sub.msvcrt.dll_fread
test eax, eax
mov ecx, eax
jne 0x57ab8a
mov dword [esi + 4], 0
mov eax, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [eax + 0xc], 0x20
je 0x57ab05
mov dword [esi + 0x38], 0xffffffff
mov ebx, dword [esi + 0x3c]
mov edi, 0xffffffff
jmp 0x57a73a
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov eax, dword [esi + 0x40]
mov ecx, 1
mov dword [esp + 4], ecx
mov edx, 0x4000
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov ebx, dword [esi + 0x44]
mov dword [esp], ebx
call sub.msvcrt.dll_fread
test eax, eax
mov ecx, eax
jne 0x57ab7d
mov dword [esi + 4], 0
mov ebx, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [ebx + 0xc], 0x20
je 0x57ab65
mov dword [esi + 0x38], 0xffffffff
mov ebx, dword [esi + 0x3c]
mov edx, 0xffffffff
jmp 0x57a757
mov edx, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
jmp 0x57a918
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
mov dword [esi], eax
jmp 0x57a74d
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
mov dword [esi], eax
jmp 0x57a730
mov dword [esi + 4], 0
mov edx, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [edx + 0xc], 0x20
je 0x57abb5
mov dword [esi + 0x38], 0xffffffff
mov ebx, dword [esi + 0x3c]
jmp 0x57a8da
mov dword [esi + 4], 0
mov edx, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [edx + 0xc], 0x20
je 0x57abdb
mov dword [esi + 0x38], 0xffffffff
mov ebx, dword [esi + 0x3c]
jmp 0x57a8ff