Function at 0xf01fed0
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
cmp eax, dword [0xf2075fc]
jae 0xf01ff00
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
mov eax, dword [ecx*4 + 0xf207600]
movsx ecx, byte [eax + edx*8 + 4]
and ecx, 1
jne 0xf01ff1c
mov dword [0xf0b615c], 9
mov dword [0xf0b6160], 0
or eax, 0xffffffff
jmp 0xf02031a
mov dword [ebp - 0x18], 0
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x1c], edx
cmp dword [ebp + 0x10], 0
je 0xf01ff4c
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
mov edx, dword [eax*4 + 0xf207600]
movsx eax, byte [edx + ecx*8 + 4]
and eax, 2
je 0xf01ff53
xor eax, eax
jmp 0xf02031a
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
mov eax, dword [ecx*4 + 0xf207600]
movsx ecx, byte [eax + edx*8 + 4]
and ecx, 0x48
je 0xf01ffdc
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov ecx, dword [edx*4 + 0xf207600]
movsx edx, byte [ecx + eax*8 + 5]
cmp edx, 0xa
je 0xf01ffdc
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
mov edx, dword [eax*4 + 0xf207600]
mov eax, dword [ebp - 0x1c]
mov cl, byte [edx + ecx*8 + 5]
mov byte [eax], cl
mov edx, dword [ebp - 0x1c]
add edx, 1
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x18]
add eax, 1
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp + 0x10]
sub ecx, 1
mov dword [ebp + 0x10], ecx
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov ecx, dword [edx*4 + 0xf207600]
mov byte [ecx + eax*8 + 5], 0xa
push 0
lea edx, [ebp - 0xc]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov ecx, dword [edx*4 + 0xf207600]
mov edx, dword [ecx + eax*8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0xf020055
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 5
jne 0xf020034
mov dword [0xf0b615c], 9
mov eax, dword [ebp - 0x10]
mov dword [0xf0b6160], eax
or eax, 0xffffffff
jmp 0xf02031a
cmp dword [ebp - 0x10], 0x6d
jne 0xf020041
xor eax, eax
jmp 0xf02031a
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.0f020cf0
add esp, 4
or eax, 0xffffffff
jmp 0xf02031a
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0xc]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
mov edx, dword [eax*4 + 0xf207600]
movsx eax, byte [edx + ecx*8 + 4]
and eax, 0x80
je 0xf020317
cmp dword [ebp - 0xc], 0
je 0xf0200c6
mov ecx, dword [ebp + 0xc]
movsx edx, byte [ecx]
cmp edx, 0xa
jne 0xf0200c6
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
mov edx, dword [eax*4 + 0xf207600]
movsx eax, byte [edx + ecx*8 + 4]
or eax, 4
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
mov ecx, dword [ecx*4 + 0xf207600]
mov byte [ecx + edx*8 + 4], al
jmp 0xf0200f8
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov ecx, dword [edx*4 + 0xf207600]
movsx edx, byte [ecx + eax*8 + 4]
and edx, 0xfffffffb
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
mov eax, dword [eax*4 + 0xf207600]
mov byte [eax + ecx*8 + 4], dl
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x14]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x18]
cmp dword [ebp - 4], eax
jae 0xf02030e
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0x1a
jne 0xf020172
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
mov edx, dword [eax*4 + 0xf207600]
movsx eax, byte [edx + ecx*8 + 4]
and eax, 0x40
jne 0xf02016d
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
mov eax, dword [ecx*4 + 0xf207600]
movsx ecx, byte [eax + edx*8 + 4]
or ecx, 2
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov edx, dword [edx*4 + 0xf207600]
mov byte [edx + eax*8 + 4], cl
jmp 0xf02030e
mov eax, dword [ebp - 4]
movsx ecx, byte [eax]
cmp ecx, 0xd
je 0xf02019e
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov cl, byte [eax]
mov byte [edx], cl
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
jmp 0xf020309
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp + 0xc]
lea eax, [edx + ecx - 1]
cmp dword [ebp - 4], eax
jae 0xf0201f4
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx + 1]
cmp edx, 0xa
jne 0xf0201d3
mov eax, dword [ebp - 4]
add eax, 2
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x14]
mov byte [ecx], 0xa
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
jmp 0xf0201ef
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
mov dl, byte [ecx]
mov byte [eax], dl
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
jmp 0xf020309
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
mov dword [ebp - 0x10], 0
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea ecx, [ebp - 5]
push ecx
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov ecx, dword [edx*4 + 0xf207600]
mov edx, dword [ecx + eax*8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0xf02023a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0xf020246
cmp dword [ebp - 0xc], 0
jne 0xf02025a
mov eax, dword [ebp - 0x14]
mov byte [eax], 0xd
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
jmp 0xf020309
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov ecx, dword [edx*4 + 0xf207600]
movsx edx, byte [ecx + eax*8 + 4]
and edx, 0x48
je 0xf0202bc
movsx eax, byte [ebp - 5]
cmp eax, 0xa
jne 0xf020291
mov ecx, dword [ebp - 0x14]
mov byte [ecx], 0xa
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
jmp 0xf0202ba
mov eax, dword [ebp - 0x14]
mov byte [eax], 0xd
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov ecx, dword [edx*4 + 0xf207600]
mov dl, byte [ebp - 5]
mov byte [ecx + eax*8 + 5], dl
jmp 0xf020309
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp + 0xc]
jne 0xf0202de
movsx ecx, byte [ebp - 5]
cmp ecx, 0xa
jne 0xf0202de
mov edx, dword [ebp - 0x14]
mov byte [edx], 0xa
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
jmp 0xf020309
push 1
push 0xffffffffffffffff
mov ecx, dword [ebp + 8]
push ecx
call fcn.0f020850
add esp, 0xc
mov dword [ebp - 0x20], eax
movsx edx, byte [ebp - 5]
cmp edx, 0xa
je 0xf020309
mov eax, dword [ebp - 0x14]
mov byte [eax], 0xd
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
jmp 0xf020104
mov edx, dword [ebp - 0x14]
sub edx, dword [ebp + 0xc]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x18]
mov esp, ebp
pop ebp
ret