Function at 0x5dda60
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 8]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
test ebp, ebp
mov edi, eax
je 0x5ddcfc
cmp byte [ebp + 0x5c], 0x72
jne 0x5ddcfc
mov ecx, dword [ebp + 0x38]
cmp ecx, 0xfffffffd
je 0x5ddced
or edx, 0xffffffff
cmp ecx, edx
je 0x5ddced
cmp ecx, 1
jne 0x5ddaa3
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
test ecx, ecx
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x10], ecx
je 0x5ddaf5
mov ecx, dword [ebp + 0x6c]
cmp ecx, edx
je 0x5ddaf5
mov byte [eax], cl
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x68]
inc eax
inc edi
mov dword [ebp + 0xc], edi
mov dword [esp + 0x18], eax
mov edi, eax
mov eax, dword [ebp + 0x70]
dec esi
inc ecx
test eax, eax
mov dword [ebp + 0x10], esi
mov dword [ebp + 0x6c], edx
mov dword [ebp + 0x68], ecx
je 0x5ddaf5
pop edi
mov dword [ebp + 0x38], 1
pop esi
pop ebp
mov eax, 1
pop ebx
ret
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x5ddcbf
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
mov esi, dword [sym.imp.MSVCRT.dll__errno]
mov eax, dword [ebp + 0x58]
test eax, eax
mov eax, dword [ebp + 4]
jne 0x5ddc27
test eax, eax
jne 0x5ddb62
mov eax, dword [ebp + 0x3c]
test eax, eax
jne 0x5ddb62
call esi
mov dword [eax], 0
mov edx, dword [ebp + 0x40]
mov eax, dword [ebp + 0x44]
push edx
push 0x4000
push 1
push eax
call ebx
add esp, 0x10
mov dword [ebp + 4], eax
test eax, eax
jne 0x5ddb5c
mov ecx, dword [ebp + 0x40]
mov dword [ebp + 0x3c], 1
test byte [ecx + 0xc], 0x20
jne 0x5ddcb8
mov edx, dword [ebp + 0x44]
mov dword [ebp], edx
mov eax, dword [ebp + 4]
mov ecx, dword [ebp + 0x64]
mov edx, dword [ebp + 0x68]
add ecx, eax
mov dword [ebp + 0x64], ecx
mov ecx, dword [ebp + 0x10]
add edx, ecx
push 0
push ebp
mov dword [ebp + 0x68], edx
call fcn.005db950
mov edx, dword [ebp + 4]
mov ecx, dword [ebp + 0x64]
sub ecx, edx
mov edx, dword [ebp + 0x68]
mov dword [ebp + 0x64], ecx
mov ecx, dword [ebp + 0x10]
add esp, 8
sub edx, ecx
cmp eax, 1
mov dword [ebp + 0x38], eax
mov dword [ebp + 0x68], edx
jne 0x5ddc01
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x4c]
sub edx, edi
push edx
push edi
push eax
call fcn.005dd1f0
mov edi, dword [ebp + 0xc]
push ebp
mov dword [ebp + 0x4c], eax
call fcn.005dddf0
mov ecx, dword [ebp + 0x4c]
add esp, 0x10
cmp eax, ecx
je 0x5ddbd0
mov dword [ebp + 0x38], 0xfffffffd
jmp 0x5ddc01
push ebp
call fcn.005dddf0
push ebp
call fcn.005dd790
mov eax, dword [ebp + 0x38]
add esp, 8
test eax, eax
jne 0x5ddcbf
push ebp
call fcn.005db810
push 0
push 0
push 0
call fcn.005dd1f0
add esp, 0x10
mov dword [ebp + 0x4c], eax
mov eax, dword [ebp + 0x38]
test eax, eax
jne 0x5ddcbf
mov eax, dword [ebp + 0x3c]
test eax, eax
jne 0x5ddcbf
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x5ddb0c
jmp 0x5ddcbf
mov ecx, dword [ebp + 0x10]
cmp eax, ecx
jbe 0x5ddc30
mov eax, ecx
test eax, eax
jbe 0x5ddc6f
mov esi, dword [ebp]
mov edi, dword [ebp + 0xc]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
mov esi, dword [ebp]
mov edx, dword [ebp + 0x10]
add ecx, eax
mov dword [esp + 0x18], ecx
mov dword [ebp + 0xc], ecx
mov ecx, dword [ebp + 4]
add esi, eax
sub edx, eax
sub ecx, eax
mov dword [ebp], esi
mov dword [ebp + 0x10], edx
mov dword [ebp + 4], ecx
mov eax, dword [ebp + 0x10]
test eax, eax
jbe 0x5ddc8f
mov ecx, dword [ebp + 0x40]
mov edx, dword [esp + 0x18]
push ecx
push eax
push 1
push edx
call ebx
mov ecx, dword [ebp + 0x10]
add esp, 0x10
sub ecx, eax
mov dword [ebp + 0x10], ecx
mov eax, dword [esp + 0x1c]
mov edi, dword [ebp + 0x10]
mov esi, dword [ebp + 0x64]
mov edx, dword [ebp + 0x68]
sub eax, edi
add esi, eax
add edx, eax
test eax, eax
mov dword [ebp + 0x64], esi
mov dword [ebp + 0x68], edx
jne 0x5ddd01
pop edi
mov dword [ebp + 0x3c], 1
pop esi
pop ebp
pop ebx
ret
mov dword [ebp + 0x38], 0xffffffff
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x4c]
sub eax, edi
push eax
push edi
push ecx
call fcn.005dd1f0
mov ecx, dword [ebp + 0x10]
mov dword [ebp + 0x4c], eax
mov eax, dword [esp + 0x28]
add esp, 0xc
cmp eax, ecx
jne 0x5ddcf5
mov ebp, dword [ebp + 0x38]
cmp ebp, 0xfffffffd
je 0x5ddced
cmp ebp, 0xffffffff
jne 0x5ddcf5
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret
pop edi
pop esi
pop ebp
sub eax, ecx
pop ebx
ret
mov eax, 0xfffffffe
pop edi
pop esi
pop ebp
pop ebx
ret