Function at 0x57b800
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 0x57b892
test ebx, ebx
jne 0x57b8b0
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 0x57b870
mov ebx, dword [esi + 0x40]
test byte [ebx + 0xc], 0x20
jne 0x57b917
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 0x57b894
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 0x57b8c0
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 0x57b821
cmp byte [eax + 1], 0x8b
jne 0x57b899
mov edx, dword [esi + 0x3c]
add eax, 2
lea ecx, [ebx - 2]
mov dword [esi], eax
test edx, edx
jne 0x57b923
test ecx, ecx
je 0x57ba0a
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 0x57b909
test ecx, ecx
je 0x57ba75
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 0x57b92d
mov dword [esi + 0x38], 0xfffffffd
jmp 0x57b8a0
mov dword [esi + 0x38], 0xffffffff
jmp 0x57b870
mov dword [esi + 4], ecx
mov ebx, 0xffffffff
jmp 0x57b8e7
test byte [ebp - 0x10], 0xe0
jne 0x57b90e
mov ebx, dword [esi + 0x3c]
mov edi, 5
test ebx, ebx
jne 0x57b950
test ecx, ecx
je 0x57bc06
mov eax, dword [esi]
dec ecx
inc eax
mov dword [esi + 4], ecx
mov dword [esi], eax
dec edi
jns 0x57b93b
test byte [ebp - 0x10], 4
je 0x57baf9
test ebx, ebx
mov edi, 0xffffffff
jne 0x57b97a
test ecx, ecx
je 0x57bcee
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 0x57b997
test ecx, ecx
je 0x57bd52
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 0x57b9b1
mov eax, dword [esi]
dec ecx
mov dword [esi + 4], ecx
movzx edx, byte [eax]
inc eax
mov dword [esi], eax
inc edx
je 0x57baf9
dec edi
cmp edi, 0xffffffff
je 0x57baf9
test ebx, ebx
jne 0x57baf9
test ecx, ecx
jne 0x57b99e
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 0x57bad8
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
mov dword [esi], eax
jmp 0x57b9a0
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 0x57bc71
mov dword [esi + 4], 0
mov ebx, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [ebx + 0xc], 0x20
je 0x57ba68
mov dword [esi + 0x38], 0xffffffff
mov edx, dword [esi + 0x3c]
mov ebx, 0xffffffff
jmp 0x57b8e7
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 0x57bc67
mov dword [esi + 4], 0
mov eax, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [eax + 0xc], 0x20
je 0x57bacc
mov dword [esi + 0x38], 0xffffffff
mov dword [ebp - 0x10], 0xffffffff
jmp 0x57b909
mov dword [esi + 4], 0
mov edi, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [edi + 0xc], 0x20
je 0x57baf6
mov dword [esi + 0x38], 0xffffffff
mov ebx, dword [esi + 0x3c]
test byte [ebp - 0x10], 8
je 0x57bb1a
test ebx, ebx
jne 0x57bb1a
test ecx, ecx
je 0x57bb7a
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 0x57bb1a
inc edx
jne 0x57baff
test byte [ebp - 0x10], 0x10
je 0x57bb3f
test ebx, ebx
jne 0x57bb3f
test ecx, ecx
je 0x57bbc0
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 0x57bb3f
inc edx
jne 0x57bb20
test byte [ebp - 0x10], 2
je 0x57bb68
mov edi, 1
test ebx, ebx
jne 0x57bb65
test ecx, ecx
je 0x57bc89
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 0x57bb4a
cmp ebx, 1
sbb edi, edi
not edi
and edi, 0xfffffffd
mov dword [esi + 0x38], edi
jmp 0x57b8a0
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 0x57bdd7
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
mov dword [esi], eax
jmp 0x57bb09
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 0x57bdfd
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
mov dword [esi], eax
jmp 0x57bb2e
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 0x57bc7e
mov dword [esi + 4], 0
mov eax, dword [esi + 0x40]
mov ebx, 1
mov dword [esi + 0x3c], 1
test byte [eax + 0xc], 0x20
je 0x57b950
mov dword [esi + 0x38], 0xffffffff
jmp 0x57b950
mov eax, dword [esi + 0x44]
mov dword [esi], eax
jmp 0x57b8fc
mov eax, dword [esi + 0x44]
mov edx, dword [esi + 0x3c]
mov dword [esi], eax
jmp 0x57b8dd
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
jmp 0x57b949
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 0x57bdb2
mov dword [esi + 4], 0
mov eax, dword [esi + 0x40]
mov ebx, 1
mov dword [esi + 0x3c], 1
test byte [eax + 0xc], 0x20
je 0x57bb65
mov dword [esi + 0x38], 0xffffffff
jmp 0x57bb65
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 0x57bdca
mov dword [esi + 4], 0
mov eax, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [eax + 0xc], 0x20
je 0x57bd45
mov dword [esi + 0x38], 0xffffffff
mov ebx, dword [esi + 0x3c]
mov edi, 0xffffffff
jmp 0x57b97a
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 0x57bdbd
mov dword [esi + 4], 0
mov ebx, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [ebx + 0xc], 0x20
je 0x57bda5
mov dword [esi + 0x38], 0xffffffff
mov ebx, dword [esi + 0x3c]
mov edx, 0xffffffff
jmp 0x57b997
mov edx, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
jmp 0x57bb58
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
mov dword [esi], eax
jmp 0x57b98d
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
mov dword [esi], eax
jmp 0x57b970
mov dword [esi + 4], 0
mov edx, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [edx + 0xc], 0x20
je 0x57bdf5
mov dword [esi + 0x38], 0xffffffff
mov ebx, dword [esi + 0x3c]
jmp 0x57bb1a
mov dword [esi + 4], 0
mov edx, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [edx + 0xc], 0x20
je 0x57be1b
mov dword [esi + 0x38], 0xffffffff
mov ebx, dword [esi + 0x3c]
jmp 0x57bb3f