Function at 0x5ed461
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
cmp dword [eax], 0xffffffff
jne 0x5ed47d
xor eax, eax
jmp 0x5ed6d1
mov dword [ebp - 0x10], 0
lea eax, [ebp - 0x34]
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
sub eax, 2
cmp eax, 1
sbb eax, eax
neg eax
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 8]
dec ecx
cmp ecx, 1
sbb ecx, ecx
neg ecx
or eax, ecx
je 0x5ed647
mov dword [ebp - 0x10], 0
push 0
push 0
push 0
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov eax, dword [ebp + 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
push 0x40
lea eax, [ebp - 0x50]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov ecx, dword [ebp - 4]
xor dword [ecx + 8], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov ecx, dword [ebp - 4]
xor dword [ecx + 0xc], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
add eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
cmp eax, dword [ecx + 0xc]
jbe 0x5ed53d
xor eax, eax
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 4]
add ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
sub ecx, dword [edx + 0xc]
sub eax, ecx
neg eax
sub dword [ebp + 0x10], eax
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
cmp dword [ebp + 0x18], 0
je 0x5ed567
mov eax, dword [ebp + 0x18]
add dword [eax + 8], 0x40
mov eax, dword [ebp + 0x18]
push eax
mov eax, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], eax
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
jne 0x5ed59e
mov eax, 1
jmp 0x5ed6d1
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 8]
cmp dword [eax + 4], ecx
jae 0x5ed5ef
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov ecx, dword [ebp + 0x14]
add eax, dword [ecx]
mov ecx, dword [ebp - 4]
cmp eax, dword [ecx + 8]
jb 0x5ed5ea
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
mov ecx, dword [ebp + 8]
sub eax, dword [ecx + 4]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov ecx, dword [ebp + 0x14]
add eax, dword [ecx]
mov ecx, dword [ebp - 4]
sub eax, dword [ecx + 8]
mov dword [ebp - 0xc], eax
jmp 0x5ed5fe
mov dword [ebp - 8], 0
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x5ed642
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x54], eax
dec dword [ebp - 0xc]
jmp 0x5ed619
dec dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0
jl 0x5ed642
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x54]
xor edx, edx
mov dl, byte [eax + ecx]
mov al, byte [edx + 0x5f43f8]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x54]
mov byte [ecx + edx], al
jmp 0x5ed616
jmp 0x5ed6c7
cmp dword [ebp + 0x18], 0
je 0x5ed658
mov eax, dword [ebp + 0x18]
add dword [eax + 8], 0x40
mov eax, dword [ebp + 0x18]
push eax
mov eax, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], eax
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
je 0x5ed6c7
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], 0
jmp 0x5ed69a
inc dword [ebp - 0x58]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x58]
cmp dword [eax], ecx
jbe 0x5ed6c7
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x5c]
xor edx, edx
mov dl, byte [eax + ecx]
mov al, byte [edx + 0x5f43f8]
mov ecx, dword [ebp - 0x58]
mov edx, dword [ebp - 0x5c]
mov byte [ecx + edx], al
jmp 0x5ed697
mov eax, 1
jmp 0x5ed6d1
pop edi
pop esi
pop ebx
leave
ret