Function at 0x78ab5e01
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov edx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push 0xfffffffffffffffe
pop eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], edx
cmp esi, eax
je 0x78add8bb
push ebx
xor ebx, ebx
cmp esi, ebx
jl 0x78add8d6
cmp esi, dword [0x78b52e60]
jae 0x78add8d6
mov eax, esi
sar eax, 5
push edi
and esi, 0x1f
lea edi, [eax*4 + sym.MSVCR100.dll___pioinfo]
mov eax, dword [edi]
shl esi, 6
mov cl, byte [eax + esi + 4]
test cl, 1
je 0x78add8f5
cmp edx, 0x7fffffff
ja 0x78ac1aa8
mov dword [ebp - 0xc], ebx
cmp edx, ebx
je 0x78ac1abd
test cl, 2
jne 0x78ac1abd
cmp dword [ebp + 0xc], ebx
je 0x78ac1aa8
mov al, byte [eax + esi + 0x24]
add al, al
sar al, 1
mov byte [ebp - 2], al
movsx eax, al
dec eax
push 4
pop ecx
je 0x78add909
dec eax
je 0x78ac1a95
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x10], ebx
mov ecx, dword [edi]
add ecx, esi
test byte [ecx + 4], 0x48
mov eax, ebx
jne 0x78add989
push 0
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp + 0x10]
push eax
mov eax, dword [edi]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x78ac1ab2
mov ecx, dword [ebp - 0x18]
test ecx, ecx
js 0x78ac1ab2
cmp ecx, dword [ebp + 0x10]
ja 0x78ac1ab2
mov eax, dword [edi]
add dword [ebp - 0xc], ecx
lea eax, [eax + esi + 4]
test byte [eax], 0x80
jne 0x78ab8308
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp + 0xc]
jne 0x78addbbc
mov eax, dword [ebp - 0x14]
cmp eax, 0xfffffffe
jne 0x78ab5f12
mov eax, dword [ebp - 0xc]
pop edi
pop ebx
pop esi
leave
ret
cmp byte [ebp - 2], 2
je 0x78ac20aa
test ecx, ecx
je 0x78ab831f
cmp byte [ebx], 0xa
je 0x78adda28
and byte [eax], 0xfb
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add eax, ebx
mov dword [ebp + 0x10], ebx
mov dword [ebp - 0xc], eax
cmp ebx, eax
jae 0x78ab8358
mov ecx, dword [ebp + 0x10]
mov al, byte [ecx]
cmp al, 0x1a
je 0x78addaca
cmp al, 0xd
je 0x78adda30
mov byte [ebx], al
inc ebx
inc ecx
mov dword [ebp + 0x10], ecx
mov eax, dword [ebp - 0xc]
cmp dword [ebp + 0x10], eax
jb 0x78ab8334
mov eax, ebx
sub eax, dword [ebp - 0x10]
cmp byte [ebp - 2], 1
mov dword [ebp - 0xc], eax
jne 0x78ab5efb
jmp 0x78addae7
mov eax, edx
not eax
test al, 1
je 0x78ac1aa8
and edx, 0xfffffffe
mov dword [ebp + 0x10], edx
jmp 0x78ab5ea2
call sym.MSVCR100.dll___doserrno
jmp 0x78add917
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x78addcad
xor eax, eax
jmp 0x78ab5f12
test ecx, ecx
je 0x78ac20b8
cmp word [ebx], 0xa
je 0x78addbe2
and byte [eax], 0xfb
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add eax, ebx
mov dword [ebp + 0x10], ebx
mov dword [ebp - 0xc], eax
cmp ebx, eax
jae 0x78ac20f5
mov eax, dword [ebp + 0x10]
movzx ecx, word [eax]
cmp ecx, 0x1a
je 0x78addc8c
cmp ecx, 0xd
je 0x78ac2100
mov word [ebx], cx
add ebx, 2
add eax, 2
mov dword [ebp + 0x10], eax
mov eax, dword [ebp - 0xc]
cmp dword [ebp + 0x10], eax
jb 0x78ac20cd
sub ebx, dword [ebp - 0x10]
mov dword [ebp - 0xc], ebx
jmp 0x78ab5efb
mov ecx, dword [ebp - 0xc]
add ecx, 0xfffffffe
cmp eax, ecx
jae 0x78addbf2
lea ecx, [eax + 2]
cmp word [ecx], 0xa
jne 0x78addbea
add eax, 4
mov dword [ebp + 0x10], eax
push 0xa
pop eax
mov word [ebx], ax
add ebx, 2
jmp 0x78ac20ed
call sym.MSVCR100.dll___doserrno
and dword [eax], 0
call sym.MSVCR100.dll__errno
mov dword [eax], 9
or eax, 0xffffffff
jmp 0x78ab5f14
call sym.MSVCR100.dll___doserrno
mov dword [eax], ebx
call sym.MSVCR100.dll__errno
mov dword [eax], 9
call sym.MSVCR100.dll__invalid_parameter_noinfo
or eax, 0xffffffff
jmp 0x78ab5f13
call sym.MSVCR100.dll___doserrno
mov dword [eax], ebx
call sym.MSVCR100.dll__errno
mov dword [eax], 9
jmp 0x78add924
mov eax, edx
not eax
test al, 1
je 0x78ac1aa8
jmp 0x78add92b
mov dword [eax], ebx
call sym.MSVCR100.dll__errno
mov dword [eax], 0x16
call sym.MSVCR100.dll__invalid_parameter_noinfo
jmp 0x78add961
mov eax, edx
shr eax, 1
mov dword [ebp + 0x10], ecx
cmp eax, ecx
jb 0x78add939
mov dword [ebp + 0x10], eax
push dword [ebp + 0x10]
call sym.MSVCR100.dll__malloc_crt
mov ebx, eax
pop ecx
mov dword [ebp - 0x10], ebx
test ebx, ebx
jne 0x78add969
call sym.MSVCR100.dll__errno
mov dword [eax], 0xc
call sym.MSVCR100.dll___doserrno
mov dword [eax], 8
or eax, 0xffffffff
jmp 0x78ab5f12
push 1
push 0
push 0
push dword [ebp + 8]
call fcn.78b27a5e
mov ecx, dword [edi]
mov dword [esi + ecx + 0x28], eax
add esp, 0x10
mov dword [esi + ecx + 0x2c], edx
jmp 0x78ab5ea8
mov cl, byte [ecx + 5]
cmp cl, 0xa
je 0x78ab5eb8
cmp dword [ebp + 0x10], 0
je 0x78ab5eb8
dec dword [ebp + 0x10]
cmp byte [ebp - 2], 0
mov byte [ebx], cl
mov ecx, dword [edi]
lea eax, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [esi + ecx + 5], 0xa
je 0x78ab5eb8
mov ecx, dword [edi]
mov cl, byte [esi + ecx + 0x25]
cmp cl, 0xa
je 0x78ab5eb8
cmp dword [ebp + 0x10], 0
je 0x78ab5eb8
mov byte [eax], cl
mov ecx, dword [edi]
inc eax
dec dword [ebp + 0x10]
cmp byte [ebp - 2], 1
mov dword [ebp - 0xc], 2
mov byte [esi + ecx + 0x25], 0xa
jne 0x78ab5eb8
mov ecx, dword [edi]
mov cl, byte [esi + ecx + 0x26]
cmp cl, 0xa
je 0x78ab5eb8
cmp dword [ebp + 0x10], 0
je 0x78ab5eb8
mov byte [eax], cl
mov ecx, dword [edi]
inc eax
dec dword [ebp + 0x10]
mov dword [ebp - 0xc], 3
mov byte [esi + ecx + 0x26], 0xa
jmp 0x78ab5eb8
or byte [eax], 4
jmp 0x78ab8322
mov eax, dword [ebp - 0xc]
dec eax
cmp ecx, eax
jae 0x78adda50
lea eax, [ecx + 1]
cmp byte [eax], 0xa
jne 0x78adda4b
add ecx, 2
mov dword [ebp + 0x10], ecx
mov byte [ebx], 0xa
jmp 0x78addac4
mov dword [ebp + 0x10], eax
jmp 0x78addac1
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0x18]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x78adda78
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x78addac1
cmp dword [ebp - 0x18], 0
je 0x78addac1
mov eax, dword [edi]
test byte [esi + eax + 4], 0x48
je 0x78adda9b
cmp byte [ebp - 1], 0xa
je 0x78adda46
mov byte [ebx], 0xd
mov eax, dword [edi]
mov cl, byte [ebp - 1]
mov byte [esi + eax + 5], cl
jmp 0x78addac4
cmp ebx, dword [ebp - 0x10]
jne 0x78addaa6
cmp byte [ebp - 1], 0xa
je 0x78adda46
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.78b27a5e
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x78ab8350
mov byte [ebx], 0xd
inc ebx
jmp 0x78ab8350
mov eax, dword [edi]
lea eax, [eax + esi + 4]
test byte [eax], 0x40
jne 0x78addadd
or byte [eax], 2
jmp 0x78ab8358
mov al, byte [ecx]
mov byte [ebx], al
inc ebx
jmp 0x78ab8358
test eax, eax
je 0x78ab5efb
dec ebx
mov cl, byte [ebx]
test cl, cl
js 0x78addafc
inc ebx
jmp 0x78addb82
xor eax, eax
inc eax
movzx ecx, cl
jmp 0x78addb13
cmp eax, 4
jg 0x78addb1c
cmp ebx, dword [ebp - 0x10]
jb 0x78addb1c
dec ebx
movzx ecx, byte [ebx]
inc eax
cmp byte [ecx + 0x78b54250], 0
je 0x78addb04
mov dl, byte [ebx]
movzx ecx, dl
movsx ecx, byte [ecx + 0x78b54250]
test ecx, ecx
jne 0x78addb39
call sym.MSVCR100.dll__errno
mov dword [eax], 0x2a
jmp 0x78addbb3
inc ecx
cmp ecx, eax
jne 0x78addb42
add ebx, eax
jmp 0x78addb82
mov ecx, dword [edi]
test byte [ecx + esi + 4], 0x48
je 0x78addb70
inc ebx
mov byte [ecx + esi + 5], dl
cmp eax, 2
jl 0x78addb5e
mov dl, byte [ebx]
mov ecx, dword [edi]
mov byte [esi + ecx + 0x25], dl
inc ebx
cmp eax, 3
jne 0x78addb6c
mov dl, byte [ebx]
mov ecx, dword [edi]
mov byte [esi + ecx + 0x26], dl
inc ebx
sub ebx, eax
jmp 0x78addb82
neg eax
cdq
push 1
push edx
push eax
push dword [ebp + 8]
call fcn.78b27a5e
add esp, 0x10
mov eax, dword [ebp - 0x1c]
sub ebx, dword [ebp - 0x10]
shr eax, 1
push eax
push dword [ebp + 0xc]
push ebx
push dword [ebp - 0x10]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x78addbc8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.MSVCR100.dll__dosmaperr
pop ecx
or dword [ebp - 0x14], 0xffffffff
jmp 0x78ab5efb
push eax
call sym.MSVCR100.dll_free
pop ecx
jmp 0x78ab5f07
mov eax, dword [ebp - 0xc]
mov edx, dword [edi]
xor ecx, ecx
cmp eax, ebx
setne cl
add eax, eax
mov dword [ebp - 0xc], eax
mov dword [esi + edx + 0x30], ecx
jmp 0x78ab5efb
or byte [eax], 4
jmp 0x78ac20bb
mov dword [ebp + 0x10], ecx
jmp 0x78addc85
add dword [ebp + 0x10], 2
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 8]
push eax
mov eax, dword [edi]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x78addc1b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x78addc85
cmp dword [ebp - 0x18], 0
je 0x78addc85
mov eax, dword [edi]
test byte [esi + eax + 4], 0x48
je 0x78addc59
cmp word [ebp - 8], 0xa
je 0x78ac2121
push 0xd
pop eax
mov word [ebx], ax
mov eax, dword [edi]
mov cl, byte [ebp - 8]
mov byte [esi + eax + 5], cl
mov eax, dword [edi]
mov cl, byte [ebp - 7]
mov byte [esi + eax + 0x25], cl
mov eax, dword [edi]
mov byte [esi + eax + 0x26], 0xa
jmp 0x78ac2127
cmp ebx, dword [ebp - 0x10]
jne 0x78addc69
cmp word [ebp - 8], 0xa
je 0x78ac2121
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.78b27a5e
add esp, 0x10
cmp word [ebp - 8], 0xa
je 0x78ac20ed
push 0xd
jmp 0x78ac2123
mov ecx, dword [edi]
lea esi, [esi + ecx + 4]
test byte [esi], 0x40
jne 0x78addc9f
or byte [esi], 2
jmp 0x78ac20f5
mov ax, word [eax]
mov word [ebx], ax
add ebx, 2
jmp 0x78ac20f5
push 5
pop esi
cmp eax, esi
jne 0x78addccb
call sym.MSVCR100.dll__errno
mov dword [eax], 9
call sym.MSVCR100.dll___doserrno
mov dword [eax], esi
jmp 0x78addbb3
cmp eax, 0x6d
jne 0x78addbac
and dword [ebp - 0x14], 0
jmp 0x78ab5efb