Function at 0x57ed20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 8], esi
mov esi, dword [ebp + 0xc]
test ebx, ebx
mov dword [ebp - 4], edi
je 0x57ed3f
cmp byte [ebx + 0x5c], 0x72
je 0x57ed53
mov edx, 0xfffffffe
mov ebx, dword [ebp - 0xc]
mov eax, edx
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx + 0x38]
cmp ecx, 0xfffffffd
sete al
cmp ecx, 0xffffffff
sete dl
or eax, edx
test al, 1
mov edx, 0xffffffff
jne 0x57ed44
xor edx, edx
dec ecx
je 0x57ed44
mov dword [ebp - 0x10], esi
mov edi, dword [ebp + 0x10]
mov edx, esi
mov dword [ebx + 0xc], esi
mov ecx, dword [ebp + 0x10]
test edi, edi
mov dword [ebx + 0x10], ecx
je 0x57ee91
mov eax, dword [ebx + 0x6c]
cmp eax, 0xffffffff
je 0x57edbc
mov byte [esi], al
mov edx, dword [ebx + 0xc]
inc esi
inc dword [ebx + 0x68]
mov ecx, dword [ebx + 0x10]
mov dword [ebp - 0x10], esi
mov eax, dword [ebx + 0x70]
inc edx
mov dword [ebx + 0xc], edx
dec ecx
test eax, eax
mov dword [ebx + 0x10], ecx
mov dword [ebx + 0x6c], 0xffffffff
jne 0x57eec5
test ecx, ecx
jne 0x57ee15
jmp 0x57ee91
add dword [ebx + 0x64], edx
xor eax, eax
add dword [ebx + 0x68], ecx
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.00579050
mov dword [ebx + 0x38], eax
mov edi, dword [ebx + 0x64]
mov edx, dword [ebx + 4]
mov ecx, dword [ebx + 0x10]
sub edi, edx
mov edx, dword [ebx + 0x68]
mov dword [ebx + 0x64], edi
sub edx, ecx
cmp eax, 1
mov dword [ebx + 0x68], edx
je 0x57eef9
test eax, eax
jne 0x57ee8e
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x57ee8e
mov ecx, dword [ebx + 0x10]
test ecx, ecx
je 0x57ee8e
mov edx, dword [ebx + 0x58]
test edx, edx
jne 0x57f3a3
mov edx, dword [ebx + 4]
test edx, edx
jne 0x57edc5
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x57edc5
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov eax, dword [ebx + 0x40]
mov edx, 1
mov dword [esp + 4], edx
mov edi, 0x4000
mov dword [esp + 8], edi
mov dword [esp + 0xc], eax
mov ecx, dword [ebx + 0x44]
mov dword [esp], ecx
call sub.msvcrt.dll_fread
mov dword [ebx + 4], eax
test eax, eax
mov edx, eax
jne 0x57ee7a
mov dword [ebx + 0x3c], 1
mov ecx, dword [ebx + 0x40]
test byte [ecx + 0xc], 0x20
jne 0x57f493
mov edi, dword [ebx + 0x44]
mov ecx, dword [ebx + 0x10]
mov dword [ebx], edi
jmp 0x57edc5
mov dword [ebx + 0x38], 0xfffffffd
mov edx, dword [ebx + 0xc]
mov dword [esp + 4], esi
sub edx, esi
mov dword [esp + 8], edx
mov esi, dword [ebx + 0x4c]
mov dword [esp], esi
call fcn.0057dd00
mov dword [ebx + 0x4c], eax
mov ecx, dword [ebx + 0x10]
cmp ecx, dword [ebp + 0x10]
je 0x57eed6
mov edx, dword [ebp + 0x10]
sub edx, ecx
mov ebx, dword [ebp - 0xc]
mov eax, edx
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov dword [ebx + 0x38], 1
mov edx, 1
jmp 0x57ed44
mov edi, dword [ebx + 0x38]
mov edx, 0xffffffff
cmp edi, 0xfffffffd
sete bl
inc edi
sete al
or eax, ebx
test al, 1
jne 0x57ed44
mov edx, dword [ebp + 0x10]
sub edx, ecx
jmp 0x57eeb6
mov ecx, dword [ebx + 0xc]
mov dword [esp + 4], esi
sub ecx, esi
mov dword [esp + 8], ecx
mov esi, dword [ebx + 0x4c]
mov dword [esp], esi
call fcn.0057dd00
mov dword [ebx + 0x4c], eax
mov ecx, dword [ebx + 0x3c]
mov esi, dword [ebx + 0xc]
mov dword [ebp - 0x18], 0xffffffff
test ecx, ecx
jne 0x57ef41
mov eax, dword [ebx + 4]
test eax, eax
je 0x57f228
mov edx, dword [ebx]
dec eax
mov dword [ebx + 4], eax
lea eax, [edx + 1]
movzx edi, byte [edx]
mov dword [ebx], eax
mov dword [ebp - 0x18], edi
test ecx, ecx
mov edi, 0xffffffff
jne 0x57ef63
mov eax, dword [ebx + 4]
test eax, eax
je 0x57f164
mov edx, dword [ebx]
dec eax
mov dword [ebx + 4], eax
lea eax, [edx + 1]
movzx edi, byte [edx]
mov dword [ebx], eax
mov edx, dword [ebp - 0x18]
shl edi, 8
add edi, edx
mov dword [ebp - 0x14], edi
test ecx, ecx
mov edi, 0xffffffff
jne 0x57ef90
mov eax, dword [ebx + 4]
test eax, eax
je 0x57f1c6
mov edx, dword [ebx]
dec eax
mov dword [ebx + 4], eax
lea eax, [edx + 1]
movzx edi, byte [edx]
mov dword [ebx], eax
mov edx, dword [ebp - 0x14]
shl edi, 0x10
add edi, edx
mov dword [ebp - 0x1c], edi
test ecx, ecx
mov edi, 0xffffffff
jne 0x57f0f7
mov eax, dword [ebx + 4]
test eax, eax
je 0x57f09d
mov edx, dword [ebx]
dec eax
lea ecx, [edx + 1]
mov dword [ebx + 4], eax
movzx edi, byte [edx]
mov dword [ebx], ecx
cmp edi, 0xffffffff
je 0x57f0f7
mov eax, dword [ebp - 0x1c]
shl edi, 0x18
add eax, edi
cmp eax, dword [ebx + 0x4c]
jne 0x57ee87
mov edx, dword [ebx + 0x3c]
test edx, edx
jne 0x57f158
mov eax, dword [ebx + 4]
test eax, eax
je 0x57f346
mov ecx, dword [ebx]
dec eax
lea edi, [ecx + 1]
mov dword [ebx + 4], eax
mov dword [ebx], edi
test edx, edx
jne 0x57f158
mov eax, dword [ebx + 4]
test eax, eax
je 0x57f2e9
mov ecx, dword [ebx]
dec eax
mov dword [ebx + 4], eax
lea eax, [ecx + 1]
mov dword [ebx], eax
test edx, edx
jne 0x57f158
mov eax, dword [ebx + 4]
test eax, eax
je 0x57f28c
mov ecx, dword [ebx]
dec eax
lea edi, [ecx + 1]
mov dword [ebx + 4], eax
mov dword [ebx], edi
test edx, edx
jne 0x57f158
mov eax, dword [ebx + 4]
test eax, eax
je 0x57f103
mov ecx, dword [ebx]
dec eax
mov dword [ebx + 4], eax
lea eax, [ecx + 1]
movzx edx, byte [ecx]
mov dword [ebx], eax
inc edx
je 0x57f158
mov eax, ebx
call fcn.0057e1c0
mov edi, dword [ebx + 0x38]
test edi, edi
jne 0x57ee8e
mov dword [esp], ebx
call fcn.00578e00
mov dword [esp], 0
xor edx, edx
xor ecx, ecx
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
call fcn.0057dd00
mov dword [ebx + 0x4c], eax
mov eax, dword [ebx + 0x38]
jmp 0x57edfb
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov edx, dword [ebx + 0x40]
mov eax, 0x4000
mov dword [esp + 8], eax
mov ecx, 1
mov dword [esp + 4], ecx
mov dword [esp + 0xc], edx
mov edi, dword [ebx + 0x44]
mov dword [esp], edi
call sub.msvcrt.dll_fread
test eax, eax
jne 0x57f3ef
mov dword [ebx + 4], 0
mov edi, dword [ebx + 0x40]
mov dword [ebx + 0x3c], 1
test byte [edi + 0xc], 0x20
je 0x57f0f2
mov dword [ebx + 0x38], 0xffffffff
mov edi, 0xffffffff
mov dword [ebx + 0x38], 0xfffffffd
jmp 0x57efca
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov edi, dword [ebx + 0x40]
mov edx, 0x4000
mov dword [esp + 8], edx
mov eax, 1
mov dword [esp + 4], eax
mov dword [esp + 0xc], edi
mov ecx, dword [ebx + 0x44]
mov dword [esp], ecx
call sub.msvcrt.dll_fread
test eax, eax
jne 0x57f413
mov dword [ebx + 4], 0
mov ecx, dword [ebx + 0x40]
mov dword [ebx + 0x3c], 1
test byte [ecx + 0xc], 0x20
je 0x57f158
mov dword [ebx + 0x38], 0xffffffff
mov dword [ebx + 0x38], 0xfffffffd
jmp 0x57f060
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov edi, dword [ebx + 0x40]
mov eax, 0x4000
mov dword [esp + 8], eax
mov ecx, 1
mov dword [esp + 4], ecx
mov dword [esp + 0xc], edi
mov edx, dword [ebx + 0x44]
mov dword [esp], edx
call sub.msvcrt.dll_fread
test eax, eax
jne 0x57f3e2
mov dword [ebx + 4], 0
mov edx, dword [ebx + 0x40]
mov dword [ebx + 0x3c], 1
test byte [edx + 0xc], 0x20
je 0x57f1b9
mov dword [ebx + 0x38], 0xffffffff
mov ecx, dword [ebx + 0x3c]
mov edi, 0xffffffff
jmp 0x57ef63
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov edx, dword [ebx + 0x40]
mov eax, 0x4000
mov dword [esp + 8], eax
mov edi, 1
mov dword [esp + 4], edi
mov dword [esp + 0xc], edx
mov ecx, dword [ebx + 0x44]
mov dword [esp], ecx
call sub.msvcrt.dll_fread
test eax, eax
jne 0x57f3d5
mov dword [ebx + 4], 0
mov ecx, dword [ebx + 0x40]
mov dword [ebx + 0x3c], 1
test byte [ecx + 0xc], 0x20
je 0x57f21b
mov dword [ebx + 0x38], 0xffffffff
mov ecx, dword [ebx + 0x3c]
mov edi, 0xffffffff
jmp 0x57ef90
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov ecx, dword [ebx + 0x40]
mov eax, 0x4000
mov dword [esp + 8], eax
mov edx, 1
mov dword [esp + 4], edx
mov dword [esp + 0xc], ecx
mov edi, dword [ebx + 0x44]
mov dword [esp], edi
call sub.msvcrt.dll_fread
test eax, eax
jne 0x57f3f9
mov dword [ebx + 4], 0
mov edi, dword [ebx + 0x40]
mov dword [ebx + 0x3c], 1
test byte [edi + 0xc], 0x20
je 0x57f27d
mov dword [ebx + 0x38], 0xffffffff
mov dword [ebp - 0x18], 0xffffffff
mov ecx, dword [ebx + 0x3c]
jmp 0x57ef41
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov eax, dword [ebx + 0x40]
mov ecx, 0x4000
mov dword [esp + 8], ecx
mov edi, 1
mov dword [esp + 4], edi
mov dword [esp + 0xc], eax
mov edx, dword [ebx + 0x44]
mov dword [esp], edx
call sub.msvcrt.dll_fread
test eax, eax
jne 0x57f42a
mov dword [ebx + 4], 0
mov edx, dword [ebx + 0x40]
mov dword [ebx + 0x3c], 1
test byte [edx + 0xc], 0x20
je 0x57f2e1
mov dword [ebx + 0x38], 0xffffffff
mov edx, dword [ebx + 0x3c]
jmp 0x57f038
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov edi, dword [ebx + 0x40]
mov edx, 0x4000
mov dword [esp + 8], edx
mov eax, 1
mov dword [esp + 4], eax
mov dword [esp + 0xc], edi
mov ecx, dword [ebx + 0x44]
mov dword [esp], ecx
call sub.msvcrt.dll_fread
test eax, eax
jne 0x57f41d
mov dword [ebx + 4], 0
mov ecx, dword [ebx + 0x40]
mov dword [ebx + 0x3c], 1
test byte [ecx + 0xc], 0x20
je 0x57f33e
mov dword [ebx + 0x38], 0xffffffff
mov edx, dword [ebx + 0x3c]
jmp 0x57f01a
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov eax, dword [ebx + 0x40]
mov ecx, 0x4000
mov dword [esp + 8], ecx
mov edi, 1
mov dword [esp + 4], edi
mov dword [esp + 0xc], eax
mov edx, dword [ebx + 0x44]
mov dword [esp], edx
call sub.msvcrt.dll_fread
test eax, eax
jne 0x57f406
mov dword [ebx + 4], 0
mov edx, dword [ebx + 0x40]
mov dword [ebx + 0x3c], 1
test byte [edx + 0xc], 0x20
je 0x57f39b
mov dword [ebx + 0x38], 0xffffffff
mov edx, dword [ebx + 0x3c]
jmp 0x57effc
mov esi, dword [ebx + 4]
cmp ecx, esi
jae 0x57f3ac
mov esi, ecx
test esi, esi
jne 0x57f463
test ecx, ecx
jne 0x57f437
mov eax, dword [ebp + 0x10]
sub eax, ecx
add dword [ebx + 0x64], eax
add dword [ebx + 0x68], eax
test eax, eax
jne 0x57f3ce
mov dword [ebx + 0x3c], 1
mov edx, eax
jmp 0x57ed44
mov edx, dword [ebx + 0x44]
mov ecx, dword [ebx + 0x3c]
mov dword [ebx], edx
jmp 0x57ef84
mov edx, dword [ebx + 0x44]
mov ecx, dword [ebx + 0x3c]
mov dword [ebx], edx
jmp 0x57ef57
mov edx, dword [ebx + 0x44]
mov dword [ebx], edx
jmp 0x57efb5
mov edx, dword [ebx + 0x44]
mov ecx, dword [ebx + 0x3c]
mov dword [ebx], edx
jmp 0x57ef32
mov ecx, dword [ebx + 0x44]
mov edx, dword [ebx + 0x3c]
mov dword [ebx], ecx
jmp 0x57eff3
mov ecx, dword [ebx + 0x44]
mov dword [ebx], ecx
jmp 0x57f04d
mov ecx, dword [ebx + 0x44]
mov edx, dword [ebx + 0x3c]
mov dword [ebx], ecx
jmp 0x57f011
mov ecx, dword [ebx + 0x44]
mov edx, dword [ebx + 0x3c]
mov dword [ebx], ecx
jmp 0x57f02f
mov edi, dword [ebx + 0x40]
mov edx, 1
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp + 0xc], edi
mov esi, dword [ebp - 0x10]
mov dword [esp], esi
call sub.msvcrt.dll_fread
mov ecx, dword [ebx + 0x10]
sub ecx, eax
mov dword [ebx + 0x10], ecx
jmp 0x57f3b8
mov edi, dword [ebx + 0xc]
mov eax, dword [ebx]
mov dword [esp + 8], esi
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
add dword [ebp - 0x10], esi
add dword [ebx], esi
sub dword [ebx + 4], esi
mov ecx, dword [ebp - 0x10]
mov dword [ebx + 0xc], ecx
mov ecx, dword [ebx + 0x10]
sub ecx, esi
mov dword [ebx + 0x10], ecx
jmp 0x57f3b4
mov dword [ebx + 0x38], 0xffffffff
mov edx, dword [ebx + 0xc]
jmp 0x57ee91