Function at 0x4aca41
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 0x4aca5b
cmp byte [esi + 0x5c], 0x72
je 0x4aca65
mov edx, 0xfffffffe
jmp 0x4acc66
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 0x4acc66
xor edx, edx
dec ecx
je 0x4acc66
mov dword [ebp - 0x10], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], edi
test edi, edi
je 0x4acc30
mov eax, dword [esi + 0x6c]
cmp eax, 0xffffffff
je 0x4acad9
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 0x4acad9
mov dl, 1
mov dword [esi + 0x38], 1
jmp 0x4acc66
mov dword [esi + 0x38], 0xffffffff
jmp 0x4acc30
cmp dword [esi + 0x10], 0
je 0x4acc30
cmp dword [esi + 0x58], 0
mov eax, dword [esi + 4]
je 0x4acb50
mov ebx, eax
mov eax, dword [esi + 0x10]
cmp ebx, eax
jbe 0x4acaf7
mov ebx, eax
test ebx, ebx
je 0x4acb1a
push ebx
push dword [esi]
push dword [esi + 0xc]
call fcn.004bdd50
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 0x4acb35
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 0x4acb49
mov dword [esi + 0x3c], 1
mov edx, edi
jmp 0x4acc66
test eax, eax
jne 0x4acb9a
cmp dword [esi + 0x3c], 0
jne 0x4acb9a
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 0x4acb95
mov eax, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
test byte [eax + 0xc], 0x20
jne 0x4acacd
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.004a8d81
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 0x4acc20
mov eax, dword [esi + 0xc]
sub eax, ebx
push eax
push ebx
push dword [esi + 0x4c]
call fcn.004aa3ca
mov ebx, dword [esi + 0xc]
mov dword [esi + 0x4c], eax
mov eax, esi
call fcn.004ac9fd
add esp, 0xc
cmp eax, dword [esi + 0x4c]
je 0x4acbf5
mov dword [esi + 0x38], 0xfffffffd
jmp 0x4acc20
mov eax, esi
call fcn.004ac9fd
mov eax, esi
call fcn.004ac53e
cmp dword [esi + 0x38], 0
jne 0x4acc30
push esi
call fcn.004a8ab0
push 0
push 0
push 0
call fcn.004aa3ca
add esp, 0x10
mov dword [esi + 0x4c], eax
cmp dword [esi + 0x38], 0
jne 0x4acc30
cmp dword [esi + 0x3c], 0
je 0x4acad9
mov eax, dword [esi + 0xc]
sub eax, ebx
push eax
push ebx
push dword [esi + 0x4c]
call fcn.004aa3ca
mov ecx, dword [esi + 0x10]
add esp, 0xc
cmp edi, ecx
mov dword [esi + 0x4c], eax
jne 0x4acc62
mov eax, dword [esi + 0x38]
cmp eax, 0xfffffffd
sete dl
inc eax
sete al
or eax, edx
or edx, 0xffffffff
test al, 1
jne 0x4acc66
mov edx, edi
sub edx, ecx
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret