Function at 0x57e1c0
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 0x57e252
test ebx, ebx
jne 0x57e270
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 0x57e230
mov ebx, dword [esi + 0x40]
test byte [ebx + 0xc], 0x20
jne 0x57e2d7
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 0x57e254
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 0x57e280
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 0x57e1e1
cmp byte [eax + 1], 0x8b
jne 0x57e259
mov edx, dword [esi + 0x3c]
add eax, 2
lea ecx, [ebx - 2]
mov dword [esi], eax
test edx, edx
jne 0x57e2e3
test ecx, ecx
je 0x57e3ca
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 0x57e2c9
test ecx, ecx
je 0x57e435
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 0x57e2ed
mov dword [esi + 0x38], 0xfffffffd
jmp 0x57e260
mov dword [esi + 0x38], 0xffffffff
jmp 0x57e230
mov dword [esi + 4], ecx
mov ebx, 0xffffffff
jmp 0x57e2a7
test byte [ebp - 0x10], 0xe0
jne 0x57e2ce
mov ebx, dword [esi + 0x3c]
mov edi, 5
test ebx, ebx
jne 0x57e310
test ecx, ecx
je 0x57e5c6
mov eax, dword [esi]
dec ecx
inc eax
mov dword [esi + 4], ecx
mov dword [esi], eax
dec edi
jns 0x57e2fb
test byte [ebp - 0x10], 4
je 0x57e4b9
test ebx, ebx
mov edi, 0xffffffff
jne 0x57e33a
test ecx, ecx
je 0x57e6ae
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 0x57e357
test ecx, ecx
je 0x57e712
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 0x57e371
mov eax, dword [esi]
dec ecx
mov dword [esi + 4], ecx
movzx edx, byte [eax]
inc eax
mov dword [esi], eax
inc edx
je 0x57e4b9
dec edi
cmp edi, 0xffffffff
je 0x57e4b9
test ebx, ebx
jne 0x57e4b9
test ecx, ecx
jne 0x57e35e
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 0x57e498
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
mov dword [esi], eax
jmp 0x57e360
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 0x57e631
mov dword [esi + 4], 0
mov ebx, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [ebx + 0xc], 0x20
je 0x57e428
mov dword [esi + 0x38], 0xffffffff
mov edx, dword [esi + 0x3c]
mov ebx, 0xffffffff
jmp 0x57e2a7
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 0x57e627
mov dword [esi + 4], 0
mov eax, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [eax + 0xc], 0x20
je 0x57e48c
mov dword [esi + 0x38], 0xffffffff
mov dword [ebp - 0x10], 0xffffffff
jmp 0x57e2c9
mov dword [esi + 4], 0
mov edi, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [edi + 0xc], 0x20
je 0x57e4b6
mov dword [esi + 0x38], 0xffffffff
mov ebx, dword [esi + 0x3c]
test byte [ebp - 0x10], 8
je 0x57e4da
test ebx, ebx
jne 0x57e4da
test ecx, ecx
je 0x57e53a
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 0x57e4da
inc edx
jne 0x57e4bf
test byte [ebp - 0x10], 0x10
je 0x57e4ff
test ebx, ebx
jne 0x57e4ff
test ecx, ecx
je 0x57e580
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 0x57e4ff
inc edx
jne 0x57e4e0
test byte [ebp - 0x10], 2
je 0x57e528
mov edi, 1
test ebx, ebx
jne 0x57e525
test ecx, ecx
je 0x57e649
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 0x57e50a
cmp ebx, 1
sbb edi, edi
not edi
and edi, 0xfffffffd
mov dword [esi + 0x38], edi
jmp 0x57e260
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 0x57e797
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
mov dword [esi], eax
jmp 0x57e4c9
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 0x57e7bd
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
mov dword [esi], eax
jmp 0x57e4ee
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 0x57e63e
mov dword [esi + 4], 0
mov eax, dword [esi + 0x40]
mov ebx, 1
mov dword [esi + 0x3c], 1
test byte [eax + 0xc], 0x20
je 0x57e310
mov dword [esi + 0x38], 0xffffffff
jmp 0x57e310
mov eax, dword [esi + 0x44]
mov dword [esi], eax
jmp 0x57e2bc
mov eax, dword [esi + 0x44]
mov edx, dword [esi + 0x3c]
mov dword [esi], eax
jmp 0x57e29d
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
jmp 0x57e309
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 0x57e772
mov dword [esi + 4], 0
mov eax, dword [esi + 0x40]
mov ebx, 1
mov dword [esi + 0x3c], 1
test byte [eax + 0xc], 0x20
je 0x57e525
mov dword [esi + 0x38], 0xffffffff
jmp 0x57e525
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 0x57e78a
mov dword [esi + 4], 0
mov eax, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [eax + 0xc], 0x20
je 0x57e705
mov dword [esi + 0x38], 0xffffffff
mov ebx, dword [esi + 0x3c]
mov edi, 0xffffffff
jmp 0x57e33a
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 0x57e77d
mov dword [esi + 4], 0
mov ebx, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [ebx + 0xc], 0x20
je 0x57e765
mov dword [esi + 0x38], 0xffffffff
mov ebx, dword [esi + 0x3c]
mov edx, 0xffffffff
jmp 0x57e357
mov edx, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
jmp 0x57e518
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
mov dword [esi], eax
jmp 0x57e34d
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x3c]
mov dword [esi], eax
jmp 0x57e330
mov dword [esi + 4], 0
mov edx, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [edx + 0xc], 0x20
je 0x57e7b5
mov dword [esi + 0x38], 0xffffffff
mov ebx, dword [esi + 0x3c]
jmp 0x57e4da
mov dword [esi + 4], 0
mov edx, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [edx + 0xc], 0x20
je 0x57e7db
mov dword [esi + 0x38], 0xffffffff
mov ebx, dword [esi + 0x3c]
jmp 0x57e4ff